Jump to content
  • How to add Horizontal Line in a visualization in Spotfire® Using IronPython Scripting


    This code snippet details on how to add Horizontal Line in a visualization.

    Introduction

    This code snippet details on how to add Horizontal Line in a visualization.

    Code sample

    # Copyright © 2017. TIBCO Software Inc.  Licensed under TIBCO BSD-style license.
    
    from Spotfire.Dxp.Application.Visuals import *
    
    barChart = bc.As[BarChart]()
    
    #Add Horizontal Straight Line
    horizontalLine1 = barChart.FittingModels.AddHorizontalLine('Avg([Y])')
    
    #Add Horizontal Line based on Data Table
    horizontalLine2 = barChart.FittingModels.AddHorizontalLine(Document.Data.Tables["World Bank Data"], "[Population]")
     

    References

    License:  TIBCO BSD-Style License

     

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


    User Feedback

    Recommended Comments

    There are no comments to display.


×
×
  • Create New...