G
Guest
Hello everybody,
i create a chart with the above code - works fine.
my problem:
how can i change the interior colors of the 4 pies?
how can i change the bachgroundcolor of the chart?
how can i change the font, font-size, font-color?
how can i set the corrosponding value to the pie?
thanks
rainer from germany
Option Explicit
Dim aryTimes
Dim aryValues
Dim objChart
Dim objCharts
Dim objConstants
Dim strFileName
Set objCharts = Createobject("OWC11.Chartspace")
Set objConstants = objCharts.Constants
aryTimes = Array("1997", "1999", "2000", "2003")
aryValues = Array(49000, -7800, -19000, 15000)
With objCharts
.HasChartSpaceTitle = True
.ChartSpaceTitle.Caption = "creating charts using microsoft office
web components"
.ChartLayout = objConstants.chChartLayoutHorizontal
End With
Call AddChart(objCharts, objConstants, aryValues, aryTimes,
objConstants.chChartTypePieExploded3D)
Response.ContentType = "image/GIF"
Response.BinaryWrite objCharts.GetPicture("GIF", 400, 400)
Set objCharts = Nothing
Set objConstants = Nothing
Sub AddChart(objCharts, objConstants, aryData, aryDescription,
intChartType)
Dim objChart
Set objChart = objCharts.Charts.Add
With objChart
.Type = intChartType
.SetData objConstants.chDimCategories,
objConstants.chDataLiteral, aryDescription
.SeriesCollection(0).SetData objConstants.chDimValues,
objConstants.chDataLiteral, aryData
End With
Set objChart = Nothing
End Sub
i create a chart with the above code - works fine.
my problem:
how can i change the interior colors of the 4 pies?
how can i change the bachgroundcolor of the chart?
how can i change the font, font-size, font-color?
how can i set the corrosponding value to the pie?
thanks
rainer from germany
Option Explicit
Dim aryTimes
Dim aryValues
Dim objChart
Dim objCharts
Dim objConstants
Dim strFileName
Set objCharts = Createobject("OWC11.Chartspace")
Set objConstants = objCharts.Constants
aryTimes = Array("1997", "1999", "2000", "2003")
aryValues = Array(49000, -7800, -19000, 15000)
With objCharts
.HasChartSpaceTitle = True
.ChartSpaceTitle.Caption = "creating charts using microsoft office
web components"
.ChartLayout = objConstants.chChartLayoutHorizontal
End With
Call AddChart(objCharts, objConstants, aryValues, aryTimes,
objConstants.chChartTypePieExploded3D)
Response.ContentType = "image/GIF"
Response.BinaryWrite objCharts.GetPicture("GIF", 400, 400)
Set objCharts = Nothing
Set objConstants = Nothing
Sub AddChart(objCharts, objConstants, aryData, aryDescription,
intChartType)
Dim objChart
Set objChart = objCharts.Charts.Add
With objChart
.Type = intChartType
.SetData objConstants.chDimCategories,
objConstants.chDataLiteral, aryDescription
.SeriesCollection(0).SetData objConstants.chDimValues,
objConstants.chDataLiteral, aryData
End With
Set objChart = Nothing
End Sub