jenroypa Posted June 11, 2009 Report Share Posted June 11, 2009 My user wants a chart that is both stacked and side by side.. As an example.. We want to do a chart that shows the number of apples eaten in a class vs the number of oranges by student by month.. So there are 2 stacked bars per month- the left stacks the number of apples eaten per student for the month, the right does the same for oranges.. and they would want 9 months shown.. Havent been able to find an example in the stacked and side by side graphs that allow both. hope the example makes sense..any help appreciated Quote Link to comment Share on other sites More sharing options...
AndreG Posted June 11, 2009 Report Share Posted June 11, 2009 The code bellow will generate the attached chart. I hope it is what you are looking for. Dim nSeries As Integer Dim nPoints As Integer Dim i As Integer Dim j As Integer nSeries = 4 nPoints = 5 i = 0 Chart1.OpenData COD_Values, nSeries, nPoints Do While (i < nSeries) j = 0 Do While (j < nPoints) Chart1.Value(i, j) = (Rnd()) * 100 j = j + 1 Loop i = i + 1 Loop Chart1.CloseData COD_Values Chart1.Series(0).Stacked = True Chart1.Series(1).Stacked = True Chart1.Series(2).Stacked = False Chart1.Series(3).Stacked = True Chart1.AxisY.Max = 200 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.