_updateLayout(minPadding) {
    if (this.notifyPlugins('beforeLayout', {cancelable: true}) === false) {
      return;
    }

    layouts.update(this, this.width, this.height, minPadding);

    const area = this.chartArea;
    const noArea = area.width <= 0 || area.height <= 0;

    this._layers = [];
    each(this.boxes, (box) => {
      if (noArea && box.position === 'chartArea') {
        // Skip drawing and configuring chartArea boxes when chartArea is zero or negative
        return;
      }

      // configure is called twice, once in core.scale.update and once here.
      // Here the boxes are fully updated and at their final positions.
      if (box.configure) {
        box.configure();
      }
      this._layers.push(...box._layers());
    }, this);

    this._layers.forEach((item, index) => {
      item._idx = index;
    });

    this.notifyPlugins('afterLayout');
  }
Updates the chart layout unless a plugin returns `false` to the `beforeLayout`
hook, in which case, plugins will not be called on `afterLayout`.
@private