Page 1 of 1

Non-Float ChartSeries Data

Posted: Wed May 26, 2004 12:16 pm
by 8441597
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?

Posted: Wed May 26, 2004 7:50 pm
by Marjan
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.

Posted: Thu May 27, 2004 4:23 pm
by 8441597
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.