echarts爬坑 : 怎么Line折線圖設置symbol:none后Label不見了?


用 echarts 時遇到了一個奇奇怪怪的問題。

 

這是一張折線圖。

本來這個圖是有數字顯示的。

series : [
        {
            name:'搜索引擎',
            type:'line',
            stack: '總量',
            label: {
                normal: {
                    show: true,
                    position: 'top'
                }
            },
            areaStyle: {normal: {}},
            data:[820, 932, 901, 934, 1290, 1330, 1320]
        }
    ]

 

 

當我設置 symbol:'none' 之后,折線圖上的數字就不見了?

series : [
        {
            name:'搜索引擎',
            type:'line',
            stack: '總量',
            label: {
                normal: {
                    show: true,
                    position: 'top'
                }
            },
            symbol:'none',
            areaStyle: {normal: {}},
            data:[820, 932, 901, 934, 1290, 1330, 1320]
        }
    ]

 

 

可能是一個bug。

后來用別的方法繞過了這個問題。

series : [
        {
            name:'搜索引擎',
            type:'line',
            stack: '總量',
            label: {
                normal: {
                    show: true,
                    position: 'top'
                }
            },
            symbol:'circle',
            symbolSize:1,
            hoverAnimation:false,
            areaStyle: {normal: {}},
            data:[820, 932, 901, 934, 1290, 1330, 1320]
        }
    ]

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM