gradient ? canvas ? Panel color ?

TeeChart for ActiveX, COM and ASP
Post Reply
Laurent75
Newbie
Newbie
Posts: 2
Joined: Mon Feb 21, 2011 12:00 am

gradient ? canvas ? Panel color ?

Post by Laurent75 » Wed Dec 14, 2011 4:02 pm

We need some help to configure the new fonction of teechart 2011 :

Here are the asp code that we are using (Teechart activeX) :

Code: Select all

Set chart = CreateObject("TeeChart.TChart")
Chart.Walls.Left.Transparent=false
Chart.Walls.Left.Color=vbyellow  
Chart.Panel.BevelOuter=0 
Chart.Panel.BevelWidth=0
Chart.Panel.color=vbWhite
'Chart.Panel.Gradient.Visible=false
Chart.Panel.Gradient.Visible = false
Chart.Panel.Gradient.Direction = gdRightLeft
Chart.Panel.Gradient.StartColor = vbWhite
Chart.Panel.Gradient.MidColor = vbWhite
Chart.Panel.Gradient.EndColor = vbWhite
First example :

Image

We are looking to disactivate the grey color of this graphique (gradient ? canvas ? Panel color ?)

Second need :
For the same graph, we are looking to put a gradient on the serie like your example in the gallery :

Image

We try with this code but it didn’t work :

Code: Select all

Chart.AddSeries(scbar)
Chart.Series(num_serie).asBar.BarStyle = bsRoundRectangle
Chart.Series(num_serie).asBar.RoundSize = 20
Chart.Series(0).asBar.Gradient.Visible=True
Chart.Series(0).ColorEachPoint=True
Chart.Series(0).asBar.Gradient.Direction = 2
'Chart.Series(0).asBar.Gradient.StartColor rgb(255,255,255)
'Chart.Series(0).asBar.Gradient.EndColor rgb(255,255,255)
'Chart.Series(0).asBar.Gradient.MidColor tab_color(0)
Can you help us ?

Yeray
Site Admin
Site Admin
Posts: 9613
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: gradient ? canvas ? Panel color ?

Post by Yeray » Thu Dec 15, 2011 8:22 am

Hello,
Laurent75 wrote:We are looking to disactivate the grey color of this graphique (gradient ? canvas ? Panel color ?)
It's probably the back wall gradient. Try this:

Code: Select all

Chart.Walls.Back.Gradient.Visible=false
Laurent75 wrote:Second need :
For the same graph, we are looking to put a gradient on the serie like your example in the gallery :
The gradient works with the bsRectGradient BarStyle, not with the bsRoundRectangle.
Here it is a simple example:

Code: Select all

  Dim BaseColor As Long
  BaseColor = RGB(0, 0, 255)

  Chart.Aspect.View3D = False
  Chart.AddSeries scHorizBar
 
  With Chart.Series(0)
    .FillSampleValues
    .color = BaseColor
    .Marks.Transparent = True
    .Marks.Font.color = vbWhite
    With .asHorizBar
      .BarStyle = bsRectGradient
      .MarksOnBar = True
      .MarksLocation = mlCenter
      With .Gradient
        .Direction = gdBottomTop
        .StartColor = BaseColor
        .MidColor = RGB(128, 128, 255)
      End With
    End With
  End With
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply