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

Function determineAlignment

src/plugins/plugin.tooltip.js:269–276  ·  view source on GitHub ↗

* Helper to get the alignment of a tooltip given the size

(chart, options, size)

Source from the content-addressed store, hash-verified

267 * Helper to get the alignment of a tooltip given the size
268 */
269function determineAlignment(chart, options, size) {
270 const yAlign = size.yAlign || options.yAlign || determineYAlign(chart, size);
271
272 return {
273 xAlign: size.xAlign || options.xAlign || determineXAlign(chart, options, size, yAlign),
274 yAlign
275 };
276}
277
278function alignX(size, xAlign) {
279 let {x, width} = size;

Callers 2

updateMethod · 0.85

Calls 2

determineYAlignFunction · 0.85
determineXAlignFunction · 0.85

Tested by

no test coverage detected