interactive plotsDoes anyone have any ideas on how to create interactive reports?
In the report, I want to include graphs with multiple lines in each graph. On the left side of the window, I would like to have a list of the lines. When I click on a line from the list, I want the selected line in the graph to be more prominent, while the remaining lines are faded out.
Data Exploration and VisualizationRe: interactive plotsHaving legend on the left side can be a bit tricky but if right side is fine, basic graph builder should be enough

https://www.jmp.com/support/help/en/18.0/#page/jmp/graph-builder.shtml#
Re: interactive plotsHello! I have used a for loop to create multiple graphs using the graph builder. Now, I would like to group all these graphs onto a single sheet and create an interactive interface for users to interact with all the graphs together. Is there a way to achieve this? Thank you!
Re: interactive plotsIts nice idea to use just the basic graph builder , i just want to put them all together one under the other after i create all of them.
Re: interactive plotsI bit more information is needed. You could for example collect them into V List Box and then display using New Window
Names Default To Here(1);
dt = open("$SAMPLE_DATA/Big Class.jmp");
gb_collector = V List Box();
For(i = 1, i <= 3, i++,
gb_collector << Append(
dt << Graph Builder(
Variables(X(:weight), Y(:height), Overlay(:sex)),
Elements(Points(X, Y, Legend(9)), Line Of Fit(X, Y, Legend(11)))
)
)
);
nw = New Window("",
gb_collector
);
If you are utilizing For loop I assume you are doing scripting. Have you read Scripting Guide (for example https://www.jmp.com/support/help/en/18.0/#page/jmp/examples-of-creating-a-dashboard-from-two-reports.shtml# ).
Re: interactive plotsI would like to combine the tab page box method with the for loop, but it doesn't work.
Here is my part of the script:
New Window("My Dashboard",
H Splitter Box(
Size(1000, 1000),
// Loop for each parameter
For(i = 1, i <= N Items(numPar), i++,
// Column boxes for plots of all batches, actual data, and difference
col1 = Col Box(""),
col2 = Col Box(""),
col3 = Col Box(""),
// Tab Page Box for each parameter
Tab Page Box(
Title(numPar[i] || " vs. Time Point"),
// Create all batches plot
gb = Graph Builder(
Size(500, 500),
Variables(X(:Time Point Months), Y(:Result), Overlay(:Batch)),
Elements(Points(X, Y))
),
// Local filter: set the batch to only the batches that are in cyc with a ref, not all other batches
gb << Local Data Filter(
invisible,
Add Filter(columns(:Component, :Batch, :Source Table),
Where(:Component == numPar[i]),
Where(:Batch == {cyc, bat}),
Where(:Source Table == dt_name)
)
),
dt << Clear Select(),
// Remove the filter display from the graph
gb << Show Control Panel(0),
// Report for changing plot
gbb = Report(gb)[GraphBuilderBox(1)],
// Add linear regression
gbb << Add Element(1, 1, {Type("Line Of Fit"), X, Y, Confidence of Fit(0), Equation(0)}),
// Set Y axis
minval = min(:Result[dt << get rows where(:Component == numPar[i] & :Batch == cyc & :Source Table == dt_name | :Batch == bat & :Component == numPar[i] & :Source Table == dt_name)]) * 0.95,
maxval = max(:Result[dt << get rows where(:Component == numPar[i] & :Batch == cyc & :Source Table == dt_name | :Batch == bat & :Component == numPar[i] & :Source Table == dt_name)]) * 1.05,
maxvalts = max(:Time Point Months[dt << get rows where(:Component == numPar[i] & :Batch == cyc & :Source Table == dt_name | :Batch == bat & :Component == numPar[i] & :Source Table == dt_name)]) * 1.05,
gbb[AxisBox(1)] << min(-0.1),
gbb[AxisBox(1)] << max(maxvalts),
gbb[AxisBox(2)] << min(minval),
gbb[AxisBox(2)] << max(maxval),
gbb[AxisBox(2)] << inc((maxval - minval) / 10),
// Set Y axis label
unitList = Associative Array(:Result Unit[dt << get rows where(:Component == numPar[i] & :Batch == cyc & :Source Table == dt_name | :Batch == bat & :Component == numPar[i] & :Source Table == dt_name)]) << Remove("") << Get Keys,
If(N Items(unitList) == 1,
gbb[Text Edit Box(4)] << Set text(numPar[i] || " [" || unitList[1] || "]")
,
gbb[Text Edit Box(4)] << Set text(numPar[i])
),
// Set graph title
gbb[Text Edit Box(1)] << Set text(numPar[i] || " vs. Time Point"),
// Append
gbba = Report(gb),
col1 << Append(gbba),
<)
)
),
<);
Re: interactive plotsNames Default To Here(1);
dt = open("$SAMPLE_DATA/Big Class.jmp");
gb_collector = Tab Box(<< Set Style("Horizontal Spread"));
For(i = 1, i <= 3, i++,
gb_collector << Add("Title",
dt << Graph Builder(
Variables(X(:weight), Y(:height), Overlay(:sex)),
Elements(Points(X, Y, Legend(9)), Line Of Fit(X, Y, Legend(11)))
)
)
);
nw = New Window("",
gb_collector
);Re: interactive plotsWhat jmp version you have? Does it work in your jmp? Because I don't have the expected output using the above script
Re: interactive plotsI don't know what is your expected output and I do not have your data. The script use Tab Box to collect results from for loop

Re: interactive plotsI have this output when i run the above script . Its not the same as you
Re: interactive plotsThey seem to have changed it in JMP18. In JMP17.2 this seemed to work
Names Default To Here(1);
dt = open("$SAMPLE_DATA/Big Class.jmp");
gb_collector = Tab Box(<< Set Style("Horizontal Spread"));
For(i = 1, i <= 3, i++,
tab = Tab Page Box("",
gb = dt << Graph Builder(
Variables(X(:weight), Y(:height), Overlay(:sex)),
Elements(Points(X, Y, Legend(9)), Line Of Fit(X, Y, Legend(11)))
)
);
tab << Title("Title " || Char(i));
gb << title(Char(i));
gb_collector << Append(tab)
);
nw = New Window("",
gb_collector
);Re: interactive plotsAnother issue I would like to address is when I have a large number of tabs (e.g., 20) with lengthy titles, the graphs become disproportionately large, making it difficult to observe them clearly. I would like to resize the graphs to a smaller scale while retaining the large titles and tabs. Is it possible to position the graph on the left with empty space to the right?
Re: interactive plotsI'm not sure what you mean by "graph on the left with empty space to the right". Create graph manually, resize it a bit, copy script and it will tell you how you can add size to the graph. Tab Box also has overflow and other options which you can find from scripting index

Re: interactive plotsI am trying to figure out if there is any way to place the graphs like in this screenshot. For example, the first graph first, and then the other two together.
Re: interactive plotsYou can combine for example V List Box, H List Box, Tab Box, Tab Page Box in many different ways to get the layout you want.
You can find quite a lot of information from Scripting Guide https://www.jmp.com/support/help/en/18.0/#page/jmp/construct-display-boxes-for-new-windows.shtml
Names Default To Here(1);
dt = open("$SAMPLE_DATA/Big Class.jmp");
gb_expr = Expr(dt << Graph Builder(
Show Control Panel(0),
Variables(X(:weight), Y(:height), Overlay(:sex)),
Elements(Points(X, Y, Legend(9)), Line Of Fit(X, Y, Legend(11)))
));
nw = New Window("",
V List Box(
gb_expr,
H List Box(
gb_expr,
gb_expr
)
)
);Re: interactive plotsNames Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
gb_collector = Tab Box( "Dashboard" );
For( i = 1, i <= 20, i++,
// Column box for plot of all batches
col1 = Col Box( "All Batches" || Char( i ) );
// Create the first Graph Builder plot
gb = Expr(
dt << Graph Builder(
invisible,
Variables( X( :weight ), Y( :height ), Overlay( :sex ) ),
Elements( Points( X, Y, Legend( 9 ) ), Line Of Fit( X, Y, Legend( 11 ) ) )
)
);
col1 << Append( gb );
// Create a column box for the two Graph Builder plots
col2 = Col Box( "Actual Data " || Char( i ) );
// Create and append two Graph Builder plots to col2
For( j = 1, j <= 2, j++,
gbb = Expr(
dt << Graph Builder(
invisible,
Variables( X( :weight ), Y( :height ), Overlay( :sex ) ),
Elements( Points( X, Y, Legend( 9 ) ), Line Of Fit( X, Y, Legend( 11 ) ) )
)
);
col2 << Append( gbb );
);
// Create a tab for col1 and col2 and append it to gb_collector
tab = Tab Page Box( " Something Something ",
V List Box(
col1,
H List Box( col2 ) // Placing the two plots next to each other
)
);
gb_collector << Append( tab );
// Set title for gb
gb << title( "dxfkgbdlk,xfhglihxfd" );
);
gb_collector << Dockable( 1 );
gb_collector << Set Overflow Enabled( 1 );
nw = New Window( "Dashboard",
gb_collector
);
Trying to use the above example in my script . But i don't get any output. Here is my script:
Current Data Table(dt);
dt << New column("Time Point Months", Formula(Round(:Time Point Days/30.438), 2));
gb_collector = Tab Box();
For(i = 1, i <= N Items(numPar), i++,
// Column box for plot of all batches
col1 = Col Box( "" );
// Column box for plot of actual data
col2 = Col Box( "" );
// Column box for plot of difference
col3 = Col Box( "" );
//tab = Tab Page Box("",
gb = dt << Graph Builder(
//invisible,
Size(700, 400),
Variables(X(:Time Point Months), Y(:Result), Overlay(:Batch)),
Elements(Points(X, Y))
);
// Local filter: set the batch to only the batches that are in cyc with a ref, not all other batches
gb << Local Data Filter(
invisible,
Add Filter(columns(:Component, :Batch, :Source Table),
Where(:Component == numPar[i]),
Where(:Batch == {cyc, bat}),
Where(:Source Table == dt_name)
)
);
dt << Clear Select();
// Remove the filter display from the graph
gb << Show Control Panel(0);
// Report for changing plot
gbb = Report(gb)[GraphBuilderBox(1)];
// Add linear regression
gbb << Add Element(1, 1, {Type("Line Of Fit"), X, Y, Confidence of Fit(0), Equation(0)});
// Set Y axis
minval = min(:Result[dt << get rows where(:Component == numPar[i] & :Batch == cyc & :Source Table == dt_name | :Batch == bat & :Component == numPar[i] & :Source Table == dt_name)]) * 0.95;
maxval = max(:Result[dt << get rows where(:Component == numPar[i] & :Batch == cyc & :Source Table == dt_name | :Batch == bat & :Component == numPar[i] & :Source Table == dt_name)]) * 1.05;
maxvalts = max(:Time Point Months[dt << get rows where(:Component == numPar[i] & :Batch == cyc & :Source Table == dt_name | :Batch == bat & :Component == numPar[i] & :Source Table == dt_name)]) * 1.05;
gbb[AxisBox(1)] << min(-0.1);
gbb[AxisBox(1)] << max(maxvalts);
gbb[AxisBox(2)] << min(minval);
gbb[AxisBox(2)] << max(maxval);
gbb[AxisBox(2)] << inc((maxval - minval) / 10);
// Set Y axis label
unitList = Associative Array(:Result Unit[dt << get rows where(:Component == numPar[i] & :Batch == cyc & :Source Table == dt_name | :Batch == bat & :Component == numPar[i] & :Source Table == dt_name)]) << Remove("") << Get Keys;
If(N Items(unitList) == 1,
gbb[Text Edit Box(4)] << Set text(numPar[i] || " [" || unitList[1] || "]")
,
gbb[Text Edit Box(4)] << Set text(numPar[i])
);
// Set graph title
gbb[Text Edit Box(1)] << Set text(numPar[i] || " vs. Time Point");
// Append
//gbba = Report(gb),
col1 << Append(gb);
//filter << close;
gb << close window;
// Within the loop through parameters we are now also looping through batches
For(k = 1, k <= N Items( cyc ), k++,
check = dt << get rows where(:Component == numPar[i] & :Batch == cyc[k] & :Source Table == dt_name | :Batch == bat[k] & :Component == numPar[i] & :Source Table == dt_name);
if(N items(check) > 0, // Create check to see if parameter exist for current batch
// Create base plot
gb = Graph Builder(
//invisible,
Size( 700, 400 ),
Variables( X( :Time Point Months ), Y( :Result ), Overlay( :Batch ) ),
Elements( Points( X, Y), )
);
gb << Local Data Filter(invisible, Add Filter( columns( :Component, :Batch, :Source Table ), Where( :Component == numPar[i] ), Where( :Batch == {cyc[k], bat[k]}), Where( :Source Table == dt_name) ));
dt << Clear Select();
// Remove the filter display from the graph
gb << Show Control Panel( 0 );
// Report for changing plot
gbb = Report( gb )[GraphBuilderBox( 1 )];
// Add liniear regression
gbb << Add Element( 1, 1, {Type( "Line Of Fit" ), X, Y, Confidence of Fit( 0 ),Equation( 0 )} );
// Set Y axis
minval = min(:Result[dt << get rows where(:Component == numPar[i] & :Batch == cyc[k] & :Source Table == dt_name | :Batch == bat[k] & :Component == numPar[i] & :Source Table == dt_name)])*0.95;
maxval = max(:Result[dt << get rows where(:Component == numPar[i] & :Batch == cyc[k] & :Source Table == dt_name| :Batch == bat[k] & :Component == numPar[i] & :Source Table == dt_name)])*1.05;
maxvalts = max(:Time Point Months[dt << get rows where(:Component == numPar[i] & :Batch == cyc[k] & :Source Table == dt_name| :Batch == bat[k] & :Component == numPar[i] & :Source Table == dt_name)])*1.05;
gbb[AxisBox(1)] << min(-0.1);
gbb[AxisBox(1)] << max(maxvalts);
gbb[AxisBox(2)] << min(minval);
gbb[AxisBox(2)] << max(maxval);
gbb[AxisBox(2)] << inc((maxval-minval)/10);
// Set Y axis label
unitList = Associative Array( :Result Unit[dt << get rows where(:Component == numPar[i] & :Batch == cyc[k] & :Source Table == dt_name | :Batch == bat[k] & :Component == numPar[i] & :Source Table == dt_name)] ) << Remove( "" ) << Get Keys;
If( N Items( unitList ) == 1,
gbb[Text Edit Box( 4 )] << Set text( numPar[i] || " [" || unitList[1] || "]" )
);
If( N Items( unitList ) != 1,
gbb[Text Edit Box( 4 )] << Set text( numPar[i] )
);
// Set graph titel
gbb[Text Edit Box( 1 )] << Set text( numPar[i] || " vs. Time Point ");
// Append
//gbba = Report( gbb );
col2 << Append( gbb );
//filter << close;
gb << close window;
// Start second plot
gb2 = Graph Builder(
//invisible,
Size( 700, 400 ),
Variables( X( Time Point Months ), Y( :Difference ), Color( :Batch ) ),
Elements( Points( X, Y) )
);
gb2 << Local Data Filter(invisible, Add Filter( columns( :Component, :Batch, :Source Table ), Where( :Component == numPar[i] ), Where( :Batch == cyc[k]), Where( :Source Table == dt5_name)));
dt4 << Clear Select();
// Remove the filter display from the graph
gb2 << Show Control Panel( 0 );
// Report for changing plot
gbb2 = Report( gb2 )[GraphBuilderBox( 1 )];
gbb2 << Add Element( 1, 1, {Type( "Line" ), X, Y} );
// Get the HC value
l_idx = dt4 << Get rows where(dt4:Component == numPar[i] & :Batch == cyc[k]);
ul = min(dt4:HC[l_idx]);
if(Ismissing(ul),
if(min(:Difference[dt << get rows where(:Component == numPar[i] & :Batch == cyc[k] & :Source Table == dt5_name)]) == 0,
minval = -5;
maxval = 5,
minval = min(:Difference[dt << get rows where(:Component == numPar[i] & :Batch == cyc[k] & :Source Table == dt5_name)])*0.95;
maxval = max(:Difference[dt << get rows where(:Component == numPar[i] & :Batch == cyc[k] & :Source Table == dt5_name)])*1.05;
),
minval = min(:Difference[dt << get rows where(:Component == numPar[i] & :Batch == cyc[k] & :Source Table == dt5_name)],-ul)*1.05;
maxval = max(:Difference[dt << get rows where(:Component == numPar[i] & :Batch == cyc[k] & :Source Table == dt5_name)], ul)*1.05;
);
if(!ismissing(ul), //if no HC value dont create limit line
gbb2[AxisBox(2)] << Add Ref Line(ul,"solid", black, char(round(ul,2)));
gbb2[AxisBox(2)] << Add Ref Line(-ul,"solid", black, char(round(-ul,2)));
);
gbb2[AxisBox(2)] << Add Ref Line(0,"Dashed");
gbb2[AxisBox(2)] << min(minval);
gbb2[AxisBox(2)] << max(maxval);
gbb2[AxisBox(2)] << inc((maxval-minval)/10);
//Append
//gbba2 = Report( gbb2 );
col3 << Append( gbba2 );
//filter << close;
gb2 << close window;
);
);
//);
tab = Tab Page Box(numPar[i],
V List Box(
col1
H List Box( col2,col3 ) // Placing the two plots next to each other
)
);
tab << Title(numPar[i]);
//gb << title(Char(1));
gb_collector << Append(tab);
);
gb_collector << Dockable( 1 );
gb_collector << Set Overflow Enabled( 1 );
nw = New Window("My dashboard",
gb_collector
);
can you please help me find out how to do it?
Re: interactive plotsYou have to take a step back and explain what you want: in best case provide example data or use one of the JMPs sample datasets to explain what you wish to have in the smallest possible example.
Re: interactive plotsNames Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
gb_collector = Tab Box("Dashboard");
For(i = 1, i <= 20, i++,
// Column box for plot of all batches
col1 = Col Box("All Batches" || Char(i));
// Create the first Graph Builder plot
gb = Expr(
dt << Graph Builder(
invisible,
Variables(X(:weight), Y(:height), Overlay(:sex)),
Elements(Points(X, Y, Legend(9)), Line Of Fit(X, Y, Legend(11)))
)
);
col1 << Append(gb);
// Create a column box for the two Graph Builder plots
col2 = Col Box("Actual Data " || Char(i));
// Create and append two Graph Builder plots to col2
For(j = 1, j <= 2, j++,
gbb = Expr(
dt << Graph Builder(
invisible,
Variables(X(:weight), Y(:height), Overlay(:sex)),
Elements(Points(X, Y, Legend(9)), Line Of Fit(X, Y, Legend(11)))
)
);
col2 << Append(gbb);
);
// Create a tab for col1 and col2 and append it to gb_collector
tab = Tab Page Box(
" Something Something ",
V List Box(
col1,
H List Box(col2) // Placing the two plots next to each other
)
);
gb_collector << Append(tab);
// Set title for gb
gb << title("Title");
);
gb_collector << Dockable(1);
gb_collector << Set Overflow Enabled(1);
nw = New Window("Dashboard", gb_collector);
Here is the example that i use and i am trying to follow the same structure in my own script.Re: interactive plotsCurrent Data Table(dt);
dt << New column("Time Point Months", Formula(Round(:Time Point Days/30.438), 2));
gb_collector = Tab Box();
For(i = 1, i <= N Items(numPar), i++,
// Column box for plot of all batches
col1 = Col Box( "" );
// Column box for plot of actual data
col2 = Col Box( "" );
// Column box for plot of difference
col3 = Col Box( "" );
//tab = Tab Page Box("",
gb = dt << Graph Builder(
//invisible,
Size(700, 400),
Variables(X(:Time Point Months), Y(:Result), Overlay(:Batch)),
Elements(Points(X, Y))
);
// Local filter: set the batch to only the batches that are in cyc with a ref, not all other batches
gb << Local Data Filter(
invisible,
Add Filter(columns(:Component, :Batch, :Source Table),
Where(:Component == numPar[i]),
Where(:Batch == {cyc, bat}),
Where(:Source Table == dt_name)
)
);
dt << Clear Select();
// Remove the filter display from the graph
gb << Show Control Panel(0);
// Report for changing plot
gbb = Report(gb)[GraphBuilderBox(1)];
// Add linear regression
gbb << Add Element(1, 1, {Type("Line Of Fit"), X, Y, Confidence of Fit(0), Equation(0)});
// Set Y axis
minval = min(:Result[dt << get rows where(:Component == numPar[i] & :Batch == cyc & :Source Table == dt_name | :Batch == bat & :Component == numPar[i] & :Source Table == dt_name)]) * 0.95;
maxval = max(:Result[dt << get rows where(:Component == numPar[i] & :Batch == cyc & :Source Table == dt_name | :Batch == bat & :Component == numPar[i] & :Source Table == dt_name)]) * 1.05;
maxvalts = max(:Time Point Months[dt << get rows where(:Component == numPar[i] & :Batch == cyc & :Source Table == dt_name | :Batch == bat & :Component == numPar[i] & :Source Table == dt_name)]) * 1.05;
gbb[AxisBox(1)] << min(-0.1);
gbb[AxisBox(1)] << max(maxvalts);
gbb[AxisBox(2)] << min(minval);
gbb[AxisBox(2)] << max(maxval);
gbb[AxisBox(2)] << inc((maxval - minval) / 10);
// Set Y axis label
unitList = Associative Array(:Result Unit[dt << get rows where(:Component == numPar[i] & :Batch == cyc & :Source Table == dt_name | :Batch == bat & :Component == numPar[i] & :Source Table == dt_name)]) << Remove("") << Get Keys;
If(N Items(unitList) == 1,
gbb[Text Edit Box(4)] << Set text(numPar[i] || " [" || unitList[1] || "]")
,
gbb[Text Edit Box(4)] << Set text(numPar[i])
);
// Set graph title
gbb[Text Edit Box(1)] << Set text(numPar[i] || " vs. Time Point");
// Append
//gbba = Report(gb),
col1 << Append(gb);
//filter << close;
gb << close window;
// Within the loop through parameters we are now also looping through batches
For(k = 1, k <= N Items( cyc ), k++,
check = dt << get rows where(:Component == numPar[i] & :Batch == cyc[k] & :Source Table == dt_name | :Batch == bat[k] & :Component == numPar[i] & :Source Table == dt_name);
if(N items(check) > 0, // Create check to see if parameter exist for current batch
// Create base plot
gb = Graph Builder(
//invisible,
Size( 700, 400 ),
Variables( X( :Time Point Months ), Y( :Result ), Overlay( :Batch ) ),
Elements( Points( X, Y), )
);
gb << Local Data Filter(invisible, Add Filter( columns( :Component, :Batch, :Source Table ), Where( :Component == numPar[i] ), Where( :Batch == {cyc[k], bat[k]}), Where( :Source Table == dt_name) ));
dt << Clear Select();
// Remove the filter display from the graph
gb << Show Control Panel( 0 );
// Report for changing plot
gbb = Report( gb )[GraphBuilderBox( 1 )];
// Add liniear regression
gbb << Add Element( 1, 1, {Type( "Line Of Fit" ), X, Y, Confidence of Fit( 0 ),Equation( 0 )} );
// Set Y axis
minval = min(:Result[dt << get rows where(:Component == numPar[i] & :Batch == cyc[k] & :Source Table == dt_name | :Batch == bat[k] & :Component == numPar[i] & :Source Table == dt_name)])*0.95;
maxval = max(:Result[dt << get rows where(:Component == numPar[i] & :Batch == cyc[k] & :Source Table == dt_name| :Batch == bat[k] & :Component == numPar[i] & :Source Table == dt_name)])*1.05;
maxvalts = max(:Time Point Months[dt << get rows where(:Component == numPar[i] & :Batch == cyc[k] & :Source Table == dt_name| :Batch == bat[k] & :Component == numPar[i] & :Source Table == dt_name)])*1.05;
gbb[AxisBox(1)] << min(-0.1);
gbb[AxisBox(1)] << max(maxvalts);
gbb[AxisBox(2)] << min(minval);
gbb[AxisBox(2)] << max(maxval);
gbb[AxisBox(2)] << inc((maxval-minval)/10);
// Set Y axis label
unitList = Associative Array( :Result Unit[dt << get rows where(:Component == numPar[i] & :Batch == cyc[k] & :Source Table == dt_name | :Batch == bat[k] & :Component == numPar[i] & :Source Table == dt_name)] ) << Remove( "" ) << Get Keys;
If( N Items( unitList ) == 1,
gbb[Text Edit Box( 4 )] << Set text( numPar[i] || " [" || unitList[1] || "]" )
);
If( N Items( unitList ) != 1,
gbb[Text Edit Box( 4 )] << Set text( numPar[i] )
);
// Set graph titel
gbb[Text Edit Box( 1 )] << Set text( numPar[i] || " vs. Time Point ");
// Append
//gbba = Report( gbb );
col2 << Append( gbb );
//filter << close;
gb << close window;
// Start second plot
gb2 = Graph Builder(
//invisible,
Size( 700, 400 ),
Variables( X( Time Point Months ), Y( :Difference ), Color( :Batch ) ),
Elements( Points( X, Y) )
);
gb2 << Local Data Filter(invisible, Add Filter( columns( :Component, :Batch, :Source Table ), Where( :Component == numPar[i] ), Where( :Batch == cyc[k]), Where( :Source Table == dt5_name)));
dt4 << Clear Select();
// Remove the filter display from the graph
gb2 << Show Control Panel( 0 );
// Report for changing plot
gbb2 = Report( gb2 )[GraphBuilderBox( 1 )];
gbb2 << Add Element( 1, 1, {Type( "Line" ), X, Y} );
// Get the HC value
l_idx = dt4 << Get rows where(dt4:Component == numPar[i] & :Batch == cyc[k]);
ul = min(dt4:HC[l_idx]);
if(Ismissing(ul),
if(min(:Difference[dt << get rows where(:Component == numPar[i] & :Batch == cyc[k] & :Source Table == dt5_name)]) == 0,
minval = -5;
maxval = 5,
minval = min(:Difference[dt << get rows where(:Component == numPar[i] & :Batch == cyc[k] & :Source Table == dt5_name)])*0.95;
maxval = max(:Difference[dt << get rows where(:Component == numPar[i] & :Batch == cyc[k] & :Source Table == dt5_name)])*1.05;
),
minval = min(:Difference[dt << get rows where(:Component == numPar[i] & :Batch == cyc[k] & :Source Table == dt5_name)],-ul)*1.05;
maxval = max(:Difference[dt << get rows where(:Component == numPar[i] & :Batch == cyc[k] & :Source Table == dt5_name)], ul)*1.05;
);
if(!ismissing(ul), //if no HC value dont create limit line
gbb2[AxisBox(2)] << Add Ref Line(ul,"solid", black, char(round(ul,2)));
gbb2[AxisBox(2)] << Add Ref Line(-ul,"solid", black, char(round(-ul,2)));
);
gbb2[AxisBox(2)] << Add Ref Line(0,"Dashed");
gbb2[AxisBox(2)] << min(minval);
gbb2[AxisBox(2)] << max(maxval);
gbb2[AxisBox(2)] << inc((maxval-minval)/10);
//Append
//gbba2 = Report( gbb2 );
col3 << Append( gbba2 );
//filter << close;
gb2 << close window;
);
);
//);
tab = Tab Page Box(numPar[i],
V List Box(
col1
H List Box( col2,col3 ) // Placing the two plots next to each other
)
);
tab << Title(numPar[i]);
//gb << title(Char(1));
gb_collector << Append(tab);
);
gb_collector << Dockable( 1 );
gb_collector << Set Overflow Enabled( 1 );
nw = New Window("My dashboard",
gb_collector
);
Here is my script..
Attached is a screenshot of my current dashboard, which contains 8 graphs. Here are my specific requirements for organizing these graphs:
- Keep the First Graph: I would like to retain the first graph as it is.
- Remove the Second Graph: The second graph should be removed from the dashboard.
- Pair the Last Six Graphs: The last six graphs should be paired such that each pair is displayed side by side. Specifically, the graphs should be organized as follows:
- The third and fourth graphs should be displayed next to each other.
- The fifth and sixth graphs should be displayed next to each other.
- The seventh and eighth graphs should be displayed next to each other.
To summarize, the final layout should have the first graph followed by three pairs of graphs, with each pair displayed side by side.
Re: interactive plotsThose two scripts are totally different (also please use JSL formatting for JSL code it is much easier to read). What are you using Col Box for? What are you looping over (i and j)? What determines what information each of the graphs contains? Should they be interactive with each other?