function displayCharts()

in assets/ml-metrics.js [199:222]


function displayCharts() {
  while (window.allCharts.length > 0) {
    window.allCharts.pop().destroy();
  }

  const history  = window.historyStatus;
  const latestDate = new Date(window.data.at(-1).date);

  let cutoffDate = new Date(latestDate);
  cutoffDate.setDate(latestDate.getDate() - history);
  cutoffDate = cutoffDate.toISOString().split('T')[0];

  const filteredData = window.data.filter(row => row.date >= cutoffDate && row.platform == platformStatus);

  window.suites.forEach(suite => {
    suite.tests.forEach(test => {
      const label=`${suite.name}-${test.name}`;

      const testData = filteredData.filter(
                          row => row.suite == suite.name && row.test == test.name);
      displayChartForTest(testData, label, test.unit);
    });
  });
}