Skip to main content

hasFieldColor

FitFileViewer - API Documentation v29.4.0


FitFileViewer - API Documentation / utils/charts/theming/getFieldColor / hasFieldColor

Function: hasFieldColor()

hasFieldColor(field: string): boolean

Defined in: utils/charts/theming/getFieldColor.js:93

Checks if a field has a defined color mapping

Parameters​

field​

string

The field name to check

Returns​

boolean

True if field has a defined color

Example​

// Check if field has color mapping
const hasColor = hasFieldColor("heartRate"); // true