参见this pen 。如何禁用滚动条以防止缩放和平移而不更改图表顶部的位置?
以下代码将完全删除滚动条(导致图表顶部向上移动):
chart.scrollbarX.disabled = true;
以下代码禁用缩放,但仍允许平移:
chart.scrollbarX.startGrip.disabled = true;
chart.scrollbarX.endGrip.disabled = true;
如有任何建议,我们将不胜感激。
最佳答案
您可以设置interactionsEnabled
在滚动条对象上设置为 false 以防止任何鼠标/触摸交互修改它。
scrollbarX.interactionsEnabled = false;
关于amCharts 4 - 如何禁用滚动条以防止缩放和平移,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55742969/