Reputation: 43
I am implementing show/hide feature of yAxes using show() and hide() methods. But the result looks this way:
show()
hide()
Is there a way to remove that empty space between the axes?
Upvotes: 0
Views: 821
Reputation: 16012
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.
hide
disabled
axis.renderer.disabled = true;
Upvotes: 1