猿问

amCharts:禁用图例中某些项目的切换

我正在使用系列的工具提示在同一个工具提示中显示图表的所有系列值。


series1.tooltipText= '[bold]{dateX}[/]\\nSeries1Label: {series1}\\nSeries2Label: {series2}\\nSeries3Label: {series3}';

series2.tooltip.disabled = true;

series3.tooltip.disabled = true;

但是我需要一种方法来禁用具有工具提示的系列的切换,因为禁用该系列也会使工具提示消失。


如 amCharts 文档中所示,您可以禁用 Legend 中的项目切换,但这是一个适用于整个图表的选项:


chart.legend.itemContainers.template.clickable = false;

如果我只需要为一个系列禁用它,同时为另一个系列启用切换怎么办?有办法吗?


宝慕林4294392
浏览 170回答 1
1回答
随时随地看视频慕课网APP

相关分类

JavaScript
我要回答