Skip to main content

Interface: PercentageMetric

Defined in: MetricCard/MetricCard.types.ts:53

Percentage-based metric with progress bar.

Extends​

Properties​

current​

current: number

Defined in: MetricCard/MetricCard.types.ts:58

Current value.


formatValue?​

optional formatValue?: (value) => string

Defined in: MetricCard/MetricCard.types.ts:66

Custom formatter for displaying values.

Parameters​

ParameterType
valuenumber

Returns​

string


helpArticleAction?​

optional helpArticleAction?: () => void

Defined in: MetricCard/MetricCard.types.ts:28

Optional help article action handler.

Returns​

void

Inherited from​

BaseMetric.helpArticleAction


icon?​

optional icon?: IconType

Defined in: MetricCard/MetricCard.types.ts:20

Icon to display alongside the metric.

Inherited from​

BaseMetric.icon


label​

label: string

Defined in: MetricCard/MetricCard.types.ts:10

Label displayed above the metric value.

Inherited from​

BaseMetric.label


max​

max: number | null

Defined in: MetricCard/MetricCard.types.ts:62

Maximum value. Use null for unlimited.


onClick?​

optional onClick?: () => void

Defined in: 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: MetricCard/MetricCard.types.ts:70

Percentage threshold at which to show an alert.


tooltip?​

optional tooltip?: string | (() => void)

Defined in: 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: MetricCard/MetricCard.types.ts:54