AnyChart
API Reference
Still have questions?
Contact support
Top

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

Getter for the adjusting font size.

Returns:

number - An adjusted font size.
See listing
var adjustFontSize = group.adjustFontSize();
Setter for the adjusting font size.

Params:

NameTypeDefaultDescription
adjustOrAdjustByWidthboolean | Array.<boolean> | Object
true
Font needs to be adjusted in case of 1 argument and adjusted by width in case of 2 arguments.
adjustByHeightboolean
Font needs to be adjusted by height.

Returns:

anychart.core.stock.eventMarkers.Group - Self instance for method chaining.

connector

Getter for connector settings.

Returns:

anychart.core.utils.Connector - Connector settings.
Setter for the connector length.

Params:

NameTypeDescription
settingsObjectConnector settings to set.

Returns:

anychart.core.stock.eventMarkers.Group - Self instance for method chaining.

data

Getter for the group data.

Returns:

Array.<Object> - Group data.
See listing
var data = group.data();
Setter for the group data.

Params:

NameTypeDescription
data* | anychart.core.stock.eventMarkers.Group.DataFormatGroup data to set.

Returns:

anychart.core.stock.eventMarkers.Group - Self instance for method chaining.

direction

Getter for the direction.

Returns:

anychart.enums.Direction | string - Event markers direction.
See listing
var direction = group.direction();
Setter for the direction.
Note: Accepts only 'up', 'down' and 'auto' values.

Params:

NameTypeDescription
directionanychart.enums.Direction | stringDirection to set.

Returns:

anychart.core.stock.eventMarkers.Group - Self instance for method chaining.

disablePointerEvents

Getter for the pointer events settings.

Returns:

boolean - The pointer events settings.
See listing
var disablePointerEvents = group.disablePointerEvents();
Setter for the pointer events setting.

Params:

NameTypeDefaultDescription
enabledboolean
false
Value to set.

Returns:

anychart.core.stock.eventMarkers.Group - Self instance for method chaining.

enabled

Getter for the element state (enabled or disabled).

Returns:

boolean - Element state.
Setter for the element enabled state.

Params:

NameTypeDefaultDescription
enabledboolean
true
Enabled state to set.

Returns:

anychart.core.stock.eventMarkers.Group - Self instance for method chaining.
Example.
if (!element.enabled())
   element.enabled(true);

fieldName

Getter for the fieldName.

Returns:

string - Field name.
See listing
var fieldName = group.fieldName();
Setter for the fieldName.
Note: Sets a series field name for all anychart.core.stock.eventMarkers.Group#position values with exception of "axis" value.

Params:

NameTypeDescription
namestringField name to set.

Returns:

anychart.core.stock.eventMarkers.Group - Self instance for method chaining.

fill

Getter for the fill color.

Returns:

anychart.graphics.vector.Fill | function - Fill color.
See listing
var fill = group.fill();
Setter for fill settings using an array, an object or a string. Learn more about coloring.

Params:

NameTypeDescription
coloranychart.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.
Setter for fill settings using function.

Params:

NameTypeDefaultDescription
fillFunctionfunction():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.
Fill color with opacity. Fill as a string or an object.

Params:

NameTypeDescription
colorstringColor as a string.
opacitynumberColor opacity.

Returns:

anychart.core.stock.eventMarkers.Group - Self instance for method chaining.
Linear gradient fill. Learn more about coloring.

Params:

NameTypeDescription
keysArray.<(anychart.graphics.vector.GradientKey|string)>Gradient keys.
anglenumberGradient angle.
modeboolean | anychart.graphics.vector.Rect | ObjectGradient mode.
opacitynumberGradient opacity.

Returns:

anychart.core.stock.eventMarkers.Group - Self instance for method chaining.
Radial gradient fill. Learn more about coloring.

Params:

NameTypeDescription
keysArray.<(anychart.graphics.vector.GradientKey|string)>Color-stop gradient keys.
cxnumberX ratio of center radial gradient.
cynumberY ratio of center radial gradient.
modeanychart.graphics.math.RectIf defined then userSpaceOnUse mode, else objectBoundingBox.
opacitynumberOpacity of the gradient.
fxnumberX ratio of focal point.
fynumberY ratio of focal point.

Returns:

anychart.core.stock.eventMarkers.Group - Self instance for method chaining.

Params:

NameTypeDescription
imageSettingsanychart.graphics.vector.FillObject with settings.

Returns:

anychart.core.stock.eventMarkers.Group - Self instance for method chaining.

fontColor

Getter for font color settings.

Returns:

string - Font color settings.
See listing
var fontColor = group.fontColor();
Setter for font color settings.

Params:

NameTypeDescription
colorstringFont color to set.

Returns:

anychart.core.stock.eventMarkers.Group - Self instance for method chaining.

fontDecoration

Getter for font decoration settings.

Returns:

anychart.graphics.vector.Text.Decoration | string - Font decoration settings.
See listing
var fontDecoration = group.fontDecoration();
Setter for font decoration settings.

Params:

NameTypeDescription
typeanychart.graphics.vector.Text.Decoration | stringFont decoration to set.

Returns:

anychart.core.stock.eventMarkers.Group - Self instance for method chaining.

fontFamily

Getter for font family settings.

Returns:

string - Font family settings.
See listing
var fontFamily = group.fontFamily();
Setter for font family settings.

Params:

NameTypeDescription
familystringFont family to set.

Returns:

anychart.core.stock.eventMarkers.Group - Self instance for method chaining.

fontOpacity

Getter for font opacity settings.

Returns:

number - Font opacity settings.
See listing
var fontOpacity = group.fontOpacity();
Setter for font opacity settings.

Params:

NameTypeDescription
opacitynumberFont opacity to set.

Returns:

anychart.core.stock.eventMarkers.Group - Self instance for method chaining.

fontPadding

Getter for the font padding.

Returns:

number | string - Font padding.
See listing
var fontPadding = group.fontPadding();
Setter for the font padding.

Params:

NameTypeDefaultDescription
paddingnumber | string
0
Value to set.

Returns:

anychart.core.stock.eventMarkers.Group - Self instance for method chaining.

fontSize

Getter for font size settings.

Returns:

number - Font size settings.
See listing
var fontSize = group.fontSize();
Setter for font size settings.

Params:

NameTypeDescription
sizenumber | stringFont size to set.

Returns:

anychart.core.stock.eventMarkers.Group - Self instance for method chaining.

fontStyle

Getter for font style settings.

Returns:

anychart.graphics.vector.Text.FontStyle | string - Font style settings.
See listing
var fontStyle = group.fontStyle();
Setter for font style settings.

Params:

NameTypeDescription
stylestring | anychart.graphics.vector.Text.FontStyleFont style to set.

Returns:

anychart.core.stock.eventMarkers.Group - Self instance for method chaining.

fontVariant

Getter for font variant settings.

Returns:

anychart.graphics.vector.Text.FontVariant | string - Font variant settings.
See listing
var fontVariant = group.fontVariant();
Setter for font variant settings.

Params:

NameTypeDescription
valuestring | anychart.graphics.vector.Text.FontVariantFont variant to set.

Returns:

anychart.core.stock.eventMarkers.Group - Self instance for method chaining.

fontWeight

Getter for font weight settings.

Returns:

string | number - Font weight settings.
See listing
var fontWeight = group.fontWeight();
Setter for font weight settings.

Params:

NameTypeDescription
weightstring | numberFont weight to set.

Returns:

anychart.core.stock.eventMarkers.Group - Self instance for method chaining.

format

Getter for the function content text for the tooltip.

Returns:

function | string - Function to format title text.
See listing
var format = group.format();
Setter for function content text for the tooltip.

Params:

NameTypeDescription
formatfunction | stringFunction or string token to format content text.

Returns:

anychart.core.stock.eventMarkers.Group - Self instance for method chaining.

getMarker

Gets group marker by index.
Note: Works only after anychart.charts.Stock#draw is called.

Params:

NameTypeDescription
indexnumberMarker index.

Returns:

anychart.format.Context - Group marker.

hAlign

Getter for horizontal align settings.

Returns:

anychart.graphics.vector.Text.HAlign | string - Horizontal align settings.
See listing
var hAlign = group.hAlign();
Setter for the horizontal align settings.

Params:

NameTypeDescription
alignstring | anychart.graphics.vector.Text.HAlignHorizontal align to set.

Returns:

anychart.core.stock.eventMarkers.Group - Self instance for method chaining.

height

Getter for the markers height.

Returns:

string | number - Markers height.
See listing
var height = group.height();
Setter for the markers height.

Params:

NameTypeDescription
heightstring | numberValue to set.

Returns:

anychart.core.stock.eventMarkers.Group - Self instance for method chaining.

hovered

Getter for hovered state settings.

Returns:

anychart.core.stock.eventMarkers.Group - Hovered state settings
Setter for hovered state settings.

Params:

NameTypeDescription
settingsObjectState settings to set.

Returns:

anychart.core.stock.eventMarkers.Group - Self instance for method chaining.

letterSpacing

Getter for text letter spacing settings.

Returns:

number - Letter spacing settings.
See listing
var letterSpacing = group.letterSpacing();
Setter for text letter spacing settings.

Params:

NameTypeDescription
spacingnumberLetter spacing to set.

Returns:

anychart.core.stock.eventMarkers.Group - Self instance for method chaining.

lineHeight

Getter for line height settings.

Returns:

number | string - Line height settings.
See listing
var lineHeight = group.lineHeight();
Setter for line height settings.

Params:

NameTypeDescription
heightnumber | stringLine height to set.

Returns:

anychart.core.stock.eventMarkers.Group - Self instance for method chaining.

maxFontSize

Getter for maximum font size settings for adjust text from.

Returns:

number - Maximum font size.
See listing
var maxFontSize = group.maxFontSize();
Setter for maximum font size settings for adjust text from.

Params:

NameTypeDescription
sizenumber | stringMaximum font size to set.

Returns:

anychart.core.stock.eventMarkers.Group - Self instance for method chaining.

minFontSize

Getter for minimum font size settings for adjust text from.

Returns:

number - Minimum font size.
See listing
var minFontSize = group.minFontSize();
Setter for minimum font size settings for adjust text from.

Params:

NameTypeDescription
sizenumber | stringMinimum font size to set.

Returns:

anychart.core.stock.eventMarkers.Group - Self instance for method chaining.

normal

Getter for normal state settings.

Returns:

anychart.core.stock.eventMarkers.Group - Normal state settings.
Setter for normal state settings.

Params:

NameTypeDescription
settingsObjectState settings to set.

Returns:

anychart.core.stock.eventMarkers.Group - Self instance for method chaining.

position

Getter for the position.

Returns:

anychart.enums.EventMarkerPosition | string - Event markers position.
See listing
var position = group.position();
Setter for the position.

Params:

NameTypeDescription
positionanychart.enums.EventMarkerPosition | stringPosition to set.

Returns:

anychart.core.stock.eventMarkers.Group - Self instance for method chaining.

selectable

Getter for the text selectable option.

Returns:

boolean - Text selectable value.
See listing
var selectable = group.selectable();
Setter for the text selectable option.

Params:

NameTypeDefaultDescription
enabledboolean
false
Enables/disables the possibility of selecting text.

Returns:

anychart.core.stock.eventMarkers.Group - Self instance for method chaining.

selected

Getter for selected state settings.

Returns:

anychart.core.stock.eventMarkers.Group - Selected state settings
Setter for selected state settings.

Params:

NameTypeDescription
settingsObjectState settings to set.

Returns:

anychart.core.stock.eventMarkers.Group - Self instance for method chaining.

seriesId

Getter for the seriesId.

Returns:

string - Series id.
See listing
var seriesId = group.seriesId();
Setter for the seriesId.
Note: Sets a series by id for all anychart.core.stock.eventMarkers.Group#position values with exception of "axis" value.

Params:

NameTypeDescription
idstringSeries id to set.

Returns:

anychart.core.stock.eventMarkers.Group - Self instance for method chaining.

stickToLeft

Getter for sticking event markers to left value.

Returns:

boolean - Event markers sticks to left value or no.
See listing
var group = plot.eventMarkers().group();
var stickToLeft = group.stickToLeft();
Setter for sticking event markers to left value.

Params:

NameTypeDefaultDescription
enabledboolean
true
Whether event markers to stick to left value.

Returns:

anychart.core.stock.eventMarkers.Group - Self instance for method chaining.

stroke

Getter for stroke settings.

Returns:

anychart.graphics.vector.Stroke - Stroke settings.
See listing
var stroke = group.stroke();
Setter for series stroke by function.

Params:

NameTypeDefaultDescription
strokeFunctionfunction():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.
Setter for series stroke settings. Learn more about stroke settings.

Params:

NameTypeDefaultDescription
coloranychart.graphics.vector.Stroke | anychart.graphics.vector.ColoredFill | string | null
Stroke settings.
thicknessnumber
1
Line thickness.
dashpatternstring
Controls the pattern of dashes and gaps used to stroke paths.
lineJoinstring | anychart.graphics.vector.StrokeLineJoin
Line join style.
lineCapstring | anychart.graphics.vector.StrokeLineCap
Line cap style.

Returns:

anychart.core.map.series.Base - Self instance for method chaining.
Setter for stroke using an object.

Params:

NameTypeDescription
settingsObjectStroke settings from anychart.graphics.vector.Stroke.

Returns:

anychart.core.stock.eventMarkers.Group - Self instance for method chaining.

textDirection

Getter for the text direction settings.

Returns:

anychart.graphics.vector.Text.Direction | string - Text direction settings.
See listing
var textDirection = group.textDirection();
Setter for text direction settings.

Params:

NameTypeDescription
typestring | anychart.graphics.vector.Text.DirectionText direction to set.

Returns:

anychart.core.stock.eventMarkers.Group - Self instance for method chaining.

textIndent

Getter for text-indent settings.

Returns:

number - Text indent settings.
See listing
var textIndent = group.textIndent();
Setter for text-indent settings.

Params:

NameTypeDescription
indentnumberText indent to set.

Returns:

anychart.core.stock.eventMarkers.Group - Self instance for method chaining.

textOverflow

Getter for text overflow settings.

Returns:

anychart.graphics.vector.Text.TextOverflow | string - Text overflow settings
See listing
var textOverflow = group.textOverflow();
Setter for text overflow settings.

Params:

NameTypeDescription
valueanychart.graphics.vector.Text.TextOverflow | stringValue to set

Returns:

anychart.core.stock.eventMarkers.Group - Self instance for method chaining.

textShadow

Getter for text shadow settings.

Returns:

string - String representation of text shadow.
See listing
var textShadow = group.textShadow();
Setter for text shadow settings.

Params:

NameTypeDefaultDescription
textShadowanychart.graphics.vector.TextShadow | string
'none'
Text shadow to set.

Returns:

anychart.core.stock.eventMarkers.Group - Self instance for method chaining.

tooltip

Getter for tooltip settings.

Returns:

anychart.core.stock.eventMarkers.Group - Tooltip instance.
Setter for tooltip settings.

Params:

NameTypeDefaultDescription
settingsObject | boolean | null
true
Tooltip settings.

Returns:

anychart.core.stock.eventMarkers.Group - Self instance for method chaining.

type

Getter for the marker type.

Returns:

anychart.enums.EventMarkerType | string - Marker type.
See listing
var type = group.type();
Setter for the marker type.

Params:

NameTypeDescription
typestring | anychart.enums.EventMarkerTypeMarker type to set.

Returns:

anychart.core.stock.eventMarkers.Group - Self instance for method chaining.

useHtml

Getter for the useHTML flag.

Returns:

boolean - UseHTML flag.
See listing
var useHtml = group.useHtml();
Setter for the useHTML flag.

Params:

NameTypeDescription
enabledbooleanValue to set.

Returns:

anychart.core.stock.eventMarkers.Group - Self instance for method chaining.

vAlign

Getter for text vertical align settings.

Returns:

anychart.graphics.vector.Text.VAlign | string - Vertical align.
See listing
var vAlign = group.vAlign();
Setter for text vertical align settings.

Params:

NameTypeDescription
alignstring | anychart.graphics.vector.Text.VAlignVertical align to set.

Returns:

anychart.core.stock.eventMarkers.Group - Self instance for method chaining.

width

Getter for the markers width.

Returns:

string | number - Markers width.
See listing
var width = group.width();
Setter for the markers width.

Params:

NameTypeDescription
widthstring | numberValue to set.

Returns:

anychart.core.stock.eventMarkers.Group - Self instance for method chaining.

wordBreak

Getter for the word-break mode.

Returns:

anychart.enums.WordBreak | string - Word-break mode.
See listing
var wordBreak = group.wordBreak();
Setter for the word-break mode.

Params:

NameTypeDefaultDescription
modeanychart.enums.WordBreak | string
'normal'
Value to set.

Returns:

anychart.core.stock.eventMarkers.Group - Self instance for method chaining.

wordWrap

Getter for the word-wrap mode.

Returns:

anychart.enums.WordWrap | string - Word-wrap mode.
See listing
var wordWrap = group.wordWrap();
Setter for the word-wrap mode.

Params:

NameTypeDefaultDescription
modeanychart.enums.WordWrap | string
'normal'
Value to set.

Returns:

anychart.core.stock.eventMarkers.Group - Self instance for method chaining.

zIndex

Getter for the Z-index of the element.

Returns:

number - Z-index.
Setter for the Z-index of the element.

Params:

NameTypeDefaultDescription
zIndexnumber
0
Value to set.

Returns:

anychart.core.stock.eventMarkers.Group - Self instance for method chaining.