API Reference



$$(id [, source])

Shorthand for getElementById().

Equivalent to prototype style $(), which is faster but less powerful than jQuery style $().

Name Type Argument Description
id string

An ID tag for a valid DOM element.

source HTMLElement <optional>

A valid DOM node to search within. If not provided, the entire document is searched.


The DOM node associated with the ID, or null if a node is not found.


$$$(selector [, source])

Functional equivalent of querySelector().

Functionally equivalent to jQuery $(). Uses querySelectorAll to maintain compatibility with Internet Explorer 9.

Note: If multiple elements match the selector, only the first is returned.

Name Type Argument Description
selector string

CSS style selector.

source HTMLElement <optional>

Node to select within. If not provided, the entire document is searched.


The first element to match the selector.


registerFDC3(stx [, config])

Registers the chart with the FDC3 connector.

To enable this function, include the fdc3.js file (in the js/extras folder of the library) in your application. The file provides access to the open protocols established by the Financial Desktop Connectivity and Collaboration Consortium (FDC3) and FINOS for desktop inter-application messaging.

Name Type Argument Description
stx CIQ.ChartEngine

The chart engine instance.

config object <optional>

Configuration options. Provide only those specifications you want to customize. The rest of the configuration will be the default values shown below.

Name Type Argument Default Description
broadcastAsIntent boolean <optional>

Whether to respond to a broadcast as if responding to an intent.

maxSymbols number <optional>

Maximum number of comparison symbols allowed.

swatchColors Array.<string> <optional>

Color codes to use for comparison series plots. See the parameters.color parameter of CIQ.ChartEngine#addSeries for accepted formats of the color strings.

In the default implementation, defaultSeriesParams, the colors are selected sequentially as comparison series are added to the chart. When the last color in the array has been used, selection resumes at the first color in the array. To ensure unique colors for all comparison series, create an array maxSymbols in length filled with unique color values.


["#8ec648", "#00afed", "#ee652e", "#912a8e", "#fff126", "#e9088c", "#ea1d2c",
 "#00a553", "#00a99c", "#0056a4", "#f4932f", "#0073ba", "#66308f", "#323390"]
defaultSeriesParams function <optional>

Provides parameters to the CIQ.ChartEngine#addSeries function based on symbol. Customize this parameter by assigning a function that contains custom specifications.

The function has three parameters which are supplied with arguments when the function is called:

  • symbol — The symbol of the comparison series added to the chart. Use this parameter to create symbol-specific customizations.
  • instrCount — The numerical order in which the series is added to the chart; for example, 3 indicates that the series is the third comparison series added to the chart.
  • colors — A array of colors from which the color of the comparison series plot can be selected. See swatchColors.


(symbol, instrCount, colors) => {
    return {
        renderer: "Lines",
        color: colors[instrCount % colors.length],
        width: 1,
        pattern: "solid"
defaultPeriodicity function <optional>

Provides periodicity to the CIQ.ChartEngine#loadChart function in a multiseries chart. See CIQ.ChartEngine~PeriodicityParameters. Customize this parameter by assigning a function that contains custom specifications.

The function has a single boolean parameter that indicates whether the chart shows holdings (that is, positions or a portfolio), in which case you may want to show a different periodicity. An argument is provided when the function is called.


(isHolding) => {
    if (isHolding)
        return {
            interval: "day"
    return {
        period: 1,
        interval: 5,
        timeUnit: "minute"
  • 8.2.0
  • 8.2.1 Added the config parameter.