GeriX
GeriX

Reputation: 13

Chart.js: Disable Y-Axis, when graph is disabled via Legend

is it possible to hide the Y-Axis for a graph that has been disabled via the legend? Right now it looks pretty messy, as disabled-graph-Y-Axis are just reset to the default range. Picture of the chart

Thanks guys!

Upvotes: 0

Views: 411

Answers (1)

LeeLenalee
LeeLenalee

Reputation: 31361

Where you make your axes, instead of setting display: true set it to display: 'auto' this will make it so that when all datasets that are linked to that axis are hidden the axis disapears

Upvotes: 2

Related Questions