Skip to content

enhance: render Others slice with secondary foreground color - #2757

Closed
JC-Chung wants to merge 2 commits into
sourcegit-scm:developfrom
JC-Chung:enhance/pie-chart-others-color
Closed

JC-Chung wants to merge 2 commits into
sourcegit-scm:developfrom
JC-Chung:enhance/pie-chart-others-color

Conversation

@JC-Chung

@JC-Chung JC-Chung commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

Changes

  • Render the Others slice with secondaryForeground (Brush.FG2) instead of the next palette color. When the number of authors above 1% is a multiple of 10, the palette index wraps around to 0, making Others the same Orange as the adjacent top-author slice — the two blend together with no visible boundary.
  • Draw a 1px separator line at the top of the pie (the head-to-tail seam) via a new BorderBrush property bound to Brush.Window. Without it, when all authors are above 1% and the count is 11/21/31..., the last author's slice is also Orange and adjacent to the top author's slice, which the Others fix cannot cover.
  • Move var brush = s_brushes[brushIndex] into the percent > 0.01 branch.
  • Rename _lastHoverred to _lastHovered (no behavior change).

@JC-Chung
JC-Chung marked this pull request as draft October 6, 2026 09:20
@JC-Chung
JC-Chung force-pushed the enhance/pie-chart-others-color branch 2 times, most recently from 77cd029 to 709d2e3 Compare October 7, 2026 02:18
@JC-Chung
JC-Chung force-pushed the enhance/pie-chart-others-color branch from 709d2e3 to f405579 Compare October 7, 2026 02:20
@JC-Chung
JC-Chung marked this pull request as ready for review October 7, 2026 02:26
@love-linger

Copy link
Copy Markdown
Collaborator

I've pushed my implementation for this feature. See dbfde1a

@JC-Chung JC-Chung closed this Oct 8, 2026
@JC-Chung
JC-Chung deleted the enhance/pie-chart-others-color branch October 8, 2026 03:55
@JC-Chung

JC-Chung commented Oct 8, 2026

Copy link
Copy Markdown
Contributor Author

@love-linger
Separately, I've also been working on the label overlap issue — see e0b6eb5 (on my fix/statistics-pie-chart-overlap branch).
Labels of small adjacent slices share nearly the same Y position and stack on top of each other, so they're now sorted per side and pushed apart to keep a minimum vertical gap, connected by elbow-style leader lines.

One trade-off: when more labels on one side than can fit vertically, labels for the smallest slices are dropped. The slices themselves are unchanged and still show details on hover via the tooltip.

Before / after:

winget-before winget-after testpie-before testpie-after testpie-all

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.

2 participants