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

class anychart.core.map.series.Base Improve this Doc

Extends: anychart.core.VisualBaseWithBounds

Choropleth series. Read more about choropleth here.

Methods Overview

Miscellaneous
allowPointsSelect()Getter for the current selected state of the points.
colorScale()Getter for the current color scale.
data()Getter for series mapping.
fill()Getter for current series fill color.
geoIdField()Getter for the current geo id field.
hatchFill()Getter fot the current hatch fill.
hover()Sets the hover state on a point by index.
hoverFill()Getter for current series fill color on hover state.
hoverHatchFill()Getter for the current hatch fill on hover state.
hoverLabels()Getter for the current series hover data labels on hover state.
labels()Getter for the current series data labels.
legendItem()Gets legend item setting for series.
select()Imitates selects a point of the series by its index.
selectFill()Getter for current series fill color for selected point.
selectHatchFill()Getter for the current hatch fill for selected point.
selectLabels()Getter for the current series select data labels.
stroke()Getter for current stroke settings.
tooltip()Getter for the current tooltip settings.
unhover()Removes hover from the series.
unselect()Deselects all points on series.

Methods Description

allowPointsSelect

Getter for the current selected state of the points.

Returns:

null | boolean - The current selected state of the points.
Allows to select points of the series.

Params:

NameTypeDescription
valuebooleanAllow or not.

Returns:

anychart.core.map.series.Base - Self instance for method chaining.

colorScale

Getter for the current color scale.
Setter for the color scale.

Returns:

anychart.core.map.series.Base - Self instance for method chaining.

data

Getter for series mapping.

Returns:

anychart.data.View - Returns current mapping.
Setter for series mapping.

Params:

NameTypeDescription
valueanychart.data.View | anychart.data.Set | Array | stringValue to set.
csvSettingsObject.<string, (string|boolean)>If CSV string is passed by first param, you can pass CSV parser settings here as a hash map.

Returns:

anychart.core.map.series.Base - Self instance for method chaining.

fill

Getter for current series fill color.

Returns:

anychart.graphics.vector.Fill - Current fill color.
Sets series fill settings using an array or a string. Learn more about coloring.

Params:

NameTypeDescription
valueanychart.graphics.vector.FillColor as an array or a string.

Returns:

anychart.core.map.series.Base - Self instance for method chaining.
Series fill color with opacity. Fill as a string or an object.

Params:

NameTypeDescription
colorstringColor as a string.
opacitynumberColor opacity.

Returns:

anychart.core.map.series.Base - Self instance for method chaining.
Linear gradient series 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.map.series.Base - Self instance for method chaining.
Radial series 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.map.series.Base - Self instance for method chaining.
Image series fill. Learn more about coloring.

Params:

NameTypeDescription
imageSettingsanychart.graphics.vector.FillObject with settings.

Returns:

anychart.core.map.series.Base - Self instance for method chaining.

geoIdField

Getter for the current geo id field.

Returns:

string - The current geo id filed.
Setter for the geo id field.

Params:

NameTypeDescription
valuestringId from geo data.

Returns:

anychart.core.map.series.Base - Self instance for method chaining.

hatchFill

Getter fot the current hatch fill.

Returns:

anychart.graphics.vector.PatternFill | anychart.graphics.vector.HatchFill | function | boolean - The current hatch fill.
Setter for the hatch fill.

Params:

NameTypeDescription
patternFillOrTypeOrStateanychart.graphics.vector.PatternFill | anychart.graphics.vector.HatchFill | function | anychart.graphics.vector.HatchFill.HatchFillType | string | booleanPatternFill or HatchFill instance or type or state of hatch fill.
colorstringColor.
thicknessnumberThickness.
sizenumberPattern size.

Returns:

anychart.core.map.series.Base - Self instance for method chaining.

hover

Sets the hover state on a point by index.

Params:

NameTypeDescription
indexnumberPoint index

Returns:

anychart.core.map.series.Base - Self instance for method chaining.

hoverFill

Getter for current series fill color on hover state.

Returns:

anychart.graphics.vector.Fill - Current fill color.
Sets series fill settings on hover state using an array or a string. Learn more about coloring.

Params:

NameTypeDescription
valueanychart.graphics.vector.FillColor as an array or a string.

Returns:

anychart.core.map.series.Base - Self instance for method chaining.
Series fill color with opacity on hover state. Fill as a string or an object.

Params:

NameTypeDescription
colorstringColor as a string.
opacitynumberColor opacity.

Returns:

anychart.core.map.series.Base - Self instance for method chaining.
Linear gradient series fill on hover state. 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.map.series.Base - Self instance for method chaining.
Radial series fill on hover state. 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.map.series.Base - Self instance for method chaining.
Image series fill on hover state. Learn more about coloring.

Params:

NameTypeDescription
imageSettingsanychart.graphics.vector.FillObject with settings.

Returns:

anychart.core.map.series.Base - Self instance for method chaining.

hoverHatchFill

Getter for the current hatch fill on hover state.

Returns:

anychart.graphics.vector.PatternFill | anychart.graphics.vector.HatchFill | function | boolean - The current hatch fill.
Setter for the hatch fill on hover state.

Params:

NameTypeDescription
patternFillOrTypeOrStateanychart.graphics.vector.PatternFill | anychart.graphics.vector.HatchFill | function | anychart.graphics.vector.HatchFill.HatchFillType | string | booleanPatternFill or HatchFill instance or type or state of hatch fill.
colorstringColor.
thicknessnumberThickness.
sizenumberPattern size.

Returns:

anychart.core.map.series.Base - Self instance for method chaining.

hoverLabels

Getter for the current series hover data labels on hover state.

Returns:

anychart.core.ui.LabelsFactory - Labels instance.
Setter for the series hover data labels on hover state.

Params:

NameTypeDefaultDescription
valueObject | boolean | null
true
Series data labels settings.

Returns:

anychart.core.map.series.Base - Self instance for method chaining.

labels

Getter for the current series data labels.

Returns:

anychart.core.ui.LabelsFactory - Labels instance.
Setter for series data labels.

Params:

NameTypeDefaultDescription
valueObject | boolean | null
true
Series data labels settings.

Returns:

anychart.core.map.series.Base - Self instance for method chaining.

legendItem

Gets legend item setting for series.

Returns:

anychart.core.utils.LegendItemSettings - Legend item settings.
Sets legend item setting for series.

Params:

NameTypeDescription
valueObjectLegend item settings object.

Returns:

anychart.core.map.series.Base - Self instance for method chaining.

select

Imitates selects a point of the series by its index.

Params:

NameTypeDescription
indexnumberIndex of the point to select.

Returns:

anychart.core.map.series.Base - Self instance for method chaining.

selectFill

Getter for current series fill color for selected point.

Returns:

anychart.graphics.vector.Fill - Current fill color.
Sets fill settings for selected point using an array or a string. Learn more about coloring.

Params:

NameTypeDescription
valueanychart.graphics.vector.FillColor as an array or a string.

Returns:

anychart.core.map.series.Base - Self instance for method chaining.
Fill color with opacity for selected point. Fill as a string or an object.

Params:

NameTypeDescription
colorstringColor as a string.
opacitynumberColor opacity.

Returns:

anychart.core.map.series.Base - Self instance for method chaining.
Linear gradient fill for selected point. 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.map.series.Base - Self instance for method chaining.
Radial fill for selected point. 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.map.series.Base - Self instance for method chaining.
Image fill for selected point. Learn more about coloring.

Params:

NameTypeDescription
imageSettingsanychart.graphics.vector.FillObject with settings.

Returns:

anychart.core.map.series.Base - Self instance for method chaining.

selectHatchFill

Getter for the current hatch fill for selected point.

Returns:

anychart.graphics.vector.PatternFill | anychart.graphics.vector.HatchFill | function | boolean - The current selected hatch fill.
Setter for the hatch fill for selected point.

Params:

NameTypeDescription
patternFillOrTypeOrStateanychart.graphics.vector.PatternFill | anychart.graphics.vector.HatchFill | function | anychart.graphics.vector.HatchFill.HatchFillType | string | booleanPatternFill or HatchFill instance or type or state of hatch fill.
colorstringColor.
thicknessnumberThickness.
sizenumberPattern size.

selectLabels

Getter for the current series select data labels.

Returns:

anychart.core.ui.LabelsFactory - Labels instance.
Setter for the series select data labels.

Params:

NameTypeDefaultDescription
valueObject | boolean | null
true
Series data labels settings.

Returns:

anychart.core.map.series.Base - Self instance for method chaining.

stroke

Getter for current stroke settings.

Returns:

anychart.graphics.vector.Stroke - Current stroke settings.
Setter for series stroke by function.

Params:

NameTypeDefaultDescription
fillFunctionfunction
function() {
 return anychart.color.darken(this.sourceColor);
}
Function that looks like function(){ // this.index - series index. // this.sourceColor - color returned by stroke() getter. // this.iterator - series point iterator. return strokeValue; // type anychart.graphics.vector.Fill or 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
strokeOrFillanychart.graphics.vector.Stroke | anychart.graphics.vector.ColoredFill | string | function | null
Fill settings or 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.map.series.Base - Self instance for method chaining.

tooltip

Getter for the current tooltip settings.

Returns:

anychart.core.ui.Tooltip - Tooltip instance.
Setter for the tooltip settings.

Params:

NameTypeDefaultDescription
valueObject | boolean | null
true
Tooltip settings.

Returns:

anychart.core.map.series.Base - Self instance for method chaining.

unhover

Removes hover from the series.

Returns:

anychart.core.map.series.Base - Self instance for method chaining.

unselect

Deselects all points on series.

Params:

NameTypeDescription
eventanychart.core.MouseEventEvent that initiate point selecting.

Returns:

anychart.core.map.series.Base - Self instance for method chaining.