Skip to content

andlehma/react-pie-chart-input

Repository files navigation

image

react pie chart input

react version of my piechartinput html element

installation

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.

usage

<PieChartInput
    size={300}
    percents={[.5, .3, .2]}
    initialAngle={Math.PI}
    colors={['red', 'blue', '#00FF00']}
    lineThickness={5}
    handleRadius={10}
    callback={handleChange()}
/>

live demo

andrewlehman.me/react-pie-chart-input

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published