Gradient.MidColor active

TeeChart for ActiveX, COM and ASP
Post Reply
mboangher
Newbie
Newbie
Posts: 10
Joined: Wed Feb 04, 2004 5:00 am

Gradient.MidColor active

Post by mboangher » Fri Jun 18, 2004 11:21 am

I'm currently using the TeeChart6 ActiveX version, and I'm playing with the Gradient properties.

In the TeeChart Pro AX v6 features demo, I've noticed that the Gradient (for the Series or for one of the Walls etc.) also have a checkBox which sets weher the Gradient.MidColor is active or not.
I could not find this property in the help file.

How could I programatically set it, please ?
Thank you.

Pep
Site Admin
Site Admin
Posts: 3303
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Mon Jun 21, 2004 10:32 am

Hi,

you only must set any color :

Code: Select all

With TChart1.Walls.Back
  .Transparent = False
  .Gradient.StartColor = vbBlue
  .Gradient.EndColor = vbGreen
  .Gradient.MidColor = vbYellow
  .Gradient.Visible = True
End With

mboangher
Newbie
Newbie
Posts: 10
Joined: Wed Feb 04, 2004 5:00 am

Post by mboangher » Mon Jun 21, 2004 11:30 am

Thank you, I already tried that.
But I actually don't want to set any color in the Middle, just to have a gradient from start color to end color, without any middle color.

In the TeeChart v6 ActiveX Demo , browsing to Previous Version - New Chart Tools - Mark Tips, then pressing Edit for the chart , then Series tab for instance, -> Gradient , you have a check "No middle", and that's what I would like to use.

Or shall I just set the MidColor to some average between StartColor and EndColor in this case ?

Pep
Site Admin
Site Admin
Posts: 3303
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Mon Jun 21, 2004 11:55 am

Hi,

you can simulate the Check using something like the following code :

Code: Select all

If Check1.Value Then
    TChart1.Series(0).Marks.Gradient.MidColor = vbGreen
Else
    TChart1.Series(0).Marks.Gradient.MidColor = clNone
End If

Post Reply