AddPen Method

Adds a new Pen to the Chart object's Pens collection.

Syntax

object.AddPen(szSource, [vaUseAnyway])

Properties

The AddPen method syntax has these parts:

Part

Description

object

An object expression that evaluates to an object in the Applies To list.

szSource

String. The data source tag or expression to use to fill in the data for the Pen. Any valid historical or real-time data source expression is supported. The only restriction is that Historical tags must not be used in an expression.

aUseAnyway

Variant. (Optional) It is used to determine whether to use the data source if the source does not exist. Values should be True or False. If source does not exist and vaUseAnyway is False, AddPen will generate an error. The default for the parameter is False.

Return Value

Object. The dispatch pointer of the Pen added to the Chart.

RefreshChartData must be called after changing the definition of a Pen.

 

Example

Applies To