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

Method getMaxOverflow

src/controllers/controller.line.js:125–136  ·  view source on GitHub ↗

* @protected

()

Source from the content-addressed store, hash-verified

123 * @protected
124 */
125 getMaxOverflow() {
126 const meta = this._cachedMeta;
127 const dataset = meta.dataset;
128 const border = dataset.options && dataset.options.borderWidth || 0;
129 const data = meta.data || [];
130 if (!data.length) {
131 return border;
132 }
133 const firstPoint = data[0].size(this.resolveDataElementOptions(0));
134 const lastPoint = data[data.length - 1].size(this.resolveDataElementOptions(data.length - 1));
135 return Math.max(border, firstPoint, lastPoint) / 2;
136 }
137
138 draw() {
139 const meta = this._cachedMeta;

Callers

nothing calls this directly

Calls 2

sizeMethod · 0.80

Tested by

no test coverage detected