SetCaption method (XY Plot object)
Sets the caption of a trace and shows the caption in the legend.
Syntax
XYPlot1
.SetCaption
(xTagName
, yTagName
, [xCaption
], [yCaption
], [xModelName
], [yModelName
], [xTraceType
], [yTraceType
])where
XYPlot1
- is the name of an XY Plot object or an expression that evaluates to an XY Plot object.xTagName
- is a parameter of String that specifies the x tag of the trace.yTagName
- is a parameter of String that specifies the y tag of the trace.xCaption
- is an optional parameter of String that will display in the x-axis of the XY Plot and in the Tag
field of the Tag list.yCaption
- is an optional parameter of String that will display in the y-axis of the XY Plot and in the Tag
field of the Tag list. You can specify xCaption
or yCaption
, or both. You can also use extended tag property or tag value for the caption.xModelName
- is an optional parameter of String that specifies the historical model
name. The parameter is required if the xTraceType
is TraceTypeAF
,
TraceTypeDataLog
, TraceTypeHistorian
, or TraceTypePIServer
.yModelName
- is an optional parameter of String that specifies the historical model
name. The parameter is required if the yTraceType
is TraceTypeAF
,
TraceTypeDataLog
, TraceTypeHistorian
, or TraceTypePIServer
.xTraceType
- is an optional parameter of the XYTraceType
constant. The
parameter can be omitted if the trace type is live data or data log.yTraceType
- is an optional parameter of the XYTraceType
constant. The
parameter can be omitted if the trace type is live data or data log.Example
Private Sub SetXYPlotCaption() 'Sets the caption for tags {/Line1_DataServer::[CookieLine]Program:Mixer.Temperature} and {/Line1_DataServer::[CookieLine]Program:Mixer.Pressure} from the data log Mixer. XYPlot1.SetCaption "{/Line1_DataServer::[CookieLine]Program:Mixer.Temperature}", "{/Line1_DataServer::[CookieLine]Program:Mixer.Pressure}", "Temperature", "Pressure", "Mixer", "Mixer" End Sub
Provide Feedback