Pie data labels take the chart's text colour when it has one

A textColor set on a chart (chart.options, or Font Color with the chart
selected) coloured the title, axes and legend but left a pie's data labels
white. They stay white by default, on the slices, and follow a colour the
chart's text was given.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
Zach Berry
2026-10-23 19:57:50 -05:00
co-authored by Claude Fable 5.1
parent be9bf48eb2
commit 30b7eff487
2 changed files with 26 additions and 1 deletions
+2 -1
View File
@@ -324,7 +324,8 @@ fn draw_inner(ctx: &mut RenderContext, rctx: &Ctx, c: &Chart, m: Affine, w: f64,
base,
Align::Center,
Anchor::Middle,
Rgba::WHITE,
// On the slices themselves: white, unless the chart's text was given a colour.
if c.text_color.is_some() { text_col } else { Rgba::WHITE },
false,
);
}