第一种:
var option = {
color: ['#00FF00', '#FFD700', '#EE2C2C'],
tooltip: {
trigger: 'axis'
},
legend: {
},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
xAxis: {
type: 'category',
boundaryGap: false,
data: data.map(function (item) {
return (item.createTime).substring(11,16);
})
},
yAxis: {
type: 'value',
max: '10' //设置y轴最大值
},
series: [
{
symbol: "none",
name: '余氯',
type: