ChartObject

The ChartObject is the manager for an instance of a chart.  The ChartObject contains the dataset as well as the hierarchy of objects responsible for the actual chart drawing, but does not do any drawing itself.

Properties:

Symbol (read-only)

Type: String

Description: The string representation of the current ticker symbol for this chart

 

Intraday (read-only)

Type: Boolean

Description: True if the chart is an intraday chart, otherwise False

 

StartDate (read-only)

Type: Date

Description: The start date for this chart

 

EndDate (read-only)

Type: Date

Description: The end date for this chart

Methods:

CreateObject(type)

type: String

Returns: object of the specified type

 

Description: Creates a chart object of the specified type.  Createable object types are: "Canvas", "Frame", "Legend", "DataSet", "LineChart", "BarChart", "PointChart", "Axis", "Labels", "Line".

 

AddObject(object)

object: Any object created by CreateObject()

 

Description: Add the specified object to this ChartObject.  Note that although any object created by CreateObject can be added to the ChartObject, only Canvas and DataSet objects should be added.

 

GetDataSet(id)

id: String id of the dataset

Returns: DataSet object

 

Description: Return the dataset with the given ID, or Nothing if the dataset does not exist for this chart.

 

GetParam(index)

index: Integer

Returns: String

 

Description: When parameters are required for an indicator, returns the nth parameter as specified by the index.  The first parameter starts at index 0.

 

GetObject(type, id)

type: String.  Valid values are "Legend", "Chart", "Labels".

id: String

Returns: an object of the requested type, or Nothing if the object with the specified type and id does not exist in the hierarchy.

 

Description: Gets one of the child objects of this ChartObject.

Note: When "Chart" is requested, it returns one of the chart types (LineChart/BarChart/PointChart).

 

RequestHistoricalDataForTicker(ticker)

ticker: Ticker object

 

Description: Generates a request to the selected data service to retrieve historical data for the specified ticker object.  The date range on the request is the same as the current chart.  The request is processed asynchronously, so this call returns immediately; when the historical data is updated, the Recalc method on the VBScript handler object is called again.

 

GetDataSetFromTicker(ticker, field)

ticker: Ticker object

field: String

Returns: DataSet object

 

Description: Retrieve the dataset representing the historical data for the specified field from the specified ticker object.  Valid fields are "Date", "Open", "High", "Low", "Close", "Volume".

 

DeferDeleteTicker(ticker)

ticker: Ticker object

 

Description: If a temporary ticker is created in a document, call this method to schedule it for deletion when the chart window is closed.