diff --git a/Frontend/src/components/analytics/HeatmapLegendControls.tsx b/Frontend/src/components/analytics/HeatmapLegendControls.tsx new file mode 100644 index 00000000..4e24338c --- /dev/null +++ b/Frontend/src/components/analytics/HeatmapLegendControls.tsx @@ -0,0 +1,68 @@ +import React, { useState } from "react"; + +export interface HeatmapScaleConfig { + minThreshold: number; + maxThreshold: number; + colorScheme: "indigo" | "emerald" | "amber" | "rose"; +} + +export interface HeatmapLegendControlsProps { + initialConfig?: HeatmapScaleConfig; + onChange?: (config: HeatmapScaleConfig) => void; +} + +export const HeatmapLegendControls: React.FC = ({ + initialConfig = { minThreshold: 0, maxThreshold: 100, colorScheme: "indigo" }, + onChange, +}) => { + const [config, setConfig] = useState(initialConfig); + + const handleUpdate = (updated: Partial) => { + const next = { ...config, ...updated }; + setConfig(next); + onChange?.(next); + }; + + return ( +
+

+ Heatmap Scale Controls +

+
+ + + +
+
+ ); +}; + +export default HeatmapLegendControls; diff --git a/Frontend/src/components/analytics/MultiAreaComparison.tsx b/Frontend/src/components/analytics/MultiAreaComparison.tsx new file mode 100644 index 00000000..36543f8d --- /dev/null +++ b/Frontend/src/components/analytics/MultiAreaComparison.tsx @@ -0,0 +1,48 @@ +import React from 'react'; + +export interface AreaStats { + areaId: string; + name: string; + gistCount: number; + activeUsers: number; + densityScore: number; +} + +export interface MultiAreaComparisonProps { + areas?: AreaStats[]; +} + +export const MultiAreaComparison: React.FC = ({ + areas = [], +}) => { + return ( +
+

+ Multi-Area Spatial Comparison +

+
+ {areas.map(area => ( +
+

{area.name}

+
+
+ Gist Count: + {area.gistCount} +
+
+ Active Users: + {area.activeUsers} +
+
+ Density Score: + {area.densityScore} +
+
+
+ ))} +
+
+ ); +}; + +export default MultiAreaComparison;