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

Method setDimensions

src/core/core.scale.js:509–529  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

507 call(this.options.beforeSetDimensions, [this]);
508 }
509 setDimensions() {
510 // Set the unconstrained dimension before label rotation
511 if (this.isHorizontal()) {
512 // Reset position before calculating rotation
513 this.width = this.maxWidth;
514 this.left = 0;
515 this.right = this.width;
516 } else {
517 this.height = this.maxHeight;
518
519 // Reset position before calculating rotation
520 this.top = 0;
521 this.bottom = this.height;
522 }
523
524 // Reset padding
525 this.paddingLeft = 0;
526 this.paddingTop = 0;
527 this.paddingRight = 0;
528 this.paddingBottom = 0;
529 }
530 afterSetDimensions() {
531 call(this.options.afterSetDimensions, [this]);
532 }

Callers 1

updateMethod · 0.95

Calls 1

isHorizontalMethod · 0.95

Tested by

no test coverage detected