[英]toggle between data and markline in echarts
Given the scatter series with markline in echarts as below :鉴于 echarts 中带有标记线的散点序列如下:
option = {
xAxis: {},
yAxis: {},
series: [{
symbolSize: 20,
data: [
[10.0, 8.04],
[8.0, 6.95],
[13.0, 7.58],
[9.0, 8.81],
[11.0, 8.33],
[14.0, 9.96],
[6.0, 7.24],
[4.0, 4.26],
[12.0, 10.84],
[7.0, 4.82],
[5.0, 5.68]
],
type: 'scatter',
markLine: {
data: [
{name: 'average',
type: 'average',
valueIndex: 0}
]
}
}]
};
I wanted to toggle between data and markline.我想在数据和标记线之间切换。 Lets say when markline off , only scattered data should be shown.假设当标记线关闭时,只应显示分散的数据。 And when markline on only markline should be shown in the graph.并且当只应在图中显示标记线上的标记线时。
I think it should work when you simply set the e-chart option accordingly:我认为当您相应地设置电子图表选项时它应该可以工作:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.