var chart;
function heighcharts(jsondata){
var options = {
chart: {
renderTo: 'compare',
defaultSeriesType: 'column'
},
title: {
text: '本月与上月对比',
style: {
margin: '10px 100px 0 0',
font: 'normal 25px Verdana, sans-serif'
}
},
xAxis: {
categories: ['1-3', '4-6','7-9','10-12','13-15','16-18','19-21','22-24','25-27','28-31']
},
yAxis: {
tickInterval: 10,
max: 100,
title: {
text:'话务量'
},
plotLines: [{
value: 0,
width: 1,
color: '#808080'
}]
},
tooltip: {
formatter: function(){
return '<b>' + this.series.name +'</b><br/>' +
this.x + ': ' + this.y;
}
}
};
options.series =[];
var temp = jsondata.rows;
for(var i=0; i<temp.length-1; i++){
options.series[i]= {
name: temp[i].month,
data: [temp[i].column1,temp[i].column2,temp[i].column3,temp[i].column4,temp[i].column5,temp[i].column6,temp[i].column7,temp[i].column8,temp[i].column9,temp[i].column10]
};
}
chart = new Highcharts.Chart(options);
}
function heighcharts(jsondata){
var options = {
chart: {
renderTo: 'compare',
defaultSeriesType: 'column'
},
title: {
text: '本月与上月对比',
style: {
margin: '10px 100px 0 0',
font: 'normal 25px Verdana, sans-serif'
}
},
xAxis: {
categories: ['1-3', '4-6','7-9','10-12','13-15','16-18','19-21','22-24','25-27','28-31']
},
yAxis: {
tickInterval: 10,
max: 100,
title: {
text:'话务量'
},
plotLines: [{
value: 0,
width: 1,
color: '#808080'
}]
},
tooltip: {
formatter: function(){
return '<b>' + this.series.name +'</b><br/>' +
this.x + ': ' + this.y;
}
}
};
options.series =[];
var temp = jsondata.rows;
for(var i=0; i<temp.length-1; i++){
options.series[i]= {
name: temp[i].month,
data: [temp[i].column1,temp[i].column2,temp[i].column3,temp[i].column4,temp[i].column5,temp[i].column6,temp[i].column7,temp[i].column8,temp[i].column9,temp[i].column10]
};
}
chart = new Highcharts.Chart(options);
}