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.
...
<body><divid="drawing"style="position: relative; width: 800px; height: 600px;"></div></body><scripttype='module'>import{ openFile, draw }from'https://root.cern/js/latest/modules/main.mjs';letfile=awaitopenFile('https://root.cern/js/files/hsimple.root');letobj=awaitfile.readObject('hpxpy;1');draw('drawing',obj,'colz');</script>
...import{openFile,makeSVG}from'jsroot';import{writeFileSync}from'fs';letfile=awaitopenFile('https://root.cern/js/files/hsimple.root');letobj=awaitfile.readObject('hpxpy;1');letsvg=awaitmakeSVG({object: obj,option: 'lego2,pal50',width: 800,height: 600});writeFileSync('lego2.svg',svg);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



