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.

有帮助吗?

解决方案

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

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top