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

class anychart.core.PiePoint Improve this Doc

Extends: anychart.core.Point

Point representing pie point.

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 the existence of the current point (by index) in dataset.
get()Fetches a field value from point data row by its name.
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.
Size and Position
getEndAngle()Gets end angle of the point.
getStartAngle()Gets start angle of the point.

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:

* - The current field value.

getChart

Getter for the current chart which current point belongs to.

Returns:

anychart.core.SeparateChart - The current chart.

getEndAngle

Gets end angle of the point. Note: Works only after chart.draw() is called.

Returns:

number - The current end angle.

getIndex

Getter for the point index in chart or series.

Returns:

number - Index of point.

getStartAngle

Gets start angle of the point. Note: Works only after chart.draw() is called.

Returns:

number - The current start angle.

getStat

Getter for the statistics value by key.

Params:

NameTypeDescription
keystring | anychart.enums.StatisticsKey.

Returns:

* - Statistics value.

hovered

Getter for the current hover point state.

Returns:

boolean - The current hover state.
Setter for hover point state.

Params:

NameTypeDefaultDescription
valueboolean
false
Hover state to set.

Returns:

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

selected

Getter for the current select point state.

Returns:

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

Params:

NameTypeDefaultDescription
valueboolean
false
Select state to set.

Returns:

anychart.core.PiePoint - 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.PiePoint - Self instance for method chaining.