Skip to main content

Interface: PercentageMetric

Defined in: packages/components/src/components/MetricCard/MetricCard.types.ts:53

Percentage-based metric with progress bar.

Extends

Properties

current

current: number

Defined in: packages/components/src/components/MetricCard/MetricCard.types.ts:58

Current value.


formatValue()?

optional formatValue: (value) => string

Defined in: packages/components/src/components/MetricCard/MetricCard.types.ts:66

Custom formatter for displaying values.

Parameters

value

number

Returns

string


helpArticleAction()?

optional helpArticleAction: () => void

Defined in: packages/components/src/components/MetricCard/MetricCard.types.ts:28

Optional help article action handler.

Returns

void

Inherited from

BaseMetric.helpArticleAction


icon?

optional icon: IconType

Defined in: packages/components/src/components/MetricCard/MetricCard.types.ts:20

Icon to display alongside the metric.

Inherited from

BaseMetric.icon


label

label: string

Defined in: packages/components/src/components/MetricCard/MetricCard.types.ts:10

Label displayed above the metric value.

Inherited from

BaseMetric.label


max

max: number | null

Defined in: packages/components/src/components/MetricCard/MetricCard.types.ts:62

Maximum value. Use null for unlimited.


onClick()?

optional onClick: () => void

Defined in: packages/components/src/components/MetricCard/MetricCard.types.ts:24

Optional click handler to make the metric card interactive.

Returns

void

Inherited from

BaseMetric.onClick


showAlertThreshold?

optional showAlertThreshold: number

Defined in: packages/components/src/components/MetricCard/MetricCard.types.ts:70

Percentage threshold at which to show an alert.


tooltip?

optional tooltip: string | () => void

Defined in: packages/components/src/components/MetricCard/MetricCard.types.ts:16

Optional tooltip text or action handler for additional context. When a string is provided, it displays a simple tooltip. When a function is provided, it's called when the tooltip icon is clicked.

Inherited from

BaseMetric.tooltip


type

type: "percentage"

Defined in: packages/components/src/components/MetricCard/MetricCard.types.ts:54