hightlight/bold "0" line

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
rperkins
Newbie
Newbie
Posts: 58
Joined: Wed May 26, 2004 4:00 am

hightlight/bold "0" line

Post by rperkins » Thu Nov 29, 2007 4:47 pm

have a chart that has percent difference on the right axis (-10 to +100). would like to have the line that goes from the left to the right at the "0" scale value "stand out" (hightlight, bold, etc.). is this possible?

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

Post by Narcís » Fri Nov 30, 2007 10:19 am

Hi rperkins,

The easiest way I can think of to achieve that is using a TColorLineTool where you can specify its axis, position and pen properties.
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

rperkins
Newbie
Newbie
Posts: 58
Joined: Wed May 26, 2004 4:00 am

Post by rperkins » Fri Nov 30, 2007 1:48 pm

not sure if this is all that's needed, but...

went to the chart. clicked on edit chart. selected the tools tab. clicked add. selected the ColorLine and add. defined the properties to be on the right axis and custom value of 0. made the color black and width of 2. rebuilt application. line not on chart. am i missing something?

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

Post by Narcís » Fri Nov 30, 2007 3:00 pm

Hi rperkins,

This works fine for me here using v8.02. Which TeeChart version are you using? Could you please send us a simple example project we can run "as-is" to reproduce the problem here?

You can either post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.

Thanks in advance.
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

rperkins
Newbie
Newbie
Posts: 58
Joined: Wed May 26, 2004 4:00 am

Post by rperkins » Fri Nov 30, 2007 3:27 pm

not really sure if it's a problem. after i exited and re-entered and rebuilt the application (about 5 times for other updates), now, i've got the line. it's not at the 0 point on the axis, but at least it's visible. with it visible, at least now i can manipulate it.

we're running either v7.04 or 7.06. can't really do an update to the latest and greatest, yet, as we'd need to coordinate our development environments.

rperkins
Newbie
Newbie
Posts: 58
Joined: Wed May 26, 2004 4:00 am

Post by rperkins » Fri Nov 30, 2007 5:15 pm

if i wanted to set the color, width, etc. of the ChartTool, what is the path to the tool (aChart->Tools...)?

i added a ChartTool to each of my 5 charts. would have expected that they'd each be ChartTool1, but they're 1 on 1, 2 on 2, etc. is this normal? did i do something incorrectly?

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

Post by Narcís » Mon Dec 03, 2007 11:45 am

Hi rperkins,

Yes, this is because they are in the same form and the form already contains this object name. To call them all the same you could use something like this:

Code: Select all

  (Chart1.Tools[0] as TColorLineTool).Axis := Chart1.Axes.Left;
If you don't need any tool specific property then you can do this:

Code: Select all

  Chart1.Tools[0].Active:=true;
Hope this helps!
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