Bug using ValueIndex in a DBChart

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Schryns
Newbie
Newbie
Posts: 1
Joined: Tue Dec 14, 2004 5:00 am

Bug using ValueIndex in a DBChart

Post by Schryns » Fri Mar 04, 2005 12:54 pm

Hello

I want to have an array of integer which looks like this :

Tab[n] = IdRecord of the dataset's record of a ganttSerie

I use the Event 'OnAfterAdd' of the serie :

procedure TFrmBossOrderLines.SerDataAfterAdd(Sender: TChartSeries;
ValueIndex: Integer);
begin
if Length(Tab)<ValueIndex+1 then SetLength(Tab,1+ValueIndex);
Tab[ValueIndex]:= DataSetName.FieldbyName('ID').AsInteger;
end;

I don't know why but it starts of well when I open the Dataset, I get the values wanted for ValueIndex 0, 1, 2 and then the next valueindex swithces back to 0 although the cursor of the dataset is on the 4th record.
And after ValueIndex continues to have awkward values...

Isn't ValueIndex suppose to be a unique number refering each ganttbar I have in the chart's serie ????

Thanks for anybody that can help.

Pep
Site Admin
Site Admin
Posts: 3303
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Thu Mar 10, 2005 10:47 am

Hi,
Isn't ValueIndex suppose to be a unique number refering each ganttbar I have in the chart's serie ????
It gives you the position index of the Point that has been added or inserted.
I cannot reproduce the problem. If you still having problems, please post an example into the news://www.steema.net/steema.public.attachments newsgroup with which we can reproduce "as is" the problem here.

Post Reply