選我正解
看看JSFiddle是不是你要的
把不要顯示的變數刪掉即可
為免JSFiddle失效
Source code 如下
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>
<div id="container"></div>
$(function () {
$('#container').highcharts({
chart: {
plotBackgroundColor: null,
plotBorderWidth: null,
plotShadow: false,
type:'pie'
},
title: {
text: 'Browsers'
},
subtitle: {
text:false,
},
tooltip: {
pointFormat: '{point.name}/{point.percentage:.1f}%/{point.custom}'
},
plotOptions: {
pie: {
allowPointSelect: true,
cursor: 'pointer',
dataLabels: {
enabled: true,
format: '<b>{point.name}</b>: {point.percentage:.1f} % {point.custom}',
style: {
color: (Highcharts.theme && Highcharts.theme.contrastTextColor) || 'black'
}
}
}
},
series: [{
name: "Total",
colorByPoint: true,
data: [{
name: "Firefox",
y: 10,
custom:"11111"
}, {
name: "Chrome",
y: 12,
custom:"22222"
}, {
name: "Explorer",
y: 65,
custom:"33333"
}, {
name: "Opera",
y: 13,
custom:"44444"
}]
}],
});
});