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

Function pressPoint

test/specs/core.controller.spec.js:483–490  ·  view source on GitHub ↗
(chart)

Source from the content-addressed store, hash-verified

481 // Presses and releases the mouse on a data element. Only the events the
482 // chart listens to are sent, since only those are handled.
483 async function pressPoint(chart) {
484 const point = chart.getDatasetMeta(0).data[1];
485 for (const type of ['mousedown', 'mouseup', 'click']) {
486 if (chart.options.events.includes(type)) {
487 await triggerMouseEvent(chart, type, point);
488 }
489 }
490 }
491
492 function createChart(events) {
493 const onClick = vi.fn();

Callers 1

Calls 1

getDatasetMetaMethod · 0.80

Tested by

no test coverage detected