markrcote / flot-axislabels

Axis Labels Plugin for Flot. This repo is unmaintained in part due to flot being in a similar situation.
95 stars 71 forks source link

Multiple axes only work when redrawing with $.plot #12

Closed magik closed 10 years ago

magik commented 11 years ago

If you try to use multiple axes with labels, where some axes are not being shown, then using the setData/setupGrid/draw method of redrawing the plot fails. I believe the problem lies within the "hack" of the secondPass. When going through the draw method after an axis has gone from not show to show, the first pass section doesn't get re-evaluated and thus it still thinks those axes that are showing now are still not showing.

Not sure if there is going to be an easy fix for this... Seems like it kind of needs the separation between the axes drawing and the plot drawing as your hack comment states...

All in all this is at least somewhat usable if you just redraw by calling the $.plot again.

markrcote commented 10 years ago

I think this was fixed in commit 85abc1756d2886fdbc933fb9340d162d5c076f11. Feel free to reopen if not.