option = {
tooltip: {
trigger: 'axis',
axisPointer: {
// Use axis to trigger tooltip
type: 'shadow' // 'shadow' as default; can also be 'line' or 'shadow'
}
},
legend: {},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
xAxis: {
type: 'category',
data: [
'Q1',
'Q2',
'Q3',
'Q4',
"",
'M1',
'M2',
'M3',
'M4',
'M5',
'M6',
'M7',
'M8',
'M9',
'M10',
'M11',
'M12',
"",
"W1",
"W2",
"W3",
],
axisPointer: {
type: 'shadow'
},
axisLabel: {
interval: 0 //设置间隔为0
}
},
yAxis: {
type: 'value'
},
series: [
{
data: [20, 38, 90, 34, null, 30, 13, 12, 30, 13,15,13, 12, 30,20, 38, 90,null, 30, 13, 12],
type: 'line',
smooth: true
}
]
};
echarts折线图数据断开显示
最新推荐文章于 2024-06-18 14:32:12 发布