Hi! I have this MWE:
Summary
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Test</title>
</head>
<body>
<div id="drawing" style="width:800px; height:600px"></div>
</body>
<script type='module'>
import { openFile, draw, create, createTGraph, createHistogram } from 'https://root.cern/js/7.5.2/modules/main.mjs';
function CreateLegendEntry(obj, lbl, opt) {
let entry = create('TLegendEntry');
entry.fObject = obj;
entry.fLabel = lbl;
entry.fOption = opt;
return entry;
}
let file0 = await openFile("https://root.cern/js/files/hsimple.root");
let file1 = await openFile("https://root.cern/js/files/fillrandom.root");
let h__file0 = await file0.readObject("hpx");
let h__file1 = await file1.readObject("h1f");
h__file0.fLineColor = 1;
h__file1.fLineColor = 2;
h__file0.fLineWidth = 4;
h__file1.fLineWidth = 4;
const npoints = 5;
let xpts=[-5, -2, 0, 2, 5];
let ypts=[20, 50, 100, 45, 15];
let exp_data = createTGraph(npoints, xpts, ypts);
exp_data.fMarkerSize = 1.5;
exp_data.fMarkerStyle = 20;
let h1 = createHistogram('TH1I', 20);
h1.fName = 'axis_draw';
h1.fTitle = "Title";
h1.fXaxis.fTitle = "Xaxis";
h1.fYaxis.fTitle = "Yaxis";
h1.fYaxis.fXmin = 0;
h1.fYaxis.fXmax = 150;
h1.fXaxis.fXmin = -10;
h1.fXaxis.fXmax = 10;
draw("drawing", h1, "NOSTAT");
draw("drawing", h__file0, "C same");
draw("drawing", h__file1, "C same");
draw("drawing", exp_data, "P");
let leg = create('TLegend');
Object.assign(leg, { fX1NDC: 0.2, fY1NDC: 0.75, fX2NDC: 0.6, fY2NDC: 0.9 });
leg.fPrimitives.Add(CreateLegendEntry(h__file0, 'hpx', 'L'));
leg.fPrimitives.Add(CreateLegendEntry(h__file1, 'h1f', 'L'));
leg.fPrimitives.Add(CreateLegendEntry(exp_data, 'data', 'P'));
draw("drawing", leg);
</script>
</html>
This is how it renders in Safari:
And this is in Firefox:
So, how to ask JSROOT to always make the same results?