MCPcopy
hub / github.com/chartjs/Chart.js / point

Function point

src/core/core.interaction.js:336–341  ·  view source on GitHub ↗

* Point mode returns all elements that hit test based on the event position * of the event * @function Chart.Interaction.modes.intersect * @param {Chart} chart - the chart we are returning items from * @param {Event} e - the event we are find things at * @param {InteractionOptions} op

(chart, e, options, useFinalPosition)

Source from the content-addressed store, hash-verified

334 * @return {InteractionItem[]} - items that are found
335 */
336 point(chart, e, options, useFinalPosition) {
337 const position = getRelativePosition(e, chart);
338 const axis = options.axis || 'xy';
339 const includeInvisible = options.includeInvisible || false;
340 return getIntersectItems(chart, position, axis, useFinalPosition, includeInvisible);
341 },
342
343 /**
344 * nearest mode returns the element closest to the point

Callers

nothing calls this directly

Calls 2

getRelativePositionFunction · 0.85
getIntersectItemsFunction · 0.85

Tested by

no test coverage detected