How to show/hide the toolbox of a chart, where the zoom tool etc. is located, on a certain event?
I tried changing the "show" property, which didn't work:
chart.getOption().toolbox[0].show = false;
getOption()
only returns the value of your chart configuration. What you actually need to use is setOption()
to change your chart's options :
myChart.setOption({
toolbox: { show: false }
})
Here is a simple example I created where the toolbox is shown/hidden each time you click the chart.