Issue #561 open

DateAxisRenderer replot (defaulting data)

cpage13
created an issue

There is a bug using the DateAxisRenderer plugin where you have to specify a min on the xaxis or nothing will graph. Not that big of a deal just added.

axes : {
   xaxis : {
       min : mydata[0][0]
   }
}

MY ISSUE: I am dynamically adding data to my line graph every second. The axes may change based on the values I receive. So I use replot with resetAxess:true. Since I am resetting my axis I need to specify the min again because of the bug mentioned.

First I change my data (Below not exact just an idea of what I am doing) {{{

!jacascript

this.min.plot.series[0].data.push([new Date().getTime(), 33]) // I check in firebug and the plot data has been added) }}}

{{{

!javascript

this.min.plot.replot({resetAxes:true, axes : { xaxis : { min : this.min.plot.series[0].data[0][0] }}}) // data is the same before it was changed, 33 is missing }}}

So after the replot the plot data resets to the values it was initialized with. I can see this in firebug (I checked many times because I thought I was losing my mind). If I remove the replot the value of 33 is still in the plot data. I cannot update my data values because they are reset every time I call replot. If I use redraw it works however the axis cannot be rescaled so this is no good. I am using version jqplot.1.0.0b2_r1012

Comments (2)

  1. Log in to comment