海图饼图的饼图 [英] Pie of pie charts in Highcharts
本文介绍了海图饼图的饼图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试创建一个饼状的饼图,就像它们在excel中显示的一样.我无法在highcharts中找到饼图支持的派.我可以创建两个饼图,但似乎无法将它们与线连接起来,如下图所示.有解决方法吗?
I'm trying to create a pie of pie charts like they show in excel. I could not find a pie of pie support in 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?
推荐答案
,您必须使用 Drilldown
.如果您点击切片,然后图表切换到内部数据.
you must use drilldown
. if you click on slice than chart switch to inner data.
例如:
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>
这篇关于海图饼图的饼图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文