JSROOT - render section of canvas instead of the whole thing

Hi!

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?

Best,

Tom

Hi Tom,

In general it should work. Like here:

http://web-docs.gsi.de/~linev/js/dev/index.htm?file=…/files/hsimple1.root&item=Canvas_1;1

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?

Regards,
Sergey