Skip to content
EliteChart

isPointInEventBadge

Documentation


Documentation / @elitechart/core / isPointInEventBadge

code
function isPointInEventBadge(
   px, 
   py, 
   cx, 
   cy, 
   radius?): boolean;

Defined in: corporate-events/corporate-event-types.ts:87

Hit-test a screen point against a corporate-event badge centered at (cx, cy). Returns true when the distance is within the badge radius.

Parameters

px

number

py

number

cx

number

cy

number

radius?

number = CORPORATE_EVENT_BADGE_RADIUS

Returns

boolean

Example

code
import { isPointInEventBadge } from '@elitechart/core';
if (isPointInEventBadge(cursor.x, cursor.y, badgeX, badgeY)) showTooltip();