2
votes

I'm working on a donut pie chart.

I set the data's color and get the drilldown (which is the object holding the data and configuration for the outer slices) slices' colors to be of the same group of color. I would like to set a different array of colors to be used in the drilldown objects. See image attached (the outer slice has two colors: orange and transparent). See here jsfiddle.net/queequeg/ma6uz/ a playground for donut pie.

needed pie

2

2 Answers

8
votes

You need to set different colors for each of slices: http://jsfiddle.net/KNFJE/36/

For example:

    series: [{
        size: '60%',
        innerSize: '30%',
        data: [
            {y: 12, color: 'orange'},
            {y: 10, color: 'gray' },
            {y: 33, color: 'orange'},
            {y: 20, color: 'gray'}
        ]
    },{
        size: '80%',
        innerSize: '60%',
        data: [
            {y: 18, color: 'gray'},
            {y: 11, color: 'orange' },
            {y: 13, color: 'gray'},
            {y: 30, color: 'orange'}
        ]
    }]
0
votes

Update the values of color in the code.

color: colors[1]

set the array index to a different preset color from 0-9. If you don't want the preset colors from 0-9 you would have to make changes in the highcharts library.