Sign in to follow this  
Cristi S.

Fill Pie chart clockwise

Recommended Posts

Just FYI, all other JavaScript chart libs we tested fill pie charts clockwise. But FusionCharts fills them from the right.

 

Is there a way to make it fill pie slices clockwise?

 

Thanks,

-Cristian

Share this post


Link to post
Share on other sites
Hi,

 

FusionCharts renders Pie charts in anti clockwise directions, however you can use "animationClockwise" attribute and enable it to "1" to rotate in clockwise direction, also you can change the "startingAngle" to change the starting angle.

 

For further reference please check this sample fiddle link


Share this post


Link to post
Share on other sites

Thanks Ayan. But I was not talking about animation... 

 

In your fiddle, the Teenage slice is first from the top-right in most other apps, not the top-left.

 

But this gave me an idea anyway: it seems enough to reverse the order of data points before sending it to the chart, to get it clockwise! :)

 

See the same fiddle with one simple reverse() call.

 

Cheers,

Cristian

Edited by cristiscu

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this