Page 1 of 1

Gradient.MidColor active

Posted: Fri Jun 18, 2004 11:21 am
by 9080753
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.

Posted: Mon Jun 21, 2004 10:32 am
by Pep
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

Posted: Mon Jun 21, 2004 11:30 am
by 9080753
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 ?

Posted: Mon Jun 21, 2004 11:55 am
by Pep
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