his.updateChartContents();
    },

    updateChartContents() {
      if (this.requiresRedraw) {
        this.updateChartDimensions_();
      }

      this.drawChartContents_();
    },

    updateChartDimensions_() {
      this.chartWidth_ = this.offsetWidth;
      this.chartHeight_ = this.offsetHeight;

      // Scale up the canvas according to the devicePixelRatio, then reduce it
      // down again via CSS. Finally we apply a scale to the canvas so that
      // things are drawn at the correct size.
     