How to set the backwall color?
Posted: Mon Nov 12, 2012 10:36 am
I've taken the example code, and am playing with the chart. I want to set the background color of the chart to white.
I've commented out the 'gradient' part, but can't see how to change the panel background color. I get an error (even though this is in the help files in the installation):
Microsoft VBScript runtime error '800a01b6'
Object doesn't support this property or method: 'Panel.BackWallColor'
Obviously missing something silly here!!!!
Thanks.
Set Chart1 = CreateObject("TeeChart.TChart")
'=== Extract Chart type =======
ChartType = 1
ViewType = 0
'=== Add Series ==========
Chart1.AddSeries(1)
Chart1.AddSeries(1)
Chart1.AddSeries(1)
'=== Setup Chart view =====
Chart1.Aspect.View3D=0
'=== Do Chart bits and pieces =====
Chart1.Header.Text(0)="TeeChart Series Types"
chart1.walls.visible=true
' Chart1.Walls.Left.Transparent=True
' Chart1.Walls.Left.Color=RGB(35,70,128)
' Chart1.Panel.Gradient.Visible=True
' Chart1.Panel.Gradient.StartColor=&HB3DEF5 '&H8CB4D2
' Chart1.Panel.Gradient.EndColor=&HFACE87
Chart1.Panel.BackWallColor = RGB(255,255,255)
'==== Size will be used for image output formats =====
Chart1.Width = 450
Chart1.Height = 290
'=== use your methods eg via DB to populate Chart or...
' Chart1.Series(0).FillSampleValues 20
with chart1
.Series(1).asBar.StackGroup = 0
.Series(1).asBar.MultiBar = mbStacked
.Series(0).Marks.Visible = false
.Series(1).Marks.Visible = false
.Series(2).Marks.Visible = false
.Legend.Visible=True
.Legend.LegendStyle=3
.Legend.TextStyle=2
.Legend.Alignment=1
.Series(0).add cDbl(objRS("wsBudgetTotal")), "Budget", rgb(0,0,255)
.Series(1).add cDbl(objRS("wsOrderIntakeTotal")), "Actual", rgb(0,255,0)
.Series(2).add cDbl(objRS("wsVarianceTotal")), "Variance", rgb(255,0,0)
.Series(0).asBar.StackGroup = 0
.Series(1).asBar.StackGroup = 1
.Series(2).asBar.StackGroup = 1
end with
I've commented out the 'gradient' part, but can't see how to change the panel background color. I get an error (even though this is in the help files in the installation):
Microsoft VBScript runtime error '800a01b6'
Object doesn't support this property or method: 'Panel.BackWallColor'
Obviously missing something silly here!!!!
Thanks.
Set Chart1 = CreateObject("TeeChart.TChart")
'=== Extract Chart type =======
ChartType = 1
ViewType = 0
'=== Add Series ==========
Chart1.AddSeries(1)
Chart1.AddSeries(1)
Chart1.AddSeries(1)
'=== Setup Chart view =====
Chart1.Aspect.View3D=0
'=== Do Chart bits and pieces =====
Chart1.Header.Text(0)="TeeChart Series Types"
chart1.walls.visible=true
' Chart1.Walls.Left.Transparent=True
' Chart1.Walls.Left.Color=RGB(35,70,128)
' Chart1.Panel.Gradient.Visible=True
' Chart1.Panel.Gradient.StartColor=&HB3DEF5 '&H8CB4D2
' Chart1.Panel.Gradient.EndColor=&HFACE87
Chart1.Panel.BackWallColor = RGB(255,255,255)
'==== Size will be used for image output formats =====
Chart1.Width = 450
Chart1.Height = 290
'=== use your methods eg via DB to populate Chart or...
' Chart1.Series(0).FillSampleValues 20
with chart1
.Series(1).asBar.StackGroup = 0
.Series(1).asBar.MultiBar = mbStacked
.Series(0).Marks.Visible = false
.Series(1).Marks.Visible = false
.Series(2).Marks.Visible = false
.Legend.Visible=True
.Legend.LegendStyle=3
.Legend.TextStyle=2
.Legend.Alignment=1
.Series(0).add cDbl(objRS("wsBudgetTotal")), "Budget", rgb(0,0,255)
.Series(1).add cDbl(objRS("wsOrderIntakeTotal")), "Actual", rgb(0,255,0)
.Series(2).add cDbl(objRS("wsVarianceTotal")), "Variance", rgb(255,0,0)
.Series(0).asBar.StackGroup = 0
.Series(1).asBar.StackGroup = 1
.Series(2).asBar.StackGroup = 1
end with