ChartSymbol.isCoordsInside

Syntax

isCoordsInside(x: Number, y: Number);

Parameters

x. X coordinate of the checked point.

y. Y coordinate of the checked point.

Description

The isCoordsInside method determines whether a point is within the area of chart bubble symbol.

Comments

The method returns True if the point is within the area of chart bubble symbol, otherwise it returns False.

Example

To execute this example, the HTML page must contain the BubbleChart component named bubbleChart (see Example of Creating the BubbleChart Component). Check if the point (150, 200) is inside the area of symbol for the first bubble chart bubble:

// Get symbol of the first bubble chart bubble
var symbol = bubbleChart.getSeries()[0].getPoints()[0].getSymbol();
// Check if the point is within the area of the first bubble chart bubble bubble symbol
if (symbol.isCoordsInside(150, 200)) {
    console.log("Point is within the area of the first bubble chart bubble symbol");
} else {
    console.log("POint is not within the area of the first bubble chart bubble symbol");
}

After this the console shows the results of checking the point for the position inside of symbol area:

Point is not within the area of the first bubble chart bubble symbol

See also:

 ChartSymbol