问题描述
我正在使用Highcharts,它工作得非常棒,我被困在一个我想要绘制一个饼图的地方,在这个饼图中,每个饼图片(在一个饼图中)具有不同的半径。
b$ b
下面是附有图片的图片。
p>
您可以跳过将其设置为donout或将其设计为具体。我只是想知道每个饼图片的半径有多大。
例如(,):
Highcharts.chart('container',{
图:{
类型:'variablepie'
},
title:{
text:'Variable pie'
},
series:[{
minPointSize:10,
innerSize:'20%',
zMin:0,
name:'countries',
data:[{
name:'Pune',
y:35,
z:25
},{
name:'Mumbai',
y:30,
z:20
},{
name:'Nagpur',
y:15,
z:15
},{
名称:'Thane',
y:25,
z:10
}]
}]
} );
这需要包括:
< script src =https://code.highcharts.com/modules/variable-pie.js>< / script>
I am using Highcharts and it is working just amazing, i am stuck at a place where i want to plot a pie chart in which every pie slice (in a single pie chart) has a different radius.
Below is the image attached of the expexted pie chart.
You can skip making it a donout or designing it this specific. I just want to know how each pie slice can have different radius.
The variablepie series type, introduced in Highcharts 6.0.0, handles this with less code. In this series type you can specify a z-parameter for each data point to alter its z-size.
For example (JSFiddle, documentation):
Highcharts.chart('container', { chart: { type: 'variablepie' }, title: { text: 'Variable pie' }, series: [{ minPointSize: 10, innerSize: '20%', zMin: 0, name: 'countries', data: [{ name: 'Pune', y: 35, z: 25 }, { name: 'Mumbai', y: 30, z: 20 }, { name: 'Nagpur', y: 15, z: 15 } , { name: 'Thane', y: 25, z: 10 }] }] });
This requires including:
<script src="https://code.highcharts.com/modules/variable-pie.js"></script>
这篇关于我可以使用Highcharts为每个饼图片分配不同的半径吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!