diff --git a/.kiro/specs/beach-litter-mapping/tasks.md b/.kiro/specs/beach-litter-mapping/tasks.md index 854b5d6..16dea81 100644 --- a/.kiro/specs/beach-litter-mapping/tasks.md +++ b/.kiro/specs/beach-litter-mapping/tasks.md @@ -83,7 +83,7 @@ - Create export to CSV functionality - _Requirements: 5.1, 5.5_ -- [x] 11. Implement data visualization charts +- [ ] 11. Implement data visualization charts - Create time series chart for report trends - Build pie chart for litter type distribution - Implement comparison metrics with previous periods @@ -91,7 +91,7 @@ - Configure chart responsiveness for mobile - _Requirements: 5.2, 5.3, 5.4_ -- [ ] 12. Create hotspot visualization +- [-] 12. Create hotspot visualization - Fetch and display hotspot data on map - Implement color-coded severity indicators - Show hotspot boundaries and statistics diff --git a/src/components/map/MapFilters.tsx b/src/components/map/MapFilters.tsx index 52bd418..fb04e1d 100644 --- a/src/components/map/MapFilters.tsx +++ b/src/components/map/MapFilters.tsx @@ -8,6 +8,9 @@ interface MapFiltersProps { showClusters: boolean; onToggleHeatmap: () => void; showHeatmap: boolean; + onToggleHotspots?: () => void; + showHotspots?: boolean; + isLoadingHotspots?: boolean; } export function MapFilters({ @@ -17,6 +20,9 @@ export function MapFilters({ showClusters, onToggleHeatmap, showHeatmap, + onToggleHotspots, + showHotspots = false, + isLoadingHotspots = false, }: MapFiltersProps) { const [isExpanded, setIsExpanded] = useState(false); @@ -153,6 +159,62 @@ export function MapFilters({ + {/* Hotspots Toggle */} + {onToggleHotspots && ( +
+ + +
+ )} + + {/* Hotspot Legend */} + {showHotspots && onToggleHotspots && ( +
+

Hotspot Severity

+
+
+
+ Low (5-9 reports) +
+
+
+ Medium (10-14 reports) +
+
+
+ High (15-19 reports) +
+
+
+ Critical (20+ reports) +
+
+
+ )} + {/* Date Range */}