Recharts: How to make single value pie chart?

Created on 22 Aug 2016  路  3Comments  路  Source: recharts/recharts

Something like this?
image

Most helpful comment

@amitava82 You can set the startAngle and endAngle of Pie like this:

<PieChart width={300} height={244}>
  <Pie
     data={chartData} 
     cx="50%" 
     cy="50%" 
     startAngle={90}
     endAngle={-270}
     innerRadius="60%"
     outerRadius="80%"
     stroke="none"
  />
</PieChart>

Here is a demo.
Please check document for detail.

All 3 comments

@amitava82 You can check this issue for two workarounds.

Not exactly same but close. How do I start it from 12'o clock?

@amitava82 You can set the startAngle and endAngle of Pie like this:

<PieChart width={300} height={244}>
  <Pie
     data={chartData} 
     cx="50%" 
     cy="50%" 
     startAngle={90}
     endAngle={-270}
     innerRadius="60%"
     outerRadius="80%"
     stroke="none"
  />
</PieChart>

Here is a demo.
Please check document for detail.

Was this page helpful?
0 / 5 - 0 ratings