How to add Horizontal Line in a visualization in TIBCO Spotfire® Using IronPython Scripting.

By:
Last updated:
9:52pm Aug 26, 2019

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