Waterfall
Explains how a value changed.
kor/ui/WaterfallSource
When to use
- Use it for profit bridges and budget changes.
Examples
From revenue to profit
<k:Waterfall unit="thousand TRY" height="220">
<k:WaterfallStep label="Revenue" value="920" kind="total"/>
<k:WaterfallStep label="Material" value="-410"/>
<k:WaterfallStep label="Labor" value="-180"/>
<k:WaterfallStep label="Incentive" value="60"/>
<k:WaterfallStep label="Energy" value="-95"/>
<k:WaterfallStep label="Profit" kind="total"/>
</k:Waterfall>
API
Properties
| Name | Type | Default | Description |
|---|
label | string | | Accessible name |
decimals | int | 0 | Decimal places |
unit | string | | Unit |
height | int | 260 | Plot height in pixels |
upIsGood | boolean | true | Whether an increase is favorable |
compact | boolean | false | Whether to use short numbers (1.2M) |
Aggregations
| Name | Type | Description |
|---|
steps | WaterfallStep[] | Steps |
Events
| Name | Type | Description |
|---|
stepPress | key: string | A step was pressed |
Methods
| Name | Description |
|---|
getRanges(): { from: number; to: number }[] | Where each step starts and ends. |
WaterfallStep
A waterfall step.
Properties
| Name | Type | Default | Description |
|---|
key | string | | Key |
label | string | | Name |
value | any | null | Amount of change. Calculated for totals when empty |
kind | string | change | change or total |
Related
TrendStat