This technique I proposed while working on chart (2008). If user requests a large amount of data but it is not possible to display them all in the viewing area (not enough pixels), you have to sample the data.
There are a lot of sampling techniques. Here is a simple one:
sample_interval = number of points to plot / number of pixels
SELECT * FROM table WHERE mod(index, sample_interval) = 0