echart data display missing - Stack Overflow
巴扎黑
巴扎黑 2017-05-19 10:28:55
0
3
420

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

Only 6 data are displayed, and there are problems with the 3 and 5 data display

巴扎黑
巴扎黑

reply all (3)
刘奇

No problem, it’s correct, all the data is displayed, but some data points are not displayed. The default is like this, you are

series: [{ name: '最近7日浏览量', type: 'line', data: [5, 20, 36, 10, 10, 20, 20] }]

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

        Latest Downloads
        More>
        Web Effects
        Website Source Code
        Website Materials
        Front End Template
        About us Disclaimer Sitemap
        php.cn:Public welfare online PHP training,Help PHP learners grow quickly!