dhammucool / flot

Automatically exported from code.google.com/p/flot
MIT License
0 stars 0 forks source link

Error Bars not playing nicely with time plugin (x-axis auto scales to origin 1970) #766

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Hi, I believe there is a bug with error bars when combined with the flot time 
plugin.

For example when I plot Error Bars on the x-axis (symmetric for simplicity, 
although same problem occurs with asymmetric) with the format:

    [  xpos, ypos, xerror ];
e.g.:

   "data": [ [1383065542280, 1, 1.0 ],[1383065542283, 2, 0.7777] ]

When I plot, the x-axis should auto scale to between these two unix timestamps. 
However, when I enable error bars, the x-axis auto scales to the origin, so it 
plots between 1970 and my much more recent timestamps.

If I look at the x-axis min value reported by the axes() function:

console.log( "Min x: " + plot.getAxes().xaxis.min );

It gives: "Min x: 0.7777"
Therefore somehow the x-axis minimum is incorrectly being overwritten by the 
minimum x-axis-error.

Many thanks,

Original issue reported on code.google.com by fredmelv...@gmail.com on 29 Oct 2013 at 5:24