new Marker(params)
A marker is a DOM object that is managed by the chart. Makers are placed in "holders" which are DIV elements whose placement and size corresponds with a panel on the chart. A holder exists for each panel. Markers are placed by date, tick or bar to control their position on the x-axis. They are placed by value (price) to control their position on the y-axis. Markers will be repositioned when the user scrolls or zooms the chart.
The default placement function for any markers is STXChart#defaultMarkerPlacement, but custom placement functions can be created as needed. See STX.Marker.AboveCandle for sample custom rendering function.
If markers must be part of an exported image generated using the STXSocial plug-in, you need to draw them on the actual canvas instead using Canvas Markers.
See Markers tutorials for additional implementation instructions.
Parameters:
Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
params |
Object | Parameters that describe the marker Properties
|
- Version:
-
- ChartIQ Advanced Package
- Since:
-
15-07-01 Class added
05-2016-10 It now takes the following `params.yPositioner` values: "value", "above_candle", "under_candle","on_candle","top","bottom"
Example
new STX.Marker({ stx: stxx, xPositioner: "date", yPositioner: "value", x: someDate, label: "events", node: newNode });