updateCharts() {
        if (!heartRateChart || !hourlyHeartRateChart || !heartRateData.length)
          return;

        // Filter and interpolate data for the last 48 hours for the full history chart
        const fortyEightHoursAgo = new Date(Date.now() - 48 * 60 * 60 * 1000);
        const filteredData = heartRateData.filter(
          (d) => new Date(d.timestamp) >= fortyEightHoursAgo,
        );
        const interpolatedData = interpolateData(filteredData, 15); // Interpolate every 15 minutes

     