mirec
Posts: 1
Joined: Thu Apr 28, 2011 8:32 am

Rotation of pie chart

Hi everyone,
i am new to highcharts, searched in ref, but cannot find any mention of possibility to rotate pie chart.
sometimes labels do not look so good, they are too close to each other when values are small and ratating could help, at least it helped when i was using openflashchart.
Is there such a option?

thx
hfrntt
Posts: 6393
Joined: Mon Aug 30, 2010 8:41 am
Contact: Website

Re: Rotation of pie chart

Ok, I'm not sure how rotation of pie can help you with labels, could you post an example of your chart and show it?
Slawek Kolodziej
Highcharts support team
jbhoward
Posts: 1
Joined: Mon May 23, 2011 2:40 am

Re: Rotation of pie chart

I, too, would like to rotate the chart.

In my case, the last data point typically has a longer name. I would like to rotate the chart 90 degrees counterclockwise to see if that will rotate the callout enough to have the entire label fit within the display area.
hfrntt
Posts: 6393
Joined: Mon Aug 30, 2010 8:41 am
Contact: Website

Re: Rotation of pie chart

Have you tried just to push data in a different order?
Slawek Kolodziej
Highcharts support team
frostyjhammer
Posts: 3
Joined: Fri Nov 18, 2011 1:53 am

Re: Rotation of pie chart

I will second (third?) the request to able to rotate a Pie Chart.
Rotating the chart 90┬║ clockwise would be perfect for me, as
it would move the thin slices of the pie away from the 12:00
position (where the lines linking the data labels to the pie
slices tend to overlap each other) to the 3:00 position, where
the labels should have more room.

I rewrote a piece of our business application from flot charts
to highcharts and we have been very happy with the upgrade;
the one feature from flot that is missing in highcharts is this
ability to rotate the pie chart.

Pushing the data in a different order is not the best solution,
I'm afraid... been there, done that... but a simple rotation
of the pie would foot the bill nicely!
hfrntt
Posts: 6393
Joined: Mon Aug 30, 2010 8:41 am
Contact: Website

Re: Rotation of pie chart

Unfortunately it's not possible now. You can post a feature request on http://highcharts.uservoice.com (or vote if similar request already exists)
Slawek Kolodziej
Highcharts support team
frostyjhammer
Posts: 3
Joined: Fri Nov 18, 2011 1:53 am

Re: Rotation of pie chart

I added my voice to the "Start Angle for Pie Chart" request:
http://highcharts.uservoice.com/forums/ ... pie-chart?

It's in 124th place... does that mean I should not hold my breath? :(
torstein.honsi
Site Admin
Posts: 9215
Joined: Thu Nov 09, 2006 11:22 am
Location: Vik i Sogn, Norway

Re: Rotation of pie chart

I'm afraid so... With the current demand for other high priority tasks I'm sorry this will have to wait. There's a small hack you can do to make it start at 90 degrees though, but it doesn't work well with data labels:

In the source code you'll find this:

Code: Select all

cumulative = -0.25, // start at top
You can change that to 0.
Torstein Hønsi
CTO, Founder
Highsoft
NicokJS
Posts: 1
Joined: Tue May 29, 2012 6:33 pm

Re: Rotation of pie chart

I admit it would be very interesting to have an option to choose the starting position of the pie.
In my example, i would like to represent the parliament (hemicycle) : a half horizontal donut starting at -90 degrees (9 o'clock).

I made a pie where half is a hidden slice. The problem is that it doesn't start at -90 degrees...
http://jsfiddle.net/cGBSS/1/

I am a very beginner with JS and highchart so maybe there are easier ways to do it...

Thanks in advance for your advices,
Nico
Fusher
Posts: 7912
Joined: Mon Jan 30, 2012 10:16 am

Re: Rotation of pie chart

It's still not possible without changing sources. What can I advice is to vote ;)
Paweł Fus
Highcharts Developer
marcosmoyano
Posts: 1
Joined: Fri Aug 17, 2012 9:05 pm

Re: Rotation of pie chart

I'm using the latest stable version, and I don't need data labels so I'm not sure how this will work for everyone. I'm my case it looked pretty straight forward to change the source and get what I wanted.

Code: Select all

[marcos ~]$ diff -E -i -b -c highcharts.src.js highcharts.src.diff.js 
*** highcharts.src.js	2012-08-17 09:43:22.862757369 -0300
--- highcharts.src.diff.js	2012-08-17 18:14:09.505054046 -0300
***************
*** 13972,13977 ****
--- 13972,13978 ----
  	legendType: 'point',
  	marker: null, // point options are specified in the base options
  	size: '75%',
+         cumulative: -0.25,
  	showInLegend: false,
  	slicedOffset: 10,
  	states: {
***************
*** 14185,14191 ****
  		
  		var total = 0,
  			series = this,
! 			cumulative = -0.25, // start at top
  			precision = 1000, // issue #172
  			options = series.options,
  			slicedOffset = options.slicedOffset,
--- 14186,14192 ----
  
  		var total = 0,
  			series = this,
! 			cumulative = this.options.cumulative,
  			precision = 1000, // issue #172
  			options = series.options,
  			slicedOffset = options.slicedOffset,

This lets me do something like:

Code: Select all

plotOptions: {
    pie: {
        cumulative: 0, // Start at 3PM
        borderWidth: 0,
        size:'95%',
        innerSize: '80%',
        dataLabels: {
            enabled: false
        }
    }
}
Hope this helps :)

Rgds,
Marcos

Return to “Highcharts Usage”