Non-Float ChartSeries Data

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
rotella
Newbie
Newbie
Posts: 7
Joined: Mon Nov 03, 2003 5:00 am
Location: chicago, IL

Non-Float ChartSeries Data

Post by rotella » Wed May 26, 2004 12:16 pm

We have written a custom TChartSeries class, and wish to include a non-floating point "value", which will be used during painting of series values to control (not supply) visual attributes.

However, TChartValueList only represents floating-point values. Is there a version of TChartValueList that holds string (or any other datatype) values?

If this is not possible, is there a way to synchronize with the underlying TDataSet during painting, such that the db record corresponding to the currently-drawn point can be found?

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

Post by Marjan » Wed May 26, 2004 7:50 pm

Hi.
TChartValueList only represents floating-point values
True. But why don't you simply add a stringlist and use it to store non floating points values. If this value is specific for each individual series point, you could simply override your series AddXY method and add a line where you add this point string value ti stringlist. Something similar we're doing for some series types which have more than 2 values (x and y), but with stringlist, not TChartValueList.
Marjan Slatinek,
http://www.steema.com

rotella
Newbie
Newbie
Posts: 7
Joined: Mon Nov 03, 2003 5:00 am
Location: chicago, IL

Post by rotella » Thu May 27, 2004 4:23 pm

I was really hoping for something more "automatic" like a TChartValueList, where you can just set ValueSource property.

Can you please provide a source example of AddXY()? How does the series access the dataset's record? There are no explicit calls to AddXY() anywhere in the client code, it all relies on the chart/dataset "machinery".

Thanks in advance.

Post Reply