Black Lives Matter. Please consider donating to Black Girls Code today.

Legend overlapping figure

I have a couple charts which have legends that overlap the entire figure when the screen gets smaller (see gif below.) I can’t orient the legend horizontally since it is too large and I can’t seem to edit the legend in a way that doesn’t overlap. Is there a way to remove the legend when it get’s to a point where it will overlap? Or are there any other hacks that someone could recommend?


Btw, the community post/solution below is somewhat helpful, but it still doesn’t fix the overlapping in some charts.


I see the same bug on the JS library as well