   const hourlyData = getHourlyData(heartRateData, 3);
        hourlyHeartRateChart.data.labels = hourlyData.map((d) => d.timestamp);
        hourlyHeartRateChart.data.datasets[0].data = hourlyData.map(
          (d) => d.value,
        );
        hourlyHeartRateChart.update("none");
      }

      function initializeCharts() {
        // Initialize 48-hour history chart
        const ctx = document.getElementById("heartRateChart").getContext("2d");
        heartRateChart = new Chart(ctx, {
          type: 