キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Discussions

Solve problems, and share tips and tricks with other JMP users.
言語を選択 翻訳バーを非表示
lala
Level IX

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))));

2024-07-16_15-26-07.png

1 件の受理された解決策

受理された解決策
jthi
Super User

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
);
-Jarmo

元の投稿で解決策を見る

25件の返信25
lala
Level IX

Re: 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 ) ) )
    )
lala
Level IX

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!

2024-07-16_15-39-23.png

 

jthi
Super User

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
);
-Jarmo
lala
Level IX

Re: How to make multi-row dashboards with JSL?

Thank jthi !

  • Can this name of each window be hidden?

2024-07-16_16-01-32.png

jthi
Super User

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("");
-Jarmo
lala
Level IX

Re: How to make multi-row dashboards with JSL?

  • I still haven't succeeded with the full executable JSL

  • 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() ) );
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("");

lala
Level IX

Re: How to make multi-row dashboards with JSL?

Report(platform)["图形生成器"]

2024-07-16_16-33-47.png

lala
Level IX

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.

2024-07-16_16-39-35.png

jthi
Super User

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).

-Jarmo

おすすめの記事