let trendChart; let map; /* |-------------------------------------------------------------------------- | Load Summary Cards |-------------------------------------------------------------------------- */ function loadSummary() { fetch('/api/dashboard/summary') .then(res => res.json()) .then(data => { let html = ''; data.forEach(item => { let trendColor = 'text-secondary'; if (item.percent_change > 0) trendColor = 'text-danger'; if (item.percent_change < 0) trendColor = 'text-success'; html += `