Page 1 of 1

Bug using ValueIndex in a DBChart

Posted: Fri Mar 04, 2005 12:54 pm
by 9340293
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.

Posted: Thu Mar 10, 2005 10:47 am
by Pep
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.