I'm using flot in a relatively large project, where I am showing a
chart with a large number of points.
When I say large I'm refering to series with up to 50.000 points, and
let me congratulate the flot development team because the performance
is quite good!
However, I'm facing the following problem:
Some times, I get this message in firebug:
Although the message is clear, the fact is that I protected my code as
much as possible to make sure that every time the plot method is
called, the container dimensions are specified. I have this for
granted, and whenever the problem happens, I check the dom (with
firebug) and the dimensions are specified on the container. I even
make sure, through the use of dom ready event, that the plot is called
only when container is available.
A couple of days ago, I searched for the problem on the flot code and
ended up suspecting that the problem might be related to some sort of
cache related with jquery. I'm not very experienced in jquery, the
project I'm working on uses YUI, so I'm not quite sure about this.
Does anyone have a clue about the cause of this behavour?
The construction of the chart is made within a class that does this:
1st: creates the page layout, including the chart placeholder
2nd: appends the layout on the DOM
3rd: adjusts the layout to the page body (in this process, dimensions
are specified for the chart placeholder)
4th: checks if the placeholder has its dimensions specified, and if it
doesn't specify it
5th: creates the chart only when the placeholder is available (using
As you can see, the process is a bit redundant to make sure dimensions
are set for the placeholder.