您好,我嘗試使用 JSL 自動執行匯出步驟,我正在使用「儲存簡報」功能,但無法使其工作。 .png 檔案在我的電腦上創建,但由於「檔案類型不受支援」而無法開啟。我的理解是,儲存簡報功能在儲存為 .jpg 檔案之前沒有將圖形產生器檔案轉換為 PNG 檔案。有沒有辦法解決這個問題?謝謝!
Names Default To Here(1);
MyGraph = Function({yCol}, {default local},
vars = Eval Expr(Variables(
X(:Test Stage),
Group X(:Temperature)
));
pts = Expr(Box Plot(X));
For(j = 1, j <= Min(8, N Items(yCol)), j++,
Insert Into(vars, Eval Expr(Y(Expr(yCol[j]),Position( 1 ))));
);
gb = Expr(
Graph Builder(
Size(1255, 981),
Show Control Panel(0),
// Variables section will be inserted here
Elements(Box Plot(X, Y(1), Y(2), Y(3), Y(4), Y(5), Y(6), Y(7), Y(8))),
Local Data Filter(
Add Filter(
columns(:Test Stage, :Sublot, :Temperature, :Soft Bin),
Display(:Test Stage, N Items(4)),
Display(:Soft Bin, N Items(15))
)
)
)
);
Insert Into(gb, Name Expr(vars));
// Save graph to a PNG file
png_path = "box_plots.png";
gb << Save Presentation("boxplot.png");
Return(gb);
);
dt = Current Data Table();
graph = MyGraph(::yColName);
New Window("My report",
VListBox(
graph,
HCenter Box(
btn = Button Box("show distribution")
)
)
);
btn << setScript(
My Histograms()
);
我發現我應該使用“儲存圖片”功能,現在已經解決了。