81,092
社区成员
发帖
与我相关
我的任务
分享
var options = {
chart: {
renderTo: 'container' //关联页面元素div#id
},
title: { //图表标题
// text: '2011年东北三大城市水果消费量统计图'
},
subtitle: {
// text: 'Source: WorldClimate.com'
},
xAxis: { //x轴
//categories: ['柑橘', '香蕉','苹果', '梨子'], //X轴类别
//labels:{y:18} //x轴标签位置:距X轴下方18像素
},
yAxis: { //y轴
title: {text: '处理天数(天)'}, //y轴标题
lineWidth: 2, //基线宽度
plotLines : [ {
color : 'red',
width : 2//,
//value:9
} ]
},
legend: {
layout: 'vertical',
align: 'left',
x: 80,
verticalAlign: 'top',
y: 60,
floating: true,
backgroundColor: '#FFFFFF'
},
tooltip: {
formatter: function() {
var s;
if (this.point.name) { // the pie chart
s = ''+
this.point.name +': '+ this.y +' fruits';
} else {
s = ''+
this.x +': '+ this.y+"天";
}
return s;
}
},
exporting: {
enabled: false //设置导出按钮不可用
},
series: [{ //数据列
type: 'column',
name: '实际办理天数'//,
// data: [8.4, 9.8, 11.4, 15.6]
},
{
type: 'column',
name: '规定办理天数'//,
// data: [1, 1, 1, 1,1]
},
{
type: 'spline',
name: '规定天数总和'//,
//data: [6.5, 9.4, 13.2, 18.6]
},
{
type: 'spline',
name: '处理天数总和'//,
// data: [8.03, 9, 11.6, 17]
}]
};
options.yAxis.plotLines=nodeTotalDays;
chart = new Highcharts.Chart(options);