componentDidUpdate()

in src/JobCorrelationHeatmap.js [120:152]


  componentDidUpdate() {
    if (!this.state.correlations) {
      return;
    }

    const el = document.getElementById("job-correlations");
    let [job_names, correlationMatrix] = this.state.correlations;
    el.innerHTML = "";
    const options = {
      usageStatistics: false,
      xAxis: {
        label: {
          formatter: (a, b) => "",
        },
      },
      yAxis: {
        label: {
          formatter: (a, b) => "",
        },
      },
      tooltip: {
        template: this.tooltipTemplate,
      },
    };
    let data = {
      categories: {
        x: job_names,
        y: job_names,
      },
      series: correlationMatrix,
    };
    Chart.heatmapChart({ el, data, options });
  }