class anychart.core.stock.eventMarkers.Controller Improve this Doc
Extends: anychart.core.Base
Chart event markers controller. Common settings for all event markers.
Methods Overview
Specific settings | |
format() | Function to format content text. |
group() | Group settings. |
seriesId() | Series id. |
stickToLeft() | Whether event markers that do not correspond to any timestamps in data sets are placed to the assigned timestamps or moved left. |
Coloring | |
fill() | Fill settings. |
stroke() | Stroke settings. |
Content Text Settings | |
disablePointerEvents() | Pointer events settings. |
fontColor() | Font color settings. |
fontDecoration() | Font decoration setting. |
fontFamily() | Font family settings. |
fontOpacity() | Font opacity settings. |
fontSize() | Font size settings. |
fontStyle() | Font style settings. |
fontVariant() | Font variant settings. |
fontWeight() | Font weight settings. |
hAlign() | Text horizontal align settings. |
letterSpacing() | Text letter spacing settings. |
lineHeight() | Text line height setting. |
selectable() | Text selectable option. |
textDirection() | Text direction settings. |
textIndent() | Text indent settings. |
textOverflow() | Text overflow settings. |
textShadow() | Text shadow settings. |
useHtml() | Use HTML option. |
vAlign() | Text vertical align settings. |
wordBreak() | Word break mode. |
wordWrap() | Word-wrap mode. |
Data | |
data() | Data settings. |
Interactivity | |
hovered() | Hovered state settings. |
normal() | Normal state settings. |
selected() | Selected state settings. |
tooltip() | Tooltip settings. |
Series | |
fieldName() | Field name. |
type() | Marker type settings. |
Size and Position | |
connector() | Connector settings. |
direction() | Direction settings. |
fontPadding() | Font padding settings. |
height() | Markers height in pixels or percentages. |
position() | Position settings. |
width() | Markers width in pixels or percentages. |
zIndex() | Z-index of the element. |
Text Settings | |
adjustFontSize() | Adjusting settings. |
maxFontSize() | Maximum font size settings. |
minFontSize() | Minimum font size settings. |
Methods Description
adjustFontSize
- [false, false] - do not adjust (adjust is off )
- [true, false] - adjust width
- [false, true] - adjust height
- [true, true] - adjust the first suitable value.
Returns:
number - An adjusted font size.var adjustFontSize = eventMarkers.adjustFontSize();
Note: anychart.core.stock.eventMarkers.Controller#fontSize does not work when adjusting is enabled.
Params:
Name | Type | Default | Description |
---|---|---|---|
adjustOrAdjustByWidth | boolean | Array.<boolean> | Object | true | Font needs to be adjusted in case of 1 argument and adjusted by width in case of 2 arguments. |
adjustByHeight | boolean | Font needs to be adjusted by height. |
Returns:
anychart.core.stock.eventMarkers.Controller - Self instance for method chaining.connector
Returns:
anychart.core.utils.Connector - Connector settings.Params:
Name | Type | Description |
---|---|---|
settings | Object | Connector settings to set. |
Returns:
anychart.core.stock.eventMarkers.Controller - Self instance for method chaining.data
Params:
Name | Type | Description |
---|---|---|
data | anychart.data.TableMapping | anychart.data.Table | Array.<Array.<*>> | string | Group data. |
Returns:
anychart.core.stock.eventMarkers.Controller - Self instance for method chaining.direction
Returns:
anychart.enums.Direction | string - Event markers direction.var direction = eventMarkers.direction();
Note: Accepts only 'up', 'down' and 'auto' values.
Params:
Name | Type | Default | Description |
---|---|---|---|
direction | anychart.enums.Direction | string | 'auto' | Direction to set. |
Returns:
anychart.core.stock.eventMarkers.Controller - Self instance for method chaining.disablePointerEvents
Returns:
boolean - The pointer events settings.var disablePointerEvents = eventMarkers.disablePointerEvents();
Params:
Name | Type | Default | Description |
---|---|---|---|
enabled | boolean | false | Enabled state to set. |
Returns:
anychart.core.stock.eventMarkers.Controller - Self instance for method chaining.fieldName
Returns:
string - Field name.var fieldName = eventMarkers.fieldName();
Note: Sets a series field name for all anychart.core.stock.eventMarkers.Controller#position values with exception of "axis" value.
Params:
Name | Type | Default | Description |
---|---|---|---|
name | string | 'value' | Field name to set. |
Returns:
anychart.core.stock.eventMarkers.Controller - Self instance for method chaining.fill
Returns:
anychart.graphics.vector.Fill | function - Fill color.var fill = eventMarkers.fill();
Params:
Name | Type | Description |
---|---|---|
color | anychart.graphics.vector.Fill | Array.<(anychart.graphics.vector.GradientKey|string)> | Color as an array, an object or a string. |
Returns:
anychart.core.stock.eventMarkers.Controller - Self instance for method chaining.Params:
Name | Type | Default | Description |
---|---|---|---|
fillFunction | function():anychart.graphics.vector.Fill | function() { return anychart.color.darken(this.sourceColor); } | Function that looks like: function(){ // this.chart - chart object. // this.group - group object. // this.index - series index. // this.iterator - series point iterator. // this.plot - plot object. // this.sourceColor - color returned by stroke() getter. return fillValue; // type anychart.graphics.vector.Fill } |
Returns:
anychart.core.stock.eventMarkers.Controller - Self instance for method chaining.Params:
Name | Type | Description |
---|---|---|
color | string | Color as a string. |
opacity | number | Color opacity (0 to 1). |
Returns:
anychart.core.stock.eventMarkers.Controller - Self instance for method chaining.Params:
Name | Type | Description |
---|---|---|
keys | Array.<(anychart.graphics.vector.GradientKey|string)> | Gradient keys. |
angle | number | Gradient angle. |
mode | boolean | anychart.graphics.vector.Rect | Object | Gradient mode. |
opacity | number | Gradient opacity. |
Returns:
anychart.core.stock.eventMarkers.Controller - Self instance for method chaining.Params:
Name | Type | Description |
---|---|---|
keys | Array.<(anychart.graphics.vector.GradientKey|string)> | Color-stop gradient keys. |
cx | number | X ratio of center radial gradient. |
cy | number | Y ratio of center radial gradient. |
mode | anychart.graphics.math.Rect | If defined then userSpaceOnUse mode, else objectBoundingBox. |
opacity | number | Opacity of the gradient. |
fx | number | X ratio of focal point. |
fy | number | Y ratio of focal point. |
Returns:
anychart.core.stock.eventMarkers.Controller - Self instance for method chaining.Params:
Name | Type | Description |
---|---|---|
imageSettings | anychart.graphics.vector.Fill | Object with settings. |
Returns:
anychart.core.stock.eventMarkers.Controller - Self instance for method chaining.fontColor
Returns:
string - Font color settings.var fontColor = eventMarkers.fontColor();
Params:
Name | Type | Description |
---|---|---|
color | string | Font color to set. |
Returns:
anychart.core.stock.eventMarkers.Controller - Self instance for method chaining.fontDecoration
Returns:
anychart.graphics.vector.Text.Decoration | string - Font decoration settings.var fontDecoration = eventMarkers.fontDecoration();
Params:
Name | Type | Description |
---|---|---|
type | anychart.graphics.vector.Text.Decoration | string | Font decoration to set. |
Returns:
anychart.core.stock.eventMarkers.Controller - Self instance for method chaining.fontFamily
Returns:
string - Font family settings.var fontFamily = eventMarkers.fontFamily();
Params:
Name | Type | Description |
---|---|---|
family | string | Font family to set. |
Returns:
anychart.core.stock.eventMarkers.Controller - Self instance for method chaining.fontOpacity
Returns:
number - Font opacity settings.var fontOpacity = eventMarkers.fontOpacity();
Params:
Name | Type | Description |
---|---|---|
opacity | number | Opacity to set. |
Returns:
anychart.core.stock.eventMarkers.Controller - Self instance for method chaining.fontPadding
Returns:
number | string - Font padding.var fontPadding = eventMarkers.fontPadding();
Params:
Name | Type | Default | Description |
---|---|---|---|
padding | number | string | 0 | Value to set. |
Returns:
anychart.core.stock.eventMarkers.Controller - Self instance for method chaining.fontSize
Returns:
number - Font size settings.var fontSize = eventMarkers.fontSize();
Params:
Name | Type | Description |
---|---|---|
size | number | string | Font size to set. |
Returns:
anychart.core.stock.eventMarkers.Controller - Self instance for method chaining.fontStyle
Returns:
anychart.graphics.vector.Text.FontStyle | string - Font style settings.var fontStyle = eventMarkers.fontStyle();
Params:
Name | Type | Description |
---|---|---|
style | string | anychart.graphics.vector.Text.FontStyle | Font style to set. |
Returns:
anychart.core.stock.eventMarkers.Controller - Self instance for method chaining.fontVariant
Returns:
anychart.graphics.vector.Text.FontVariant | string - Font variant settings.var fontVariant = eventMarkers.fontVariant();
Params:
Name | Type | Description |
---|---|---|
value | string | anychart.graphics.vector.Text.FontVariant | Value to set. |
Returns:
anychart.core.stock.eventMarkers.Controller - Self instance for method chaining.fontWeight
Returns:
string | number - Font weight settings.var fontWeight = eventMarkers.fontWeight();
Params:
Name | Type | Description |
---|---|---|
weight | string | number | Font weight to set. |
Returns:
anychart.core.stock.eventMarkers.Controller - Self instance for method chaining.format
Returns:
function | string - Function to format title text.var format = eventMarkers.format();
Params:
Name | Type | Description |
---|---|---|
format | function | string | Function or string token to format content text. |
Returns:
anychart.core.stock.eventMarkers.Controller - Self instance for method chaining.group
Params:
Name | Type | Description |
---|---|---|
indexOrValue | number | Group index. |
Returns:
anychart.core.stock.eventMarkers.Group - Group instance by index.Params:
Name | Type | Description |
---|---|---|
settings | Object | Array | boolean | null | Group settings to set. |
Returns:
anychart.core.stock.eventMarkers.Controller - Self instance for method chaining.Params:
Name | Type | Description |
---|---|---|
index | number | Index of a group. |
settings | Object | Array | boolean | null | Group settings to set. |
Returns:
anychart.core.stock.eventMarkers.Controller - Self instance for method chaining.hAlign
Returns:
anychart.graphics.vector.Text.HAlign | string - Horizontal align settings.var hAlign = eventMarkers.hAlign();
Params:
Name | Type | Description |
---|---|---|
align | string | anychart.graphics.vector.Text.HAlign | Horizontal align to set. |
Returns:
anychart.core.stock.eventMarkers.Controller - Self instance for method chaining.height
Returns:
string | number - Markers height.var height = eventMarkers.height();
Params:
Name | Type | Description |
---|---|---|
height | string | number | Markers height to set. |
Returns:
anychart.core.stock.eventMarkers.Controller - Self instance for method chaining.hovered
Returns:
anychart.core.StateSettings - Hovered state settingsParams:
Name | Type | Description |
---|---|---|
settings | Object | State settings to set. |
Returns:
anychart.core.stock.eventMarkers.Controller - Self instance for method chaining.letterSpacing
Returns:
number - Letter spacing settings.var letterSpacing = eventMarkers.letterSpacing();
Params:
Name | Type | Description |
---|---|---|
spacing | number | Letter spacing to set. |
Returns:
anychart.core.stock.eventMarkers.Controller - Self instance for method chaining.lineHeight
Returns:
number | string - Line height settings.var lineHeight = eventMarkers.lineHeight();
Params:
Name | Type | Description |
---|---|---|
height | number | string | Line height to set. |
Returns:
anychart.core.stock.eventMarkers.Controller - Self instance for method chaining.maxFontSize
Returns:
number - Maximum font size.var maxFontSize = eventMarkers.maxFontSize();
Params:
Name | Type | Description |
---|---|---|
size | number | string | Maximum font size to set. |
Returns:
anychart.core.stock.eventMarkers.Controller - Self instance for method chaining.minFontSize
Returns:
number - Minimum font size.var minFontSize = eventMarkers.minFontSize();
Params:
Name | Type | Description |
---|---|---|
size | number | string | Minimum font size to set. |
Returns:
anychart.core.stock.eventMarkers.Controller - Self instance for method chaining.normal
Returns:
anychart.core.StateSettings - Normal state settings.Params:
Name | Type | Description |
---|---|---|
settings | Object | State settings to set. |
Returns:
anychart.core.stock.eventMarkers.Controller - Self instance for method chaining.position
Returns:
anychart.enums.EventMarkerPosition | string - Event markers position.var position = eventMarkers.position();
Params:
Name | Type | Default | Description |
---|---|---|---|
position | anychart.enums.EventMarkerPosition | string | 'axis' | Position to set. |
Returns:
anychart.core.stock.eventMarkers.Controller - Self instance for method chaining.selectable
Returns:
boolean - Text selectable value.var selectable = eventMarkers.selectable();
Params:
Name | Type | Default | Description |
---|---|---|---|
enabled | boolean | false | Value to set. |
Returns:
anychart.core.stock.eventMarkers.Controller - Self instance for method chaining.selected
Returns:
anychart.core.StateSettings - Selected state settingsParams:
Name | Type | Description |
---|---|---|
settings | Object | State settings to set. |
Returns:
anychart.core.stock.eventMarkers.Controller - Self instance for method chaining.seriesId
Returns:
string - Series id.var seriesId = eventMarkers.seriesId();
Note: Sets a series by id for all anychart.core.stock.eventMarkers.Controller#position values with exception of "axis" value.
Params:
Name | Type | Default | Description |
---|---|---|---|
id | string | '0' | Series id to set. |
Returns:
anychart.core.stock.eventMarkers.Controller - Self instance for method chaining.stickToLeft
Returns:
boolean - Event markers sticks to left value or no.var eventMarkers = plot.eventMarkers(); var stickToLeft = eventMarkers.stickToLeft();
By default, the value is set to true which for example if the event marker has timestamp '15 October 2000', and the nearest points on the chart are '1 October 2000' and '1 November 2000' - the event marker will be placed on '1 October 2000' position - the nearest left value.
If you pass false to this method event markers will always be placed to their real timestamp place, even if it falls on missings or else.
Note: The group settings have a higher priority over the controller settings.
Params:
Name | Type | Default | Description |
---|---|---|---|
enabled | boolean | true | Whether event markers to stick to left value. |
Returns:
anychart.core.stock.eventMarkers.Controller - Self instance for method chaining.stroke
Returns:
anychart.graphics.vector.Stroke - Stroke settings.var stroke = eventMarkers.stroke();
Params:
Name | Type | Default | Description |
---|---|---|---|
strokeFunction | function():anychart.graphics.vector.Stroke|anychart.graphics.vector.ColoredFill | function() { return anychart.color.darken(this.sourceColor); } | Function that looks like: function(){ // this.chart - chart object. // this.group - group object. // this.index - series index. // this.iterator - series point iterator. // this.plot - plot object. // this.sourceColor - color returned by stroke() getter. return strokeValue; // type anychart.graphics.vector.Stroke } |
Returns:
anychart.core.map.series.Base - Self instance for method chaining.Params:
Name | Type | Default | Description |
---|---|---|---|
color | anychart.graphics.vector.Stroke | anychart.graphics.vector.ColoredFill | string | null | Stroke settings. | |
thickness | number | 1 | Line thickness. |
dashpattern | string | Controls the pattern of dashes and gaps used to stroke paths. | |
lineJoin | string | anychart.graphics.vector.StrokeLineJoin | Line join style. | |
lineCap | string | anychart.graphics.vector.StrokeLineCap | Line cap style. |
Returns:
anychart.core.map.series.Base - Self instance for method chaining.Params:
Name | Type | Description |
---|---|---|
settings | Object | Stroke settings from anychart.graphics.vector.Stroke. |
Returns:
anychart.core.stock.eventMarkers.Controller - Self instance for method chaining.textDirection
Returns:
anychart.graphics.vector.Text.Direction | string - Text direction settings.var textDirection = eventMarkers.textDirection();
Params:
Name | Type | Description |
---|---|---|
value | string | anychart.graphics.vector.Text.Direction | Value to set. |
Returns:
anychart.core.stock.eventMarkers.Controller - Self instance for method chaining.textIndent
Returns:
number - Text indent settings.var textIndent = eventMarkers.textIndent();
Params:
Name | Type | Description |
---|---|---|
indent | number | Text indent to set. |
Returns:
anychart.core.stock.eventMarkers.Controller - Self instance for method chaining.textOverflow
Returns:
anychart.graphics.vector.Text.TextOverflow | string - Text overflow settingsvar textOverflow = eventMarkers.textOverflow();
Params:
Name | Type | Description |
---|---|---|
value | anychart.graphics.vector.Text.TextOverflow | string | Value to set |
Returns:
anychart.core.stock.eventMarkers.Controller - Self instance for method chaining.textShadow
Returns:
string - String representation of text shadow.var textShadow = eventMarkers.textShadow();
Params:
Name | Type | Default | Description |
---|---|---|---|
textShadow | anychart.graphics.vector.TextShadow | string | 'none' | Text shadow to set. |
Returns:
anychart.core.stock.eventMarkers.Controller - Self instance for method chaining.tooltip
Returns:
anychart.core.ui.Tooltip - Tooltip instance.- null/boolean - disable or enable data tooltip.
- object - sets data tooltip settings.
Params:
Name | Type | Default | Description |
---|---|---|---|
settings | Object | boolean | null | true | Tooltip settings. |
Returns:
anychart.core.stock.eventMarkers.Controller - Self instance for method chaining.type
Returns:
anychart.enums.EventMarkerType | string - Marker type.var type = eventMarkers.type();
Params:
Name | Type | Default | Description |
---|---|---|---|
type | string | anychart.enums.EventMarkerType | 'circle' | Marker type to set. |
Returns:
anychart.core.stock.eventMarkers.Controller - Self instance for method chaining.useHtml
Returns:
boolean - UseHTML flag.var useHtml = eventMarkers.useHtml();
Params:
Name | Type | Description |
---|---|---|
enabled | boolean | Enabled state to set. |
Returns:
anychart.core.stock.eventMarkers.Controller - Self instance for method chaining.vAlign
Returns:
anychart.graphics.vector.Text.VAlign | string - Vertical align.var vAlign = eventMarkers.vAlign();
Params:
Name | Type | Description |
---|---|---|
align | string | anychart.graphics.vector.Text.VAlign | Vertical align to set. |
Returns:
anychart.core.stock.eventMarkers.Controller - Self instance for method chaining.width
Returns:
string | number - Markers width.var width = eventMarkers.width();
Params:
Name | Type | Description |
---|---|---|
width | string | number | Markers width. |
Returns:
anychart.core.stock.eventMarkers.Controller - Self instance for method chaining.wordBreak
Returns:
anychart.enums.WordBreak | string - Word-break mode.var wordBreak = eventMarkers.wordBreak();
Params:
Name | Type | Default | Description |
---|---|---|---|
mode | anychart.enums.WordBreak | string | 'normal' | Value to set. |
Returns:
anychart.core.stock.eventMarkers.Controller - Self instance for method chaining.wordWrap
Returns:
anychart.enums.WordWrap | string - Word-wrap mode.var wordWrap = eventMarkers.wordWrap();
Params:
Name | Type | Default | Description |
---|---|---|---|
mode | anychart.enums.WordWrap | string | 'normal' | Value to set. |
Returns:
anychart.core.stock.eventMarkers.Controller - Self instance for method chaining.zIndex
Returns:
number - Z-index.Params:
Name | Type | Default | Description |
---|---|---|---|
zIndex | number | 0 | Value to set. |
Returns:
anychart.core.stock.eventMarkers.Controller - Self instance for method chaining.