option = {
xAxis: {
type: 'category',
boundaryGap: false,
data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'],
axisLabel: {
show: true,
textStyle: {
color: 'white', //更改坐标轴文字颜色
}
},
},
tooltip : {
trigger: 'axis',
formatter(params){
for(var x in params){
return '用电量:'+params[x].name +"<br>"+params[x].data+"khw(峰时段)";
}
}
},
yAxis: {
type: 'value',
name: '单位(kwh)',
nameTextStyle: {
color: 'white'
},
axisLabel: {
show: true,
textStyle: {
color: 'white', //更改坐标轴文字颜色
}
},
},
grid: {
left: '1%',
right: '1%',
bottom: '1%',
containLabel: true
},
series: [{
data: [820, 932, 901, 934, 1290, 1330, 1320,1400,1420,1450,1460,1480],
type: 'line',
areaStyle: {
normal: {
color: '#F99A42' //改变区域颜色
}
},itemStyle : {
normal : {
color:'#1A1A1A', //改变折线点的颜色
lineStyle:{
color:'#F99A42' //改变折线颜色
}
}
},
}]
};
注意:本文归作者所有,未经作者允许,不得转载