FirstValueIndex and LastValueIndex

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

FirstValueIndex and LastValueIndex

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

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;

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

Post by Marjan » Tue Jun 01, 2004 6:24 am

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.
Marjan Slatinek,
http://www.steema.com

Post Reply