Skip to content

fix(funnel/waterfall/pie/sunburst): respect textinfo token order#7871

Closed
camdecoster wants to merge 2 commits into
v4.0from
cam/7751/textinfo-token-order
Closed

fix(funnel/waterfall/pie/sunburst): respect textinfo token order#7871
camdecoster wants to merge 2 commits into
v4.0from
cam/7751/textinfo-token-order

Conversation

@camdecoster

Copy link
Copy Markdown
Contributor

Summary

Resurrects the work from #7752 (closed because it's a breaking change; targeting v4.0 here so it can ship in the next major release).

Replaces hardcoded hasFlag() checks in calcTextinfo / formatSliceLabel with a loop over the user-specified textinfo tokens so they render in the requested order. Applies to funnel/waterfall (bar/plot.js), pie, sunburst, and indirectly treemap, icicle, and funnelarea (which reuse formatSliceLabel).

Note: per @archmoj's comment on #7752, the flaglist attribute type spec explicitly says token order should not affect output. Either the spec / coerce.js flaglist handling needs to be relaxed to permit ordered tokens, or textinfo needs a new orderedflaglist-style coerce type. Filing this PR against v4.0 to gate that decision behind a major-version bump.

Before:

  • textinfo="percent initial+value""1000 100.0%"

After:

  • textinfo="percent initial+value""100.0% 1000"

Test plan

  • Lint passes (npm run lint)
  • New jasmine tests added for funnel/pie/sunburst to assert token order is respected
  • Existing restyle and base assertions updated in sunburst/treemap to reflect new ordering
  • Image baselines may need regeneration in CI (display-text_zero-number, funnelarea_with_other_traces, icicle_, sunburst_with-without_values, treemap_); v4.0 baselines kept here so CI can flag the actual deltas
  • Verify failing image baselines are expected order-change diffs, not unrelated rendering shifts

Closes #7751. Supersedes #7752.

Co-authored-by: Abinesh N abineshabee2@gmail.com

🤖 Generated with Claude Code

camdecoster and others added 2 commits June 26, 2026 16:28
Replaces hardcoded hasFlag() checks with a loop over user-specified
parts[] so textinfo tokens render in the order the user requested.
Applies to funnel/waterfall (bar/plot.js), pie, and sunburst traces.

Fixes #7751

Co-authored-by: Abinesh N <abineshabee2@gmail.com>
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