ValyroUI Русская версия

Metric Comparison

Metric comparison. Pro · Charts and analytics › Analysis and scenarios

Current vs previous period for several metrics: values, delta with trend color and paired bars.

Installation

npx valyro-cli@latest login
npx valyro-cli@latest add metric-comparison
npm install valyro-ui-pro

import 'valyro-ui-pro/styles.css';
import { MetricComparison } from 'valyro-ui-pro';

Props

PropTypeDefault
metrics *ComparisonMetric[]One row per metric.
bars'delta' | 'paired''delta'delta: one bar per row from a centre line, its length the change on a scale shared by all rows, green or red by whether the change is good. paired: current and previous bars, each row scaled to its own larger value. Default delta.
currentLabelstring'Current'Column title for the current period. Default "Current".
previousLabelstring'Previous'Column title for the previous period. Default "Previous".
valueFormatterValueFormatterFormats current and previous values of metrics without their own format.
localestringBCP 47 locale for the default number and percentage formatting. Default: the ThemeProvider locale, then the browser's.
labelsPartial<MetricComparisonLabels>Overrides for the built-in strings.
ariaLabelstringAccessible name of the table.

Related components

Previous: Gauge Chart · Next: Analytics Filter Bar · All Charts and analytics