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