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

Variance Explainer

Waterfall: what drove a KPI change, with drill-down into factors. Pro · Charts and analytics › Analysis and scenarios

Why a KPI moved: a waterfall from the old value to the new one, one bar per factor, any factor with finer factors opens into its own waterfall (with a path back up). A list of contributions repeats the chart as text, and a gap between the factors and the total is shown, not hidden.

Installation

npx valyro-cli@latest login
npx valyro-cli@latest add variance-explainer
npm install valyro-ui-pro

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

Props

PropTypeDefault
start *{ label: string; value: number }The KPI before: label ("Сентябрь") and value.
end{ label: string; value: number }The KPI after. Default: start plus every factor; a difference shows as an "unexplained" step.
factors *VarianceFactor[]Contributions to the change; factors with children can be broken down.
pathstring[]Drill-down path of factor ids.
defaultPathstring[]EMPTYInitial path when uncontrolled.
onPathChange(path: string[]) => voidCalled when the reader drills into a factor or goes back up.
sort'given' | 'impact''given'impact orders factors by absolute contribution; given keeps your order. Default given.
formatValueFormat{}How values read.
currencystringISO 4217 code for format: 'currency'.
heightnumber220Height of the bars area in px. Default 220.
loadingbooleanfalseData is loading: skeleton.
errorReactNodeLoading failed: shown instead of the chart.
titleReactNodeHeading. Default: labels.title.
headingLevel2 | 3 | 4 | 53Level of the heading (default 3).
localestringBCP 47 locale for numbers; defaults to the ThemeProvider's.
labelsPartial<VarianceExplainerLabels>Overrides for the built-in English text; keys left out keep their defaults.

Related components

Previous: Scenario Simulator · Next: Map Layer Story · All Charts and analytics