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