D
Dimitry
Hi Guys,
I've been using DataSource Control (DSC) as a data source for my
ChartSpace (csChart) object in OWC9. Now I have to convert following
code to OWC11.
After I changed classid for both objects I get error since ChartSpace
doesn't have ChartDataSources collection anymore.
Is there any other way to bind ChartSpace to DSC in OWC11.
Thank you for help,
Dimitry
Set c = csChart.Constants
For i=0 to iChartMax
Set rsd = DSC.RecordsetDefs.AddNew(
GenerateSQL(i,iSet,sSelectedPeriod), c.dscCommandText)
Set ChartDS = csChart.ChartDataSources.Add
ChartDS.DataSource = DSC
ChartDS.DataMember = rsd.Name
Next
csChart.ChartWrapCount=iWarpCount
'Draw Charts
For iChartNum = 0 To iChartMax
Set oChart=csChart.Charts.Add
With oChart
.SetData c.chDimSeriesNames, iChartNum, "SERIES"
.SetData c.chDimCategories, iChartNum, "PERIOD"
.SetData c.chDimValues, iChartNum, "VALUE"
.HasLegend = True
.Legend.Position =LegendPosition
.HasTitle = True
.Title.Caption = aTitles(iSet)(iChartNum)(0)
.Type = aTitles(iSet)(iChartNum)(6)
.Title.Position =TitlePosition
.Axes(0).Font.Size=7
.Axes(1).Font.Size=6
.PlotArea.Interior.Color =cColor
End With
Next
I've been using DataSource Control (DSC) as a data source for my
ChartSpace (csChart) object in OWC9. Now I have to convert following
code to OWC11.
After I changed classid for both objects I get error since ChartSpace
doesn't have ChartDataSources collection anymore.
Is there any other way to bind ChartSpace to DSC in OWC11.
Thank you for help,
Dimitry
Set c = csChart.Constants
For i=0 to iChartMax
Set rsd = DSC.RecordsetDefs.AddNew(
GenerateSQL(i,iSet,sSelectedPeriod), c.dscCommandText)
Set ChartDS = csChart.ChartDataSources.Add
ChartDS.DataSource = DSC
ChartDS.DataMember = rsd.Name
Next
csChart.ChartWrapCount=iWarpCount
'Draw Charts
For iChartNum = 0 To iChartMax
Set oChart=csChart.Charts.Add
With oChart
.SetData c.chDimSeriesNames, iChartNum, "SERIES"
.SetData c.chDimCategories, iChartNum, "PERIOD"
.SetData c.chDimValues, iChartNum, "VALUE"
.HasLegend = True
.Legend.Position =LegendPosition
.HasTitle = True
.Title.Caption = aTitles(iSet)(iChartNum)(0)
.Type = aTitles(iSet)(iChartNum)(6)
.Title.Position =TitlePosition
.Axes(0).Font.Size=7
.Axes(1).Font.Size=6
.PlotArea.Interior.Color =cColor
End With
Next