Domanda

I need a chart with 2 or more inner Pie Slice and 1 outer pie with donut type of Highchart plugin.

Here is the donut example :

http://tinyurl.com/d4fp8p9

Here is jsfiddle. It has categories and each category has more than 1 data. What I want ? I have categories but each category doesn't have data. There is only 1 slice that have data for outer pie.

È stato utile?

Soluzione

Here is working Demo

Actually you need to remove drilldown attribute from the pie that has no link with donut pie and check the data with:

 if(data[i].drilldown!=undefined){
    for (var j = 0; j < data[i].drilldown.data.length; j++) {
        var brightness = 0.2 - (j /data[i].drilldown.data.length) / 5 ;
        versionsData.push({
            name: data[i].drilldown.categories[j],
            y: data[i].drilldown.data[j],
            color: Highcharts.Color(data[i].color).brighten(brightness).get()
        });
    }
}}

or put empty drilldown like this Demo

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top