Skip to main content

SecondaryMetricProps

@elastic/chartsExports


@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:38


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:45


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:32


icon?

icon?: string

Optional icon displayed next to the text

Source

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


iconPosition?

iconPosition?: "after" | "before"

Determines whether the icon appears before or after the value

Source

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


label?

label?: string

Optional label to display alongside the value

Source

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


labelPosition?

labelPosition?: "after" | "before"

Determines whether the label appears before or after the value

Source

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


style?

style?: CSSProperties

Optional CSS properties to apply to the container element

Source

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


value

value: string

The main value to display

Source

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


Generated using typedoc-plugin-markdown and TypeDoc