The code is like this
;(function(){
var lineChart = echarts.init(document.getElementById('sparkline'));
// 指定图表的配置项和数据
var option = {
color: ['#fff'],
grid: {
bottom: 0,
top: 0,
left: 0,
right: 0
},
tooltip: {
show: true,
trigger: 'item',
formatter: '{b} : {c}'
},
xAxis: {
show: false,
data: ['星期一','星期二','星期三','星期四','星期五','星期六','星期日']
},
yAxis: {
show: false
},
series: [{
name: '最近7日浏览量',
type: 'line',
data: [5, 20, 36, 10, 10, 20, 20]
}]
};
// 使用刚指定的配置项和数据显示图表。
lineChart.setOption(option);
})()
The icon displayed is like this
No problem, it’s correct, all the data is displayed, but some data points are not displayed. The default is like this, you are
Add showAllSymbol:true configuration here, then all the points will be displayed.
It’s not lost, brother
I tried it with your configuration and it’s fine. Let’s take a closer look