Ivo
Ivo

Reputation: 43

amcharts 4 - Hide/show yAxis is leaving empty space

I am implementing show/hide feature of yAxes using show() and hide() methods. But the result looks this way:

enter image description here

Is there a way to remove that empty space between the axes?

Upvotes: 0

Views: 821

Answers (1)

xorspark
xorspark

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.

axis.renderer.disabled = true;

Upvotes: 1

Related Questions