JSROOT - render section of canvas instead of the whole thing


I am rendering a canvas in C++ code, writing it to a root file, and then displaying it with JSROOT. There are two objects being draw on the canvas - a TH1D and a TF1. I’m setting the range on the x-axis with TH1D->GetXaxis()->SetRangeUser(). The effects of SetRangeUser() show up if I open a TBrowser with the ROOT prompt but JSROOT ignores it. Am I doing something wrong or does JSROOT not support axis ranges?



Hi Tom,

In general it should work. Like here:


This is histogram from hsimple.C, which I open, call SetRangeUser and store as canvas.

It could be that more complex case is not working.
Could you provide your ROOT file with stored canvas?