最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Recharts render pie chart vertically - Stack Overflow

programmeradmin2浏览0评论

I am using recharts library for pie charts.

I want to load pie chart for two values always.The chart is loading horizantally as you can see here starting from angle 0. But i want it to be starting from angle 90 looking as below.

PS: Tried changing startAngle and endAngle values.

I am using recharts library for pie charts.

I want to load pie chart for two values always.The chart is loading horizantally as you can see here starting from angle 0. But i want it to be starting from angle 90 looking as below.

PS: Tried changing startAngle and endAngle values.

Share Improve this question asked Mar 24, 2020 at 13:19 RiddhiRiddhi 2,2441 gold badge10 silver badges17 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 16

Well I guess it's still related with props startAngle and endAngle

It starts counting at degree 90. (It may be kind of counterintuitive)

If you try another value as below, it would bee a vertical start pie

startAngle={-270}

Notice according to the document, the default value:

  • startAngle: 0
  • endAngle: 360

The diff equals 360 would show a full circle pie. You can try out other pairs, like

[-270, 90], [90, -270], [45, 405]

发布评论

评论列表(0)

  1. 暂无评论