Bonjour, j'essayais d'automatiser l'étape d'exportation en utilisant JSL, j'utilise la fonction Enregistrer la présentation mais je n'ai pas réussi à la faire fonctionner. Le fichier .png est créé sur mon ordinateur mais il ne peut pas être ouvert en raison d'un « type de fichier non pris en charge ». Je crois comprendre que la fonction Enregistrer la présentation n'a pas converti le fichier Graph Builder en fichier PNG avant de l'enregistrer en tant que fichier .jpg. Y'a t'il un moyen d'arranger cela? Merci!
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()
);
J'ai compris que je devrais utiliser la fonction "enregistrer l'image", c'est résolu maintenant.