MCPcopy Create free account
hub / github.com/chartjs/Chart.js / x

Function x

src/core/core.interaction.ts:439–442  ·  view source on GitHub ↗

* x mode returns the elements that hit-test at the current x coordinate * @param chart - the chart we are returning items from * @param e - the event we are find things at * @param options - options to use * @param [useFinalPosition] - use final element position (animation target) * @

(chart: Chart, e: Event, options: InteractionOptions, useFinalPosition?: boolean)

Source from the content-addressed store, hash-verified

437 * @return - items that are found
438 */
439 x(chart: Chart, e: Event, options: InteractionOptions, useFinalPosition?: boolean): InteractionItem[] {
440 const position = getRelativePosition(e, chart);
441 return getAxisItems(chart, position, 'x', options.intersect, useFinalPosition);
442 },
443
444 /**
445 * y mode returns the elements that hit-test at the current y coordinate

Callers

nothing calls this directly

Calls 2

getRelativePositionFunction · 0.85
getAxisItemsFunction · 0.85

Tested by

no test coverage detected