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

Class Scale

src/core/core.scale.js:168–1710  ·  src/core/core.scale.js::Scale

Source from the content-addressed store, hash-verified

166}
167
168export default class Scale extends Element {
169
170 class="cm">// eslint-disable-next-line max-statements
171 constructor(cfg) {
172 super();
173
174 /** @type {string} */
175 this.id = cfg.id;
176 /** @type {string} */
177 this.type = cfg.type;
178 /** @type {any} */
179 this.options = undefined;
180 /** @type {CanvasRenderingContext2D} */
181 this.ctx = cfg.ctx;
182 /** @type {Chart} */
183 this.chart = cfg.chart;
184
185 class="cm">// implements box
186 /** @type {number} */
187 this.top = undefined;
188 /** @type {number} */
189 this.bottom = undefined;
190 /** @type {number} */
191 this.left = undefined;
192 /** @type {number} */
193 this.right = undefined;
194 /** @type {number} */
195 this.width = undefined;
196 /** @type {number} */
197 this.height = undefined;
198 this._margins = {
199 left: 0,
200 right: 0,
201 top: 0,
202 bottom: 0
203 };
204 /** @type {number} */
205 this.maxWidth = undefined;
206 /** @type {number} */
207 this.maxHeight = undefined;
208 /** @type {number} */
209 this.paddingTop = undefined;
210 /** @type {number} */
211 this.paddingBottom = undefined;
212 /** @type {number} */
213 this.paddingLeft = undefined;
214 /** @type {number} */
215 this.paddingRight = undefined;
216
217 class="cm">// scale-specific properties
218 /** @type {string=} */
219 this.axis = undefined;
220 /** @type {number=} */
221 this.labelRotation = undefined;
222 this.min = undefined;
223 this.max = undefined;
224 this._range = undefined;
225 /** @type {Tick[]} */

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected