Class: ChartConfigService
Defined in: src/services/chartConfig.ts:226
Chart Configuration Service for theme-aware chart styling.
Remarksโ
Centralizes all chart configurations to ensure consistency and maintainability across the application. The service automatically applies theme colors, fonts, and spacing to all chart configurations.
Seeโ
createChartConfigs for the functional wrapper.
Constructorsโ
Constructorโ
new ChartConfigService(
theme:Theme):ChartConfigService
Defined in: src/services/chartConfig.ts:237
Creates a new chart configuration service.
Parametersโ
themeโ
Theme instance containing colors, typography, and spacing
Returnsโ
ChartConfigService
Propertiesโ
themeโ
privatereadonlytheme:Theme
Defined in: src/services/chartConfig.ts:228
Current theme instance for styling configuration
Methodsโ
getBarChartConfig()โ
getBarChartConfig():
ChartOptions<"bar">
Defined in: src/services/chartConfig.ts:249
eslint-disable @typescript-eslint/no-unsafe-type-assertion -- Safe: Chart.js configuration object type assertions
Returnsโ
ChartOptions<"bar">
getDoughnutChartConfig()โ
getDoughnutChartConfig(
totalChecks:number):ChartOptions<"doughnut">
Defined in: src/services/chartConfig.ts:277
Uptime doughnut chart configuration.
Parametersโ
totalChecksโ
number
Total number of checks for percentage calculation.
Returnsโ
ChartOptions<"doughnut">
Chart configuration options for doughnut charts.
getLineChartConfig()โ
getLineChartConfig():
ChartOptions<"line">
Defined in: src/services/chartConfig.ts:322
Response time line chart configuration.
Returnsโ
ChartOptions<"line">
Chart configuration options for line charts with responsive scaling.
getAxisTitle()โ
privategetAxisTitle(text:string):AxisTitleConfig
Defined in: src/services/chartConfig.ts:375
Internal
Get common axis title configuration.
Parametersโ
textโ
string
The text to display in the axis title.
Returnsโ
Configured axis title object with theme-aware styling.
getBaseConfig()โ
privategetBaseConfig():Partial<ChartOptions>
Defined in: src/services/chartConfig.ts:396
Internal
Get base configuration shared across all chart types.
Returnsโ
Partial chart options with common styling and behavior.
Remarksโ
Provides a consistent foundation for all charts including responsive behavior, theme-aware colors, typography, and tooltip styling. Extended by chart-specific methods to avoid duplication.
getBaseScale()โ
privategetBaseScale():BaseScaleConfig
Defined in: src/services/chartConfig.ts:430
Internal
Get base scale configuration with theme-aware styling.
Returnsโ
Base scale configuration object for axes.
getChartFont()โ
privategetChartFont(size:number,weight:string):ChartFontConfig
Defined in: src/services/chartConfig.ts:455
Internal
Get common font configuration used across charts.
Parametersโ
sizeโ
number = 12
Font size in pixels (default: 12).
weightโ
string = "normal"
Font weight (default: "normal").
Returnsโ
Font configuration object with theme-aware family.
getChartTitle()โ
privategetChartTitle(text:string):ChartTitleConfig
Defined in: src/services/chartConfig.ts:472
Internal
Get common title configuration for charts.
Parametersโ
textโ
string
The text to display in the chart title.
Returnsโ
Configured chart title object with theme-aware styling.