AnyChart
API Reference
Still have questions?
Contact support
Top
You are looking at an outdated v7 version of this document. Switch to the v8 version to see the up to date information.

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

Extends: anychart.core.linearGauge.pointers.Base

Marker pointer class.

Methods Overview

Specific settings
hoverLabel()Hover label settings.
label()Label settings.
legendItem()Legend item settings.
selectLabel()Select label settings.
type()Marker type settings.
Axes and Scales
scale()Scale settings.
Coloring
color()Color settings.
fill()Fill settings.
hatchFill()Hatch fill settings.
hoverFill()Fill settings.
hoverHatchFill()Hatch fill settings.
hoverStroke()Stroke settings.
selectFill()Select fill settings.
selectHatchFill()Hatch fill settings.
selectStroke()Stroke settings.
stroke()Stroke settings.
Data
dataIndex()Pointer name settings.
name()Pointer name settings.
Gauges
getGauge()Getter for the gauge.
Interactivity
hover()Hovers a pointer.
select()Selects a pointer.
unhover()Removes hover from the pointer.
unselect()Deselects a pointer.
Size and Position
offset()Offset settings.
width()Width settings

Methods Description

color

Getter for the pointer color.

Returns:

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

Params:

NameTypeDescription
valuestringColor as a string.

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.

fill

Getter for the pointer fill color.

Returns:

anychart.graphics.vector.Fill | function - Pointer fill color.
Setter for fill settings using an array or a string. Learn more about coloring.

Params:

NameTypeDefaultDescription
valueanychart.graphics.vector.Fill
Color as an object 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
patternFillOrTypeanychart.graphics.vector.PatternFill | anychart.graphics.vector.HatchFill | function | anychart.graphics.vector.HatchFill.HatchFillType | string | boolean
false
PatternFill or HatchFill instance or type of hatch fill.
colorstring
Color.
thicknessnumber
Thickness.
sizenumber
Pattern size.

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.

hoverFill

Getter for the hover fill color.

Returns:

anychart.graphics.vector.Fill | function - Pointer hover fill color.
Setter for the hover fill settings using an array or a string. Learn more about coloring.

Params:

NameTypeDefaultDescription
valueanychart.graphics.vector.Fill
Color as an object 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.

hoverHatchFill

Getter for pointer hover hatch fill settings.

Returns:

anychart.graphics.vector.PatternFill | anychart.graphics.vector.HatchFill | function - Pointer hover hatch fill settings.
Setter for hover hatch fill settings.

Params:

NameTypeDefaultDescription
patternFillOrTypeanychart.graphics.vector.PatternFill | anychart.graphics.vector.HatchFill | function | anychart.graphics.vector.HatchFill.HatchFillType | string | boolean
false
PatternFill or HatchFill instance or type of hatch fill.
colorstring
Color.
thicknessnumber
Thickness.
sizenumber
Pattern size.

Returns:

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

hoverLabel

Getter for the pointer hover label.

Returns:

anychart.core.ui.LabelsFactory - Labels factory instance.
Setter for the pointer hover label.

Params:

NameTypeDescription
valueanychart.core.ui.LabelsFactory | Object | booleanPointer label settings.

Returns:

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

hoverStroke

Getter for the pointer hover stroke.

Returns:

anychart.graphics.vector.Stroke | function - The pointer hover stroke.
Setter for the pointer hover stroke using function. Learn more about hoverStroke settings.

Params:

NameTypeDefaultDescription
valueanychart.graphics.vector.Stroke | function
// return hoverStroke 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 - hoverStroke 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 hover 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 hoverStroke paths.
lineJoinanychart.graphics.vector.StrokeLineJoin
Line join style.
lineCapanychart.graphics.vector.StrokeLineCap
Line cap style.

Returns:

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

label

Getter for the pointer label.

Returns:

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

Params:

NameTypeDescription
valueanychart.core.ui.LabelsFactory | Object | booleanPointer label 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
valueObjectLegend item settings object.

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
valuestringPointer name.

Returns:

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

offset

Getter for the pointer offset.

Returns:

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

Params:

NameTypeDescription
valuestringPercent offset.

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:

NameTypeDescription
valueanychart.scales.BasePointer 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.

selectFill

Getter for the select fill color.

Returns:

anychart.graphics.vector.Fill | function - Pointer fill color.
Setter for the select fill settings using an array or a string. Learn more about coloring.

Params:

NameTypeDefaultDescription
valueanychart.graphics.vector.Fill
Color as an object 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.

selectHatchFill

Getter for pointer select hatch fill settings.

Returns:

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

Params:

NameTypeDefaultDescription
patternFillOrTypeanychart.graphics.vector.PatternFill | anychart.graphics.vector.HatchFill | function | anychart.graphics.vector.HatchFill.HatchFillType | string | boolean
false
PatternFill or HatchFill instance or type of hatch fill.
colorstring
Color.
thicknessnumber
Thickness.
sizenumber
Pattern size.

Returns:

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

selectLabel

Getter for the pointer select label.

Returns:

anychart.core.ui.LabelsFactory - Labels factory instance.
Setter for the pointer select label.

Params:

NameTypeDescription
valueanychart.core.ui.LabelsFactory | ObjectPointer select label.

Returns:

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

selectStroke

Getter for the pointer select stroke.

Returns:

anychart.graphics.vector.Stroke | function - The pointer select stroke.
Setter for the pointer select stroke using function. Learn more about selectStroke settings.

Params:

NameTypeDefaultDescription
valuefunction
// return selectStroke 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 - selectStroke 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 select stroke using several parameters. Learn more about stroke settings.

Params:

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

Returns:

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

stroke

Getter for the pointer stroke.

Returns:

anychart.graphics.vector.Stroke | function - The pointer stroke.
Setter for the pointer stroke using function. Learn more about stroke settings.

Params:

NameTypeDefaultDescription
valueanychart.graphics.vector.Stroke | function
// 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 | function | null
Stroke settings.
thicknessnumber
1
Line thickness.
dashpatternstring
Controls the pattern of dashes and gaps used to stroke paths.
lineJoinanychart.graphics.vector.StrokeLineJoin
Line join style.
lineCapanychart.graphics.vector.StrokeLineCap
Line cap style.

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:

NameTypeDescription
valuestring | anychart.enums.MarkerTypeMarker 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
valuestring
"10%"
Pointer width

Returns:

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