Page 1 of 1

Howto draw Colorband behind axes in V7

Posted: Fri Aug 20, 2004 10:53 am
by 9079147
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

Posted: Fri Aug 20, 2004 12:49 pm
by Chris
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

Posted: Fri Aug 20, 2004 2:01 pm
by 9079147
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]

Posted: Mon Aug 23, 2004 8:10 am
by Chris
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.

Posted: Mon Aug 23, 2004 8:58 am
by 9079147
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

Posted: Mon Aug 23, 2004 9:39 am
by Chris
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!

Posted: Mon Aug 23, 2004 10:23 am
by 9079147
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

Posted: Tue Aug 24, 2004 4:33 pm
by Chris
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?

Posted: Wed Aug 25, 2004 8:16 am
by 9079147
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