I am finding that JSROOT ignores the y-axis Ndivisions and SetRangeUser when it loads and displays graphs stored in a root file. Is there a way for me to change that? (I can set the range again in JSROOT using object.fHistogram.fMaximum & fMinimum).
Edit: Next, I found that I can also set the Ndivisions in JSROOT using object.fHistogram.fYaxis.fNdivisions.
The problem was that the y-axis user range (and Ndivisions) stored in the graph in the .root file were ignored when JSROOT drew the graph on my website, it used its defaults. After I wrote my question, I found how to set these again in JSROOT, so I have a workaround.
Iβll attach one graph that showed this problem when viewed online, its values are all 1 but its possible values are -1,0,1, so I wanted to set the y-axis to show all three as itβs then easier to compare with earlier versions.
In your file histogram associated with TGraph has fMinimum/fMaximum values set.
They are -1.4 and 1.4 respectively. So these values overrule all other Y axis settings.
Sorry. I had confused it with a TMultiGraph that I built in JSROOT. The graphs (as in my example file) do load perfectly, but I had combined several into a multigraph which used default axis values until I worked out how to set them properly for myself. So my original complaint was wrong and everything is fine.
It did take me a while to find out how to set the axis settings, so maybe that info will help someone else.
One must be careful when building TMultiGraph object.
In JSROOT set gr.fHistogram = null for all used graphs or gr->SetHistogram(nullptr); in the ROOT. Otherwise graph settings may conflict with settings in TMultiGraph.