jsroot v7.8.1
JavaScript ROOT
JavaScript ROOT provides interactive ROOT-like graphics in the web browsers and in node.js
.
Data can be read and displayed from ROOT binary and JSON files.
JSROOT
implements user interface for THttpServer class.
Examples
In web browser
...
<body>
<div id="drawing" style="position: relative; width: 800px; height: 600px;"></div>
</body>
<script type='module'>
import { openFile, draw } from 'https://root.cern/js/latest/modules/main.mjs';
let file = await openFile('https://root.cern/js/files/hsimple.root');
let obj = await file.readObject('hpxpy;1');
draw('drawing', obj, 'colz');
</script>
...
In node.js
import { openFile, makeSVG } from 'jsroot';
import { writeFileSync } from 'fs';
let file = await openFile('https://root.cern/js/files/hsimple.root');
let obj = await file.readObject('hpxpy;1');
let svg = await makeSVG({ object: obj, option: 'lego2,pal50', width: 800, height: 600 });
writeFileSync('lego2.svg', svg);
More examples
Install
npm install jsroot
For 3D rendering jsroot uses gl package which may have problems
during installation. To use jsroot without gl
one can omit development packages:
npm install jsroot --omit=dev
Documentation
Links
7 months ago
5 months ago
8 months ago
9 months ago
1 year ago
1 year ago
10 months ago
12 months ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
4 years ago
3 years ago
3 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
5 years ago
5 years ago
5 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago