I using flot pie chart for plotting pie charts. but it shows error in firebug that
uncaught exception: Invalid dimensions for plot, width = null, heig
I had the same problem integrating template to rails. That's a bad way, but I just comment the line which throws the exception and add 2 lines to set width and height to 0 - it helped me.
Canvas.prototype.resize = function(width, height) {
if (width <= 0 || height <= 0) {
// COMMENTED NEXT LINE
// throw new Error("Invalid dimensions for plot, width = " + width + ", height = " + height);
// NEW LINES ADDED
width = 0;
height = 0;
}
// ... others code
}