cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
ErraticAttack
Level VI

GraphBuilder Legend hook

There are many useful instances of being able to have a hook onto the selection state change of a legend for a chart / graph.  With the non graph-builder method of generating charts' and graphs' legends (using Row Legend()), this was quite simple as the display element was simply a Table Box() that can receive a Set Row Change Function() message.  The same cannot be done (to my knowledge) with Graph Builder's Legend Server.  In general I find Graph Builder's legend to be poorly designed when it comes to modifications and hooks (also it swaps the color settings of 2nd and 3rd items).

 

And while a hacky work-around can be to look at the row-states of the underlying table, it does not meet most of the needs for most UI purposes.

 

Is anyone aware of how to get a hook into the Legend Server's selection state, like what is done in the script below for a Row Legend()?

 

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
New Window( "Test",
	olb = Outline Box( "",
		dt << Bivariate( y( :weight ), x( :height ) );
	)
);
olb[Frame Box( 1 )] << Row Legend( "age", color( 1 ), Marker( 1 ) );

olb[Table Box( 1 )] << Set Row Change Function(
	Function( {box},
		show( box << Get Selected Rows )
	)
)

 Thanks!

Jordan
0 REPLIES 0