Top
You are looking at an outdated 7.7.0 version of this document. Switch to the 8.0.1 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

Specific settings
legendItem()Legend item settings.
Coloring
color()Color settings.
colorScale()Color scale settings.
fill()Fill settings.
hatchFill()Hatch fill settings.
hoverFill()Fill settings on hover state.
hoverHatchFill()Hatch fill settings on hover state.
hoverStroke()Stroke settings on hover state.
selectFill()Fill settings for selected point.
selectHatchFill()Hatch fill settings for selected point.
selectStroke()Stroke settings for selected point.
stroke()Stroke settings.
Data
data()Data settings.
geoIdField()Geo id field settings.
Interactivity
allowPointsSelect()Allows to select points or not.
hover()Sets the hover state on a point by index.
select()Imitates selects a point of the series by its index.
tooltip()Tooltip settings.
Point Elements
hoverLabels()Labels settings on hover state.
labels()Labels settings.
selectLabels()Labels settings for selected state.

Methods Description

allowPointsSelect

Getter for the current selected state of the points.

Returns:

null boolean - The current selected state of the points.

Try it:

Allows to select points of the series.

Params:

Name Type Default Description
value boolean
false
Allow or not.

Returns:

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

Try it:

color

Getter for current series color.

Returns:

anychart.graphics.vector.Fill - The current color.

Try it:

Sets color settings using an object or a string.

Params:

Name Type Default Description
value anychart.graphics.vector.Fill
"#64b5f6"
Color as an object or a string.

Returns:

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

Params:

Name Type Description
color string Color as a string.
opacity number Color opacity.

Returns:

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

Try it:

Linear gradient. Learn more about coloring.

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.map.series.Base - Self instance for method chaining.

Try it:

Radial gradient. Learn more about coloring.

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.map.series.Base - Self instance for method chaining.

Try it:

colorScale

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

Params:

Name Type Description
value anychart.core.map.scale.LinearColor | anychart.core.map.scale.OrdinalColor Scale to set.

Returns:

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

Try it:

data

Getter for series mapping.

Returns:

anychart.data.View - Returns current mapping.

Try it:

Setter for series mapping.

Params:

Name Type Description
value anychart.data.View | anychart.data.Set | Array | string Value to set.
csvSettings Object.<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.

Try it:

Sets series fill settings using an array or a string. Learn more about coloring.

Params:

Name Type Description
value anychart.graphics.vector.Fill Color 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:

Name Type Description
color string Color as a string.
opacity number Color opacity.

Returns:

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

Try it:

Linear gradient series fill. Learn more about coloring.

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.map.series.Base - Self instance for method chaining.

Try it:

Radial series fill. Learn more about coloring.

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.map.series.Base - Self instance for method chaining.

Try it:

Image series fill. Learn more about coloring.

Params:

Name Type Description
imageSettings anychart.graphics.vector.Fill Object with settings.

Returns:

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

Try it:

geoIdField

Getter for the current geo id field.

Returns:

string - The current geo id filed.

Try it:

Setter for the geo id field.

Params:

Name Type Description
value string Id from geo data.

Returns:

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

Try it:

hatchFill

Getter fot the current hatch fill.

Returns:

anychart.graphics.vector.PatternFill anychart.graphics.vector.HatchFill function boolean - The current hatch fill.

Try it:

Setter for the hatch fill.

Params:

Name Type Default Description
patternFillOrTypeOrState anychart.graphics.vector.PatternFill | anychart.graphics.vector.HatchFill | function | anychart.graphics.vector.HatchFill.HatchFillType | string | boolean
false
PatternFill or HatchFill instance or type or state of hatch fill.
color string
Color.
thickness number
Thickness.
size number
Pattern size.

Returns:

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

Try it:

hover

Sets the hover state on a point by index.

Params:

Name Type Description
index number Point index

Returns:

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

Try it:

hoverFill

Getter for current series fill color on hover state.

Returns:

anychart.graphics.vector.Fill - Current fill color.

Try it:

Sets series fill settings on hover state using an array or a string. Learn more about coloring.

Params:

Name Type Description
value anychart.graphics.vector.Fill Color 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:

Name Type Description
color string Color as a string.
opacity number Color opacity.

Returns:

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

Try it:

Linear gradient series fill on hover state. Learn more about coloring.

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.map.series.Base - Self instance for method chaining.

Try it:

Radial series fill on hover state. Learn more about coloring.

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.map.series.Base - Self instance for method chaining.

Try it:

Image series fill on hover state. Learn more about coloring.

Params:

Name Type Description
imageSettings anychart.graphics.vector.Fill Object with settings.

Returns:

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

Try it:

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.

Try it:

Setter for the hatch fill on hover state.

Params:

Name Type Default Description
patternFillOrTypeOrState anychart.graphics.vector.PatternFill | anychart.graphics.vector.HatchFill | function | anychart.graphics.vector.HatchFill.HatchFillType | string | boolean
null
PatternFill or HatchFill instance or type or state of hatch fill.
color string
Color.
thickness number
Thickness.
size number
Pattern size.

Returns:

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

Try it:

hoverLabels

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

Returns:

anychart.core.ui.LabelsFactory - Labels instance.

Try it:

Setter for the series hover data labels on hover state.

Params:

Name Type Default Description
value Object | boolean | null
null
Series data labels settings.

Returns:

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

hoverStroke

Getter for current stroke settings on hover state.

Returns:

anychart.graphics.vector.Stroke - Current stroke settings.

Try it:

Setter for series stroke on hover state by function.

Params:

Name Type Default Description
strokeFunction function
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.

Try it:

Setter for series stroke settings on hover state. Learn more about stroke settings.

Params:

Name Type Default Description
strokeOrFill anychart.graphics.vector.Stroke | anychart.graphics.vector.ColoredFill | string | function | null
Fill settings or stroke settings.
thickness number
1
Line thickness.
dashpattern string
Controls the pattern of dashes and gaps used to stroke paths.
lineJoin anychart.graphics.vector.StrokeLineJoin
Line join style.
lineCap anychart.graphics.vector.StrokeLineCap
Line cap style.

Returns:

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

Try it:

labels

Getter for the current series data labels.

Returns:

anychart.core.ui.LabelsFactory - Labels instance.

Try it:

Setter for series data labels.

Params:

Name Type Default Description
value Object | 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.

Try it:

Sets legend item setting for series.

Params:

Name Type Description
value Object Legend item settings object.

Returns:

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

Try it:

select

Imitates selects a point of the series by its index.

Params:

Name Type Description
index number Index of the point to select.

Returns:

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

Try it:

selectFill

Getter for current series fill color for selected point.

Returns:

anychart.graphics.vector.Fill - Current fill color.

Try it:

Sets fill settings for selected point using an array or a string. Learn more about coloring.

Params:

Name Type Default Description
value anychart.graphics.vector.Fill
{color: '#64b5f6'}
Color 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:

Name Type Description
color string Color as a string.
opacity number Color opacity.

Returns:

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

Try it:

Linear gradient fill for selected point. Learn more about coloring.

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.map.series.Base - Self instance for method chaining.

Try it:

Radial fill for selected point. Learn more about coloring.

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.map.series.Base - Self instance for method chaining.

Try it:

Image fill for selected point. Learn more about coloring.

Params:

Name Type Description
imageSettings anychart.graphics.vector.Fill Object with settings.

Returns:

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

Try it:

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.

Try it:

Setter for the hatch fill for selected point.

Params:

Name Type Default Description
patternFillOrTypeOrState anychart.graphics.vector.PatternFill | anychart.graphics.vector.HatchFill | function | anychart.graphics.vector.HatchFill.HatchFillType | string | boolean
null
PatternFill or HatchFill instance or type or state of hatch fill.
color string
Color.
thickness number
Thickness.
size number
Pattern size.

Returns:

anychart.core.map.series.Base - Hatch fill.

Try it:

selectLabels

Getter for the current series select data labels.

Returns:

anychart.core.ui.LabelsFactory - Labels instance.

Try it:

Setter for the series select data labels.

Params:

Name Type Default Description
value Object | boolean | null
null
Series data labels settings.

Returns:

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

selectStroke

Getter for current stroke settings on hover state.

Returns:

anychart.graphics.vector.Stroke - Current stroke settings.

Try it:

Setter for series stroke on hover state by function.

Params:

Name Type Default Description
fillFunction function
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.

Try it:

Setter for series stroke settings on hover state. Learn more about stroke settings.

Params:

Name Type Default Description
strokeOrFill anychart.graphics.vector.Stroke | anychart.graphics.vector.ColoredFill | string | function | null
Fill settings or stroke settings.
thickness number
1
Line thickness.
dashpattern string
Controls the pattern of dashes and gaps used to stroke paths.
lineJoin anychart.graphics.vector.StrokeLineJoin
Line join style.
lineCap anychart.graphics.vector.StrokeLineCap
Line cap style.

Returns:

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

Try it:

stroke

Getter for current stroke settings.

Returns:

anychart.graphics.vector.Stroke - Current stroke settings.

Try it:

Setter for series stroke by function.

Params:

Name Type Default Description
strokeFunction function
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.

Try it:

Setter for series stroke settings. Learn more about stroke settings.

Params:

Name Type Default Description
stroke anychart.graphics.vector.Stroke | anychart.graphics.vector.ColoredFill | string | function | null
{thickness: 0.5, color: "#545f69"}
Stroke settings.
thickness number
1
Line thickness.
dashpattern string
Controls the pattern of dashes and gaps used to stroke paths.
lineJoin anychart.graphics.vector.StrokeLineJoin
Line join style.
lineCap anychart.graphics.vector.StrokeLineCap
Line cap style.

Returns:

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

Try it:

tooltip

Getter for the current tooltip settings.

Returns:

anychart.core.ui.Tooltip - Tooltip instance.

Try it:

Setter for the tooltip settings.

Params:

Name Type Default Description
value Object | boolean | null
true
Tooltip settings.

Returns:

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