您的位置:首页 > 其它

highcharts 数据格式化

2012-06-15 14:23 260 查看
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");

});
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: