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

Function getTitleHeight

src/core/core.scale.js:95–105  ·  view source on GitHub ↗

* @param {object} options

(options, fallback)

Source from the content-addressed store, hash-verified

93 * @param {object} options
94 */
95function getTitleHeight(options, fallback) {
96 if (!options.display) {
97 return 0;
98 }
99
100 const font = toFont(options.font, fallback);
101 const padding = toPadding(options.padding);
102 const lines = isArray(options.text) ? options.text.length : 1;
103
104 return (lines * font.lineHeight) + padding.height;
105}
106
107function createScaleContext(parent, scale) {
108 return createContext(parent, {

Callers 2

fitMethod · 0.85

Calls 3

toFontFunction · 0.85
toPaddingFunction · 0.85
isArrayFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…