Skip to content

feat: Add percentMode config and improve percentage formatting for funnel charts#9341

Open
djbarnwal wants to merge 3 commits intomainfrom
feat/funnel-perc-improvements
Open

feat: Add percentMode config and improve percentage formatting for funnel charts#9341
djbarnwal wants to merge 3 commits intomainfrom
feat/funnel-perc-improvements

Conversation

@djbarnwal
Copy link
Copy Markdown
Member

  • Add percentMode (top | previous, default top) to funnel chart spec so authors can pick whether on-bar percentages reference the top of the funnel or the previous stage.
  • Tooltip now always shows both % of top and % of previous regardless of the configured mode, so end-users can disambiguate without the author surfacing both.
  • Switch percentage formatting to one decimal with trailing .0 stripped (32%, 32.1%) so neighboring values stay visually distinct while round numbers stay clean.

Closes https://linear.app/rilldata/issue/APP-821/canvas-funnel-chart-percentage-ambiguous-add-reference-label-decimal

Checklist:

  • Covered by tests
  • Ran it and it works as intended
  • Reviewed the diff before requesting a review
  • Checked for unhandled edge cases
  • Linked the issues it closes
  • Checked if the docs need to be updated. If so, create a separate Linear DOCS issue
  • Intend to cherry-pick into the release branch
  • I'm proud of this work!

@djbarnwal djbarnwal requested review from a team as code owners April 30, 2026 09:45
@djbarnwal djbarnwal requested a review from ericokuma April 30, 2026 09:45
@ericokuma ericokuma requested a review from Di7design April 30, 2026 18:14
@ericokuma
Copy link
Copy Markdown
Contributor

cc @Di7design for design review

Copy link
Copy Markdown
Contributor

@ericokuma ericokuma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

royendo added a commit that referenced this pull request May 1, 2026
PR #9341 adds a section-scoped loader that redirects branch-view URLs
to branch home and gates production view on `manageProject`. When that
PR lands first, the Status tab (now visible to editors per this PR)
would dead-end at a 403/redirect for editors and on any branch URL.

Override the loader to gate on `readProdStatus` and drop the
branch-view redirect so editors can reach Status from any URL.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@begelundmuller begelundmuller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Backend looks good

@djbarnwal djbarnwal requested review from ericokuma and ericpgreen2 May 4, 2026 21:02
@Di7design
Copy link
Copy Markdown

Di7design commented May 5, 2026

  1. A small caption directly above the % column on the right: "% of top" or "% of previous stage", swapping based on percentMode. One persistent label answers the question for the whole chart without crowding bars.
  2. In top mode, the first bar shows 100% (since it is the reference),this anchors the user's mental model.
    In previous mode, the first bar shows or just the raw value (no %), since "vs previous" doesn't apply.
  3. Design changes: align the funnel bar to the left, the percentage to the right, and the value name to the left. Increase the gapping between each funnel bar.
Screenshot 2026-05-05 at 3 16 47 PM Screenshot 2026-05-05 at 3 16 57 PM

See reference link below:
funnel-percent-reference-mock.html

Copy link
Copy Markdown

@Di7design Di7design left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See above

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.

4 participants