Jonathan Guthrie Posted January 23, 2019 Share Posted January 23, 2019 I have a Python script as follows to change the YColumnReference in Lines & Curves in a ScatterPlot (screenshot of parameters attached) from Spotfire.Dxp.Application.Visuals import * sp = vis.As[scatterPlot]() for fm in sp.FittingModels: if fm.TypeId.DisplayName == "Line from Column Values": if fm.Line.DisplayName == "Fit Data": print fm.Line.DisplayName print FittingModelCurve fm.YColumnReference = FittingModelCurve print fm.YColumnReference which displays the following Error: Fit Data Modified Arps (Secant).0 Traceback (most recent call last): File "", line 9, in TypeError: expected DataColumn, got str Any thoughts Link to comment Share on other sites More sharing options...
Shandilya Peddi Posted January 24, 2019 Share Posted January 24, 2019 The YColumnReference takes a DataColumn as an argument, so you should set that to a DataColumn and not a plain String. It should be something as below fm.YColumnReference = Document.Data.Tables["enter your Table Name"].Columns["COlumnNAme"]https://docs.tibco.com/pub/doc_remote/sfire_dev/area/doc/api/TIB_sfire-a... Link to comment Share on other sites More sharing options...
Jonathan Guthrie Posted January 25, 2019 Author Share Posted January 25, 2019 Thanks Shandilya! Now working. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now