Jump to content
We've recently updated our Privacy Statement, available here. ×
  • How to enable multiple IndividualFittingModes of Lines & Curves in a visualization in Spotfire® Using IronPython Scripting


    This code snippet details on how to enable multiple IndividualFittingModes of Lines & Curves in a visualization.

    Introduction

    This code snippet details on how to enable multiple IndividualFittingModes of Lines & Curves in a visualization.

    The check boxes that control the "One per" variable is called IndividualFittingModes in the API and is an enumeration or a bit index. If you want to add multiple values you can use a bit-wise OR operation on the values.

     straightLine.IndividualFittingModes = IndividualFittingModes.Trellis | IndividualFittingModes.Color
     

    Code sample

    # Copyright © 2017. TIBCO Software Inc.  Licensed under TIBCO BSD-style license.
    
    from Spotfire.Dxp.Application.Visuals import *
    from Spotfire.Dxp.Application.Visuals.FittingModels import IndividualFittingModes
    
    barChart = bc.As[BarChart]()
    
    straightLine = barChart.FittingModels.AddStraightLineFit()
    straightLine.IndividualFittingModes = IndividualFittingModes.Trellis | IndividualFittingModes.Color
    
    horizontalLine = barChart.FittingModels.AddHorizontalLine('Avg([Y])')
    horizontalLine.IndividualFittingModes = FittingModels.IndividualFittingModes.Trellis | IndividualFittingModes.Color
     

    References

    License:  TIBCO BSD-Style License

    Back to IronPyton Scripting in TIBCO Spotfire Examples:  https://community.spotfire.com/s/article/IronPython-Scripting-in-TIBCO-Spotfire

     

     


    User Feedback

    Recommended Comments

    There are no comments to display.


×
×
  • Create New...