AnyChart
API Reference
Still have questions?
Contact support
Top

class anychart.core.linearGauge.pointers.Marker Improve this Doc

Extends: anychart.core.linearGauge.pointers.Base

Marker pointer class.

Methods Overview

Specific Settings
id()Pointer id.
Specific settings
labels()Labels settings.
legendItem()Legend item settings.
type()Marker type settings.
Axes and Scales
scale()Scale settings.
Coloring
color()Color settings.
fill()Fill settings.
hatchFill()Hatch fill settings.
stroke()Stroke settings.
Data
data()Data for pointers.
dataIndex()Pointer name settings.
name()Pointer name settings.
Gauges
getGauge()Getter for the gauge.
Interactivity
enabled()Element state (enabled or disabled).
hover()Hovers a pointer.
hovered()Hovered state settings.
normal()Normal state settings.
select()Selects a pointer.
selected()Selected state settings.
unhover()Removes hover from the pointer.
unselect()Deselects a pointer.
Size and Position
offset()Offset settings.
width()Width settings
zIndex()Z-index of the element.

Methods Description

color

Getter for the pointer color.

Returns:

string - The pointer color.
Setter for the pointer color.

Params:

NameTypeDescription
colorstringColor as a string.

Returns:

anychart.core.linearGauge.pointers.Marker - Self instance for method chaining.

data

Getter for pointers data.

Returns:

anychart.data.View - Pointers data.
See listing
var pointer = pointer.data();
Getter for pointers data.

Params:

NameTypeDescription
dataanychart.data.View | anychart.data.Set | Array | stringData to set.
csvSettingsanychart.enums.TextParsingMode | anychart.data.TextParsingSettingsIf CSV string is passed, you can pass CSV parser settings here as a hash map.

Returns:

anychart.core.linearGauge.pointers.Marker - Self instance for method chaining.

dataIndex

Getter for the data index.

Returns:

number - Data index.
Setter for the data index.

Params:

NameTypeDescription
indexnumberData index to set.

Returns:

anychart.core.linearGauge.pointers.Marker - 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.linearGauge.pointers.Marker - Self instance for method chaining.
Example.
if (!element.enabled())
   element.enabled(true);

fill

Getter for the pointer fill color.

Returns:

anychart.graphics.vector.Fill | function - Pointer fill color.
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 object, an array or a string.

Returns:

anychart.core.linearGauge.pointers.Marker - 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.linearGauge.pointers.Marker - 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.linearGauge.pointers.Marker - 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.linearGauge.pointers.Marker - Self instance for method chaining.

Params:

NameTypeDescription
imageSettingsanychart.graphics.vector.FillObject with settings.

Returns:

anychart.core.linearGauge.pointers.Marker - Self instance for method chaining.

getGauge

hatchFill

Getter for pointer hatch fill settings.

Returns:

anychart.graphics.vector.PatternFill | anychart.graphics.vector.HatchFill | function - The pointer hatch fill.
Setter for hatch fill settings.

Params:

NameTypeDefaultDescription
typeanychart.graphics.vector.HatchFill.HatchFillType | string
false
Type of hatch fill.
colorstring
Color.
thicknessnumber
Thickness.
sizenumber
Pattern size.

Returns:

anychart.core.linearGauge.pointers.Marker - Self instance for method chaining.
Setter for hatch fill settings using function. Learn more about coloring.

Params:

NameTypeDescription
hatchFillFunctionfunctionHatchFill function.

Returns:

anychart.core.linearGauge.pointers.Marker - Self instance for method chaining.
Setter for hatch fill settings using pattern fill. Learn more about coloring.

Params:

NameTypeDescription
patternFillanychart.graphics.vector.PatternFillPattern fill to set.

Returns:

anychart.core.linearGauge.pointers.Marker - Self instance for method chaining.
Setter for hatch fill settings using an instance. Learn more about coloring.

Params:

NameTypeDescription
settingsanychart.graphics.vector.HatchFillHatch fill instance.

Returns:

anychart.core.linearGauge.pointers.Marker - Self instance for method chaining.
Setter for hatch fill using boolean. Learn more about hatch fill settings.

Params:

NameTypeDefaultDescription
enabledboolean
false
Whether to enable hatch fill or no.

Returns:

anychart.core.linearGauge.pointers.Marker - Self instance for method chaining.

hover

Hovers a pointer.

Returns:

anychart.core.linearGauge.pointers.Marker - Self instance for method chaining.

hovered

Getter for hovered state settings.

Returns:

anychart.core.StateSettings - Hovered state settings
Setter for hovered state settings.

Params:

NameTypeDescription
settingsObjectState settings to set.

Returns:

anychart.core.linearGauge.pointers.Marker - Self instance for method chaining.

id

Getter for the pointer id.

Returns:

string | number - Pointer id.
See listing
var id = pointer.id();
Setter for the pointer id.

Params:

NameTypeDefaultDescription
idstring | number
0
Pointer id to set.

Returns:

anychart.core.linearGauge.pointers.Marker - Self instance for method chaining.

labels

Getter for the pointer labels.

Returns:

anychart.core.ui.LabelsFactory - Labels instance.
Setter for the pointer labels.

Params:

NameTypeDescription
settingsanychart.core.ui.LabelsFactory | Object | booleanPointer labels settings.

Returns:

anychart.core.linearGauge.pointers.Marker - Self instance for method chaining.

legendItem

Getter for the legend item settings.

Returns:

anychart.core.utils.LegendItemSettings - Legend item settings.
Setter for the legend item settings.

Params:

NameTypeDescription
settingsObjectLegend item settings to set.

Returns:

anychart.core.linearGauge.pointers.Marker - Self instance for method chaining.

name

Getter for the pointer name.

Returns:

string - The pointer name.
Setter for the pointer name.

Params:

NameTypeDescription
namestringPointer name to set.

Returns:

anychart.core.linearGauge.pointers.Marker - Self instance for method chaining.

normal

Getter for normal state settings.

Returns:

anychart.core.StateSettings - Normal state settings.
Setter for normal state settings.

Params:

NameTypeDescription
settingsObjectState settings to set.

Returns:

anychart.core.linearGauge.pointers.Marker - Self instance for method chaining.

offset

Getter for the pointer offset.

Returns:

string - The pointer offset in percent.
Setter for the pointer offset.

Params:

NameTypeDefaultDescription
offsetstring | number
'0%'
Pointer offset to set.

Returns:

anychart.core.linearGauge.pointers.Marker - Self instance for method chaining.

scale

Getter for the pointer scale.

Returns:

anychart.scales.Base - Pointer scale.
Setter for the pointer scale.

Params:

NameTypeDefaultDescription
scaleanychart.scales.Base
anychart.scales.Linear
Pointer scale.

Returns:

anychart.core.linearGauge.pointers.Marker - Self instance for method chaining.

select

Selects a pointer.

Params:

NameTypeDescription
eventanychart.core.MouseEventEvent that initiate point selecting.

Returns:

anychart.core.linearGauge.pointers.Marker - Self instance for method chaining.

selected

Getter for selected state settings.

Returns:

anychart.core.StateSettings - Selected state settings
Setter for selected state settings.

Params:

NameTypeDescription
settingsObjectState settings to set.

Returns:

anychart.core.linearGauge.pointers.Marker - Self instance for method chaining.

stroke

Setter for the pointer stroke using function. Learn more about stroke settings.

Params:

NameTypeDefaultDescription
strokeFunctionfunction():anychart.graphics.vector.Stroke|anychart.graphics.vector.ColoredFill
// return stroke from the default palette.
function() {
  return anychart.color.darken(this.sourceColor);
};
or Stroke, or stroke-function, which should look like:
function() {
 //  this: {
 //  index : number  - the index of the current point
 //  sourceColor : anychart.graphics.vector.Stroke - stroke of the current point
 // }
 return myStroke; //anychart.graphics.vector.Stroke
};

Returns:

anychart.core.linearGauge.pointers.Marker - Self instance for method chaining.
Setter for the pointer stroke using several parameters. 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.linearGauge.pointers.Marker - Self instance for method chaining.
Setter for the pointer stroke using an object.

Params:

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

Returns:

anychart.core.linearGauge.pointers.Marker - Self instance for method chaining.

type

Getter for the marker type.

Returns:

string - The marker type.
Setter for the marker type.

Params:

NameTypeDefaultDescription
typeanychart.enums.MarkerType | string
'circle'
Marker type.

Returns:

anychart.core.linearGauge.pointers.Marker - Self instance for method chaining.

unhover

Removes hover from the pointer.

Returns:

anychart.core.linearGauge.pointers.Marker - Self instance for method chaining.

unselect

Deselects a pointer.

Returns:

anychart.core.linearGauge.pointers.Marker - Self instance for method chaining.

width

Getter for the pointer width.

Returns:

string - The pointer width.
Setter for the pointer width.

Params:

NameTypeDefaultDescription
widthstring
'10%'
Pointer width

Returns:

anychart.core.linearGauge.pointers.Marker - 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.linearGauge.pointers.Marker - Self instance for method chaining.