feat: add circular progress component and update historical lake data indices
This commit is contained in:
@@ -33,7 +33,7 @@ const lakes = lakesConfig.map(lake => {
|
||||
|
||||
// Take up to 12 last records for sparkline
|
||||
const recentData = data.slice(-12);
|
||||
sparkline = recentData.map(d => (d.flow === null || isNaN(d.flow) ? 0 : d.flow));
|
||||
sparkline = recentData.map(d => (d.level === null || isNaN(d.level) ? 0 : d.level));
|
||||
|
||||
// Pad with zeros if less than 12
|
||||
while (sparkline.length < 12) {
|
||||
|
||||
Reference in New Issue
Block a user