TColorLineTool.Style := clmaximum

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Linus Ljung
Newbie
Newbie
Posts: 7
Joined: Wed Dec 01, 2004 5:00 am

TColorLineTool.Style := clmaximum

Post by Linus Ljung » Wed Oct 26, 2005 10:34 am

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 :-)

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Wed Oct 26, 2005 10:52 am

Hi Linus,

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
Image Image Image Image Image Image
Instructions - How to post in this forum

Linus Ljung
Newbie
Newbie
Posts: 7
Joined: Wed Dec 01, 2004 5:00 am

Post by Linus Ljung » Wed Oct 26, 2005 11:09 am

Hi, thanks for the answer!

I use version 7.01 is there i differance?
I cant get your code to work either.

I am not in a state where i want to upgrade to a newer version, since the project is under strict quality control, a lot of spec has to be accepted once again.

BR
Linus

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Wed Oct 26, 2005 11:18 am

Hi Linus,

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;
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.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Linus Ljung
Newbie
Newbie
Posts: 7
Joined: Wed Dec 01, 2004 5:00 am

Post by Linus Ljung » Wed Oct 26, 2005 11:38 am

Now it works fine, thanks!

BR
Linus

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Wed Oct 26, 2005 11:39 am

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
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply