正文
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]
}
]