Hello,
I would like to have a check box object on top of Graph builder view to toggle on/off separation of overlapping points (jitter). I know that this can be done from control panel but from visualization perspective, I want to keep the control panel closed.
Example script below which creates control elements for jitter on top of graph. Despite of my best efforts, I can't get the check box to toggle the jitter; I don't know what is the correct way to send update to report.
I am requesting Your help with the syntax.
Names Default To Here(1);
dt= Open("$SAMPLE_DATA/Big Class.jmp");
gb=Graph Builder(
Show Control Panel( 0 ),
Variables( X( :height ), Y( :weight ) ),
Elements(
Points( X, Y )
)
);
jitter = 1;
jitter_elements=H List Box(
cb=Check Box(
{"Jitter enabled"},
If(cb<<Get()==1,
<FONT color="#FF0000"> gb << SendToReport(Elements(Points(Jitter( "Positive Grid" ), Jitter Limit( jitter )))), // This is not correct but something like this (maybe)
gb << SendToReport(Elements(Points(Jitter( "None" )))) // This is not correct but something like this (maybe)</FONT>
);
),
sb = Slider Box( 0, 2, jitter,
neb << set( jitter );
),
neb = Number Edit Box(jitter,
<<setfunction(
Function( {this},
jitter = this << get;
sb << inval;
)
)
)
);
rgb = Report(gb);
(( rgb[PictureBox(1)] << Parent ) << Child ) << Sib Append (jitter_elements);