Howto draw Colorband behind axes in V7

TeeChart for ActiveX, COM and ASP
Post Reply
DH
Newbie
Newbie
Posts: 7
Joined: Wed Sep 24, 2003 4:00 am
Location: Germany
Contact:

Howto draw Colorband behind axes in V7

Post by DH » Fri Aug 20, 2004 10:53 am

Hello,

I have a question regarding a new feature in Version 7 of Teechart ActiveX. There seems to be a possibility to draw a colorband behind the axes so that the grid will be shown. This is possible via the editor.

How can it be done via code?

Thanks in advance.
Dirk

Christopher
Site Admin
Site Admin
Posts: 1349
Joined: Thu Jan 01, 1970 12:00 am
Location: Riudellots de la Selva, Catalonia
Contact:

Post by Christopher » Fri Aug 20, 2004 12:49 pm

Hi Dirk,
I have a question regarding a new feature in Version 7 of Teechart ActiveX. There seems to be a possibility to draw a colorband behind the axes so that the grid will be shown. This is possible via the editor.

How can it be done via code?
Do you mean transparency, e.g.

Code: Select all

Private Sub Check1_Click()
TChart1.Tools.Items(0).asColorband.DrawBehind = Check1.Value
End Sub

Private Sub Form_Load()
With TChart1
    .AddSeries scLine
    .Series(0).FillSampleValues 20
    
    .Axis.Left.SetMinMax 0, 2000
    
    .Tools.Add tcColorband
    .Tools.Items(0).asColorband.Axis = .Axis.Left
    .Tools.Items(0).asColorband.StartValue = 200
    .Tools.Items(0).asColorband.EndValue = 1700
    .Tools.Items(0).asColorband.Color = vbBlue
    .Tools.Items(0).asColorband.Transparency = 75
    
End With
End Sub
Thank you!

Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/

DH
Newbie
Newbie
Posts: 7
Joined: Wed Sep 24, 2003 4:00 am
Location: Germany
Contact:

Post by DH » Fri Aug 20, 2004 2:01 pm

Hi Chris,

no I don't mean transparency.

I'm using the trial version of Teechart7 and therein the editor (Tchart1.ShowEditor). Then I'm adding a colorband to my chart and on the options tab of the colorband there is an option "Draw Behind Axes" which places the colorband behind the grids.

Now I want to do the same thing by code.

How can it be done?

Dirk[/img]

Christopher
Site Admin
Site Admin
Posts: 1349
Joined: Thu Jan 01, 1970 12:00 am
Location: Riudellots de la Selva, Catalonia
Contact:

Post by Christopher » Mon Aug 23, 2004 8:10 am

Hi Dirk,
no I don't mean transparency.

I'm using the trial version of Teechart7 and therein the editor (Tchart1.ShowEditor). Then I'm adding a colorband to my chart and on the options tab of the colorband there is an option "Draw Behind Axes" which places the colorband behind the grids.

Now I want to do the same thing by code.

How can it be done?
The IColorLineTool.DrawBehindAxes seems to be missing from the TeeChart Pro AXv7.0.0.2. I've added this issue to the list of defects meaning that a fix to it will be considered for inclusion into the next maintenance release.

In the meantime, the only workaround I can suggest is to use the transparency feature I mentioned earlier.
Thank you!

Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/

DH
Newbie
Newbie
Posts: 7
Joined: Wed Sep 24, 2003 4:00 am
Location: Germany
Contact:

Post by DH » Mon Aug 23, 2004 8:58 am

Hi Chris,

The transparency attribute is not usable for me because if I export or print the chart with a transparency for the colorband of 30 % it I will not be shown correct.

Bur I think I found a workaround for my problem:
If you set Axis.DrawAxesBeforeSeries = False and then add the Colorband the colorband is drawn behind the grid.

Regards,
Dirk

Christopher
Site Admin
Site Admin
Posts: 1349
Joined: Thu Jan 01, 1970 12:00 am
Location: Riudellots de la Selva, Catalonia
Contact:

Post by Christopher » Mon Aug 23, 2004 9:39 am

Hi --
Bur I think I found a workaround for my problem:
If you set Axis.DrawAxesBeforeSeries = False and then add the Colorband the colorband is drawn behind the grid.
This has the disadvantage of making the axes grids draw on top of the series but if that's OK for you until we add the property into the type library then that's fine!
Thank you!

Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/

DH
Newbie
Newbie
Posts: 7
Joined: Wed Sep 24, 2003 4:00 am
Location: Germany
Contact:

Post by DH » Mon Aug 23, 2004 10:23 am

Hi Chris,

you are right. The effect that I create using my suggestion is not the desired one.

Could you please tell me when the next maintenance release is due because I need this method very urgent for my work.

Thanks,
Dirk

Christopher
Site Admin
Site Admin
Posts: 1349
Joined: Thu Jan 01, 1970 12:00 am
Location: Riudellots de la Selva, Catalonia
Contact:

Post by Christopher » Tue Aug 24, 2004 4:33 pm

Hi Dirk,
Could you please tell me when the next maintenance release is due because I need this method very urgent for my work.
The TeeChart Pro AXv7.0.0.2 was released on 14th Aug. 2004. We like to try and release [at least] one major release and three maintenance releases for each product per year, meaning that the next maintenance release for AXv7 will probably be out at some time in November.

Can't you use my transparency workaround as a temporary measure?
Thank you!

Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/

DH
Newbie
Newbie
Posts: 7
Joined: Wed Sep 24, 2003 4:00 am
Location: Germany
Contact:

Post by DH » Wed Aug 25, 2004 8:16 am

Hi Chris,

unfortunately I can't use the transparency property because I need to export the graph to an EMF file and there the transparency isn't working.

Regards,
Dirk

Post Reply