feat: implement data visualization charts for analytics dashboard
- Add TimeSeriesChart component for report trends over time - Add LitterTypeChart component with pie chart for type distribution - Add QuantityChart component with bar chart for quantity aggregation - Update analytics service with new API methods for chart data - Add new types for chart data structures (TimeSeriesDataPoint, LitterTypeDistribution, QuantityAggregation) - Integrate charts into AnalyticsPage with responsive grid layout - Add mock data fallback for development when API is not available - Configure charts for mobile responsiveness - Implement comparison metrics display in time series - Add loading states and empty states for all charts Implements task 11: Data visualization charts Requirements: 5.2, 5.3, 5.4
This commit is contained in:
@@ -137,3 +137,21 @@ export interface DateRange {
|
||||
start: Date;
|
||||
end: Date;
|
||||
}
|
||||
|
||||
export interface TimeSeriesDataPoint {
|
||||
date: string;
|
||||
reports: number;
|
||||
events?: number;
|
||||
}
|
||||
|
||||
export interface LitterTypeDistribution {
|
||||
type: LitterType;
|
||||
count: number;
|
||||
percentage: number;
|
||||
}
|
||||
|
||||
export interface QuantityAggregation {
|
||||
quantity: QuantityLevel;
|
||||
count: number;
|
||||
percentage: number;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user