new Marker(params)
Create a new Marker. You would only have to do this for a one-off marker not related to any event feed or signal.
Parameters:
| Name | Type | Description |
|---|---|---|
params |
MarkerParams | Parameters used to create the marker. |
- Since:
-
9.4.0
Type Definitions
-
MarkerBox
-
Bounding dimensions of a marker or click zone for a marker when drawn on the chart.
Type:
- object
- Since:
-
9.4.0
Properties:
Name Type Argument Description x0number Upper left corner of marker x-coord.
x1number Lower right corner of marker x-coord.
y0number Upper left corner of marker y-coord.
y1number Lower right corner of marker y-coord.
rnumber <optional>
Radius of click zone from center.
midXnumber <optional>
Center of marker x-coord.
midYnumber <optional>
Center of marker y-coord.
stemHeightnumber <optional>
Height of stem when present.
-
MarkerConfig
-
Configuration settings for a marker.
Type:
- object
- Since:
-
9.4.0
Properties:
Name Type Argument Description drawDelaynumber <optional>
Time to wait in msec for drawing markers.
-
MarkerParams
-
Parameters used to create and display a marker on the chart.
Type:
- object
- Since:
-
9.4.0
Properties:
Name Type Argument Default Description qcCompactChart CompactChart instance.
xDate | number Position of marker on the x axis. Value depends on
xPositionervalue.ynumber <optional>
Position of marker on the y axis. Value depends on
yPositionervalue, and isn't required in all cases.xPositionerXPositioner Positioning type for x axis.
yPositionerYPositioner <optional>
'value'|'above_candle' Positioning type for y axis. Default is set to 'value' if
yis provided as a number, otherwise default is set to 'above_candle'.includeAxisboolean <optional>
If true, positioning and placement will be relative to the panel area including the y axes. Otherwise, the area does not include the axes.
labelstring Group type of marker. Usually markers for the same security from the same source get the same label.
offsetnumber <optional>
Pixels to offset the marker vertically from its computed position.
panelNamestring <optional>
Name of panel the marker is to be rendered upon.
symbolstring <optional>
Symbol identifier, used when marker is placed relative to a plot, such as when yPositioner='above_candle', for example.
fieldstring <optional>
Field identifier, used when marker is placed relative to a plot, such as when yPositioner='above_candle', for example.
avoidFlushboolean <optional>
When true, inserts a 5 pixel buffer between the marker and the border of the panel.
nodeHTMLElement <optional>
The DOM element controlled by this marker.
classNamestring <optional>
Category of marker.
idstring <optional>
Unique id for marker.
nodeCreatorMarkerNode <optional>
Class representing the expansion of the marker (what happens when marker is clicked, for example).
chartContainerHTMLElement <optional>
If provided, marker will be inserted as a child of this element.
yAxisYAxis <optional>
If provided, marker will be positioned relative to that axis's value.
futureboolean <optional>
If true, indicates marker will be positioned "in the future", to the right of the most recent tick.
translateboolean | function If true, will apply standard language translation to marker comments. If a function, will utilize that function when translation is needed. The
thisargument of the function is this MarkerParams object.boxMarkerBox <optional>
Represents the bounding dimensions of the marker when drawn on the chart.
-
XPositioner
-
Possible values of the marker's xPositioner property.
Type:
- 'master' | 'tick' | 'date' | 'none'
- Since:
-
9.4.0
-
YPositioner
-
Possible values of the marker's yPositioner property.
Type:
- 'above_candle' | 'below_candle' | 'on_candle' | 'value' | 'top' | 'bottom' | 'top_lane' | 'bottom_lane' | 'none'
- Since:
-
9.4.0
