It is currently Thu Apr 24, 2014 5:49 pm Advanced search

Rotation of pie chart

Technical support, bug reports and more.

Rotation of pie chart

Postby mirec » Thu Apr 28, 2011 10:35 am

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
mirec
 
Posts: 1
Joined: Thu Apr 28, 2011 10:32 am

Re: Rotation of pie chart

Postby hfrntt » Sat Apr 30, 2011 1:20 pm

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
hfrntt
 
Posts: 6394
Joined: Mon Aug 30, 2010 10:41 am

Re: Rotation of pie chart

Postby jbhoward » Mon May 23, 2011 4:43 am

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.
jbhoward
 
Posts: 1
Joined: Mon May 23, 2011 4:40 am

Re: Rotation of pie chart

Postby hfrntt » Mon May 23, 2011 9:26 pm

Have you tried just to push data in a different order?
Slawek Kolodziej
Highcharts support team
hfrntt
 
Posts: 6394
Joined: Mon Aug 30, 2010 10:41 am

Re: Rotation of pie chart

Postby frostyjhammer » Fri Nov 18, 2011 3:59 am

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!
frostyjhammer
 
Posts: 2
Joined: Fri Nov 18, 2011 3:53 am

Re: Rotation of pie chart

Postby hfrntt » Mon Nov 21, 2011 8:05 pm

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
hfrntt
 
Posts: 6394
Joined: Mon Aug 30, 2010 10:41 am

Re: Rotation of pie chart

Postby frostyjhammer » Mon Nov 28, 2011 5:44 am

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

It's in 124th place... does that mean I should not hold my breath? :(
frostyjhammer
 
Posts: 2
Joined: Fri Nov 18, 2011 3:53 am

Re: Rotation of pie chart

Postby torstein.honsi » Thu Dec 01, 2011 11:20 am

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 Solutions
User avatar
torstein.honsi
Site Admin
 
Posts: 9182
Joined: Thu Nov 09, 2006 1:22 pm
Location: Vik i Sogn, Norway

Re: Rotation of pie chart

Postby NicokJS » Tue May 29, 2012 8:41 pm

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
NicokJS
 
Posts: 1
Joined: Tue May 29, 2012 8:33 pm

Re: Rotation of pie chart

Postby Fusher » Wed May 30, 2012 2:59 pm

It's still not possible without changing sources. What can I advice is to vote ;)
Paweł Fus
Highcharts support team
Fusher
 
Posts: 5317
Joined: Mon Jan 30, 2012 12:16 pm

Re: Rotation of pie chart

Postby marcosmoyano » Fri Aug 17, 2012 11:16 pm

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
marcosmoyano
 
Posts: 1
Joined: Fri Aug 17, 2012 11:05 pm


Return to Highcharts Usage

Who is online

Users browsing this forum: Bing [Bot], Exabot [Bot] and 13 guests