Line chart wraps when data is added
Line chart wraps when data is added
I have an application where I enter X-Y data into a chart, say X goes from 0 to 1023, then I repeat (X starts again at 0 and goes to 1023), but a line is drawn from the X,Y point at X=1023 to the X,Y point at 0 even though I use change the existing value of Y (using ...->XValue[1023] = 1023 followed by... ->XValue[0] = 0). Any way I can keep this from happening as I get a LOT of horizontal lines across the screen....
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi reef,
Yes, you can avoid this adding a null point at the end of each line, for example:
Yes, you can avoid this adding a null point at the end of each line, for example:
Code: Select all
procedure TForm1.FormCreate(Sender: TObject);
var i,j: Integer;
begin
Series1.XValues.Order:=loNone;
for i:=0 to 5 do
begin
for j:=0 to 1023 do
Series1.AddXY(j,i);
Series1.AddNullXY(j,i);
end;
end;
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |