react version of my piechartinput html element
for use in a react application, install from npm with
npm install react-pie-chart-input
to run the demo, clone the repo and run
cd react-pie-chart-input/demo
then npm install
and npm run build
then open index.html
in a browser.
if you're planning on supporting mobile browsers, i recommend that you add
html,
body {
overscroll-behavior-y: contain;
}
this ensures that the user does not accidentally reload the page while manipulating the pie chart input.
<PieChartInput
size={300}
percents={[.5, .3, .2]}
initialAngle={Math.PI}
colors={['red', 'blue', '#00FF00']}
lineThickness={5}
handleRadius={10}
callback={handleChange()}
/>