API Reference
Namespaces
Classes
Events
Global
Externals

Class: Group

CIQ.Marker. Group


new Group(params)

Creates a marker group. Markers within the group are determined automatically based on positioning

Parameters:
Name Type Description
params object

Configuration parameters.

Properties
Name Type Argument Default Description
stx CIQ.ChartEngine

The chart engine.

groupKey string <optional>

The shared groupKey value for markers associated with this group

x *

A valid date, tick, or bar (depending on the selected xPositioner) used to select a candle to which the marker is associated.

y Number <optional>

A valid value for positioning the marker on the y-axis (depending on selected yPositioner). If this value is not provided, the marker is set "above_candle" as long as a valid candle is selected by params.x.

node HTMLElement | CIQ.Marker.Simple | CIQ.Marker.Performance <optional>

The HTML element that contains the marker. This element should be detached from the DOM. If an element is not provided, an empty div is created. You can create your own or use the provided CIQ.Marker.Simple and CIQ.Marker.Performance node creators.

panelName string <optional>
"chart"

The name of the panel to which the node is attached. Defaults to the main chart panel.

xPositioner string <optional>
"date"

Determines the x-axis position of the marker. Values include:

  • "date" — params.x must be set to a JavaScript date object. This will be converted to the closest masterData position if the provided date does not exactly match any existing points. Be sure the same timezone as masterData is used.
  • "master" — params.x must be set to a masterData position.
  • "tick" — params.x must be set to a dataSet position.
  • "bar" — params.x must be set to a dataSegment position.
  • "none" — Use CSS positioning; params.x is not used.
yPositioner string <optional>
"value"

Determines the y-axis position of the marker. Values include:

  • "value" — params.y must be set to an exact y-axis value. If params.y is omitted, the y-axis position defaults to "above_candle".
  • "above_candle" — Positions the marker right above the candle or line. If more than one marker is at the same position, the markers are aligned upwards from the first. The params.y value is not used.
  • "below_candle" — Positions the marker right below the candle or line. If more than one marker is at the same position, the markers are aligned downwards from the first. The params.y value is not used.
  • "on_candle" — Position the marker in the center of the candle or line, covering it. If more than one marker is at the same position, the markers are aligned downwards from the first. The params.y value is not used.
  • "top" — Position the marker at the top of the chart, right below the margin. If more than one marker is at the same position, the markers are aligned downwards from the first. The params.y value is not used.
  • "top_lane" — Same as "top", but each marker type (defined by label) gets its own row, or lane.
  • "bottom" — Position the marker at the bottom of the chart, right above the margin. If more than one marker is at the same position, the markers are aligned upwards from the first. The params.y value is not used.
  • "bottom_lane" — Same as "bottom", but each marker type (defined by label) gets its own row, or lane.
  • "none" — Use CSS positioning; params.y is not used.
field string <optional>

When yPositioner is set to position relative to a candle, this parameter determined which field in the dataSet to use for the candle. When not specified, uses available HLC data.

noInteraction string <optional>

Set to true to disable the marker's default click handler.

Since:
  • 9.2.0
  • 9.3.0 Add noInteraction parameter.

Methods


createNode(params)

Creates a CIQ.Marker.GroupNode object for use as the node of a group marker.

Parameters:
Name Type Description
params Object

Parameters to describe the marker

Since:
  • 9.2.0


getMarkersInGroup()

Returns the CIQ.GroupMarker object representing the marker if it is placed in a group.

Since:
  • 9.2.0

Returns:

Array of CIQ.Marker objects associated with this group

Type
Array.<CIQ.Marker>

position()

After the group marker is positioned, this function is called to position pinned expansions for markers in the group.

Requires "js/extras/pinnedMarkers.js"

Version:
  • ChartIQ Extras Package
Since:
  • 9.4.0


positionPinnedExpansion(marker)

Position a pinned expansion for a marker in a group.

Requires "js/extras/pinnedMarkers.js"

Parameters:
Name Type Description
marker CIQ.Marker

The marker to position.

Version:
  • ChartIQ Extras Package
Since:
  • 9.4.0


remove()

Removes the group marker from the chart object and resets the active state of all markers in group.

Since:
  • 9.3.0