Graphbuilder and cross-selectionHey,
i have a fairly large data table similar to this format:

from which we create a set of graph builders to be to visualize different assay types and assays next to each other, sort of like this (one assay type to the right with assays as pages and batches as overlay, and then the other assay type on the right but the same setup):

We'd like to select the batches in one graph and have then highlighted in the others, but since the selection happens on the rows they will of course not highlight.
I wanted to put in a small script to force the two graphbuilders to select all batches existing in the selection, but i am not able to make it work. I am not able to find the right function to set against the graphbuilder to capture such an event.
I have a small script like this will select all rows associated with the selected rows:
batches = AssociativeArray(:Batch[dt << get selected rows])<< Get Keys;
dt << Select Where( Contains( batches, :Batch ) );
Is there a function i can set against the graphbuilder that will trigger this script against a selection change?
Or are there better was to achieve what we are looking for here?
(We do also get into troubles when we want to change the colors of some batches and have it reflect across all graphs since we have the batchid as overlay. I think i can script my way out of that as well if i can just find the right triggers).
I've been looking through the scripting index for all kinds of functions to set but they do not seem to have an effect against the graph builder but they do not fail either.
I am on JMP 17.1 for MacOS (14.3.1).
Thanks in advance,
Daniel
Automation and ScriptingData Exploration and VisualizationRe: Multiple Graph-builders and cross-selectionThere aren't really any easy options of doing this outside of using a button. You might be able to use duplicate tables and row state handlers but I would suggest doing this, as Row State Handler is very buggy in JMP
Names Default To Here(1);
dt = open("$SAMPLE_DATA/Big Class.jmp");
dt2 = dt << Subset(All Rows, Selected Columns(0), private);
f = Function({a},
selages = dt[a, "age"];
rowstoselect = dt2 << Get Rows Where(Contains(selages, :age));
rowstates = J(1, N Rows(dt2), 0);
rowstates[rowstoselect] = 1;
dt2 << Set Row States(rowstates);
);
rs = dt << make row state handler(f);
nw = New Window("",
H List Box(
gb = dt << Graph Builder(
Size(525, 490),
Show Control Panel(0),
Variables(X(:age), Y(:height), Group X(:sex)),
Elements(Bar(X, Y, Legend(12)))
),
gb2 = dt2 << Graph Builder(
Size(525, 448),
Show Control Panel(0),
Variables(X(:age), Y(:height)),
Elements(Bar(X, Y, Legend(4))),
SendToReport(
Dispatch(
{},
"Graph Builder",
FrameBox,
{Fill Selection Mode("Selected Outlined")}
)
)
)
)
);
I will create wish list item regarding this type of cases but until that here is wish list item in hopes that JMP will improve different handlers we have
Improve JMP's state handlers (hover label, row state handler, filter state handler, scheduler, ...)
Re: Multiple Graph-builders and cross-selectionThanks for the reply Jarmo!
I'll have a look at it and if it acts out i will just revert to making a button instead.
It is not pretty but i guess it will work at least 
Thanks again,
Daniel