如何用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 = Open("$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 << 圖形產生器(
轉換列(“行”,公式(行())),
尺寸(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<< 圖形產生器(轉換列(“行”,公式(行())),大小(500,100),顯示控制面板(0),顯示圖例(0),顯示標題(0),顯示頁腳(0),顯示X軸(0),顯示Y軸(0),顯示X軸標題(0),顯示Y軸標題(0),變數(X(:行),Y(:權重)),元素(線(X,Y,圖例(5))));
(p2 << XPath("//OutlineBox[text() = '圖形產生器']")) << 設定標題("");
lub = 陣容框(N Col(1));
lub << 追加(gb_expr)
……
nw = 新視窗("",
盧布
);
(nw << XPath("//OutlineBox[text() = '圖形產生器']")) << Set Title("");
回覆:如何使用 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 的這篇文章給出了基本想法
回覆全部:如何為圖形產生器編寫動態內容腳本
回覆:如何使用 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 製作多行儀表板?使用“值順序”列屬性進行排序。