export class FitnessDashboard { constructor(containerId) { this.container = document.getElementById(containerId); // Mock Data this.data = { steps: { current: 8432, goal: 10000 }, sleep: { current: 6.5, goal: 8 }, history: { steps: [4500, 7200, 10500, 8900, 6000, 11200, 8432], sleep: [5.5, 6.0, 7.5, 8.2, 5.0, 9.0, 6.5] } }; this.render(); // Delay animation to allow DOM paint setTimeout(() => this.animate(), 100); } render() { const stepPercent = Math.min((this.data.steps.current / this.data.steps.goal) * 100, 100); const sleepPercent = Math.min((this.data.sleep.current / this.data.sleep.goal) * 100, 100); // Ring Config const center = 100; const radiusOuter = 80; const radiusInner = 55; const circumOuter = 2 * Math.PI * radiusOuter; const circumInner = 2 * Math.PI * radiusInner; this.container.innerHTML = `