API Reference
Namespaces
Classes
Events
Global
Externals

Namespace: PinnedMarker

CIQ. PinnedMarker

CIQ.PinnedMarker is a namespace containing functions required to make a marker "pinnable". Pinnable markers have the following characteristics:

  • They can be dragged
  • They draw a stem from themselves to the point of the plot to which they are attached
  • They are closed from a close button (for example, an X in the corner)
  • They can persist in storage

Requires "js/extras/pinnedMarkers.js"

Version:
  • ChartIQ Extras Package
Since:
  • 9.1.0

Classes

NameValueStore

Methods


drawStem(marker [, expandNode])

Draws a stem from the bar that the marker is attached, to the marker itself.

Requires "js/extras/pinnedMarkers.js"

Parameters:
Name Type Argument Description
marker CIQ.Marker

The marker to draw stem for.

expandNode HTMLElement <optional>

The expansion element to position. If not provided, the node will be selected from the marker.stxNodeCreator.expand property.

Version:
  • ChartIQ Extras Package
Since:
  • 9.4.0 - Added expandNode parameter to allow for the stem to be drawn from an alternative expansion node.


getChartKey(stx, key)

Returns chartId-specific key to be used with nameValueStore.

Requires "js/extras/pinnedMarkers.js"

Parameters:
Name Type Description
stx CIQ.ChartEngine

Chart engine instance.

key string

Should always be "pinned_tooltip" or "pinned_event".

Version:
  • ChartIQ Extras Package
Since:
  • 9.4.0

Returns:

Chart id modified key

Type
string

position(marker)

After marker is positioned, this function is called to draw the stem and update storage if a hidden marker is now visible.

Requires "js/extras/pinnedMarkers.js"

Parameters:
Name Type Description
marker CIQ.Marker

The marker to position.

Version:
  • ChartIQ Extras Package
Since:
  • 9.1.0


removeByLabel(stx, label)

Removes all markers currently pinned to any plots on the screen.

Requires "js/extras/pinnedMarkers.js"

Parameters:
Name Type Description
stx CIQ.ChartEngine

Chart engine instance.

label string

Should always be "pinned_tooltip" or "pinned_event".

Version:
  • ChartIQ Extras Package
Since:
  • 9.1.0


restore(stx)

Restores markers to the chart if found in storage. This will restore markers when a page is reloaded.

Requires "js/extras/pinnedMarkers.js"

Parameters:
Name Type Description
stx CIQ.ChartEngine

Chart engine instance.

Version:
  • ChartIQ Extras Package
Since:
  • 9.1.0


store(stx)

Stores a marker in storage, if available.

Requires "js/extras/pinnedMarkers.js"

Parameters:
Name Type Description
stx CIQ.ChartEngine

The chart engine instance.

Version:
  • ChartIQ Extras Package
Since:
  • 9.1.0