Methods

This section describes the methods that can be used in code to manipulate the Point object.

clearSelection()

Deselects the point.

To learn about point selection, refer to the Selection Handling section.

View Demo

Show Example:
jQuery

Click a point to select it. Then, click it once again to deselect it. The deselection is performed using the clearSelection() method.


                                    

                                    

getBoundingRect()

Gets the parameters of the point's minimum bounding rectangle (MBR).

Return Value:

Object

An object with the following content: { x: numeric, y: numeric, height: numeric, width: numeric }.

The object returned by this method contains the X and Y coordinates of the upper-left corner of the MBR. These coordinates are relative to the client area (widget's container). Additionally, the returned object contains the height and width of the MBR.

NOTE
This method is not supported for the rangeBar and rangeArea series points.

getColor()

Gets the color of a particular point.

Return Value:

String

The color of a point.

getLabel()

Allows you to obtain the label(s) of the series point.

Return Value:

Point Label

|

Array

The point label(s).

This method returns an array of two Label objects if a series point has two labels, like in a range bar or range area series. Otherwise, it returns a single Label object.

hideTooltip()

Hides the tooltip of the point.

The hideTooltip() and showTooltip() methods allow you to change tooltip visibility in code. Call the point's hideTooltip() method to hide the tooltip of this point.

Show Example:
jQuery

In this example, the point's hideTooltip() method, which causes a tooltip to hide, is called in 1000 milliseconds after the tooltip appears. Hover over any point of the chart to see this behavior.


                                    

                                    

isHovered()

Provides information about the hover state of a point.

Return Value:

Boolean

Hover state of a point.

When a point is hovered over, this method returns true. Otherwise, the returned value is false.

To learn more about point and series hover operation, refer to the Hover Handling topic.

Show Example:
jQuery

Hover over a point on the chart and information about the country of the hovered series point will appear under the chart. When the point that has been hovered over is hovered out, the information disappears. This behavior is achieved using the isHovered() method of the hovered point.


                                    

                                    

isSelected()

Provides information about the selection state of a point.

Return Value:

Boolean

Selection state of a point.

When a point is selected, this method returns true. Otherwise, the returned value is false.

You can select a point using its select() method. To learn more about point and series selection, refer to the Selection Handling topic.

View Demo

Show Example:
jQuery

Click a point on the chart to select this point. Information about the country of the selected series point will appear under the chart. Click this point again and the information will disappear. This behavior is achieved using the isSelected() method of the clicked point.


                                    

                                    

select()

Selects the point. The point is displayed in a 'selected' style until another point is selected or the current point is deselected programmatically.

To learn about point selection, refer to the Selection Handling section.

View Demo

Show Example:
jQuery

In this example, click a point to select it. Then, click it once again to deselect it. The selection is performed using the select() method.


                                    

                                    

showTooltip()

Shows the tooltip of the point.

The hideTooltip() and showTooltip() methods allow you to change tooltip visibility in code. Call the point's showTooltip() method to show the tooltip of this point.

View Demo

Show Example:
jQuery

In this example, the point's showTooltip() method is called within the handler of the Show next tooltip button click. Here, this handler displays the tooltip of the next point in the order.