From 3791ce1189a46d3dcc8f99b6a79171b5ddd7d4b1 Mon Sep 17 00:00:00 2001 From: aiongg Date: Wed, 25 Nov 2026 14:19:40 +0000 Subject: [PATCH] Chart label test: Excel's ? placeholders are spaces --- crates/model/src/chart.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/crates/model/src/chart.rs b/crates/model/src/chart.rs index 38448c725..8f19dc185 100644 --- a/crates/model/src/chart.rs +++ b/crates/model/src/chart.rs @@ -1181,7 +1181,8 @@ mod tests { c.y_format = Some(r#"_-* #\ ##0\ "₽"_-;\-* #\ ##0\ "₽"_-;_-* "-"??\ "₽"_-;_-@_-"#.into()); c.lang = Some("ru-RU".into()); assert_eq!(c.axis_label(false, 800_000.0), "800\u{a0}000 ₽"); - assert_eq!(c.axis_label(false, 0.0), "- ₽"); + // Excel shows each `?` of the zero section as a space. + assert_eq!(c.axis_label(false, 0.0), "- ₽"); // No format: General. assert_eq!(c.axis_label(true, 2.5), "2,5"); c.lang = None; @@ -1190,7 +1191,7 @@ mod tests { c.lang = Some("ru-RU".into()); c.series[0].number_format = Some(r#"#,##0\ "₽""#.into()); assert_eq!(c.data_label(&c.series[0], 516_600_000.0), "516\u{a0}600\u{a0}000 ₽"); - assert_eq!(c.data_label(&c.series[1], 0.0), "- ₽"); + assert_eq!(c.data_label(&c.series[1], 0.0), "- ₽"); } #[test]