如何使用 JSL 制作多行仪表板?我将手动创建仪表板的脚本保存到数据表并关闭了数据表
重新打开表并执行脚本失败。
谢谢专家!
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))));
基础数据分析与建模视窗回复:如何使用 JSL 制作多行仪表板?这是已保存的 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 ) ) )
)
回复:如何使用 JSL 制作多行仪表板?如果我的数据表有 40 列,并且我需要制作这种形式的仪表板,我该如何编写脚本
谢谢!

回复:如何使用 JSL 制作多行仪表板?是否有必要使用应用程序生成器?可能只需创建新窗口并向其附加报告即可
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
);回复:如何使用 JSL 制作多行仪表板?谢谢 jthi!

回复:如何使用 JSL 制作多行仪表板?是的,可以。具体怎么做取决于你的应用程序,下面是使用 XPath 的一个选项
(nw << XPath("//OutlineBox[text() = 'Graph Builder']")) << Set Title("");回复:如何使用 JSL 制作多行仪表板?dt = 打开(“$SAMPLE_DATA/Big Class.jmp”);
dt << 新列(“col1”,数字,连续,设置公式(Col Shuffle()));
dt << 新列(“col2”,数字,连续,设置公式(Col Shuffle()));
dt << 新列(“col3”,数字,连续,设置公式(Col Shuffle()));
dt << 新列(“col4”,数字,连续,设置公式(Col Shuffle()));
dt << 新列(“col5”,数字,连续,设置公式(Col Shuffle()));
dt << 新列(“col6”,数字,连续,设置公式(Col Shuffle()));
dt << 新列(“col7”,数字,连续,设置公式(Col Shuffle()));
dt << 新列(“col8”,数字,连续,设置公式(Col Shuffle()));
//??
gb_expr = Expr(dt << 图形生成器(
变换列(“row”, 公式(Row())),
尺寸(500,100),
显示控制面板(0),
显示图例(0),
显示标题(0),
显示页脚(0),
显示 X 轴(0),
显示 Y 轴(0),
显示 X 轴标题(0),
显示 Y 轴标题(0),
变量(X(:行),Y(:高度)),
元素(线(X,Y,图例(5)))
));
lub = 阵容框(N Col(1));
p2=dt<< 图形生成器(转换列(“row”,公式(Row())),大小(500,100),显示控制面板(0),显示图例(0),显示标题(0),显示页脚(0),显示 X 轴(0),显示 Y 轴(0),显示 X 轴标题(0),显示 Y 轴标题(0),变量(X(:row),Y(:weight)),元素(线(X,Y,图例(5))));
(p2 << XPath("//OutlineBox[text() = '图形生成器']")) << 设置标题("");
lub = 阵容框(N Col(1));
lub << 附加 (gb_expr)
……
nw = 新窗口(“”,
卢布
(英文):
(nw << XPath("//OutlineBox[text() = '图形生成器']")) << Set Title("");
Re: How to make multi-row dashboards with JSL?Report(platform)["图形生成器"]

回复:如何使用 JSL 制作多行仪表板?可以隐藏,但是JSL中如何写多列还是没成功。

回复:如何使用 JSL 制作多行仪表板?你必须放慢一点速度,一点一点地解释你的需求。目前,你要求的是多个不同的东西,而这些东西都有不同的解决方案,因为目标似乎一直在变化(这使得提供可靠的解决方案非常困难)。
回复:如何使用 JSL 制作多行仪表板?是的,专家的代码基本上已经发挥了作用。
您刚刚将“高度”列 10 次添加到仪表板。
如果我想将总共 10 列以及新列一一添加到表中,我该如何编写代码?这就是关键。
至于隐藏的文字则是次要的。
谢谢专家!
回复:如何使用 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
);回复:如何使用 JSL 制作多行仪表板?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()));
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 ) ) )
);
回复:如何使用 JSL 制作多行仪表板?您的图表数量是否始终相同?如果不是,那么我通常会分别构建表达式(Variables() 和 Elements),然后使用 Eval(Substitute()) 将它们添加到我最终评估的图表构建器表达式中。我知道关于这个话题已经有很多了,因为我已经回复过这些话题(我只是找不到它们),但 Xan 的这篇文章给出了基本的想法
回复全部:如何为 Graph Builder 编写动态内容脚本
回复:如何使用 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;我就是
谢谢专家!
回复:如何使用 JSL 制作多行仪表板?我昨天尝试写了一下,但还是不行。
这段代码的问题在于变量“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><SPAN class=""><SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2024-07-18_17-44-45.png" style="width: 253px;"><SPAN class="lia-inline-image-display-wrapper" image-alt="2024-07-18_17-44-45.png" style="width: 253px;"><SPAN class="lia-inline-image-display-wrapper" image-alt="2024-07-18_17-44-45.png" style="width: 253px;"><SPAN class="lia-inline-image-display-wrapper" image-alt="2024-07-18_17-44-45.png" style="width: 253px;"><SPAN class="lia-inline-image-display-wrapper" image-alt="2024-07-18_17-44-45.png" style="width: 253px;"><SPAN class="lia-inline-image-display-wrapper" image-alt="2024-07-18_17-44-45.png" style="width: 253px;"><SPAN class="lia-inline-image-display-wrapper" image-alt="2024-07-18_17-44-45.png" style="width: 253px;"><SPAN class="lia-inline-image-display-wrapper" image-alt="2024-07-18_17-44-45.png" style="width: 253px;"><SPAN class="lia-inline-image-display-wrapper" image-alt="2024-07-18_17-44-45.png" style="width: 253px;"><SPAN class="lia-inline-image-display-wrapper" image-alt="2024-07-18_17-44-45.png" style="width: 253px;"><SPAN class="lia-inline-image-display-wrapper" image-alt="2024-07-18_17-44-45.png" style="width: 253px;"><SPAN class="lia-inline-image-display-wrapper" image-alt="2024-07-18_17-44-45.png" style="width: 253px;"><span class="lia-inline-image-display-wrapper" image-alt="2024-07-18_17-44-45.png" style="width: 253px;"><img src="https://us.v-cdn.net/6038925/uploads/images/66319i838261FBE3A3DA44/2024-07-18_17-44-45.png" role="button" title="2024-07-18_17-44-45.png" alt="2024-07-18_17-44-45.png" /></span></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN>
回复:如何使用 JSL 制作多行仪表板?好的
将绘图代码保存为单独的 JSL
所以很容易结合。
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>回复:如何使用 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()));
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)))
);
回复:如何使用 JSL 制作多行仪表板?谢谢专家!
我在实际应用中设定了更多的条件。
喜欢这个表格。我仍然不知道如何在事后添加多列
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><BR />Illustration:<BR />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,<BR />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).<BR />The graphics are set to transparency.The right Y-axis title is also hidden.<BR />So there's a lot more code for mapping.I don't know how to batch them.
Thanks!
<SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2024-07-22_16-07-12.png" style="width: 999px;"><SPAN class="lia-inline-image-display-wrapper" image-alt="2024-07-22_16-07-12.png" style="width: 999px;"><SPAN class="lia-inline-image-display-wrapper" image-alt="2024-07-22_16-07-12.png" style="width: 999px;"><SPAN class="lia-inline-image-display-wrapper" image-alt="2024-07-22_16-07-12.png" style="width: 999px;"><SPAN class="lia-inline-image-display-wrapper" image-alt="2024-07-22_16-07-12.png" style="width: 999px;"><SPAN class="lia-inline-image-display-wrapper" image-alt="2024-07-22_16-07-12.png" style="width: 999px;"><SPAN class="lia-inline-image-display-wrapper" image-alt="2024-07-22_16-07-12.png" style="width: 999px;"><SPAN class="lia-inline-image-display-wrapper" image-alt="2024-07-22_16-07-12.png" style="width: 999px;"><SPAN class="lia-inline-image-display-wrapper" image-alt="2024-07-22_16-07-12.png" style="width: 999px;"><span class="lia-inline-image-display-wrapper" image-alt="2024-07-22_16-07-12.png" style="width: 999px;"><img src="https://us.v-cdn.net/6038925/uploads/images/66366iA37DF0093E9320C8/2024-07-22_16-07-12.png" role="button" title="2024-07-22_16-07-12.png" alt="2024-07-22_16-07-12.png" /></span></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN>
回复:如何使用 JSL 制作多行仪表板?如果图表中的系列数量超过 200,我不知道它会如何变化

回复:如何使用 JSL 制作多行仪表板?利用堆叠数据表可以更轻松地创建此类内容

回复:如何使用 JSL 制作多行仪表板?我尝试过,但不知道如何堆叠它。
向专家寻求指导。
非常感谢!
回复:如何使用 JSL 制作多行仪表板?使用多系列堆栈

然后从其中一个标签列创建分组列,根据需要重命名列,根据需要删除并创建一个图
回复:如何使用 JSL 制作多行仪表板?好的我明白了
谢谢 jthi!
回复:如何使用 JSL 制作多行仪表板?图形组的创建似乎是许多系统的默认设置。
例如,此图中的标签列是默认排序
我是否希望图表按照原始数据表的标签排序,并且只能在数据表的标签列中编号?比如数据表中的标签是按照C,D,A,B,E排序的,图形也是以此排序的,只能在数据表中修改为:1C,2D,3A,4B,5E。
设置透明度也是无效的。
谢谢!

回复:如何使用 JSL 制作多行仪表板?使用“值顺序”列属性进行排序。