Page 1 of 1

TColorLineTool.Style := clmaximum

Posted: Wed Oct 26, 2005 10:34 am
by 9340045
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 :-)

Posted: Wed Oct 26, 2005 10:52 am
by narcis
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;

Posted: Wed Oct 26, 2005 11:09 am
by 9340045
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

Posted: Wed Oct 26, 2005 11:18 am
by narcis
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.

Posted: Wed Oct 26, 2005 11:38 am
by 9340045
Now it works fine, thanks!

BR
Linus

Posted: Wed Oct 26, 2005 11:39 am
by narcis
You're welcome Linus. I'm glad to hear that.