so easy, create charts with react-raphael!
# or specify the externals in webpack config
npm install --save raphael
# install react-raphael-chart in your react-raphael-chart project
npm install --save react-raphael-chart
All props
- color
stringarc fill color of PieChart - background
stringbackground fill color of PieChart - radius
numberradius of PieChart's circle - center
objectradius of PieChart's circle - label
numbertext of PieChart's label - fontsize
objectfontsize of PieChart's label - total
stringtotal of PieChart's data - value
numbervalue of PieChart's data - width
numberwidth of PieChart - height
numberwidth of PieChart - style
objectstyle of PieChart's container - className
stringclassName of PieChart's container - animate
booleananimation of PieChart - repeat
booleanrepeat the animation
All props
- color
stringarc fill color of DoughnutChart - background
stringbackground fill color of DoughnutChart - radius
numberradius of DoughnutChart's circle - center
objectradius of DoughnutChart's circle - thinckness
numberthinckness of DoughnutChart's circle - label
numbertext of DoughnutChart's label - fontsize
objectfontsize of DoughnutChart's label - total
stringtotal of DoughnutChart's data - value
numbervalue of DoughnutChart's data - width
numberwidth of DoughnutChart - height
numberwidth of DoughnutChart - style
objectstyle of DoughnutChart's container - className
stringclassName of DoughnutChart's container - animate
booleananimation of DoughnutChart - repeat
booleanrepeat the animation
- width
numberwidth of LineChart - height
numberwidth of LineChart - serises
arrayserises of LineChart- data
arraydata of LineChart's serise- x
numberx of LineChart's serise data - y
numberx of LineChart's serise data
- x
- color
stringcolor of LineChart's serise - thickness
numberthickness of LineChart's serise - curve
booleancurve of LineChart's serise
- data
- xAxis
objectxAxis of LineChart- min
numbermin value of xAxis - max
numbermax value of xAxis - interval
numberinterval value of xAxis - formatter
functiontitle formatter of xAxis{ data: object } - height
numberheight of xAxis
- min
- yAxis
objectyAxis of LineChart- min
numbermin value of yAxis - max
numbermax value of yAxis - interval
numberinterval value of yAxis - formatter
functiontitle formatter of yAxis{ data: object } - width
numberwidth of yAxis
- min
- grid
objectgrid of LineChart- color
stringcolor of LineChart's grid - thickness
numberthickness of LineChart's serise - showYGrid
booleanshow y axis grid of LineChart - showXGrid
booleanshow y axis grid of LineChart
- color
- animate
booleananimation of LineChart - repeat
booleanrepeat the LineChart
- width
numberwidth of BarChart - height
numberwidth of BarChart - serises
arrayserises of BarChart- data
arraydata of BarChart's serise- x
numberx of BarChart's serise data - y
numberx of BarChart's serise data
- x
- color
stringcolor of BarChart's serise - hoverColor
stringhover color of BarChart's serise
- data
- xAxis
objectxAxis of BarChart- min
numbermin value of xAxis - max
numbermax value of xAxis - interval
numberinterval value of xAxis - formatter
functiontitle formatter of xAxis{ data: object } - height
numberheight of xAxis
- min
- yAxis
objectyAxis of BarChart- min
numbermin value of yAxis - max
numbermax value of yAxis - interval
numberinterval value of yAxis - formatter
functiontitle formatter of yAxis{ data: object } - width
numberwidth of yAxis
- min
- grid
objectgrid of BarChart- color
stringcolor of BarChart's grid - thickness
numberthickness of BarChart's serise - showYGrid
booleanshow y axis grid of BarChart - showXGrid
booleanshow y axis grid of BarChart
- color
- barWidth
numbermax width of BarChart's bar - fontSize
numberfont size of BarChart's text - textAutoHide
booleanauto hide of BarChart's text
-
clone the repository
git clone https://github.com/liuhong1happy/react-raphael-chart.git -
install dependency package;
npm install -
run example
npm run example -
build
npm run build
Now , you can see example !
Email: liuhong1.happy@163.com