Subscribe Bookmark RSS Feed

Overlay plot - Selecting a legend entry?

Wondering if something is possible. Given an overlay plot with a legend, is it possible to get the value a selected legend entry? When you select on individual legend entry, the text is bolded and italicized. Is there some way in JSL to get the value of this selection? What I ultimately want to do is allow the user to select the legend entry, and then programmaticly get the value and use this to select all the data in the chart that matches this legend group.

Below is some code that creates some dummy data and an overlay plot. Can someone capture the value of a selected legend entry?

a = new table("test1");
a << Add Multiple Columns("Col",2,First,Numeric);
a << new column("name", char);

a << Add Rows(3);
:col 1[1]=1;
:col 2[1]=3;
:col 1[2]=2;
:col 2[2]=5;
:col 1[3]=3;
:col 2[3]=2;

op=a< X( :col 1 ),
Y( :col 2 ),
Grouping( :name ),
Overlay Groups,
SendToReport( Dispatch( {}, "101", ScaleBox( 2 ), {Interval( "Day" )} ) ));

Sorry. the code got cut off. Here's the rest:
:col 1[1]=1; :col 2[1]=3; :name[1]="A"; :col 1[2]=2; :col 2[2]=5; :name[2]="B"; :col 1[3]=3; :col 2[3]=2; :name[3]="A";op=a<