Skip to content

fix(charts): pie legend, distinct colours, donut sized to the pane (#1160) - #1177

Merged
ZhuchkaTriplesix merged 1 commit into
devfrom
issue/1160-pie-legend-colours-radius
Oct 9, 2026
Merged

ZhuchkaTriplesix merged 1 commit into
devfrom
issue/1160-pie-legend-colours-radius

Conversation

@ZhuchkaTriplesix

Copy link
Copy Markdown
Member

Closes #1160

Changes

  • The donut is sized from the pane (LayoutBuilder) instead of a fixed 100 px, so it fills the pane at 600 px and 1 600 px wide.
  • Legend with colour, label, value and share. Beside the chart when the pane is at least 520 px wide, below it otherwise.
  • Hovering a slice highlights its legend row and the reverse. The touched slice grows slightly.
  • Default for pie is Top 8 with Other (ChartData.pieTopN). Top N choices now include 8.
  • Slices beyond the palette of five repeat the palette in a lighter tint, so 9 slices (8 + Other) never share a colour.
  • Slice titles appear only for shares of 5 % or more and use black or white, whichever contrasts with the slice.
  • Widget test: 30 categories give 8 slices plus Other, all colours distinct, and the legend names Other.

Not in this PR

  • SVG export of the pie keeps its previous layout. Its legend can follow in a separate change.

🤖 Generated with Claude Code

…1160)

The pie had a fixed 100 px radius, labels only for up to 8 slices and five
colours cycled over up to 50 slices. The donut now fills the pane, a legend
lists colour, label, value and share (beside it when wide, below when
narrow), and hovering a slice or a legend row highlights both. Pie defaults
to Top 8 with Other. Further colour rounds are tinted, so slices stay
distinct, and slice titles show only shares of 5 % or more in a contrasting
colour.
@github-actions github-actions Bot added bug Something isn't working ui User interface components and widgets data-grid Interactive data grid, cell editor, filtering, groupings P2 Medium priority / Parity & Refactoring labels Oct 9, 2026
@ZhuchkaTriplesix
ZhuchkaTriplesix merged commit b14f66e into dev Oct 9, 2026
13 checks passed
@ZhuchkaTriplesix
ZhuchkaTriplesix deleted the issue/1160-pie-legend-colours-radius branch October 11, 2026 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working data-grid Interactive data grid, cell editor, filtering, groupings P2 Medium priority / Parity & Refactoring ui User interface components and widgets

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant