-
Notifications
You must be signed in to change notification settings - Fork 1
SettingsPanel
Bote Wang edited this page Nov 15, 2024
·
2 revisions
The SettingsPanel component serves as the primary control interface for the visualization dashboard, allowing users to configure visualization parameters, select data sources, and customize display options.
- State selection through dropdown menu
- Model selection with visual color indicators
- Date range and season selection
- Forecast horizon configuration
- Y-axis scale toggle (linear/logarithmic)
- Confidence interval selection with multiple options
- Responsive layout design
interface SettingsPanel {
stateSelection: {
dropdown: ReactComponent;
stateMap: ReactComponent;
};
modelSelection: {
checkboxGroup: ReactComponent;
colorIndicators: Record<string, string>;
};
dateControls: {
seasonSelector: ReactComponent;
datePickers: {
start: DatePicker;
end: DatePicker;
};
};
configOptions: {
horizonSelector: RadioGroup;
axisScale: RadioGroup;
confidenceIntervals: CheckboxGroup;
};
}
interface PanelActions {
updateSelectedState: (state: StateSelection) => void;
updateForecastModel: (models: string[]) => void;
updateDateRange: (range: string) => void;
updateDateStart: (date: Date) => void;
updateDateEnd: (date: Date) => void;
updateYScale: (scale: 'linear' | 'log') => void;
updateConfidenceInterval: (intervals: string[]) => void;
updateNumOfWeeksAhead: (weeks: number) => void;
}
interface SettingsFunctions {
onStateSelectionChange: (stateNum: string) => void;
onModelSelectionChange: (modelName: string, checked: boolean) => void;
onDateStartSelectionChange: (date: Date) => void;
onDateEndSelectionChange: (date: Date) => void;
onSeasonSelectionChange: (timeValue: string) => void;
onYAxisScaleChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
onConfidenceIntervalChange: (interval: string, checked: boolean) => void;
handleShowAllDates: () => void;
}
- Handles date range validation and constraints
- Manages model selection and deselection
- Processes state selection events
- Controls confidence interval toggling
- Manages axis scale switching
- Uses Tailwind CSS for responsive layout
- Implements Material Tailwind components
- Custom styling for date pickers
- Responsive text sizing classes
- Dark theme color scheme
<SettingsPanel>
<div className="bg-mobs-lab-color-filterspane text-white">
<StateSelection />
<ModelSelection
models={modelNames}
colorMap={modelColorMap}
/>
<DateRangeSelection
seasonOptions={seasonOptions}
minDate={earliestDate}
maxDate={latestDate}
/>
<ConfigurationOptions
horizonOptions={[0, 1, 2, 3]}
scaleOptions={['linear', 'log']}
confidenceIntervals={['50%', '90%', '95%']}
/>
</div>
</SettingsPanel>
- ARIA labels for interactive elements
- Keyboard navigation support
- High contrast color scheme
- Screen reader compatible markup
- Focus management for modal dialogs
- Date range validation
- Model selection constraints
- State selection validation
- Data availability checks
- User input sanitization
{
"dependencies": {
"@material-tailwind/react": "^2.1.9",
"react-date-picker": "^11.0.0",
"date-fns": "^3.6.0"
}
}
- Single date range selection
- Fixed confidence interval options
- Predefined model color scheme
- Limited undo/redo capability
- Multiple date range comparison
- Custom confidence interval input
- User-defined color schemes
- Configuration presets
- Enhanced mobile support
- Advanced filtering options
- Data export capabilities
Main Pages
Data Pipeline
- Data Pipeline
- Data Transformation Script
- Custom data interface for wrapping processed csv into React Components
- Data Fetching API
Static Components
Visualizations
-
- WIP
Styling