How to add Horizontal Line in a visualization in TIBCO Spotfire® Using IronPython Scripting.
By:
Last updated:
3:51pm Apr 24, 2018

Back to main IronPython scripting page

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