7

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.

enter image description here

PS: Tried changing startAngle and endAngle values.

Riddhi
  • 2,174
  • 1
  • 9
  • 17

1 Answers1

13

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 become 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]

enter image description here

keikai
  • 14,085
  • 9
  • 49
  • 68