Skip to main content

SecondaryMetricProps

@elastic/charts • Exports


@elastic/charts / SecondaryMetricProps

Interface: SecondaryMetricProps

Props for displaying a secondary metric value with optional label and badge styling.

Contents​

Properties​

ariaDescription?​

ariaDescription?: string

Optional aria description

Source​

packages/charts/src/chart_types/metric/specs/index.ts:61


badgeBorderColor?​

badgeBorderColor?: Object | Object | Object

Badge border config:

  • undefined: no border
  • { mode: 'none' }: explicitly disable border
  • { mode: 'auto' }: parent computes a white or black border based on contrast with the badge and metric background colors
  • { mode: 'custom', color: Color }: use provided color

Source​

packages/charts/src/chart_types/metric/specs/index.ts:68


badgeColor?​

badgeColor?: string

Optional background color for the value badge. If not provided, no badge is displayed

Source​

packages/charts/src/chart_types/metric/specs/index.ts:49


badgeTextColor?​

badgeTextColor?: string

Optional text color for the value badge. If not provided, it will be computed automatically for contrast

Source​

packages/charts/src/chart_types/metric/specs/index.ts:51


icon?​

icon?: string

Optional icon displayed next to the text

Source​

packages/charts/src/chart_types/metric/specs/index.ts:70


iconPosition?​

iconPosition?: "after" | "before"

Determines whether the icon appears before or after the value

Source​

packages/charts/src/chart_types/metric/specs/index.ts:72


label?​

label?: string

Optional label to display alongside the value

Source​

packages/charts/src/chart_types/metric/specs/index.ts:47


labelPosition?​

labelPosition?: "tooltip" | "after" | "before"

Determines whether the label appears before or after the value or is displayed in a tooltip

Source​

packages/charts/src/chart_types/metric/specs/index.ts:53


labelTooltip?​

labelTooltip?: ComponentType<SecondaryMetricLabelTooltipProps>

Custom component used to render the label tooltip when labelPosition is 'tooltip', ignored when labelPosition is 'before' or 'after'.

Source​

packages/charts/src/chart_types/metric/specs/index.ts:57


style?​

style?: CSSProperties

Optional CSS properties to apply to the container element

Source​

packages/charts/src/chart_types/metric/specs/index.ts:59


value​

value: string

The main value to display

Source​

packages/charts/src/chart_types/metric/specs/index.ts:45


Generated using typedoc-plugin-markdown and TypeDoc