Page 1 of 1

Not getting all the Data points to show on the Graph

Posted: Tue Feb 24, 2009 1:01 pm
by 8440889
I'm using TeeChart Pro 7.0 w/Delphi 2006

I'm working with a Line Series graph and my problem is that I'm only getting a display of what looks to be 256 of the 512 points that I am sending to my graph to show.

I have two x and y arrays of double, both contain 512 points. I've added a stringgrid to show that all the points are being added to the graph using the code below. However, the data points stop plotting at roughly 1/2 the array (which I'm guessing is 256).

Using the following code:

Code: Select all

       for i := 0 to 511 do
        begin
        x := xVal[i];
        y := yVal[i];
        AddXY(xVal[i],yVal[i]);
        if (SeriesIndex = 0) and (chart.Name = 'DisplayChart') then
         begin
         Mainform.ChartGrid1.Cells[0,i-fc] := Format('%.3f',[x]);
         Mainform.ChartGrid1.Cells[1,i-fc] := Format('%.3f',[y]);
         end;
        end;
       end;
Any ideas? I've been trying to work around this for a couple of days and I'm totally stumped.

Posted: Tue Feb 24, 2009 2:15 pm
by 8440889
Okay, I figured out my problem - I was doing it to myself. I had a procedure that was truncating my array. After I fixed it, everything was good.

Posted: Tue Feb 24, 2009 2:24 pm
by yeray
Hi lkuderick,

I'm happy to see that you found your problem.