V8.02 - Problem loading Series Data from Dynamic array
Posted: Wed Feb 27, 2008 10:00 pm
I am having a problem loading the series with data from 2 dynamic array in Delphi 7. The X axis is filled with time array and the second contains floating point values
The arrays are filled starting at element zero and dimensioned to size of the dataset. My application will freeze after the arrays are loaded.
If I dimension the arrays with an extra element it works, but the value of this element is zero. The code is as follows:
NumOfPts:=length(pSesTime);
{ set our X array }
With serMax.XValues do
begin
Value:=TChartValues(pSesTime); { <-- the array }
Count:=NumOfPts; { <-- number of points }
Modified:=True; { <-- recalculate min and max }
end;
{ set our Y array }
With serMax.YValues do
begin
Value:=TChartValues(pGraph[GraphNum].Max);
Count:=NumOfPts;
Modified:=True;
end;
chtSesData.UndoZoom; { <-- remove zoom (optional) }
{ Show data }
serMax.Repaint;
What am I doing wrong? I have also tried using the AddXY method with the same results. Please help!
The arrays are filled starting at element zero and dimensioned to size of the dataset. My application will freeze after the arrays are loaded.
If I dimension the arrays with an extra element it works, but the value of this element is zero. The code is as follows:
NumOfPts:=length(pSesTime);
{ set our X array }
With serMax.XValues do
begin
Value:=TChartValues(pSesTime); { <-- the array }
Count:=NumOfPts; { <-- number of points }
Modified:=True; { <-- recalculate min and max }
end;
{ set our Y array }
With serMax.YValues do
begin
Value:=TChartValues(pGraph[GraphNum].Max);
Count:=NumOfPts;
Modified:=True;
end;
chtSesData.UndoZoom; { <-- remove zoom (optional) }
{ Show data }
serMax.Repaint;
What am I doing wrong? I have also tried using the AddXY method with the same results. Please help!