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");
});
$(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坐标轴标签格式化回调函数formatter:function中引用series中的数据
- WPF格式化绑定数据
- 磁盘未被格式化,是否格式化数据灾难应急方案
- Python中数据类型变量,编码以及格式化注意细节O(∩_∩)O
- 格式化测试数据,组装用于插入表中的sql语句
- BigDecimal 类型数据的加、减、乘、除以及格式化
- GridView_Eval()_中数据格式化或格式化数据
- Gridview利用DataFormatString属性格式化数据
- number_format()数据格式化
- Spring MVC返回json字符串时数据格式化
- json字符串 格式化数据
- 格式化double数据
- HighCharts动态显示数据实例
- 【第28篇】通过Gson和FastJson格式化Json数据
- 【数据可视化】【highcharts】多轴x轴改为日期格式--实例
- 移动硬盘不小心格式化后的数据如何恢复
- [HighCharts] 关于对几组不同数量级的数据进行分类比较处理办法
- 关于gridView格式化数据的说明 DataFormatString
- php处理excel时间数据--——使用PHPExcel判别和格式化Excel中的日期格式
- HDD 格式化错误 E:31:00 --如何备份DV里的数据