var chart1;
var options1;
Highcharts.setOptions({
global : {
useUTC : false
}
});
String.prototype.endWith=function(oString){
var reg=new RegExp(oString+"$");
return reg.test(this);
}
options1= {
colors: [
'#B20000' //红
],
chart: {
renderTo: 'container2',
type: 'spline',
//backgroundColor:'#BFDFFF',
//plotBackgroundColor:'#BFDFFF',
zoomType: 'x',
events: {
}
},
title: {
text: '功率曲线'
},
subtitle: {
text: ''
},
xAxis: {
labels: {
align: 'center',
formatter: function() {
return Highcharts.dateFormat('%H
%M', this.value);
}
},
type: 'datetime'
},
yAxis: [{
title: {
text: '功率数值(MW)'
}
}],
legend: {
layout: 'vertical',
// backgroundColor: '#FFFFFF',
align: 'right',
verticalAlign: 'top',
floating: true
// shadow: true
// layout: 'vertical',
// align: 'right',
// verticalAlign: 'middle',
// borderWidth: 0
},
tooltip: {
crosshairs:{//控制十字线
width:2
},
shared:true,
xDateFormat:'%Y-%m-%d %H:%M'
/*formatter: function() {
return ''+ this.series.name +':'+
Highcharts.numberFormat(this.y, 2) +' 万kW
时间:'+
Highcharts.dateFormat('%Y-%m-%d %H:%M:%S', this.x);
}*/
},
credits: {
enabled: false
},
plotOptions: {
spline: {
dataLabels : {
enabled :false
},
// pointPadding: 0.2,
borderWidth: 0
},
series: {
cursor: 'pointer',
marker: {
radius: 0,
symbol: 'circle' //曲线点类型:"circle", "square", "diamond", "triangle","triangle-down",默认是"circle"
}
}
},
series: [
{
type: 'spline',
name: '实发功率(单位:MW)',
yAxis:0
}]
};