Combination Charts with Multiple Series

B

beeper

Hello,

I have just recently begun using OWC11 for creating charts, and thing
are great for most of my charts (perusing this forum has helped
thanks!). However, I seem to be running into a limitation wit
combination charts. I want to plot a chart with 4 series a
chChartTypeColumnStacked, and then also have two series a
chChartTypeLineMarkers. But I never seem to be able to get more than
series to display for the second type of chart in the combo chart. I'v
tried lots of combinations of numbers of series and methods o
declaring chart types, but I keep running into this same barrier.

The snippet below shows the pertinent part of my VBScript in an as
page. The four arrays Values(0), Values(1), Values(2), and Values (3
are plotted nicely in stacked columns. I want to add the data in th
arrays targetValues and classValues as markers, but only the las
series added gets plotted (classValues in this example).

Is this a real limitation, or is there some way around?

Thanks,

Brian Reid


Set myChartSpace = CreateObject("OWC11.Chartspace")
myChartSpace.Charts.Add
with myChartSpace.Charts(0)
.Type = myChartSpace.Constants.chChartTypeColumnStacked

.SeriesCollection.Add
.SeriesCollection(0).Caption = "Observed"
.SeriesCollection(0).SetData myChartSpace.Constants.chDimValues
myChartSpace.Constants.chDataLiteral, Values(0)
.SeriesCollection(0).Interior.Color = RGB(192,192,96)

.SeriesCollection.Add
.SeriesCollection(1).Caption = "Assisted Someone Else"
.SeriesCollection(1).SetData myChartSpace.Constants.chDimValues
myChartSpace.Constants.chDataLiteral, Values(1)
.SeriesCollection(1).Interior.Color = RGB(128,128,255)

.SeriesCollection.Add
.SeriesCollection(2).Caption = "Perf. w/ Assist. & Supervis."
.SeriesCollection(2).SetData myChartSpace.Constants.chDimValues
myChartSpace.Constants.chDataLiteral, Values(2)
.SeriesCollection(2).Interior.Color = RGB(255,128,128)

.SeriesCollection.Add
.SeriesCollection(3).Caption = "Performed by Myself"
.SeriesCollection(3).SetData myChartSpace.Constants.chDimValues
myChartSpace.Constants.chDataLiteral, Values(3)
.SeriesCollection(3).Interior.Color = RGB(128,255,128)

.SeriesCollection.Add
.SeriesCollection(4).Caption = "Target"
.SeriesCollection(4).SetData myChartSpace.Constants.chDimValues
myChartSpace.Constants.chDataLiteral, targetValues
.SeriesCollection(4).Line.Color = -2
.SeriesCollection(4).Marker.Style
myChartSpace.Constants.chMarkerStyleTriangle
.SeriesCollection(4).Interior.Color = "yellow"
.SeriesCollection(4).Type
myChartSpace.Constants.chChartTypeLineMarkers

.SeriesCollection.Add
.SeriesCollection(5).Caption = "Average"
.SeriesCollection(5).SetData myChartSpace.Constants.chDimValues
myChartSpace.Constants.chDataLiteral, classValues
.SeriesCollection(5).Line.Color = -2
.SeriesCollection(5).Marker.Style
myChartSpace.Constants.chMarkerStyleDiamond
.SeriesCollection(5).Interior.Color = RGB(0,0,0)
.SeriesCollection(5).Type
myChartSpace.Constants.chChartTypeLineMarkers

.SeriesCollection(0).SetData myChartSpace.Constants.chDimCategories
myChartSpace.Constants.chDataLiteral, Categories
End wit
 
A

Alvin Bruney - ASP.NET MVP

It's probably not a supported type. I haven't checked. You can do so easily
by looking it up on the office website or in the black book.

--
Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
The Microsoft Office Web Components Black Book with .NET
Now Available @ www.lulu.com/owc
Forth-coming VSTO.NET - Wrox/Wiley 2006
 
B

beeper

I'm using chChartTypeColumnStacked and chChartTypeLineMarkers which d
appear to be in the "supported" families for combination charts
"column, area, and line charts."

In fact the same problem occurs when using the chart types used i
Microsoft's combination chart example, chChartTypeColumnClustered an
chChartTypeLin
(http://support.microsoft.com/default.aspx?scid=kb;en-us;240263) o
when using the chart types use in the Black Book example
chChartTypeSmoothLine (I think) and chChartTypeLine (pp. 169-170).

So I don't think it's a supported chart type problem. I haven't foun
any examples of combination charts that have more than 1 series fo
each of two different chart types.

Thanks,
-Brian
It's probably not a supported type. I haven't checked. You can do s
easily
by looking it up on the office website or in the black book.

--
Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
The Microsoft Office Web Components Black Book with .NET
Now Available @ www.lulu.com/owc
Forth-coming VSTO.NET - Wrox/Wiley 2006
-------------------------------------------------------
 
A

Alvin Bruney - ASP.NET MVP

By default, combination charts support a single series so that there are at
most two series on the chart. However, you can easily impose any number of
series on the chart by using custom drawing. There's more in the black book.
Also, follow this link for an idea:
http://support.microsoft.com/default.aspx?scid=kb;en-us;555162

--
Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
The Microsoft Office Web Components Black Book with .NET
Now Available @ www.lulu.com/owc
Forth-coming VSTO.NET - Wrox/Wiley 2006
-------------------------------------------------------



beeper said:
I'm using chChartTypeColumnStacked and chChartTypeLineMarkers which do
appear to be in the "supported" families for combination charts -
"column, area, and line charts."

In fact the same problem occurs when using the chart types used in
Microsoft's combination chart example, chChartTypeColumnClustered and
chChartTypeLine
(http://support.microsoft.com/default.aspx?scid=kb;en-us;240263) or
when using the chart types use in the Black Book example,
chChartTypeSmoothLine (I think) and chChartTypeLine (pp. 169-170).

So I don't think it's a supported chart type problem. I haven't found
any examples of combination charts that have more than 1 series for
each of two different chart types.

Thanks,
-Brian
It's probably not a supported type. I haven't checked. You can do so
easily
by looking it up on the office website or in the black book.

--
Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
The Microsoft Office Web Components Black Book with .NET
Now Available @ www.lulu.com/owc
Forth-coming VSTO.NET - Wrox/Wiley 2006
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top