Problem with Bubble Chart OWC10

M

Michael Weiss

I have the following code with which I am constructing a bubble chart. The
problem I am running into is that I need to use the three of the four totals
being dipslayed in the OWC Pivot Control that the chartspace object is tied
to. When I uncomment the lines for SetData for the SeriesCollection(0) object
I get an error on the first of those three lines. Commenting out the line
".PlotAllAggregages = c.chPlotAggreggatesSeries" gives me an empty chartspace
object. If I use that line in the code I at least get bubbles representing
the data in the pivot control but the chart control shows the first three
data totals (Items 0 - 2) and I need totals.items 0,1, & 3...
Any suggestions where I could be going wrong here?
Thank you,
Michael
 
M

Michael Weiss

Here is the sample code:
with cspace
.HasMultipleCharts = false
.PlotAllAggregates = c.chPlotAggregatesSeries
.ChartLayout = c.chChartLayoutHorizontal
.displayfieldbuttons = false
.AllowPropertyToolbox = False
.interior.color = "white"
.HasChartSpaceLegend = True
.ChartSpaceLegend.Position = c.chLegendPositionLeft
.ChartSpaceLegend.Font.Name = "Arial"
.ChartSpaceLegend.Font.Size = 7
'.SetData c.chDimValues, 0, "CPM"
end with

Set cht = cspace.charts(0)
if cht.Type <> c.chChartTypeBubble then
cht.Type = c.chChartTypeBubble
end if

' Use the first total for Y values,
' second for X values, and third
' for Bubble size values
'cht.SeriesCollection.Add
'cht.SeriesCollection(0).SetData c.chDimYValues, c.chDataBound,
"Call Count"
'cht.SeriesCollection(0).SetData c.chDimXValues, 0, "Call Dur"
'cht.SeriesCollection(0).SetData c.chDimBubbleValues, 0, "CPM"

' Set the label and number format for the Y axis
set ax = cht.Axes(c.chAxisPositionLeft)
set ttl = pview.DataAxis.Totals(0)
ax.NumberFormat = ttl.NumberFormat
ax.HasTitle = True
ax.Title.Caption = ttl.Caption
ax.title.font.size = 8
ax.title.font.color = "cornsilk"
ax.Scaling.Orientation = c.chScaleOrientationMinMax

' Set the label and number format for the X axis
set ax = cht.Axes(c.chAxisPositionBottom)
set ttl = pview.DataAxis.Totals(1)
ax.NumberFormat = ttl.NumberFormat
ax.HasTitle = True
ax.Title.Caption = ttl.Caption
ax.title.font.size = 8
ax.title.font.color = "cornsilk"
ax.Scaling.Orientation = c.chScaleOrientationMinMax

With cht
..plotarea.interior.color = "cornsilk"
..axes(1).font.color = "cornsilk"
..axes(0).font.color = "cornsilk"
..axes(1).font.size = 7
..axes(0).font.size = 7
'.legend.interior.color = "#336699"
'.legend.font.size = 7
'.legend.font.color = "cornsilk"
End With 'with cht
 
M

Michael Weiss

Okay, I have changed the code to the following and now I get an error stating
that the specified dimension is not valid for the selected chart type on the
line .SetData c.chDimYValues, 0, "Call Count"...any ideas?
Thank you,
Michael
with cspace
..HasMultipleCharts = false
'.PlotAllAggregates = c.chPlotAggregatesSeries
..SetData c.chDimYValues, 0, "Call Count"
..SetData c.chDimXValues, 0, "Call Dur"
..SetData c.chDimBubbleValues, 0, "CPM"
end with

Set cht = cspace.charts(0)
if cht.Type <> c.chChartTypeBubble then
cht.Type = c.chChartTypeBubble
end if
 
Top