option = {
//title
title: {
text: title,
//标题样式
textStyle: {
fontWeight:
'normal'
,
color:
'#fff'
,
},
},
xAxis: {
type:
'category'
,
//x轴字体颜色
axisLine: {
lineStyle: {
color:
'#fff'
}
},
data: [
'0822'
,
'0823'
,
'0824'
,
'0826'
,
'0827'
,
'0828'
]
},
yAxis: {
type:
'value'
,
//y轴颜色
axisLine: {
lineStyle: {
color:
'#fff'
}
},
//y轴设置为百分比
axisLabel: {
formatter:
'{value}%'
,
},
//坐标轴内线的样式
splitLine: {
lineStyle: {
color:
'#666'
,
//type:'dashed'虚线
}
}
},
series: [{
//折线上数字
label: {
normal: {
show:
true
,
position:
'top'
,
formatter:
'{c}%'
}
},
// 折线颜色
itemStyle: {
normal: {
color:
'#33CCFF'
,
lineStyle: {
color:
'#33CCFF'
}
}
},
data:[
'78.57'
,
'50'
,
'80'
,
'93.33'
,
'92.86'
,
'100'
],
type:
'line'
,
smooth:
true
}]
};
myChart.setOption(option
);
}
}