I need to get the exponential curve values (a and b) into variable... but I cannot figure out how. I can get the Curve datatype, but don't know how to read it. I can locate the Name attribute of the a, b, or ExpressionWithValues, but cannot locate the value attribute.
Details[2] is ExpressionWithValues
Details[3] is a
Details[4] is b
There is a chart, called "Line Chart", that has a single curve (Exponential).
import Spotfire.Dxp.Application.Visuals
from Spotfire.Dxp.Application.Visuals import LineChart
for vis in Application.Document.ActivePageReference.Visuals:
-if vis.Title == "Line Chart":
--if vis.As[LineChart]().FittingModels[0].Enabled == True:
---print "True"
---print vis.As[LineChart]().FittingModels[0].Curve.Details[2].Name
---print vis.As[LineChart]().FittingModels[0].Curve.Details[2]
--else:
---print "False"
Output:
True
ExpressionWithValues
Spotfire.Dxp.Application.Visuals.FittingModels.CurveExpressionWithValuesReferenceItemDetail object at 0x0000000000000031 [Spotfire.Dxp.Application.Visuals.FittingModels.CurveExpressionWithValuesReferenceItemDetail]>
Any help to get the a & b values into variables would be greatly appreciated. Thanks.
Jonathan