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

Function determineYAlign

src/plugins/plugin.tooltip.js:223–232  ·  view source on GitHub ↗
(chart, size)

Source from the content-addressed store, hash-verified

221}
222
223function determineYAlign(chart, size) {
224 const {y, height} = size;
225
226 if (y < height / 2) {
227 return 'top';
228 } else if (y > (chart.height - height / 2)) {
229 return 'bottom';
230 }
231 return 'center';
232}
233
234function doesNotFitWithAlign(xAlign, chart, options, size) {
235 const {x, width} = size;

Callers 1

determineAlignmentFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected