You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/JSROOT.md
+9-1Lines changed: 9 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -46,7 +46,8 @@ To automate files loading and objects drawing, one can provide number of URL par
46
46
- mathjax - use MathJax for latex output
47
47
- latex - 'off', 'symbols', 'normal', 'mathjax', 'alwaysmath' control of TLatex processor
48
48
- style - name of TStyle object to define global JSROOT style
49
-
- toolbar - show canvas tool buttons 'off', 'on' and 'popup'
49
+
- toolbar - show canvas tool buttons 'off', 'on' and 'popup', 'left' or 'right' for position, 'vert' for vertical
50
+
- divsize - fixed size in pixels for main div element like &dvisize=700x400
50
51
51
52
For instance:
52
53
@@ -69,6 +70,8 @@ Following layouts are supported:
69
70
70
71
When specifying `files`, `items` or `opts` parameters, array of strings could be provided like `files=['file1.root','file2.root']`. One could skip quotes when specifying elements names `items=[file1.root/hpx,file2.root/hpy]` or `opts=['',colz]`.
71
72
73
+
As item name, URL to existing image can be provided like `item=img:http://server/image.png`. Such image will be just inserted in the existing layout. One could specify option `"scale"` to automatically scale image to available space.
74
+
72
75
Many examples of URL string usage can be found on [JSROOT examples](https://root.cern/js/latest/api.htm) page.
73
76
74
77
One can very easy integrate JSROOT graphic into arbitrary HTML pages using a __iframe__ tag:
@@ -211,6 +214,10 @@ Like in ROOT, one could configure histogram binning and range directly:
@@ -267,6 +274,7 @@ Following parameters are supported:
267
274
- "htype" - last letter in histogram type like "I", "F", "D", "S", "L", "C"
268
275
- "hbins" - number of bins on each histogram axis
269
276
- "drawopt" - drawing option for produced histogram
277
+
- "graph" - draw into TGraph object
270
278
271
279
Example - [opt=event.fTracks[].fTriggerBits;entries:1000;first:200;maxrange:25](https://root.cern/js/latest/?file=https://root.cern/files/event/event_0.root&item=EventTree&opt=event.fTracks[].fTriggerBits;entries:1000;first:200;maxrange:25)
{name: "Horizontal layout",url: "?file="+filepath+"hsimple.root&layout=horiz32_12&items=[ntuple,ntuple,ntuple,hpx,hpxpy]&opts=[px:py,px:pz,py:pz,hist,lego2]",title: "Display several items in horizontal layout, adjust size ratio"},
150
150
{name: "Inspector",url: "?file="+filepath+"hsimple.root&item=hpx;1&opt=inspect",title: "Show objects data memebers"},
151
151
{name: "Projection",url: "?nobrowser&file="+filepath+"hsimple.root&item=hpxpy;1&opt=col,projx3",title: "Enable X projection with 3 bins"},
152
+
{name: "Images",url: "?path="+filepath+"&layout=grid2x2&file=hsimple.root&items=[hpx;1,hpxpy;1,img:../files/img/ALICE.png,img:../files/img/ATLAS.png]&opts=[hist,colz,scale,center]",title: "Example of adding images from the web server"},
152
153
{name: "Use JSON",url: "?nobrowser&json="+filepath+"danilo6.json",title: "Read and display data from JSON file, produced with TBufferJSON class"},
153
154
{name: "Superimpose",url: "?file="+filepath+"fillrandom.root&item=h1f;1+sqroot;1",title: "Superimpose histogram and function"},
154
155
{name: "Several files",url: "?layout=grid2x2&path="+filepath+"&files=[hsimple.root,graph.root,ct.root]&items=[hsimple.root/[1],graph.root/[11],graph.root/[3],ct.root/[0]]&opts=[lego]",title: "Open several files simultaneusely"},
155
156
{name: "Superimpose 2 files",url: "?files=["+filepath+"hsimple.root,"+filepath+"graph.root]&item=graph.root/Graph;1+hsimple.root/hprof;1",title: "Superimpose items from two different files"},
156
-
{name: "Superimpose 3 files",url: "?path="+filepath+"&files=[temp44.root,temp35.root,temp28.root]&item=temp44.root/Histograms/TDC_C100/Ch1/TDC_C100_Ch1_RisingCalibr;1+temp35.root/_same_+temp28.root/_same_&opt=autocol,nostat&tooltip=2",title: "Superimpose same item from three different files"},
157
+
{name: "Superimpose 3 files",url: "?path="+filepath+"&files=[temp44.root,temp35.root,temp28.root]&item=temp44.root/Histograms/TDC_C100/Ch1/TDC_C100_Ch1_RisingCalibr;1+temp35.root/_same_+temp28.root/_same_&opt=plc,nostat+plc+plc&tooltip=2",title: "Superimpose same item from three different files"},
157
158
{name: "Use autozoom",url: "?layout=grid1x3&path="+filepath+"&files=[temp44.root,temp35.root,temp28.root]&items=[temp44.root/Histograms/TDC_C100/Ch3/TDC_C100_Ch3_RisingRef;1,temp35.root/_same_,temp28.root/_same_]&opts=[autozoom,autozoom,autozoom]",title: "Let display only non-empty bins of the histogram(s)"}
{name: "Zooming",url: "demo/zoom_handler.htm",title: "Redefine Zoom function to make synchronous zooming in other histogram",src: true},
177
179
{name: "User IO",url: "index.htm?file="+filepath+"amore.root&item=moH1F_0;1&load=demo/amore.js",title : "Example of custom streamer and custom draw function (AMORE)",src: "demo/amore.js"},
180
+
{name: "Store JSON",url: "demo/store_json.htm",title: "Store drawn objects into JSON, can be reused to display once again",src: true},
178
181
{name: "Geometry",url: "demo/tgeo_build.htm",title : "Example how one can create three.js model for TGeo object, using JSROOT.GEO.build function",src: "demo/tgeo_build.htm"},
0 commit comments