Page 1 of 1

FirstValueIndex and LastValueIndex

Posted: Wed May 26, 2004 12:28 pm
by 8441597
We have created a TCustomSeries subclass which has two X-values and two Y-values, to draw "dumbbell" shapes.

Everything paints fine. However how do we integrate this second x-axis TChartValueList to participate in FirstValueIndex and LastValueIndex methods? We don't have source code, are these methods virtual?

Without these methods, we must handle this series class differently, and basically search the entire series against the X-axis min/max to find "visible" value indices.

Also, what other "plumbing" must be implemented to correctly integrate this series into the TeeCharts "machinery"? We currently have the following (in addition to drawing methods):
function MaxXValue: double; override;
function MaxYValue: double; override;
function MinYValue: double; override;

Posted: Tue Jun 01, 2004 6:24 am
by Marjan
Hi.

The FirstValueIndex and LastValueIndex properties are read-only and access the FFirstVisibleIndex and FLastVisibleIndex variables, defined and set in internal series/chart code.
We don't have source code
If you're deriving new series types and adding functionality then having a source code is almost a must. Have you considered upgrading to TeeChart source code license?
integrate this series into the TeeCharts "machinery"?
It depends, what exactly do you want to do with series. You can get functionality by overriding only DrawValue method, or by overriding/changing additional public and protected methods. Again, having a source code will give you good idea how things are implemented for existing series types.