I am implementing show/hide feature of yAxes using show()
and hide()
methods. But the result looks this way:
Is there a way to remove that empty space between the axes?
hide
simply sets the opacity of the elements to 0. To completely remove the space occupied by the axis, you need to set disabled
to true on the axis' renderer. Setting it back to false will restore the axis completely.
axis.renderer.disabled = true;