You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Pie charts with many segments need a computed Other slice that updates when users toggle visibility in Options. selectattr:'visible' only filters rows — it can’t aggregate hidden segments into a single Other slice.
Use case: a pie chart with primary segments shown individually and secondary segments collapsed into Other by default; toggling a segment in Options promotes it and shrinks Other.
Expected: chart_segments | pievisible returns visible slices plus one Other slice summing hidden values (30 above). When MX is toggled visible, MX appears as its own slice and Other drops to 10. When everything is visible, Other is omitted.
Actual: no built-in pipe for this — authors must precompute slices in Python or hand-roll aggregation in expressions.
Proposed approach (comment on the issue if filing before the PR):
Add a pievisible pipe in renderer/src/expression.ts that:
takes segments with label, value, visible, and group (primary / secondary)
returns {label, value} slices for visible rows
aggregates hidden rows into a single Other slice
Implemented by #548, now merged. PieChart supports aggregate_below for a fraction-of-total cutoff and aggregate_except for a reactive selection list. Both preserve the total by combining the remaining rows into Other, using the chart’s existing field names. Angela Zhang is credited as a co-author for the original #471 proposal.
Activity
jlowin commentedon Oct 26, 2026
Implemented by #548, now merged. PieChart supports aggregate_below for a fraction-of-total cutoff and aggregate_except for a reactive selection list. Both preserve the total by combining the remaining rows into Other, using the chart’s existing field names. Angela Zhang is credited as a co-author for the original #471 proposal.