JSROOT Multigraph Dragging Around Plots

Hi,

I have a quick question about some JSROOT TMultigraph functionality.

As one can see here https://root.cern.ch/js/latest/api.htm#custom_html_tmultigraph when using a JSROOT TMultiGraph, one can hover the mouse near the lines or points being plotted, a fist will appear, and the user will be able to move the points or line around on the canvas.

I often find myself accidentally moving the lines around on my plots and having to refresh my page to remake them in the correct location. It would be great to be able to disable that when making the Multigraph. Is there an option to be able to do this?

Thank you.

I think @linev can help you.

Hi,

This is default behavior of ROOT that any TGraph object is editable. You can disable it, setting kNotEditable (or BIT(18)) for the objects. If you create TGraph objects in the JSROOT, just call
graph.InvertBit(JSROOT.BIT(18))

Regards,
Sergey

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.