Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I'd like to let the user change the number of columns that appear in a Trellis chart dynamically. Is it possible to do this? I'm thinking of having a multibox with a range of values
Here's the psuedo logic I'm thinking.
=if(GetSelectedCount(of multibox field)=1, set trellis column property = value of multibox field, set set trellis column property = 3)
Questions:
-How do I set the trellis column property?
-Where would this logic go? In a trigger that detects whenever the multibox changes?
May be you can try with Macro.. Like
sub TrellisColumn()
set chart = ActiveDocument.GetSheetObject("CH01")
set p = chart.GetProperties
Column=ActiveDocument.Evaluate("Column")
Row=ActiveDocument.Evaluate("Row")
p.ChartProperties.TrellisProperties.EnablePrimaryDimension=true
p.ChartProperties.TrellisProperties.EnableSecondaryDimension=False
p.ChartProperties.TrellisProperties.Columns=Column
p.ChartProperties.TrellisProperties.Rows=Row
chart.SetProperties p
End sub
Source: API Guide
Sample Attached
May be you can try with Macro.. Like
sub TrellisColumn()
set chart = ActiveDocument.GetSheetObject("CH01")
set p = chart.GetProperties
Column=ActiveDocument.Evaluate("Column")
Row=ActiveDocument.Evaluate("Row")
p.ChartProperties.TrellisProperties.EnablePrimaryDimension=true
p.ChartProperties.TrellisProperties.EnableSecondaryDimension=False
p.ChartProperties.TrellisProperties.Columns=Column
p.ChartProperties.TrellisProperties.Rows=Row
chart.SetProperties p
End sub
Source: API Guide
Sample Attached
Works great! I may explore using a trigger instead of a button but works like a charm.