Page 1 of 1

hightlight/bold "0" line

Posted: Thu Nov 29, 2007 4:47 pm
by 9232632
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?

Posted: Fri Nov 30, 2007 10:19 am
by narcis
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.

Posted: Fri Nov 30, 2007 1:48 pm
by 9232632
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?

Posted: Fri Nov 30, 2007 3:00 pm
by narcis
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.

Posted: Fri Nov 30, 2007 3:27 pm
by 9232632
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.

Posted: Fri Nov 30, 2007 5:15 pm
by 9232632
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?

Posted: Mon Dec 03, 2007 11:45 am
by narcis
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!