在(highcharts)气泡图上显示百分比值 [英] Display Percentage Values on (highcharts) bubble chart
本文介绍了在(highcharts)气泡图上显示百分比值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
https://jsfiddle.net/Kondaldurgam/ewng3aqa/
我有泡沫大小值。我想用百分比显示值如何用百分比显示值。它可能显示或不显示?
在气泡图上显示百分比值
I have bubble size value. i want to show the value with percentage how to show the value with percentage.Its Possible to shows or not? Display Percentage Values on bubble chart
Highcharts.chart('container', {
chart: {
type: 'bubble',
plotBorderWidth: 0,
zoomType: 'xy'
},
title: {
text: 'Highcharts bubbles with radial gradient fill'
},
xAxis: {
gridLineWidth: 1
},
yAxis: {
startOnTick: false,
endOnTick: false
},
plotOptions: {
bubble: {
dataLabels: {
enabled: true,
x:30
},
}
},
series: [{
data: [
[9, 81, 63],
[98, 5, 89],
[51, 50, 73],
[41, 22, 14],
[58, 24, 20],
[78, 37, 34],
[55, 56, 53],
[18, 45, 70],
[42, 44, 28],
[3, 52, 59],
[31, 18, 97],
[79, 91, 63],
[93, 23, 23],
[44, 83, 22]
],
marker: {
fillColor: {
radialGradient: { cx: 0.4, cy: 0.3, r: 0.7 },
stops: [
[0, 'rgba(255,255,255,0.5)'],
[1, Highcharts.Color(Highcharts.getOptions().colors[0]).setOpacity(0.5).get('rgba')]
]
}
}
}, ]
});
推荐答案
您只需添加格式选项
bubble: {
dataLabels: {
enabled: true,
x:30,
format: "{y}%"
},
}
参见小提琴 https://jsfiddle.net/ewng3aqa/1/
这篇关于在(highcharts)气泡图上显示百分比值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文