var myLineChart = echarts.init(document.getElementById(‘chart-id’));
var ChargeLineChartOption = {
tooltip: {
trigger: ‘axis’,
//formatter 自定义tooltip的显示(可根据具体条件筛选显示)
formatter: function(params) {
return params[0].name + ‘
}
},
data: [1,2,3,4,5,6,7,8,9,10,11,12]
},
{
name: '减免额',
type: 'line',
smooth: true,
symbol: 'circle',
symbolSize: 0,
showSymbol: true,
lineStyle: {
normal: {
width: 5
}
},
itemStyle: {
normal: {
color: '#00d4fa',
borderColor: 'rgba(255,255,255,0.5)',
borderWidth: 0
}
},
data: [1,,10,11,122,3,4,5,6,7,8,9]
},
{
name: '同期收费',
type: 'line',
smooth: true,
symbol: 'circle',
symbolSize: 0,
showSymbol: true,
lineStyle: {
normal: {
width: 5,
type: 'dotted'
}
},
itemStyle: {
normal: {
color: '#ff4040',
borderColor: 'rgba(255,255,255,0.5)',
borderWidth: 0
}
},
data: [9,10,11,12,1,2,3,4,5,6,7,8]
},
{
name: '同期减免',
type: 'line',
smooth: true,
symbol: 'circle',
symbolSize: 0,
showSymbol: true,
lineStyle: {
normal: {
width: 5,
type: 'dotted'
}
},
itemStyle: {
normal: {
color: '#00d4fa',
borderColor: 'rgba(255,255,255,0.5)',
borderWidth: 0
}
},
data: [1,2,3,9,10,11,12,4,5,6,7,8]
}
]
};
ChargeLineChart.setOption(ChargeLineChartOption);