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

Function getMeasurePoint

src/plugins/plugin.tooltip.js:29–32  ·  view source on GitHub ↗

* The point the interaction modes measure an element by: the centre of the visible part * for a bar, the centre point for any other element.

(el, chartArea)

Source from the content-addressed store, hash-verified

27 * for a bar, the centre point for any other element.
28 */
29function getMeasurePoint(el, chartArea) {
30 const areaCenter = chartArea && el._getAreaCenter && el._getAreaCenter(chartArea);
31 return areaCenter || el.getCenterPoint();
32}
33
34/**
35 * The point the tooltip anchors to. A bar cut off by the chart area points at the centre

Callers 1

nearestFunction · 0.85

Calls 2

_getAreaCenterMethod · 0.80
getCenterPointMethod · 0.65

Tested by

no test coverage detected