Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Using flot in Bootstrap modal #1264

4Giedrius opened this Issue · 1 comment

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);

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
@dnschnur dnschnur added the invalid label
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.