Line series shrinks data messing up the data I passed in.

Line series shrinks data messing up the data I passed in.

REQUIRED INFORMATION

Ext version tested:

Ext 4.0.5

Browser versions tested against:

FF6.0.1 (firebug 1.8.2 installed)

Chrome 13.0.782.220 m

DOCTYPE tested against:

no doc type, strict

Description:
I am currently working on using Ext charts for a wave monitor and I've run across three different but related problems. A wave graph has lots of points by its nature. When Ext.chart.series.Line notices that there are more points than there are pixels, it chooses to shrink the data (Ext.chart.series.Line.shrink), that is, it takes averages of some points to shrink the data. This is causing problems with my chart because it does have more points than there are pixels, depending on your screen size. This averaging out of values often causes my wave form to be distorted, and the tooltips for each point is not even close to the real value.

This is a link to a screen capture of the problem. https://docs.google.com/leaf?id=0B5M...AxM2E2ZTZmZjk0 You have to download it and open it in a browser to see it. Be sure to turn on your speakers to hear me describing the issue. This is the code that I'm running but I've created a simpler reduction that can easily be run.

As I see it there are 3 problems:

Shrinking my data should be optional, modifying my data points is not acceptable in my case. I've worked around this issue by doing

An important thing to note is that I (probably, depends on screen size) would not have more points than pixels if the series accounted for the fact that only the points between minimum and maximum are displayed.

If you do shrink data, the tooltips display the averaged out points, and sometimes display nothing, not sure what the solution for that is.

Yet another problem caused by the series' lack of taking minimum/maximum into account is that data that is less than my minimum on my x axis is still displayed on the chart. I've worked around that by removing data points that are less than the current minimum. However, the Line series should not attempt to draw points outside of the minimum and maximum

Steps to reproduce the problem:

Load the code under 'Test Case' on a page that references ext-all.js and ext-all.css

Notice that as more data points are added to the store, the wave gets less and less tall, even though the data cycles always going up to 1 and down to -1

Notice that data before the minimum is still being rendered and makes it look really bad

The result that was expected:

My data should remain as it was. Even if there are more points than pixels, SVG handles that well . This causes important data to be lost on my wave.

The data that is outside minimum/maximum should not be rendered on the screen. Looks really ugly, I can workaround it, but what good is the minimum if not enforced fully?

The result that occurs instead:

Data gets 'shrunk', important values are averaged out and mess up my wave.

Data that is outside the min/max gets displayed over the axis grid

Line series also do not take axis's minimum and maximum when determining whether there are more points than there are pixels

// Number if milliseconds to show at a time var windowSize = 100;// Frequency to update the window minimum and maximum var updateChartWindowInterval = 1000;// Frequency to fetch new data from our fakeValuesvar dataRetrievalInterval = 10000;// The initial data contains 2 times the window size to avoid gaps while waiting for new datavar initialData = data.slice(0, windowSize * 2);