class anychart.core.SeriesPoint Improve this Doc
Extends: anychart.core.Point
Point representing all points that belongs to series-based chart.
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. |
| 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. |
Methods Description
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:
* - Field value.Try it:
getChart
Getter for the chart which current point belongs to.
Returns:
anychart.core.SeparateChart - The current chart.Try it:
getIndex
getSeries
getStackValue
Returns stack value of the point.
Note: Works only after chart.draw() is called.
Returns:
number - Returns stack value of the point.Try it:
getStackZero
Returns stack zero of the point.
Note: Works only after chart.draw() is called.
Note: Works only after chart.draw() is called.
Returns:
number - Returns stack zero of the pointTry it:
getStat
Getter for the statistics value by key.
Params:
| Name | Type | Description |
|---|---|---|
| key | anychart.enums.Statistics | string | Key. |
Returns:
* - Statistics value.Try it:
hovered
Setter for the hover point state.
Params:
| Name | Type | Default | Description |
|---|---|---|---|
| enabled | boolean | false | Hover state to set. |
Returns:
anychart.core.SeriesPoint - Self instance for method chaining.Try it:
selected
Getter for the select series point state.
Returns:
boolean - Select point state. See listing
var point = series.getPoint(1); var selectState = point.selected();
Setter for the select series point state.
Params:
| Name | Type | Default | Description |
|---|---|---|---|
| enabled | boolean | false | Select state to set. |
Returns:
anychart.core.SeriesPoint - 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.SeriesPoint - Self instance for method chaining.Try it:
