Two types of graphs on same chart?

D

dahler

Is it possible to have two types of graphs on one chart?



I would like på make a ColumnStacked graph, and on the same chart have a
horizontal line, being a kind of limit, so that I can se, which columns
are below the limit, and which are above.



Is it possible? Can anyone help me, how to do this?



Thanks,

/Dahler
 
S

Sean

All you have to do is set up two different
SeriesCollections. Look at the following example:

'Add a series to the chart with the x-values and y-
values
Dim oSeries
Set oSeries = oChart.SeriesCollection.Add
oSeries.SetData c.chDimCategories, c.chDataLiteral,
xValues
oSeries.SetData c.chDimValues, c.chDataLiteral,
yValues1
oSeries.Type = c.chChartTypeColumnClustered


'Add another series to the chart with the x-values
and second y-values
'from the arrays and set the series type to a line
chart.
Set oSeries = oChart.SeriesCollection.Add
oSeries.SetData c.chDimCategories, c.chDataLiteral,
xValues
oSeries.SetData c.chDimValues, c.chDataLiteral,
yValues2
oSeries.Type = c.chChartTypeSmoothLine
 

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