Skip to content

[Due for payment 2026-11-11] [Insights polish] [R1] Add chart labels back to the Home Insights widget #104266

Closed

Description

@JmillsExpensify

Background

The Insights widget on Home shows one graph at a time: Spend over time, Top spenders, Top merchants, or Top categories. #102814 moved each item's name out of the chart and into the list beneath it on the Insights page. The Home widget doesn't show that list, so its bar charts have no labels and its donut has no legend. People have to hover each bar or slice to find out what it is.

This issue adds labels back to the Home widget's charts: x-axis labels on every bar and line chart, and a legend beside or below the donut.

Change summary

  • Apply the Spend over time x-axis label rules from # to the Home widget.
  • Label each bar on Top spenders and Top merchants with the item's name, horizontally, wrapping to two lines and truncating after that.
  • Add a legend to the Top categories donut, to the right of the donut where there's room and below it where there isn't.
  • No change to the Insights page, which keeps its list beneath each graph, or to the Home widget's tooltips, switcher, or ⋮ menu.

Product and design details

Top merchants bars with two-line labels

Image

Top categories donut with the legend on the right

Image

Top categories donut with the legend below

Image

Spend over time

Bar labels

This applies to Top spenders and Top merchants, and to Top categories whenever it draws as bars.

  • Each bar gets its item's name beneath it, centered under the bar, in the same style as the axis labels.
  • Labels are always horizontal and never rotated.
  • A label can use the full width of its bar's column. It wraps at word breaks onto a second line if needed, and anything past two lines is cut off with an ellipsis, e.g. IT Software / Licenses and Su….
  • The tooltip still shows the full name, so nothing is lost to truncation.
  • Top spenders labels use the spender's display name.

Donut legend

  • The Top categories donut gets a legend: one row per slice, with the slice's color dot and the category name, in the same order as the slices (largest first). The total stays in the center of the donut.
  • The legend shows names only. Amounts stay in the tooltip.
  • Side by side when the card is wide enough: the donut on the left and the legend on the right, vertically centered against the donut. Legend names wrap onto as many lines as they need.
  • Stacked when it isn't, which is mostly narrow phone screens: the donut centered at the top, and the legend beneath it, left-aligned. Each name usually fits on one line here, and wraps if it doesn't.
  • @dannymcclain can confirm the exact card width where the layout switches from side by side to stacked. The legend should never be narrower than the longest common category name on two lines.
  • The layout updates when the card's width changes, e.g. when the window is resized.
Issue OwnerCurrent Issue Owner: @truph01

Activity

  1. added
    ImprovementItem broken or needs improvement.
    InternalRequires API changes or must be handled by Expensify staff
    on Oct 16, 2026
  2. truph01 commented on Oct 19, 2026

    @truph01
    Contributor

    @dannymcclain Could you assign me since I worked on the previous issue #102863

  3. JmillsExpensify commented on Oct 19, 2026

    @JmillsExpensify
    ContributorAuthor

    Done

  4. adamgrzybowski commented on Oct 19, 2026

    @adamgrzybowski
    Contributor

    I will be working on this one

  5. JmillsExpensify commented on Oct 19, 2026

    @JmillsExpensify
    ContributorAuthor

    Assigned you

  6. 43 remaining items

  7. JmillsExpensify commented on Nov 10, 2026

    @JmillsExpensify
    ContributorAuthor

    Looks like this is ready for payment?

  8. JmillsExpensify commented on Nov 10, 2026

    @JmillsExpensify
    ContributorAuthor

    Or wait, maybe we can close. I'll let someone else clarify.

  9. truph01 commented on Nov 11, 2026

    @truph01
    Contributor

    Following the payment summary in #104266 (comment), we have one more PR, Update pie chart labels styling and total value formatting, to address the remaining feedback in #104266 (comment).

    @JmillsExpensify Could you please create a payment issue to cover the work on #105747?

    Thanks!

  10. JmillsExpensify commented on Nov 11, 2026

    @JmillsExpensify
    ContributorAuthor

    Can you provide the regression test for that PR here? I'll get the payment issue created.

  11. JmillsExpensify commented on Nov 11, 2026

    @JmillsExpensify
    ContributorAuthor

    If you request via Expensify, then you can link this internal issue: https://github.com/Expensify/Expensify/issues/703019.

  12. truph01 commented on Nov 11, 2026

    @truph01
    Contributor

    Contributor+ Checklist:

    • [Contributor] The offending PR and associated issue have been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.

      Link to the comment on the PR: N/A. It is an improvement
      Link to the comment on the Issue:

    • [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.

      Link to discussion:

    • [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.

    Regression Test Proposal

    Precondition:

    Test:

    1. Open Home and find the Insights section, switch to a pie chart (Top categories).
    2. Check that the legend labels are the same size as the axis labels on a bar or line chart, and that the color dots are smaller than before.
    3. On a wide window, where the legend sits beside the donut, check that labels don't wrap when there's space next to them.
    4. Narrow the window until the legend moves below the donut. Check that it still lines up and the dots stay level with the first line of each label.
    5. Check the center total:
      • Under 1m: full amount with decimals, e.g. $3,527.00.
      • 1m to under 10m: full amount without decimals, e.g. $1,234,568.
      • 10m and up: compact form, e.g. $12M.
    6. With a zero-decimal currency such as JPY, check that totals under 1m show no decimals, e.g. ¥3,527.
    7. On web, hover the center total and check that a tooltip shows the exact amount.
    8. Hover a slice and check that its tooltip still works.
    9. Check that the total stays inside the donut hole and doesn't overlap the ring.
    10. Repeat steps 2 to 9 for pie charts in Spend and Insights.
    11. On Android shrink the system font size, restart the app and check that the labels aren't clipped.

    Do we agree 👍 or 👎

  13. truph01 commented on Nov 12, 2026

    @truph01
    Contributor

    Can you provide the regression test for that PR here? I'll get the payment issue created.

    @JmillsExpensify Could you create a payment issue for it?

  14. JmillsExpensify commented on Nov 12, 2026

    @JmillsExpensify
    ContributorAuthor

    @mallenexpensify Can you help out? Not sure why you didn't get assigned. (I'll also reach out to him 1:1).

  15. mallenexpensify commented on Nov 12, 2026

    @mallenexpensify
    Contributor

    @truph01 I bumped the payment summary above to $500 since you haven't requested payment yet. Tag me and reopen here if that doesn't work for ya. Created another test case too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionDailyKSv2ImprovementItem broken or needs improvement.InternalRequires API changes or must be handled by Expensify staff

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions