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

Function titleAlign

src/core/core.scale.js:122–129  ·  view source on GitHub ↗
(align, position, reverse)

Source from the content-addressed store, hash-verified

120}
121
122function titleAlign(align, position, reverse) {
123 /** @type {CanvasTextAlign} */
124 let ret = _toLeftRightCenter(align);
125 if ((reverse && position !== 'right') || (!reverse && position === 'right')) {
126 ret = reverseAlign(ret);
127 }
128 return ret;
129}
130
131function titleArgs(scale, offset, position, align) {
132 const {top, left, bottom, right, chart} = scale;

Callers 1

drawTitleMethod · 0.85

Calls 2

_toLeftRightCenterFunction · 0.85
reverseAlignFunction · 0.85

Tested by

no test coverage detected