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
So, it seems that before you render to a chart, you need to re-fetch the DOM element. Since flot manipulates the elements and inserts its own, it looks like it's replacing the element with its own elements.
In your render, do:
$.plot($(".myChartId || #myChartClass"), myData, myOptions);
This has nothing to do with being in $(document).ready()
, although it is good practice to place it inside of this.
Hope this helps!