Question

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...

Was it helpful?

Solution

Could you use onLoad?

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top