Overview
TheDelta component displays a numeric change with visual indicators (arrows) and color coding to show positive, negative, or neutral changes. Perfect for showing comparisons, growth rates, and changes over time.
Basic Usage
With Formatting
As Chip
Props
Data Selection
Query result, object, or array containing the delta value.
Column name containing the delta value. If not specified, uses first column.
Direct numeric value instead of using data. Use either
data or value, not both.Row index to select from the dataset (0-based).
Display Options
Label text to display after the delta (e.g., “vs. prev month”).
Display as a chip with background color and border.
Show the numeric value.
Show the directional arrow symbol (▲/▼).
Position of the arrow symbol relative to the value.
Formatting
Format string for the value. Examples:
"pct1", "usd", "#,##0".Behavior
Reverse color coding (green for negative, red for positive). Use for metrics where decreases are positive (e.g., costs, errors).
Minimum value for neutral range. Values between neutralMin and neutralMax display as neutral.
Maximum value for neutral range.
Styling
Text alignment.
CSS class for font styling.
Error Handling
How to handle empty datasets.
Custom message to display when dataset is empty.
Examples
Basic Deltas
Chip Style
With Custom Text
Down is Good (e.g., Cost Reduction)
With Neutral Range
Symbol Positioning
Using Direct Value
Hide Symbol or Value
In BigValue Component
Color Coding
The Delta component uses color coding based on the value:- Positive values (> neutralMax): Green (or red if
downIsGood={true}) - Negative values (< neutralMin): Red (or green if
downIsGood={true}) - Neutral values (between neutralMin and neutralMax): Gray
Notes
- Arrows: ▲ for positive, ▼ for negative, – for neutral
- Use
chipfor a more prominent, badge-like appearance downIsGoodis useful for metrics like costs, error rates, or load times where decreases are improvements- The neutral range is inclusive: neutralMin ≤ value ≤ neutralMax
- When using
valueprop directly,datais not required