react-jsroot
Create app using CRA
Info: https://github.com/facebookincubator/create-react-app
Install pacakge
Install @obl/react-jsroot
npm install --save @obl/react-jsroot
or
yarn add @obl/react-jsroot
Example usage for your project
Note that example is located at
src/demo/App.js
JSRootExample
import React from 'react';
import {JSRootExample} from "@obl/react-jsroot";
const App = () => (
<div>
<JSRootExample name='hist1' />
</div>
);
export default App;
JSRootBrowser
import React from 'react';
import {JSRootBrowser} from "@obl/react-jsroot";
const App = () => (
<div>
<JSRootBrowser
name='MyBrows'
filename="https://alieos.saske.sk//eos/alike.saske.sk/scratch/hsimple.root"
obj="hpxpy;1"
drawOptions="colz"
displayType="simple"
onScriptLoaded={this.onScriptLoaded}
tree={{width: "250px", height: "500px", float: "left"}}
main={{width: "500px", height: "500px"}}
/>
</div>
);
export default App;
JSRootGeo
Without tracks
import React from 'react';
import {JSRootGeo} from "@obl/react-jsroot";
const App = () => (
<div>
<JSRootGeo/>
</div>
);
export default App;
With tracks
import React from 'react';
import {JSRootGeo} from "@obl/react-jsroot";
const App = () => (
<div>
<JSRootGeo tracks />
</div>
);
export default App;
Note
Project was generated via https://github.com/UdiliaInc/create-react-library