在 legend 文字很多的时候对文字做裁剪并且开启 tooltip,但tooltip的position设置不起任何作用
legend: {
show: true,
x: 'center',
tooltip: {
show: true,
trigger: 'item',
position: [10, 10]
}
}
在 legend 文字很多的时候对文字做裁剪并且开启 tooltip,但tooltip的position设置不起任何作用
legend: {
show: true,
x: 'center',
tooltip: {
show: true,
trigger: 'item',
position: [10, 10]
}
}
1 回答2.4k 阅读✓ 已解决
2 回答1.2k 阅读
1 回答667 阅读✓ 已解决
1 回答709 阅读✓ 已解决
1 回答1.1k 阅读
2 回答743 阅读
说说我是什么原因。
let originOptions = JSON.parse(JSON.stringify(BASE.CHART_OPTIONS))
我把echarts的配置信息写在CHART_OPTIONS里,然后深拷贝赋值给 originOptions。
position方法写在CHART_OPTIONS里了。
问题就出在深拷贝里,将position函数直接定义到originOptions,就好了。