class anychart.core.ChoroplethPoint Improve this Doc
Extends: anychart.core.SeriesPoint
Point representing choropleth points that belongs to map.
Methods Overview
| Specific settings | |
| getIndex() | Getter for the point index in chart or series. |
| Charts | |
| getChart() | Getter for the current chart which current point belongs to. |
| Data | |
| exists() | Checks if the point with the given index exists in a dataset. |
| get() | Fetches a field value from point data row by its name. |
| getStackValue() | Returns stack value of the point. |
| getStackZero() | Returns stack zero of the point. |
| 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. |
| Series | |
| getSeries() | Getter for series which current point belongs to. |
| Size and Position | |
| crs() | Feature crs |
| getFeatureBounds() | Getter for the current point bounds. |
| middleX() | X center of the point label |
| middleY() | Y center of the point label |
| scaleFactor() | Scaling of the point. |
| translate() | Moves point. |
| translation() | Point translation |
| Miscellaneous | |
| getFeatureProp() | Getter for the current point properties. |
Methods Description
crs
Returns the current point crs (coordinate system).
Detailed description
This method uses the map data, which include latitude and longitude.
Returns:
string - The current point crs.Try it:
Changes crs (coordinate system) of the point.
Note: Works only after anychart.charts.Map#draw is called.
Note: Works only after anychart.charts.Map#draw is called.
Detailed description
This method uses the map data, which include latitude and longitude.
You can see some map projections at http://www.spatialreference.org/ref/ or use http://www.qgis.org/
You can see some map projections at http://www.spatialreference.org/ref/ or use http://www.qgis.org/
Params:
| Name | Type | Description |
|---|---|---|
| crs | string | String crs representation (map projection). |
Returns:
anychart.core.ChoroplethPoint - Self instance for method chaining.Try it:
exists
Checks if the point with the given index exists in a dataset.
Detailed description
If you request an index that is bigger than array length you will get empty points.
If you set a value to this point, this value will not be added to array dataset.
Returns:
boolean - Whether point exists in dataset or not.Try it:
get
Fetches a field value from point data row by its name.
Params:
| Name | Type | Description |
|---|---|---|
| field | string | Field in data row. |
Returns:
* - The current field value.Try it:
getChart
Getter for the current chart which current point belongs to.
Returns:
anychart.core.SeparateChart - The current chart.Try it:
getFeatureBounds
Getter for the current point bounds.
Note: Works only after anychart.charts.Map#draw is called.
Note: Works only after anychart.charts.Map#draw is called.
Detailed description
This method uses the map data, which include latitude and longitude.
Returns:
anychart.math.Rect - Choropleth point bounds.Try it:
getFeatureProp
Getter for the current point properties.
Note: Works only after anychart.charts.Map#draw is called.
Note: Works only after anychart.charts.Map#draw is called.
Detailed description
This method uses the map data, which include latitude and longitude.
Returns:
Object - The current point properties.Try it:
getIndex
getSeries
getStackValue
Returns stack value of the point.
Note: Works only after chart.draw() is called.
Returns:
number - The current stack value of the point.Try it:
getStackZero
Returns stack zero of the point.
Note: Works only after chart.draw() is called.
Returns:
number - The current stack zero of the pointTry it:
getStat
Getter for the statistics value by key.
Params:
| Name | Type | Description |
|---|---|---|
| key | string | anychart.enums.Statistics | Key. |
Returns:
* - Statistics value.Try it:
hovered
Getter for the current hover point state.
Returns:
boolean - The current hover state.Try it:
Setter for hover point state.
Params:
| Name | Type | Default | Description |
|---|---|---|---|
| value | boolean | false | Hover state to set. |
Returns:
anychart.core.ChoroplethPoint - Self instance for method chaining.Try it:
middleX
Getter for the current X center of the point label.
Detailed description
This method uses the map data, which include latitude and longitude.
Returns:
number - Middle X value in ratio relative point bounds.Try it:
Setter for the X center of the point label.
Note: Works only after anychart.charts.Map#draw is called.
Note: Works only after anychart.charts.Map#draw is called.
Detailed description
This method uses the map data, which include latitude and longitude.
Params:
| Name | Type | Description |
|---|---|---|
| value | number | Value of the middle X coordinate. |
Returns:
anychart.core.ChoroplethPoint - Self instance for method chaining.Try it:
middleY
Getter for the current Y center of the point label.
Detailed description
This method uses the map data, which include latitude and longitude.
Returns:
number - Middle Y value in ratio relative point bounds.Try it:
Setter for the Y center of the point label.
Note: Works only after anychart.charts.Map#draw is called.
Note: Works only after anychart.charts.Map#draw is called.
Detailed description
This method uses the map data, which include latitude and longitude.
Params:
| Name | Type | Description |
|---|---|---|
| value | number | Value of the middle Y coordinate. |
Returns:
anychart.core.ChoroplethPoint - Self instance for method chaining.Try it:
scaleFactor
Getter for the current scale of the point.
Returns:
number - The current scale of the point.Try it:
Scales point.
Note: Works only after anychart.charts.Map#draw is called.
Note: Works only after anychart.charts.Map#draw is called.
Detailed description
This method uses the map data, which include latitude and longitude.
Params:
| Name | Type | Description |
|---|---|---|
| scale | number | Scale value. |
Returns:
anychart.core.ChoroplethPoint - Self instance for method chaining.Try it:
selected
Getter for the current select series point state.
Returns:
boolean - Select point state. See listing
var point = series.getPoint(1); var selectState = point.selected();
Setter for select series point state.
Params:
| Name | Type | Default | Description |
|---|---|---|---|
| value | boolean | false | Select state to set. |
Returns:
anychart.core.ChoroplethPoint - Self instance for method chaining.Try it:
set
Sets the field of the point data row to the specified value.
Params:
| Name | Type | Description |
|---|---|---|
| field | string | Field. |
| value | * | Value to set. |
Returns:
anychart.core.ChoroplethPoint - Self instance for method chaining.Try it:
translate
Moves point.
Note: Works only after anychart.charts.Map#draw is called.
Note: Works only after anychart.charts.Map#draw is called.
Detailed description
This method uses the map data, which include latitude and longitude.
Params:
| Name | Type | Description |
|---|---|---|
| dx | number | Offset x coordinate. |
| dy | number | Offset y coordinate. |
Returns:
anychart.core.ChoroplethPoint - Self instance for method chaining.Try it:
translation
Getter for the current point translation.
Returns:
Array.<number> - The current point translation. See listing
var point = series.getPoint(12); var currentTranslation = point.translation();
Setter for the point translation.
Note: Works only after anychart.charts.Map#draw is called.
Note: Works only after anychart.charts.Map#draw is called.
Detailed description
Use the map data, which include latitude and longitude.
Method moves the feature from the current position to the passed x and y.
Params:
| Name | Type | Description |
|---|---|---|
| dx | number | Offset x coordinate. |
| dy | number | Offset y coordinate. |
Returns:
anychart.core.ChoroplethPoint - Self instance for method chaining.Try it:
