Skip to content

Conversation

@ohauer
Copy link

@ohauer ohauer commented Feb 10, 2026

Fixes #2259

Chart series with Fill{Type: "solid"} were not applying custom colors because drawShapeFill() only processed Type "pattern" with Pattern=1.

This PR modifies the condition to accept both Type "solid" and Type "pattern" with Pattern=1.

Changes:

  • Modified drawShapeFill() in drawing.go line 840
  • Affects all chart types: bar, line, pie, scatter, etc.
  • Also fixes DataPoint colors, markers, and plot area fills

Testing:

  • ✅ Bar charts: 5 series with custom colors
  • ✅ Pie charts: 5 slices with DataPoint colors
  • ✅ All colors render correctly matching specified RGB values

Breaking change: None (only adds support for previously ignored syntax)

Chart series with Fill{Type: "solid"} were not applying custom colors
because drawShapeFill() only processed Type "pattern" with Pattern=1.

This caused charts to always use Excel's default theme colors instead
of the specified RGB colors.

Changes:
- Modified drawShapeFill() condition to accept both Type "solid" and
  Type "pattern" with Pattern=1
- Affects all chart types: bar, line, pie, scatter, etc.
- Also fixes DataPoint colors, markers, and plot area fills

Tested with:
- Bar charts: 5 series with custom colors ✓
- Pie charts: 5 slices with DataPoint colors ✓
- All colors render correctly matching specified RGB values

Breaking change: None (only adds support for previously ignored syntax)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Chart series Fill with Type "solid" not applying custom colors

1 participant