What is delta mode?
Delta mode adjusts the visual representation of bars to show heights relative to the minimum value in the dataset, rather than starting all bars from zero. This makes small variations dramatically more visible. Without delta mode: Bars showing[1000, 1002, 1001, 1005] all appear nearly identical height.
With delta mode: The same data shows clear visual differences, making the pattern of variation obvious at a glance.
When to use delta mode
Delta mode is ideal when:- Your data has small variations around a large baseline value
- You want to emphasize relative changes rather than absolute values
- All values are close together (e.g., daily temperatures, stock prices, minor metric fluctuations)
- The pattern of change is more important than the absolute scale
Enabling delta mode
Set thedeltaMode property to true on a BarSeries:
Configuration example
You can also enable delta mode through the chart configuration:The
deltaMode property is defined in src/render/BarSeries.ts:8 and is processed during the draw operation at src/render/BarSeries.ts:64-72.How delta mode calculates baselines
When delta mode is enabled, the rendering logic:- Finds the minimum Y value in the visible dataset
- Adds a small buffer (10% of the Y range) below the minimum for visual clarity
- Uses this calculated baseline as the starting point for all bars
- Draws bar heights from this baseline to each data point’s Y value
Tooltips show actual values
An important feature of delta mode is that while the visual heights are relative, tooltips always display the true Y values. This ensures users can see both the pattern (visual) and the actual data (tooltip).Delta mode with stacking
Delta mode can be combined with stacked bars. When a stacked series has delta mode enabled, the baseline adjustment applies to the bottom-most series:Y-axis scaling behavior
When delta mode is enabled, the chart’supdateYScale() method detects it and disables the startFromZero behavior. This prevents the Y-axis from being forced to zero, which would defeat the purpose of delta mode: