views:

410

answers:

1

When my iframe's onReady-event is fired, I draw a flot graph in it (the iframe is inside an ext component). But the graph gets drawn with the wrong spacing (labels are in the wrong place - either to far away from the axis or on the wrong row, both causing those annoying scroll bars to show up). However, the graph redraws itself correctly with the same data whenever the onWindowResize-event is fired.

Could something happen AFTER the onReady-event that changes the size of the iframe (making the flot graph suddenly the wrong size)? Why would the graph draw incorrectly for the onReady-event and not for the onWindowResize-event?

I don't think this has anything to do with flot (a JS charting library that works on jQuery) itself...

+1  A: 

Could you use onLoad?

Are there images [set without explict width and heights] that could be loading after onReady causing the dimensions to change?

epascarello
I think you're right; it looks like images are changing the iframe size after onReady.
the Will Cole