AnyChart
API Reference
Still have questions?
Contact support
Top

class anychart.core.MapPoint Improve this Doc

Extends: anychart.core.Point

Series-based chart point.

Methods Overview

Specific settings
getIndex()Getter for the point index in chart or series.
Charts
getChart()Getter for the chart which current point belongs to.
getCurrentChart()Returns current visible map on stage.
getParentChart()Returns point parent map chart.
Data
exists()Checks the existence of the current point (by index) in dataset.
get()Fetches a field value from point data row by its name.
getId()Returns point geo id.
getProperties()Returns point geo properties.
getStat()Getter for the statistics value by key.
set()Sets the field of the point data row to the specified value.
Point Elements
hovered()Hover point state.
selected()Select point state.

Methods Description

exists

Checks the existence of the current point (by index) in dataset.

Returns:

boolean - Whether point exists in dataset or not.

get

Fetches a field value from point data row by its name.

Params:

NameTypeDescription
fieldstringField in data row.

Returns:

* - Field value.

getChart

Getter for the chart which current point belongs to.

Returns:

anychart.core.SeparateChart - The current chart.

getCurrentChart

Returns current visible map on stage.

Returns:

anychart.core.SeparateChart - The current map.

getId

Returns point geo id.

Returns:

string - Returns the point geo id.

getIndex

Getter for the point index in chart or series.

Returns:

number - Index of point.

getParentChart

Returns point parent map chart.

Returns:

anychart.core.SeparateChart - The parent map chart.

getProperties

Returns point geo properties.

Returns:

Object -

getStat

Getter for the statistics value by key.

Params:

NameTypeDescription
keyanychart.enums.Statistics | stringKey.

Returns:

* - Statistics value.

hovered

Getter for the hover point state.

Returns:

boolean - Returns the hover state.
Setter for hover point state.

Params:

NameTypeDefaultDescription
enabledboolean
false
Hover state to set.

Returns:

anychart.core.MapPoint - Self instance for method chaining.

selected

Getter for the select point state.

Returns:

boolean - Select point state.
See listing
var point = chart.getPoint(1);
var selected = point.selected();
Setter for select point state.

Params:

NameTypeDefaultDescription
enabledboolean
false
Select state to set.

Returns:

anychart.core.MapPoint - Self instance for method chaining.

set

Sets the field of the point data row to the specified value.

Params:

NameTypeDescription
fieldstringField.
value*Value to set.

Returns:

anychart.core.MapPoint - Self instance for method chaining.