ReferenceLineCollection AddNew Method TIBCO Spotfire 6.0 API Reference
Adds a reference line based on a given expression.

Namespace: Spotfire.Dxp.Application.Visuals
Assembly: Spotfire.Dxp.Application (in Spotfire.Dxp.Application.dll) Version: 13.19.7018.3940 (13.19.7018.3940)
Syntax

[ObsoleteAttribute("Use FittingModels instead.")]
public ReferenceLine AddNew(
	ScaleAxis axis,
	string expression
)

Parameters

axis
Type: Spotfire.Dxp.Application.Visuals ScaleAxis
The axis on which the line will be rendered. Currenly only axes X and Y are supported.
expression
Type: System String
The expression for the reference line.

Return Value

Type: ReferenceLine
The newly created ReferenceLine object.
Exceptions

ExceptionCondition
System ArgumentNullException either of the parameters is null .
System ArgumentExceptionexpression is empty or if axis does not belong to the plot which this call is being made on.
Spotfire.Dxp.Data.Exceptions ExpressionExceptionexpression is not valid, for example it refers to an axis other than axis it does not return a numeric result.
Examples

To add an average line based on the average of the Y axis, call:
myPlot.ReferenceLines.Items.AddNew(myPlot.YAxis, "Avg([Y])");
See Also