shared/types/chartHybrid
Hybrid Chart.js type definitions combining official Chart.js v4.5.0 types with custom business logic.
Remarksโ
This file creates a hybrid approach where we use Chart.js official types as the foundation but extend them with our custom business logic types where the official types lack specificity.
Strategy:
- Use official
ChartOptions<TType>,ChartData<TType>for service layer integrations - Use custom
ChartScalesConfig,ChartPluginsConfigfor business logic and utilities - Provide hybrid types that combine both for complete type safety
When to use which:
ChartOptions<'line' | 'bar' | 'doughnut'>: Service layer, Chart.js instantiationChartScalesConfig: Utils, business logic, theme integrationChartPluginsConfig: Plugin configuration, custom stylingUptimeChartOptions<TType>: Hybrid type for complete Uptime Watcher chart config
For comprehensive documentation see the hybrid type system guide in the architecture documentation set.
Interfacesโ
- UptimeChartOptions
- ChartTypeRegistry
- UptimeChartData
- UptimeChartConfig
- ThemeAwareChartFactory
- ChartUtilities
- UptimeChartDataPoint