Skip to main content

buildChartConfigFromSpec

FitFileViewer - API Documentation v29.4.0


FitFileViewer - API Documentation / utils/charts/core/chartSpecFactory / buildChartConfigFromSpec

Function: buildChartConfigFromSpec()

buildChartConfigFromSpec(spec: ChartSpec, themeConfig: any): any

Defined in: utils/charts/core/chartSpecFactory.js:54

Build a Chart.js configuration object from a declarative spec and theme config.

This helper is intentionally minimal and focuses on the common configuration shared by FitFileViewer charts. It is primarily used in tests and as a foundation for future declarative chart definitions.

Parameters​

spec​

ChartSpec

Declarative chart specification

themeConfig​

any

Theme configuration (colors etc.)

Returns​

any

Chart.js configuration object