Jump to content

IronPython script to enable One per color in Lines & Curves

Li Sim Low

Recommended Posts

Try this one, it is working at my end:

from Spotfire.Dxp.Application.Visuals import LineChart

from Spotfire.Dxp.Application.Visuals.FittingModels import IndividualFittingModes


for vis in Document.ActivePageReference.Visuals:

if vis.Title == "GrowthRate":

lc = vis.As[LineChart]()

model = lc.FittingModels.AddHorizontalLine("Avg(Y)")

model.IndividualFittingModes = IndividualFittingModes.ColorThis is for Horizontal Line with the Average value of the Y-axis. For other lines, you can refer to this API documentation:


Link to comment
Share on other sites

  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...