How to make multi-row dashboards with JSL?I saved the script for manually creating the dashboard to the data table and closed the data table
Reopening the table and executing the script was unsuccessful.
Thanks Experts!
dt=Open("$SAMPLE_DATA/Big Class.jmp");
p1=dt<< Graph Builder(Transform Column("row",Formula(Row())),Size(500,100),Show Control Panel(0),Show Legend(0),Show Title(0),Show Footer(0),Show X Axis(0),Show Y Axis(0),Show X Axis Title(0),Show Y Axis Title(0),Variables(X(:row),Y(:height)),Elements(Line(X,Y,Legend(5))));
p2=dt<< Graph Builder(Transform Column("row",Formula(Row())),Size(500,100),Show Control Panel(0),Show Legend(0),Show Title(0),Show Footer(0),Show X Axis(0),Show Y Axis(0),Show X Axis Title(0),Show Y Axis Title(0),Variables(X(:row),Y(:weight)),Elements(Line(X,Y,Legend(5))));
Basic Data Analysis and ModelingWindowsRe: How to make multi-row dashboards with JSL?This is the saved JSL
Graph Builder(
Size( 401, 40 ),
Show Control Panel( 0 ),
Show Legend( 0 ),
Show Title( 0 ),
Show Footer( 0 ),
Show X Axis( 0 ),
Show Y Axis( 0 ),
Show X Axis Title( 0 ),
Show Y Axis Title( 0 ),
Variables( X( Transform Column( "row", Formula( Row() ) ) ), Y( :weight ) ),
Elements( Line( X, Y, Legend( 5 ) ) )
)
Re: How to make multi-row dashboards with JSL?If my data table has 40 columns and I need to make this form of dashboard, how do I script it
Thanks!

Re: How to make multi-row dashboards with JSL?Is it necessary to use Application Builder? It might be easier to just build new window and append reports to that
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
gb_expr = Expr(dt << Graph Builder(
Transform Column("row", Formula(Row())),
Size(500, 100),
Show Control Panel(0),
Show Legend(0),
Show Title(0),
Show Footer(0),
Show X Axis(0),
Show Y Axis(0),
Show X Axis Title(0),
Show Y Axis Title(0),
Variables(X(:row), Y(:height)),
Elements(Line(X, Y, Legend(5)))
));
lub = Lineup Box(N Col(1));
For(i = 1, i <= 10, i++,
lub << append(gb_expr)
);
nw = new window("",
lub
);Re: How to make multi-row dashboards with JSL?Thank jthi !

Re: How to make multi-row dashboards with JSL?Yes they can. How you might want to do it depends on your application, below is one option using XPath
(nw << XPath("//OutlineBox[text() = 'Graph Builder']")) << Set Title("");Re: How to make multi-row dashboards with JSL?dt = Open("$SAMPLE_DATA/Big Class.jmp");
dt << New Column( "col1", Numeric, Continuous, Set Formula( Col Shuffle() ) );
dt << New Column( "col2", Numeric, Continuous, Set Formula( Col Shuffle() ) );
dt << New Column( "col3", Numeric, Continuous, Set Formula( Col Shuffle() ) );
dt << New Column( "col4", Numeric, Continuous, Set Formula( Col Shuffle() ) );
dt << New Column( "col5", Numeric, Continuous, Set Formula( Col Shuffle() ) );
dt << New Column( "col6", Numeric, Continuous, Set Formula( Col Shuffle() ) );
dt << New Column( "col7", Numeric, Continuous, Set Formula( Col Shuffle() ) );
dt << New Column( "col8", Numeric, Continuous, Set Formula( Col Shuffle() ) );
//??
gb_expr = Expr(dt << Graph Builder(
Transform Column("row", Formula(Row())),
Size(500, 100),
Show Control Panel(0),
Show Legend(0),
Show Title(0),
Show Footer(0),
Show X Axis(0),
Show Y Axis(0),
Show X Axis Title(0),
Show Y Axis Title(0),
Variables(X(:row), Y(:height)),
Elements(Line(X, Y, Legend(5)))
));
lub = Lineup Box(N Col(1));
p2=dt<< Graph Builder(Transform Column("row",Formula(Row())),Size(500,100),Show Control Panel(0),Show Legend(0),Show Title(0),Show Footer(0),Show X Axis(0),Show Y Axis(0),Show X Axis Title(0),Show Y Axis Title(0),Variables(X(:row),Y(:weight)),Elements(Line(X,Y,Legend(5))));
(p2 << XPath("//OutlineBox[text() = '图形生成器']")) << Set Title("");
lub = Lineup Box(N Col(1));
lub << append(gb_expr)
……
nw = new window("",
lub
);
(nw << XPath("//OutlineBox[text() = '图形生成器']")) << Set Title("");
Re: How to make multi-row dashboards with JSL?Report(platform)["Graph Generator"]

Re: How to make multi-row dashboards with JSL?It can be hidden, but how to write multiple columns in JSL is still not successful.

Re: How to make multi-row dashboards with JSL?You have to slow down a little bit, explain what you need in small steps. Currently you are asking for multiple different things which all have different solutions as it seems like the goal is changing all the time just a little (makes providing robust solution very difficult).
Re: How to make multi-row dashboards with JSL?Yes, the expert's code has pretty much done the trick.
You just added the "height" column 10 times to the dashboard.
How do I write code if I want to add a total of 10 columns to the table, one by one, along with the new ones?That's the key.
As for the hidden text is secondary.
Thanks Experts!
Re: How to make multi-row dashboards with JSL?Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
dt << New Column("col1", Numeric, Continuous, Set Formula(Col Shuffle()));
dt << New Column("col2", Numeric, Continuous, Set Formula(Col Shuffle()));
dt << New Column("col3", Numeric, Continuous, Set Formula(Col Shuffle()));
dt << New Column("col4", Numeric, Continuous, Set Formula(Col Shuffle()));
dt << New Column("col5", Numeric, Continuous, Set Formula(Col Shuffle()));
dt << New Column("col6", Numeric, Continuous, Set Formula(Col Shuffle()));
dt << New Column("col7", Numeric, Continuous, Set Formula(Col Shuffle()));
dt << New Column("col8", Numeric, Continuous, Set Formula(Col Shuffle()));
create_report = function({dt, colname}, {Default Local},
gb = dt << Graph Builder(
Transform Column("row", Formula(Row())),
Size(500, 100),
Show Control Panel(0),
Show Legend(0),
Show Title(0),
Show Footer(0),
Show X Axis(0),
Show Y Axis(0),
Show X Axis Title(0),
Show Y Axis Title(0),
Variables(X(:row), Y(Eval(colname))),
Elements(Line(X, Y, Legend(5))),
SendToReport(
Dispatch({}, "Graph Builder", OutlineBox,
{Set Title(""), Image Export Display(Normal)}
)
)
);
return(gb);
);
lub = Lineup Box(N Col(1));
cols = {"col1", "col2", "col3", "col4", "col5", "col6", "col7", "col8"};
For Each({colname}, cols,
lub << Append(create_report(dt, colname));
);
nw = new window("",
lub
);Re: How to make multi-row dashboards with JSL?JSL Making Graphics How do I make column names dynamic and generic?Like this, the number of columns I added and the column names are different
Thanks Experts!
dt = Open("$SAMPLE_DATA/Big Class.jmp");
dt << New Column("col1", Numeric, Continuous, Set Formula(Col Shuffle()));
dt << New Column("col2", Numeric, Continuous, Set Formula(Col Shuffle()));
dt << New Column("col3", Numeric, Continuous, Set Formula(Col Shuffle()));
p1=dt<< Graph Builder(
Size( 534, 648 ),
Show Control Panel( 0 ),
Show Legend( 0 ),
Show Title( 0 ),
Show Footer( 0 ),
Show X Axis( 0 ),
Show Y Axis( 0 ),
Show X Axis Title( 0 ),
Variables(
X( Transform Column( "Row", Formula( Row() ) ) ),
Y( :height ),
Y( :weight ),
Y( :col1 ),
Y( :col2 ),
Y( :col3 ),
Y( :col3 )
),
Elements( Position( 1, 1 ), Bar( X, Y, Legend( 10 ) ) ),
Elements( Position( 1, 2 ), Bar( X, Y, Legend( 9 ) ) ),
Elements( Position( 1, 3 ), Bar( X, Y, Legend( 8 ) ) ),
Elements( Position( 1, 4 ), Bar( X, Y, Legend( 7 ) ) ),
Elements( Position( 1, 5 ), Bar( X, Y, Legend( 6 ) ) ),
Elements( Position( 1, 6 ), Bar( X, Y, Legend( 5 ) ) )
);
Re: How to make multi-row dashboards with JSL?Do you always have the same amount of graphs? If not, then I usually build the expressions separately (Variables() and Elements) and then use Eval(Substitute()) to add them to graph builder expression which I finally evaluate. I know there has been quite a few topics about this as I have replied to those (I just can't find them) but this post by Xan gives the basic idea
Reply All: How to script dynamic content for Graph Builder
Re: How to make multi-row dashboards with JSL?dt = Open("$SAMPLE_DATA/Big Class.jmp");
dt << New Column("col1", Numeric, Continuous, Set Formula(Col Shuffle()));
dt << New Column("col2", Numeric, Continuous, Set Formula(Col Shuffle()));
dt << New Column("col3", Numeric, Continuous, Set Formula(Col Shuffle()));
vars = Expr(Variables(X(Transform Column("Row", Formula(Row())))));
points = Expr(Line(X, Y, Legend(5)));
起 = 4;止 = 8;
For(i = 起, i <= 止, i++,
Insert Into(vars, Eval Expr(Y(Expr(Column(dt, i)), Position(1))));
Insert Into( points, Eval Expr( Y( Expr( i - 起 + 1 ) ) ), i - 起 );
);
gb = Eval Expr(
Graph Builder(
Size(534, 648),
Show Control Panel(0),
Show Legend(0),
Show Title(0),
Show Footer(0),
Show X Axis(0),
Show Y Axis(0),
Show X Axis Title(0),
Expr(Name Expr(vars)),
points(Expr(Name Expr(points)))
)
);
gb;I just so
Thanks Experts!
Re: How to make multi-row dashboards with JSL?I tried to write it yesterday, but it still didn't work.
The problem with this code is the variable "two."
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt << New Column( "col1", Numeric, Continuous, Set Formula( Col Shuffle() ) );
dt << New Column( "col2", Numeric, Continuous, Set Formula( Col Shuffle() ) );
dt << New Column( "col3", Numeric, Continuous, Set Formula( Col Shuffle() ) );
m1 = 1; m2 = 180; m0 = 10;
one=Expr(Variables( X( Transform Column( "Row", Formula( Row() ))) , Y( :height ) ));two=Expr(Elements( Position( 1, 1 ), Bar( X, Y, Legend( 5 ) ) ) );thr=Expr( Dispatch( {}, "height", ScaleBox, {Min( m1 ), Max( m2 ), Inc( m0 ), Minor Ticks( 1 )} ));
first co = 5;last col = 8;
For( i = first co, i <= last col, i++,
Insert Into( one, Eval Expr( Y( Expr( Column( dt, i ) ) ) ) );
Insert Into( two, Eval Expr(Elements( Position( 1, Expr(i-3 )), Bar( X, Y, Legend( Expr(1+i )) ) ) ));
Insert Into( thr, Eval Expr( Dispatch( {}, Column(Expr(i))<<GET name=""></GET>
Re: How to make multi-row dashboards with JSL?OK
Save the drawing code as a separate JSL
So it's easy to combine.
tx1 = "";
tx2 = "";
tx3 = "SendToReport(";
For( i = first co, i <= last col, i++,
//……
);
txt =
"nw=dt<< Graph Builder(Size(554,1654),Show Control Panel(0),Show Legend(0),Show Title(0),Show Footer(0),Show X Axis(0),Show Y Axis(0),Show X Axis Title(0),Variables(X(:分)"
|| tx1 || ")" || tx2 || "\!n," || tx3 ||
"));(nw << XPath(\!"//OutlineBox[text() = '图形生成器']\!")) << Set Title(\!"\!");nw<<SET window="" size=""></SET>Re: How to make multi-row dashboards with JSL?Scripting Index as examples of both Add Variable and Add Element
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
dt << New Column("col1", Numeric, Continuous, Set Formula(Col Shuffle()));
dt << New Column("col2", Numeric, Continuous, Set Formula(Col Shuffle()));
dt << New Column("col3", Numeric, Continuous, Set Formula(Col Shuffle()));
gb = dt << Graph Builder(
Size(534, 648),
Show Control Panel(0),
Show Legend(0),
Show Title(0),
Show Footer(0),
Show X Axis(0),
Show Y Axis(0),
Show X Axis Title(0),
Variables(
X(Transform Column("Row", Formula(Row()))),
Y(:height),
Y(:weight)
),
Elements(Position(1, 1), Bar(X, Y, Legend(10))),
Elements(Position(1, 2), Bar(X, Y, Legend(9)))
);
cols = {"col1", "col2", "col3", "col3"};
For Each({colname, idx}, cols,
gb << Add Variable({Eval(colname), Role("Y")});
// Either add both of these or neither
gb << Remove Element(1, 2 + idx, 1);
gb << Add Element(1, 2 + idx, {Type("Bar"), X, Y, Legend(9-idx)});
);
</CODE>Sometimes you have to check the graph builder script to see how it is being built. In this case due to Legend being starting from 10, you either have to first remove element and then add it back OR just let JMP take care of them (so leave out << Remove Element and << Add Element)</P>
<P><SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_0-1721456186653.png" style="width: 400px;"><SPAN class="lia-inline-image-display-wrapper" image-alt="jthi_0-1721456186653.png" style="width: 267px;"><SPAN class="lia-inline-image-display-wrapper" image-alt="jthi_0-1721456186653.png" style="width: 267px;"><SPAN class="lia-inline-image-display-wrapper" image-alt="jthi_0-1721456186653.png" style="width: 267px;"><SPAN class="lia-inline-image-display-wrapper" image-alt="jthi_0-1721456186653.png" style="width: 267px;"><SPAN class="lia-inline-image-display-wrapper" image-alt="jthi_0-1721456186653.png" style="width: 267px;"><SPAN class="lia-inline-image-display-wrapper" image-alt="jthi_0-1721456186653.png" style="width: 267px;"><SPAN class="lia-inline-image-display-wrapper" image-alt="jthi_0-1721456186653.png" style="width: 267px;"><SPAN class="lia-inline-image-display-wrapper" image-alt="jthi_0-1721456186653.png" style="width: 267px;"><SPAN class="lia-inline-image-display-wrapper" image-alt="jthi_0-1721456186653.png" style="width: 267px;"><span class="lia-inline-image-display-wrapper" image-alt="jthi_0-1721456186653.png" style="width: 267px;"><img src="https://us.v-cdn.net/6038925/uploads/images/66331i8F2B15E24DF276BB/jthi_0-1721456186653.png" role="button" title="jthi_0-1721456186653.png" alt="jthi_0-1721456186653.png" /></span></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></P>
<PRE><CODE class=" language-jsl">Graph Builder(
Transform Column("Row", Formula(Row())),
Size(534, 648),
Show Control Panel(0),
Show Legend(0),
Show Title(0),
Show Footer(0),
Show X Axis(0),
Show Y Axis(0),
Show X Axis Title(0),
Variables(
X(:Row),
Y(:height),
Y(:weight),
Y(:col1),
Y(:col2),
Y(:col3),
Y(:col3)
),
Elements(Position(1, 1), Bar(X, Y, Legend(10))),
Elements(Position(1, 2), Bar(X, Y, Legend(9))),
Elements(Position(1, 3), Bar(X, Y, Legend(8))),
Elements(Position(1, 4), Bar(X, Y, Legend(7))),
Elements(Position(1, 5), Bar(X, Y, Legend(6))),
Elements(Position(1, 6), Bar(X, Y, Legend(5)))
);
Re: How to make multi-row dashboards with JSL?Thanks Experts!
I set more conditions in the actual application.
Like this form.I still don't know how to add multiple columns after the fact
ca = "row";dt = New Table( "test", Add Rows( 40 ), New Column( ca, Character, "Nominal" ) );
Column( ca ) << Formula( Char( Row() ) );dt << run formulas;Column( ca ) << deleteFormula;
na = {"A", "B", "C", "D", "E"};
j = 1;
For( j = 1, j <= N Items( na ), j++,
i = 1;
For( i = 1, i <= 4, i++,
ca = na[j] || Char( i ); New Column( ca );
Column( ca ) << Formula( If( i == 1, Random Integer( -100, 100 ), Random Integer( 30 * i, 50 * i ) ) );
dt << run formulas; Column( ca ) << deleteFormula; Column( ca ) << Set Display Width( 38 );
);
);
p1=dt<<GRAPH builder=""></GRAPH>
Illustration:
A1-A4 is a group of the same letters, are listed as a group of 4, move A2-A4 to the right of the Y axis to form a line graph;A1 is the bar chart,
The color of the bar is variable, but the color of the line on the right is fixed by number (the same color as the line with different letter groups of the number).
The graphics are set to transparency.The right Y-axis title is also hidden.
So there's a lot more code for mapping.I don't know how to batch them.
Thanks!

Re: How to make multi-row dashboards with JSL?If the number of series in the graph is more than 200, I do not know how it changes

Re: How to make multi-row dashboards with JSL?Utilizing Stacked Data table makes creating something like this easier

Re: How to make multi-row dashboards with JSL?I tried, but couldn't figure out how to stack it.
Ask an expert for instructions.
Thank you very much!
Re: How to make multi-row dashboards with JSL?Use Multiple series stack

Then create grouping column from one of the label columns, rename columns as needed, remove as needed and create a plot
Re: How to make multi-row dashboards with JSL?OK、I see
Thank jthi !
Re: How to make multi-row dashboards with JSL?This creation of graph groups seems to be the default setting for many systems.
For example, the label column in this graph is the default sort
Do I want the graph to be sorted by the label of the original data table and can only be numbered in the label column of the data table?For example, the labels in the data table are sorted by C, D, A, B, E, and the graphs are also sorted by this, which can only be modified in the data table to :1C, 2D, 3A, 4B, 5E.
Setting transparency is also ineffective.
Thanks!

Re: How to make multi-row dashboards with JSL?Use Value Order column property for the ordering.