Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Highcharts pie chart dynamically changes size

I am having an issue with a pie chart I created in highcharts.

Depending on the placement of the data labels the actual chart will grow or shrink.

We need the pie chart to stay the same size so is there a way to keep the pie size constant and force the labels to fit around it or do I just have to place the labels inside each slice?

like image 523
Water Monkey Avatar asked May 07 '14 16:05

Water Monkey


1 Answers

You will have to set a fixed size for the pie chart. Can be a percentage or a pixel value. For example:

plotOptions: {
        pie: {
            size: 100
        }
    },

See this fiddle from the API http://jsfiddle.net/gh/get/jquery/1.7.2/highslide-software/highcharts.com/tree/master/samples/highcharts/plotoptions/pie-size/

like image 63
Sualkcin Avatar answered Oct 22 '22 14:10

Sualkcin