Skip to content

feat(bar): support per-bar color palettes in playground#11

Merged
hdcodedev merged 2 commits intomainfrom
feat/bar-colors-playground
Mar 21, 2026
Merged

feat(bar): support per-bar color palettes in playground#11
hdcodedev merged 2 commits intomainfrom
feat/bar-colors-playground

Conversation

@hdcodedev
Copy link
Copy Markdown
Member

Why

The playground could configure only a single barColor, so it could not represent or generate examples using per-bar palettes.

Summary

This adds per-bar color palette support to the Bar playground style model and chart definition. The Bar settings now expose a Bar Colors palette sized to the current data point count. Style snapshot/code generation now include barColors, and colors are normalized to match series size for stable output. JS and JVM generator tests were extended to verify emitted barColors code and required Color imports.

Changes

  • Add barColors to BarStyleState
  • Add Bar Colors palette setting in BarChartDefinition
  • Pass series count into bar style snapshot and normalize palette length
  • Include barColors in generated style output
  • Add codegen and compilation test coverage for barColors

Notes/Risk

  • None

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 21, 2026

✅ Playground Test Summary

  • ✅ 33 tests completed successfully

@hdcodedev hdcodedev merged commit 8f569f1 into main Mar 21, 2026
4 checks passed
@hdcodedev hdcodedev deleted the feat/bar-colors-playground branch March 21, 2026 11:50
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.

1 participant