From b5499d7157081452735e8a1d13dc253cf6469c40 Mon Sep 17 00:00:00 2001 From: Brandon Thomas Date: Wed, 14 Oct 2026 13:41:50 -0400 Subject: [PATCH] Fix up merged PRs: waterfall axis scale uses the running totals main's axis_scale now reads plotted_extent rather than value_range, which #537 taught about waterfalls; route waterfall charts to value_range there too. Co-Authored-By: Claude Opus 5.5 --- crates/model/src/chart.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crates/model/src/chart.rs b/crates/model/src/chart.rs index 694d06cd..42a8378d 100644 --- a/crates/model/src/chart.rs +++ b/crates/model/src/chart.rs @@ -369,6 +369,9 @@ impl Chart { /// stacked series as running sums from zero, 100 % series as 0–1. `(0, 0)` without finite /// values; `None` when no series uses the axis. fn plotted_extent(&self, secondary: bool) -> Option<(f64, f64)> { + if self.kind == ChartType::Waterfall { + return (!secondary).then(|| self.value_range()); + } let ser: Vec<&Series> = self.series.iter().filter(|s| self.on_secondary(s) == secondary).collect(); if ser.is_empty() { return (!secondary && self.kind != ChartType::Combo).then_some((0.0, 0.0));