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
- API Reference: FittingModelCollection. AddHorizontalLine Method (String)
- API Reference: FittingModelCollection. AddHorizontalLine Method (DataTable, String)
License: TIBCO BSD-Style License
Back to IronPyton Scripting in Spotfire Examples: https://community.spotfire.com/s/article/IronPython-Scripting-in-Spotfire
Recommended Comments
There are no comments to display.