Hi,
what is the best way to trigger JSL when I select a data point in Graph Builder?
e.g. to update parts of the Dashboard based on the current selection
There is the Row State Handler.
But this is a property of the data table. So the JSL code will even be triggered after the Dashboard got closed.
So, I would have to take care to remove it afterwards.
I noticed that a Filter Change Handler of a Local Data Filter can act as a row state handler - it will even trigger when the mouse touches a data point.
"Cool" - is this feature "as designed". It seems to be still available in Jmp18 - but I could imagine that it gets disabled at some later point in time:
Improve JMP's state handlers (hover label, row state handler, filter state handler, scheduler, ...)
New window("test", Data Filter Context Box(
V List box(tb = Text Box ("hello"),
H list Box(
ldf = dt << data filter(local),
gb = dt << Graph Builder(
Variables( X( :height ), Y( :weight ), Overlay( :sex ) ),
Elements( Points( X, Y, Legend( 1 ) )) )
)))));
i=1;
f = Function( {a}, Print( tb << set text(Char(i++)) ) );
rs = ldf << Make Filter Change Handler( f );I would say it depends what you wish to do with the data point selection, how many data points (or rather rows) might be selected at the same time and possibly other things.
1pt /row (the script will use the first selected row and neglect further selections)
At the moment we will go for :
- Local Data Filter (just generate it, and hide it)
- Filter Change Handler (to abuse it as local row state handler)
- check if the ROW selection was changed - otherwise do nothing.