简体   繁体   English

海图饼图的饼图

[英]Pie of pie charts in Highcharts

I'm trying to create a pie of pie charts like they show in excel. 我正在尝试创建一个饼状的饼图,就像它们在excel中显示的一样。 I could not find a pie of pie support in highcharts. 我无法在highcharts中找到饼图支持。 I can create two pie charts but I can't seem to connect them with lines as shown in the image below. 我可以创建两个饼图,但似乎无法将它们与线连接起来,如下图所示。 Is there a workaround for this? 有没有解决方法?

Pie of pie charts 饼图饼图

you must use drilldown . 您必须使用drilldown if you click on slice than chart switch to inner data. 如果您单击切片 ,则图表将切换到内部数据。

ex: 例如:

 Highcharts.chart('container', { chart: { type: 'pie', }, series: [{ name: 'out', data: [{ name: 'data 1', y: 55, drilldown: 'data 1' },{ name: 'data 2', y: 45, drilldown: 'data 2' }] }], drilldown: { series: [{ name: 'inner 1', id: 'data 1', data: [ ['inner 1-1', 24.13], ['inner 1-2', 17.2], ['inner 1-3', 8.11], ['inner 1-4', 5.33], ['inner 1-5', 1.06], ['inner 1-6', 0.5] ] }, { name: 'inner 2', id: 'data 2', data: [ ['inner 2-1', 5], ['inner 2-2', 4.32], ['inner 2-3', 3.68], ['inner 2-4', 2.96], ['inner 2-5', 2.53], ['inner 2-6', 1.45], ['inner 2-7', 1.24], ['inner 2-8', 0.85] ] }] } }); 
 <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <script src="https://code.highcharts.com/highcharts.js"></script> <script src="https://code.highcharts.com/modules/drilldown.js"></script> <div id="container" style="height: 400px"></div> 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM