Hi Narcis,
In the example I sent to you the were 3 TColorLineTools that I use for marking the current day and time. When I scoll left or right, the color marks move beyond the axis until they are off the form. How can I get the color lines to deactivate when they are outside of the left or right axis without freeing them?
GetASeries Method
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi CCRyder,
You can use something like the snippet below and some additional tricks I added on the original project you sent. I'm going to post the project in the attachments newsgroup.
You can use something like the snippet below and some additional tricks I added on the original project you sent. I'm going to post the project in the attachments newsgroup.
Code: Select all
procedure TForm1.Chart1AfterDraw(Sender: TObject);
var i: Integer;
begin
With Chart1.Tools do
begin
for i := 0 to Count - 1 do
if (Items[i] is TColorLineTool) then
begin
if (((Items[i] as TColorLineTool).Value > Chart1.Axes.Top.Maximum) or
((Items[i] as TColorLineTool).Value < Chart1.Axes.Top.Minimum)) then
Items[i].Active:=false
else
Items[i].Active:=true;
end;
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 |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi CCRyder,
You're very welcome! I'm glad to hear my suggestions were helpful.
You're very welcome! I'm glad to hear my suggestions were helpful.
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 |