Issue #216 open

Autoscaling Axes causes disappearing of points

Timo Paschke
created an issue

Using jqPlot 0.9.7r597 for a autoscaled chart that is upgraded every second, sometimes the "low" values are not displayed any more. The scope of the graph does not include the point after a new (higher) value has been inserted in the graph (see screenshot). My values are in the range between 0 and 100 (integer).

The problem occures under Safari 5.0 (7533.16) and Chrome 5.0.375.125.

These are my used options to plot the graph: {{{


this.chartOptions['title'] = this.textValue; this.chartOptions['axes'] = { yaxis: { autoscale: true, label: this.yAxisText, labelRenderer: $.jqplot.CanvasAxisLabelRenderer, labelOptions: { enableFontSupport: true, fontFamly: 'Verdana', fontSize: '14pt' } }, xaxis: {
renderer:$.jqplot.DateAxisRenderer, tickOptions:{formatString: "%H:%#S.%#N"}, autoscale: true, label: 'Time', labelRenderer: $.jqplot.CanvasAxisLabelRenderer, labelOptions: { enableFontSupport: true, fontFamly: 'Verdana', fontSize: '14pt' } } }; this.chartOptions['series'] = [{color: '#5FAB78'}]; }}}

Comments (5)

  1. Anonymous

    I've experienced the same issue in FF 3.5.13 and chrome. I am plotting a sine function from -300 to +300 over time and I noticed that it will stop autoscaling at certain values, typically getting caught at y: +108 to -22.

  2. eiapopeia

    I can confimr this bug. Also in the new beta (1.0.0b2). It happens, when

    • having all of the values at 0 (zero, not null)
    • autoscale: true at the y axis
    • and not printing a non-Zero line

    See the attached file for example code.

  3. Chris Leonello repo owner

    Thanks eiapopeia for confirming in latest build.

    One comment on usage. Axes now autoscale by default with a much better algorithm than the autoscale: true option. The autoscale option is left in for cases where you've supplied a numberTicks or tickInterval option. If you aren't using those options, you will get better results by NOT using autoscale: true.

    Unfortunately, this is all a bit messy and needs cleaned up. The autoscale option should probably disappear at some point as axis scaling has improved. This doesn't mean there is not a real bug. I am only trying to clarify best usage of options.

  4. eiapopeia

    Yes, the standard autoscale algorithm is very improved now. Thanks for that. But when showing multiple axes, one gets many many many ticks with different distance between because the number on each axis is different. I opened Issue #362 for that.

  5. Log in to comment