Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Macro to switch accumulation / no accum

is it possible to switch this option in a graph by a macro?

Please can somebody point me in the right direction

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Hello Jochem,

Certainly. Here's the example from the API guide for Accumulate which is found under the expression properties:

set chart = ActiveDocument.Sheets("Main").CreateComboChart
chart.AddDimension "ProductType"
chart.AddExpression "sum(Amount)"
chart.AddExpression "count(Customer)"
set p = chart.GetProperties
p.Expressions.Item(1).Item(0).Data.ExpressionData.Accumulate = 1
chart.SetProperties p

The Accumulate member takes one value which can be:
0 = no accumulation
1 = full accumulation
n = accumulation n steps back

View solution in original post

2 Replies
Anonymous
Not applicable
Author

Hello Jochem,

Certainly. Here's the example from the API guide for Accumulate which is found under the expression properties:

set chart = ActiveDocument.Sheets("Main").CreateComboChart
chart.AddDimension "ProductType"
chart.AddExpression "sum(Amount)"
chart.AddExpression "count(Customer)"
set p = chart.GetProperties
p.Expressions.Item(1).Item(0).Data.ExpressionData.Accumulate = 1
chart.SetProperties p

The Accumulate member takes one value which can be:
0 = no accumulation
1 = full accumulation
n = accumulation n steps back

Not applicable
Author

Thnx Johannes!