isCoordsInside(x: Number, y: Number);
x. X coordinate of the checked point.
y. Y coordinate of the checked point.
The isCoordsInside method determines whether a point is within the area of chart bubble symbol.
The method returns True if the point is within the area of chart bubble symbol, otherwise it returns False.
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: