Jump to content
  • How to use Trellis option in a visualization in Spotfire® Using IronPython Scripting


    The below code snippet details on how to use Trellis with Rows and Columns option in a visualization.

    Introduction

    The below code snippets, details on how to use Trellis in a visualization.

    Code samples

    The below code snippet details on how to use Trellis with Rows and Columns option in a visualization.

    Splits the visualization into different panels for all categories in the selected column or hierarchy.

    # Copyright © 2017. TIBCO Software Inc.  Licensed under TIBCO BSD-style license.
    
    from Spotfire.Dxp.Application.Visuals import *
    
    barChart = bc.As[BarChart]()
    
    barChart.Trellis.TrellisMode = TrellisMode.RowsColumns
    barChart.Trellis.RowAxis.Expression = "<[Country Code]>"
    barChart.Trellis.ColumnAxis.Expression = "<[Income Group]>"
    barChart.Trellis.PageAxis.Expression = "<[Region]>"
    #bc is a script parameter referencing the BarChart Plot visualization
     

    The below code snippet details on how to use Trellis with Panels option in a visualization.

    Splits the visualization into different panels for all categories in the selected column or hierarchy, without binding any dimensions to either rows or columns.

    # Copyright © 2017. TIBCO Software Inc.  Licensed under TIBCO BSD-style license.
    
    from Spotfire.Dxp.Application.Visuals import *
    
    barChart = bc.As[BarChart]()
    
    barChart.Trellis.TrellisMode = TrellisMode.Panels
    barChart.Trellis.PanelAxis.Expression = "<[Region]>"
    barChart.Trellis.ManualLayout = True
    barChart.Trellis.ManualRowCount = 2
    barChart.Trellis.ManualColumnCount = 2
    #bc is a script parameter referencing the BarChart Plot visualization
     

     

    References

    License:  TIBCO BSD-Style License

     

     


    User Feedback

    Recommended Comments

    There are no comments to display.


×
×
  • Create New...