Link to home
Start Free TrialLog in
Avatar of Milkus1
Milkus1Flag for Australia

asked on

Ordering the seriescollection in an Access PivotChart form

I am using the chartspace object in my Access 2010 application.
It is not always easy to format the control via VBA, but up until this point I have managed.

The current issue I have is that my bar chart needs to display each series in a particular order
The chart displays along a time line in years, with a grouping for each year of 3 bars.

eg: low, base, high ....it current does it alphabetically :  base, high, low.

The recordset that populates the chart serves up the data in the right order, but when the chart displays the bars are sorted incorrectly.

eg: 2015 low   5.4
      2015 base 6
      2015 high  7.9
      2016 low   5
      2016 base 5.9
      2016 high  6.1

I need to use VBA to solve this issue, as the form presented to the user is readonly and doesnt allow direct changes to the chart. I dont know if this helps but the data is bound as

            .SetData chDimCategories, chDataBound, "YearNumber"
            .SetData chDimValues, chDataBound, "Rate"
            .SetData chDimSeriesNames, chDataBound, "RateTitle"  ' (low,base,high)
ASKER CERTIFIED SOLUTION
Avatar of Milkus1
Milkus1
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial