Line graph with many values

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Arie
Newbie
Newbie
Posts: 3
Joined: Tue Jun 06, 2006 12:00 am

Line graph with many values

Post by Arie » Wed Nov 15, 2006 7:30 am

Hi,

Say I have a large amount of data, (t, f(t)), that describes a
piecewise-linear function (that is, every two points are connected by a
straight line). For example there are 10,000 different points in the
collection. Putting them all on a single graph will produce an unreadable
and messed-up graph with many jagging lines.

I wonder if there is a way to have TeeChart automatically "sparsify" the
data. So that, at first glance I will see a nice but inaccurate graph (where
some points may be averaged with other adjacent points, for example). When I
zoom into a section of the graph, I will see the points in more detail, and
actually more points will be shown.

In short, sort of a Google-maps mechanism, where I can zoom in to see the
fine details, and zoom out to see the outline.

Any advice?

Thanks,
Arie

Marjan
Site Admin
Site Admin
Posts: 745
Joined: Fri Nov 07, 2003 5:00 am
Location: Slovenia
Contact:

Post by Marjan » Wed Nov 15, 2006 8:17 am

Hi.

There are several ways to reduce the number of points in series (and get the same or "similar" plot). If you're using TeeChart v7 then the easiest solution is to use the TDownSamplingFunction function to reduce number of points in series. Check the "All Features -> Functions -> Extended -> Reducing number of points" example.
Marjan Slatinek,
http://www.steema.com

Post Reply