Using flot in Bootstrap modal #1264

4Giedrius opened this Issue Mar 19, 2014 · 1 comment


None yet
2 participants

When displaying flot graph in Bootstrap modal, following exceptions is being thrown.

It happens in Canvas.prototype.resize function when closing modal because then it's width and height becomes null. Despite the exception everything else works fine. Is there any workaround.

   if (width <= 0 || height <= 0) {
            throw new Error("Invalid dimensions for plot, width = " + width + ", height = " + height);

dnschnur commented Mar 20, 2014

This is really a usage question for the forum; Flot requires that its container has dimensions, and so this is not a bug.

I would simply disable resize, either before closing the modal or when the plot reaches a sufficiently small size.

@dnschnur dnschnur closed this Mar 20, 2014

@dnschnur dnschnur added the invalid label Mar 20, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment