class anychart.core.stock.eventMarkers.Group Improve this Doc
Extends: anychart.core.VisualBase
Event markers group class.
Settings of the separate markers group.
Methods Overview
Specific settings | |
format() | Function to format content text. |
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 | |
enabled() | Element state (enabled or disabled). |
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. |
Miscellaneous | |
getMarker() | Gets group marker by index. |
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 = group.adjustFontSize();
Note: anychart.core.stock.eventMarkers.Group#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.Group - Self instance for method chaining.Try it:
connector
Params:
Name | Type | Description |
---|---|---|
settings | Object | Connector settings to set. |
Returns:
anychart.core.stock.eventMarkers.Group - Self instance for method chaining.Try it:
data
Params:
Name | Type | Description |
---|---|---|
data | * | anychart.core.stock.eventMarkers.Group.DataFormat | Group data to set. |
Returns:
anychart.core.stock.eventMarkers.Group - Self instance for method chaining.Try it:
direction
Returns:
anychart.enums.Direction | string - Event markers direction.var direction = group.direction();
Note: Accepts only 'up', 'down' and 'auto' values.
Params:
Name | Type | Description |
---|---|---|
direction | anychart.enums.Direction | string | Direction to set. |
Returns:
anychart.core.stock.eventMarkers.Group - Self instance for method chaining.Try it:
disablePointerEvents
Returns:
boolean - The pointer events settings.var disablePointerEvents = group.disablePointerEvents();
Params:
Name | Type | Default | Description |
---|---|---|---|
enabled | boolean | false | Value to set. |
Returns:
anychart.core.stock.eventMarkers.Group - Self instance for method chaining.enabled
Returns:
boolean - Element state.Try it:
Params:
Name | Type | Default | Description |
---|---|---|---|
enabled | boolean | true | Enabled state to set. |
Returns:
anychart.core.stock.eventMarkers.Group - Self instance for method chaining.if (!element.enabled()) element.enabled(true);
Try it:
fieldName
Note: Sets a series field name for all anychart.core.stock.eventMarkers.Group#position values with exception of "axis" value.
Params:
Name | Type | Description |
---|---|---|
name | string | Field name to set. |
Returns:
anychart.core.stock.eventMarkers.Group - Self instance for method chaining.Try it:
fill
Returns:
anychart.graphics.vector.Fill | function - Fill color.var fill = group.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.Group - 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.Group - Self instance for method chaining.Try it:
Params:
Name | Type | Description |
---|---|---|
color | string | Color as a string. |
opacity | number | Color opacity. |
Returns:
anychart.core.stock.eventMarkers.Group - Self instance for method chaining.Try it:
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.Group - Self instance for method chaining.Try it:
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.Group - Self instance for method chaining.Try it:
Params:
Name | Type | Description |
---|---|---|
imageSettings | anychart.graphics.vector.Fill | Object with settings. |
Returns:
anychart.core.stock.eventMarkers.Group - Self instance for method chaining.Try it:
fontColor
Returns:
string - Font color settings.var fontColor = group.fontColor();
Params:
Name | Type | Description |
---|---|---|
color | string | Font color to set. |
Returns:
anychart.core.stock.eventMarkers.Group - Self instance for method chaining.Try it:
fontDecoration
Returns:
anychart.graphics.vector.Text.Decoration | string - Font decoration settings.var fontDecoration = group.fontDecoration();
Params:
Name | Type | Description |
---|---|---|
type | anychart.graphics.vector.Text.Decoration | string | Font decoration to set. |
Returns:
anychart.core.stock.eventMarkers.Group - Self instance for method chaining.Try it:
fontFamily
Returns:
string - Font family settings.var fontFamily = group.fontFamily();
Params:
Name | Type | Description |
---|---|---|
family | string | Font family to set. |
Returns:
anychart.core.stock.eventMarkers.Group - Self instance for method chaining.Try it:
fontOpacity
Returns:
number - Font opacity settings.var fontOpacity = group.fontOpacity();
Params:
Name | Type | Description |
---|---|---|
opacity | number | Font opacity to set. |
Returns:
anychart.core.stock.eventMarkers.Group - Self instance for method chaining.Try it:
fontPadding
Returns:
number | string - Font padding.var fontPadding = group.fontPadding();
Params:
Name | Type | Default | Description |
---|---|---|---|
padding | number | string | 0 | Value to set. |
Returns:
anychart.core.stock.eventMarkers.Group - Self instance for method chaining.Try it:
fontSize
Returns:
number - Font size settings.var fontSize = group.fontSize();
Params:
Name | Type | Description |
---|---|---|
size | number | string | Font size to set. |
Returns:
anychart.core.stock.eventMarkers.Group - Self instance for method chaining.Try it:
fontStyle
Returns:
anychart.graphics.vector.Text.FontStyle | string - Font style settings.var fontStyle = group.fontStyle();
Params:
Name | Type | Description |
---|---|---|
style | string | anychart.graphics.vector.Text.FontStyle | Font style to set. |
Returns:
anychart.core.stock.eventMarkers.Group - Self instance for method chaining.Try it:
fontVariant
Returns:
anychart.graphics.vector.Text.FontVariant | string - Font variant settings.var fontVariant = group.fontVariant();
Params:
Name | Type | Description |
---|---|---|
value | string | anychart.graphics.vector.Text.FontVariant | Font variant to set. |
Returns:
anychart.core.stock.eventMarkers.Group - Self instance for method chaining.Try it:
fontWeight
Returns:
string | number - Font weight settings.var fontWeight = group.fontWeight();
Params:
Name | Type | Description |
---|---|---|
weight | string | number | Font weight to set. |
Returns:
anychart.core.stock.eventMarkers.Group - Self instance for method chaining.Try it:
format
Returns:
function | string - Function to format title text.var format = group.format();
Params:
Name | Type | Description |
---|---|---|
format | function | string | Function or string token to format content text. |
Returns:
anychart.core.stock.eventMarkers.Group - Self instance for method chaining.Try it:
getMarker
Note: Works only after anychart.charts.Stock#draw is called.
Params:
Name | Type | Description |
---|---|---|
index | number | Marker index. |
Returns:
anychart.format.Context - Group marker.Try it:
hAlign
Returns:
anychart.graphics.vector.Text.HAlign | string - Horizontal align settings.var hAlign = group.hAlign();
Params:
Name | Type | Description |
---|---|---|
align | string | anychart.graphics.vector.Text.HAlign | Horizontal align to set. |
Returns:
anychart.core.stock.eventMarkers.Group - Self instance for method chaining.Try it:
height
Returns:
string | number - Markers height.var height = group.height();
Params:
Name | Type | Description |
---|---|---|
height | string | number | Value to set. |
Returns:
anychart.core.stock.eventMarkers.Group - Self instance for method chaining.Try it:
hovered
Returns:
anychart.core.stock.eventMarkers.Group - Hovered state settingsTry it:
Params:
Name | Type | Description |
---|---|---|
settings | Object | State settings to set. |
Returns:
anychart.core.stock.eventMarkers.Group - Self instance for method chaining.Try it:
letterSpacing
Returns:
number - Letter spacing settings.var letterSpacing = group.letterSpacing();
Params:
Name | Type | Description |
---|---|---|
spacing | number | Letter spacing to set. |
Returns:
anychart.core.stock.eventMarkers.Group - Self instance for method chaining.Try it:
lineHeight
Returns:
number | string - Line height settings.var lineHeight = group.lineHeight();
Params:
Name | Type | Description |
---|---|---|
height | number | string | Line height to set. |
Returns:
anychart.core.stock.eventMarkers.Group - Self instance for method chaining.Try it:
maxFontSize
Returns:
number - Maximum font size.var maxFontSize = group.maxFontSize();
Params:
Name | Type | Description |
---|---|---|
size | number | string | Maximum font size to set. |
Returns:
anychart.core.stock.eventMarkers.Group - Self instance for method chaining.Try it:
minFontSize
Returns:
number - Minimum font size.var minFontSize = group.minFontSize();
Params:
Name | Type | Description |
---|---|---|
size | number | string | Minimum font size to set. |
Returns:
anychart.core.stock.eventMarkers.Group - Self instance for method chaining.Try it:
normal
Returns:
anychart.core.stock.eventMarkers.Group - Normal state settings.Try it:
Params:
Name | Type | Description |
---|---|---|
settings | Object | State settings to set. |
Returns:
anychart.core.stock.eventMarkers.Group - Self instance for method chaining.Try it:
position
Returns:
anychart.enums.EventMarkerPosition | string - Event markers position.var position = group.position();
Params:
Name | Type | Description |
---|---|---|
position | anychart.enums.EventMarkerPosition | string | Position to set. |
Returns:
anychart.core.stock.eventMarkers.Group - Self instance for method chaining.Try it:
selectable
Returns:
boolean - Text selectable value.var selectable = group.selectable();
Params:
Name | Type | Default | Description |
---|---|---|---|
enabled | boolean | false | Enables/disables the possibility of selecting text. |
Returns:
anychart.core.stock.eventMarkers.Group - Self instance for method chaining.Try it:
selected
Returns:
anychart.core.stock.eventMarkers.Group - Selected state settingsTry it:
Params:
Name | Type | Description |
---|---|---|
settings | Object | State settings to set. |
Returns:
anychart.core.stock.eventMarkers.Group - Self instance for method chaining.Try it:
seriesId
Note: Sets a series by id for all anychart.core.stock.eventMarkers.Group#position values with exception of "axis" value.
Params:
Name | Type | Description |
---|---|---|
id | string | Series id to set. |
Returns:
anychart.core.stock.eventMarkers.Group - Self instance for method chaining.Try it:
stickToLeft
Returns:
boolean - Event markers sticks to left value or no.var group = plot.eventMarkers().group(); var stickToLeft = group.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.Group - Self instance for method chaining.Try it:
stroke
Returns:
anychart.graphics.vector.Stroke - Stroke settings.var stroke = group.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.Try it:
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.Try it:
Params:
Name | Type | Description |
---|---|---|
settings | Object | Stroke settings from anychart.graphics.vector.Stroke. |
Returns:
anychart.core.stock.eventMarkers.Group - Self instance for method chaining.Try it:
textDirection
Returns:
anychart.graphics.vector.Text.Direction | string - Text direction settings.var textDirection = group.textDirection();
Params:
Name | Type | Description |
---|---|---|
type | string | anychart.graphics.vector.Text.Direction | Text direction to set. |
Returns:
anychart.core.stock.eventMarkers.Group - Self instance for method chaining.textIndent
Returns:
number - Text indent settings.var textIndent = group.textIndent();
Params:
Name | Type | Description |
---|---|---|
indent | number | Text indent to set. |
Returns:
anychart.core.stock.eventMarkers.Group - Self instance for method chaining.Try it:
textOverflow
Returns:
anychart.graphics.vector.Text.TextOverflow | string - Text overflow settingsvar textOverflow = group.textOverflow();
Params:
Name | Type | Description |
---|---|---|
value | anychart.graphics.vector.Text.TextOverflow | string | Value to set |
Returns:
anychart.core.stock.eventMarkers.Group - Self instance for method chaining.Try it:
textShadow
Returns:
string - String representation of text shadow.var textShadow = group.textShadow();
Params:
Name | Type | Default | Description |
---|---|---|---|
textShadow | anychart.graphics.vector.TextShadow | string | 'none' | Text shadow to set. |
Returns:
anychart.core.stock.eventMarkers.Group - Self instance for method chaining.Try it:
tooltip
Returns:
anychart.core.stock.eventMarkers.Group - Tooltip instance.Try it:
- 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.Group - Self instance for method chaining.type
Returns:
anychart.enums.EventMarkerType | string - Marker type.var type = group.type();
Params:
Name | Type | Description |
---|---|---|
type | string | anychart.enums.EventMarkerType | Marker type to set. |
Returns:
anychart.core.stock.eventMarkers.Group - Self instance for method chaining.Try it:
useHtml
Returns:
boolean - UseHTML flag.var useHtml = group.useHtml();
Params:
Name | Type | Description |
---|---|---|
enabled | boolean | Value to set. |
Returns:
anychart.core.stock.eventMarkers.Group - Self instance for method chaining.Try it:
vAlign
Returns:
anychart.graphics.vector.Text.VAlign | string - Vertical align.var vAlign = group.vAlign();
Params:
Name | Type | Description |
---|---|---|
align | string | anychart.graphics.vector.Text.VAlign | Vertical align to set. |
Returns:
anychart.core.stock.eventMarkers.Group - Self instance for method chaining.Try it:
width
Returns:
string | number - Markers width.var width = group.width();
Params:
Name | Type | Description |
---|---|---|
width | string | number | Value to set. |
Returns:
anychart.core.stock.eventMarkers.Group - Self instance for method chaining.Try it:
wordBreak
Returns:
anychart.enums.WordBreak | string - Word-break mode.var wordBreak = group.wordBreak();
Params:
Name | Type | Default | Description |
---|---|---|---|
mode | anychart.enums.WordBreak | string | 'normal' | Value to set. |
Returns:
anychart.core.stock.eventMarkers.Group - Self instance for method chaining.wordWrap
Returns:
anychart.enums.WordWrap | string - Word-wrap mode.var wordWrap = group.wordWrap();
Params:
Name | Type | Default | Description |
---|---|---|---|
mode | anychart.enums.WordWrap | string | 'normal' | Value to set. |
Returns:
anychart.core.stock.eventMarkers.Group - Self instance for method chaining.zIndex
Params:
Name | Type | Default | Description |
---|---|---|---|
zIndex | number | 0 | Value to set. |
Returns:
anychart.core.stock.eventMarkers.Group - Self instance for method chaining.Try it: