TColorLineTool.Style := clmaximum but TColorLineTool.Value still point to the left of the x axis.
I want to collect the last added value in the grid for displaying in a edit box.
I get a value but it is from the first value in the grid, not the last as i want.
Is there some update that has to be done or something else.
Happy for any suggestion!
BR
Linus
BTW, it works fine when i manually drag the line
TColorLineTool.Style := clmaximum
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Linus,
It works fine for me here using latest TeeChart version available at our customer area, which is v7.05, and this code:
It works fine for me here using latest TeeChart version available at our customer area, which is v7.05, and this code:
Code: Select all
procedure TForm1.Timer1Timer(Sender: TObject);
begin
Series1.Add(Random);
Edit1.Text:=FloatToStr(Series1.XValue[Series1.Count-1]);
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
ChartTool1.Axis:=Chart1.Axes.Bottom;
ChartTool1.Style:=clMaximum;
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 |
-
- Newbie
- Posts: 7
- Joined: Wed Dec 01, 2004 5:00 am
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Linus,
If the code I sent doesn't work and you can't upgrade your TeeChart version then you could try using:
BTW: Notice that v7.05 is much better than v7.01 as several bug fixes and new features were implemented for it. You can review release notes from v7.01 to v7.05 here.
If the code I sent doesn't work and you can't upgrade your TeeChart version then you could try using:
Code: Select all
procedure TForm1.Timer1Timer(Sender: TObject);
begin
Series1.Add(Random);
Edit1.Text:=FloatToStr(Series1.XValue[Series1.Count-1]);
ChartTool1.Value:=Series1.XValues.MaxValue;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
ChartTool1.Axis:=Chart1.Axes.Bottom;
ChartTool1.Style:=clMaximum;
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 |
-
- Newbie
- Posts: 7
- Joined: Wed Dec 01, 2004 5:00 am
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
You're welcome Linus. I'm glad to hear that.
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 |