highcharts 数据格式化

var chart;
$(document).ready(function() {
chart = new Highcharts.Chart({
chart: {
renderTo: 'reportDiv',
//defaultSeriesType: 'column',
plotBackgroundColor: null,
plotBorderWidth: null,
plotShadow: false
},
title: {
text: '来源调查饼图'
},
tooltip: {
formatter: function() {
return '<b>'+ this.point.name +'</b>: '+ Highcharts.numberFormat(this.percentage, 2) +'% ('+
Highcharts.numberFormat(this.y, 0, ',') +' 个)';
}
},

plotOptions: {
pie: {
allowPointSelect: true,
cursor: 'pointer',
dataLabels: {
enabled: false
},
showInLegend: true
}
},
series: [{type: 'pie',name: '来源调查',data: [ {name: '公司主页',sliced: true,selected: true,y:6},['报纸杂志',2],['朋友推荐',6],['外部招聘网站',4],['其他',4]]}]
});
//$("#printButton").css("display","none");
//$("#exportButton").css("display","none");


});

你可能感兴趣的:(Highcharts)