No documentation about property AllowSinglePoint

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Messie
Newbie
Newbie
Posts: 34
Joined: Wed Apr 13, 2005 4:00 am
Location: Goettingen, Germany

No documentation about property AllowSinglePoint

Post by Messie » Thu Apr 28, 2005 9:44 am

Hi,
I have a TPointSeries and try to use it for realtime data. I've tried to get it as fast as possible and found the non-documented property
TPointSeries.AllowSinglePoint
Does anyone know about this property and its influenc to the graph performance?

Did anyone find a solution yet to get FastLineSeries data points as sinlge points like TPointSeries?

Thanks, Messie

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

Post by Marjan » Thu Apr 28, 2005 11:30 am

Hi.
AllowSinglePoint
The property only defines if series will be drawn if there is only single point. For example, if you have bar or point series, single bar/point will be drawn. On the other hand, if you have line series, you'll need two points to draw a line segment (meaning AllowSinglePoint property is set to false for this series type).
get FastLineSeries data points as sinlge points like
Pass group of points to fastline series as single point (replace several points with single point) ? Or reduce the number of series drawing points ? I think both approaches are demonstrated in TeeChart demo. Additionally, there is an article about fast real-time plotting available at this link.
Marjan Slatinek,
http://www.steema.com

Messie
Newbie
Newbie
Posts: 34
Joined: Wed Apr 13, 2005 4:00 am
Location: Goettingen, Germany

Post by Messie » Thu Apr 28, 2005 12:16 pm

Hi Marjan,
Pass group of points to fastline series as single point (replace several points with single point) ? Or reduce the number of series drawing points ?
I want to have a TPointSeries as fast as the TFastlineseries. I have a number of independent x/y data points and may not have lines between them. I read the article but could not find any example which fits to my task. So I tried to take the TPointSeries but it is much slower than the TFastLineSeries. Regarding the TPointSeries I have another problem:
I need to update only the points which have to be changed.
An access to the TPointSeries.XValue := newx is very slowly. When I delete all points and use TPointSeries.AddXY(newx,newy) this is much faster in updating but the remaining points flicker during the delete and add.
Maybe there is a way to access the data faster so I can stay with the TPointSeries.

Regards, Ulfert

[/quote]

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

Post by Marjan » Tue May 17, 2005 12:22 pm

Hi.
I want to have a TPointSeries as fast as the TFastlineseries.
You can't. These two series types are not derived from same (stripped-down, optimized) series type. For speed drawing we optimized the drawing code specifically for fastline series and removed all non-essential properties. That's why fastline series is faster than other series types (no overhead, simplified drawing, no series pointer, etc.). The only solution I can think of is you deriving new series type from fastline series and overriding/changing it's DrawValue method (replace MoveTo+LineTo combination with Pixel or Pixel3D method).
An access to the TPointSeries.XValue := newx is very slowly.


Well, it depends what your newx value is. Perhaps newx is greater than other x values and so the array has to be reordered. Usually you'd use this approach if changing XValue doesn't change the order of points (or if XValues.Order is loNone). Otherwise it's better to delete the point and then add it using AddXY method.

points flicker during the delete and add.

Try setting tChart.AutoRepaint to false prior to deleting/adding points and then refresh chart after you made changes:

Code: Select all

Chart1.AutoRepaint := false;
// delete, add
Chart1.AutoRepaint := true;
Chart1.Repaint;
Marjan Slatinek,
http://www.steema.com

Post Reply