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

Method getMinMax

src/controllers/controller.polarArea.js:123–142  ·  view source on GitHub ↗

* @protected

()

Source from the content-addressed store, hash-verified

121 * @protected
122 */
123 getMinMax() {
124 const meta = this._cachedMeta;
125 const range = {min: Number.POSITIVE_INFINITY, max: Number.NEGATIVE_INFINITY};
126
127 meta.data.forEach((element, index) => {
128 const parsed = this.getParsed(index).r;
129
130 if (!isNaN(parsed) && this.chart.getDataVisibility(index)) {
131 if (parsed < range.min) {
132 range.min = parsed;
133 }
134
135 if (parsed > range.max) {
136 range.max = parsed;
137 }
138 }
139 });
140
141 return range;
142 }
143
144 /**
145 * @private

Callers

nothing calls this directly

Calls 2

getParsedMethod · 0.80
getDataVisibilityMethod · 0.80

Tested by

no test coverage detected