2 Replies Latest reply: May 12, 2016 11:39 AM by Gary Lauk RSS

    Setting Trellis Column dynamically

    Gary Lauk

      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?

        • Re: Setting Trellis Column dynamically
          Settu Periyasamy

          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