Scenario Simulator
Ползунки допущений меняют прогноз, коридор неопределённости и KPI. Pro · Графики и аналитика › Аналитика и сценарии
Установка
npx valyro-cli@latest login
npx valyro-cli@latest add scenario-simulator
npm install valyro-ui-pro
import 'valyro-ui-pro/styles.css';
import { ScenarioSimulator } from 'valyro-ui-pro';
Пропсы
| Prop | Type | Default | |
|---|---|---|---|
inputs * | ScenarioInput[] | Assumptions the reader can move: range, step, unit and the base value. | |
simulate * | (values: Record<string, number>) => ScenarioResult | The model: values in, forecast series and KPIs (with optional low / high bounds) out. Keep it pure and fast. | |
scenarios | ScenarioPreset[] | Named scenarios ("Pessimistic", "Base", "Optimistic") that set several inputs at once. | |
values | Record<string, number> | Current values by input id. | |
defaultValues | Record<string, number> | Initial values when uncontrolled. Default: every input's defaultValue. | |
onValuesChange | (values: Record<string, number>) => void | Called with all values when the reader moves an input or picks a scenario. | |
baseline | Record<string, number> | Values the forecast is compared with (dashed line, KPI deltas). Default: the inputs' defaults. | |
precision | number | Fraction digits of KPI values that set no digits. | |
seriesFormat | ValueFormat | How forecast values read on the axis and in the data table. Default: like the first KPI. | |
currency | string | ISO 4217 code for format: 'currency' values. | |
method | ReactNode | The model's method in words — formulas and sources, so results can be reproduced. | |
chartHeight | number | 220 | Chart height in px. Default 220. |
loading | boolean | false | The model is loading: skeleton. |
error | ReactNode | Loading failed: shown instead of the simulator. | |
title | ReactNode | Heading. Default: labels.title. | |
headingLevel | 2 | 3 | 4 | 5 | 3 | Level of the heading (default 3). |
locale | string | BCP 47 locale for numbers; defaults to the ThemeProvider's. | |
labels | Partial<ScenarioSimulatorLabels> | Overrides for the built-in English text; keys left out keep their defaults. |
Похожие компоненты
- Gauge Chart — Круговые индикаторы
- Metric Comparison — Сравнение показателей
- Analytics Filter Bar — Фильтры дашборда
- Variance Explainer — Водопад: из чего сложилось изменение KPI, с раскрытием факторов
- Map Layer Story — История по карте: шаги включают слои данных и кадрируют регион, без WebGL
- Line Chart — Линейные графики
- Bar Chart — Столбчатые диаграммы
- Area Chart — Графики с заливкой
- Scatter Chart — Точечные и пузырьковые диаграммы с линией тренда
- Sparkline — Мини-графики
- Confidence Band Chart — Прогноз с доверительными интервалами и выбросами, точки читаются с клавиатуры
- Candlestick Chart — Биржевые свечи с объёмами и скользящими средними
Назад: Analytics Filter Bar · Далее: Variance Explainer · Весь раздел «Графики и аналитика»