Export to GitHub

flot - issue #766

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


Posted on Oct 29, 2013 by Swift Giraffe

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,

Status: New

Labels:
Type-Defect Priority-Medium