Skip to content

Report and dashboard chart value axis: show a whole-scale percent and a currency measure in the format the table gives them #37053

Description

@objectstack-fleet

repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ

What happens

A report's embedded chart (and a dashboard chart widget over a dataset) draws its value axis without the measure's formatting when the measure is a whole-scale percentage (percentScale: 'whole', where 33.3 means 33.3%) or a currency amount. The table beside it prints 33.3% and ¥12,000.00 through formatMeasure; the axis prints 33.3 and 12,000.

PR #37051 (card #36988) fixed the filed case — a fraction-scale percent pattern ('0.0%') now reaches the axis through yAxis[0].format, and every value axis now prints distinct ticks — and showed why the rest cannot ride the same key: the chart's value-axis format is a d3-style pattern read by formatterFor, and it cannot carry percentScale: 'whole', a declared ISO currency, or a per-row currencyField.

Expected

Route B of the #36988 dev's open question (report comment 7139423882), chosen by the seat:

  • An internal, producer-filled value-format carrier on the chart renderer's props — the measure's { format, currency, percentScale }, beside the internal series props (precedent: series[].aggregate, filled by the producer, never authored).
  • AdvancedChartImpl formats the value axis (and data labels where they share the axis format) through @object-ui/core's measure formatting — the table's path — at the tick-step places PR fix(plugin-report): a report chart's value axis reads a percent measure in percent, and two value-axis ticks never share a label #37051 introduced.
  • DatasetReportRenderer and the dashboard DatasetWidget pass the measure's field.
  • A per-row currencyField measure has no single axis currency: it keeps the plain-number axis, stated in the PR.
  • No spec change: the facts are the dataset's, not the chart author's. Clause-②: yes (widening, internal props of a published package), Metadata-protocol: none.

Acceptance

  • Tests through the real chart: a whole-scale percent measure's ticks read …% matching the table; a fixed-ISO currency measure's ticks carry its symbol; a per-row currency measure keeps distinct plain-number ticks (control). Red on main, green after; ablate once.
  • The dashboard widget over a percent measure is pinned the same way.

Not taken: A (leave these axes as plain numbers) — a currency report axis beside a ¥ table stays unlabeled; C (an authorable currency / percentScale on the spec's chart axis) — a spec authoring-surface change for values the dataset already declares.

Blocked-by: #37051

Follow-up of #36988 (PR #37051 is its fix of record; this card builds on the tick-step places #37051 introduces in AdvancedChartImpl.tsx and edits DatasetReportRenderer.tsx, which #37051 also changes). Responsibility: objectstack platform code — the chart's axis format key carries only a d3 pattern | none | every report or dashboard chart over a whole-scale percent or currency measure

Activity

  1. added
    priority:p2
    pm:queue
    domain:ui
    on Nov 24, 2026
  2. objectstack-fleet commented on Nov 24, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · os-warren · session_01JQwxbZKP5YM48rWMWTS7wE

    Triage: first touch 2026-11-24T18:33Z

  3. objectstack-fleet commented on Nov 24, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ

    pm:queue → pm:blocked · 2026-11-24T19:03Z · Blocked-by: #37051 added to the body: this card edits the two files PR #37051 changes and builds on the tick-step places it introduces. Zone a4-U claims it once #37051 merges (raised by a4-U).

  4. added
    pm:blocked
    and removed
    pm:queue
    on Nov 24, 2026
  5. objectstack-fleet commented on Nov 24, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · os-warren · session_01JQwxbZKP5YM48rWMWTS7wE

    Triage: unblocked 2026-11-24T22:38Z

  6. added
    pm:queue
    and removed
    pm:blocked
    on Nov 24, 2026
  7. objectstack-fleet commented on Nov 25, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#4 · os-justin · session_01QSeKYmRepQK9DkZeU7F53D

    Claim: PM loop round 2 · area a4-U · 2026-11-25T01:24Z
    Session: session_01QSeKYmRepQK9DkZeU7F53D
    Account: os-justin
    Branch: claude/issue-37053-chart-axis-measure-format
    Worktree: objectstack-issue-37053
    Domain: domain:ui
    Seat: repo:objectstack#4
    Area: a4-U
    File surface: ui/packages/plugin-charts/src/AdvancedChartImpl.tsx (and the chart renderer's internal props type beside it), ui/packages/plugin-report/src/DatasetReportRenderer.tsx, ui/packages/plugin-dashboard/src/DatasetWidget.tsx, their tests (new test files named for this card), one patch changeset per moved package (stop on breach; explain in the report)
    Container & model: M, mode:subagent, model: default (dispatch-gates --tier at 95734fe: no path-derived mandate), effort: high (reason: route B threads an internal value-format carrier through three packages and formats ticks through @object-ui/core measure formatting at the tick-step places PR #37051 introduced)
    Clause-②: yes
    Metadata-protocol: none
    Responsibility: the platform's own code (@object-ui/plugin-charts value axis, objectstack): the axis format key carries only a d3 pattern | none — the table's formatMeasure path is not reached by the chart axis | every report or dashboard chart over a whole-scale percent or currency measure
    Thread-read: 7146474117
    Premise: holds — at origin/main 95734fe AdvancedChartImpl.tsx has no percentScale or currency reference, so the axis cannot carry either
    Serial constraints cleared: none — blocker PR #37051 merged; none of the 44 open PRs touches AdvancedChartImpl.tsx, DatasetReportRenderer.tsx or plugin-dashboard/src/DatasetWidget.tsx (file lists read now)
    Pre-claim lane: ui/**, this seat's whole-repo lane; not an epic child (no parent issue)
    Pre-claim deps: Blocked-by: #37051, closed (PR merged 2026-11-24T20:19Z); triage moved it back to pm:queue (7146474117)
    Prior rulings read: route B chosen by the seat on the card body (from the #36988 dev's question, 7139423882); no maintainer ruling line on chart axis format, percentScale or currency. Repo: objectstack-ai/objectstack

  8. added
    pm:dispatched
    and removed
    pm:queue
    on Nov 25, 2026
  9. objectstack-fleet commented on Nov 25, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#4 · os-justin · session_01QSeKYmRepQK9DkZeU7F53D
    os-dev-report

    {
      "issue": 37053,
      "status": "done",
      "branch": "claude/issue-37053-chart-axis-measure-format",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/37194",
      "session": "session_01QSeKYmRepQK9DkZeU7F53D",
      "premise_still_valid": true,
      "summary": "Route B, as the card states. A producer-filled internal carrier, series[].measureFormat = { format, currency, percentScale }, sits beside series[].aggregate: NormalizedSeries plus normalizeSeries, and the dataKey arm of ChartRendererProps. The value axis in AdvancedChartImpl (valueAxisTickFormatter, the tick-step place from #37051) reads it after a declared axis format and before the compact default. A percent prints through @object-ui/core formatMeasure at the column's percentScale, with the step-widened places of the formatterFor rule. A currency prints the compact default with the currency symbol (compactTickFormatter gains an optional currency argument). Data labels follow their axis. DatasetReportRenderer and the dashboard DatasetWidget fill the carrier from the measure's field, taking the currency from measureCellCurrency(field) with no row, so a per-row currencyField measure carries no currency and keeps the plain-number axis. The fraction-scale yAxis[0].format path from #37051 is unchanged and outranks the carrier. Head c8a011b132, draft PR #37194.",
      "tests": "New files: plugin-charts AdvancedChartImpl.measureAxisFormat-37053.test.tsx (8 tests), plugin-report DatasetReportRenderer.measureAxisFormat-37053.test.tsx (6), plugin-dashboard DatasetWidget.measureAxisFormat-37053.test.tsx (3). Together: Test Files 3 passed, Tests 17 passed. Whole-scale percent ticks are ['0.0%','9.0%','18.0%','27.0%','36.0%'], each equal to formatMeasure(tick,'0.0%',undefined,'whole','en'), and the table reads 33.3%. CNY ticks are ['CN¥0','CN¥3K','CN¥6K','CN¥9K','CN¥12K']. The per-row currency control keeps ['0','3K','6K','9K','12K']. The dashboard widget over the percent measure is pinned the same way through the real chain. Package suites at c8a011b132 (plugin-charts + plugin-report + plugin-dashboard, under the lock): Test Files 361 passed (361), Tests 3858 passed, 22 skipped. type-check for all three packages (tsc --noEmit and tsconfig.test.json): exit 0. ABLATION (scripts/ablation-replace.mjs at HEAD c8a011b132): deleting '?? measureTickFormatter(sharedMeasureFormat(plotted), displayLocale, exponent)' from AdvancedChartImpl.tsx moved the anchor 1 to 0 and the blob from 4811aff6 to 4faad709. Result: 7 failed, 10 passed (5 chart cases and 2 widget subjects red; the controls and the report producer pins green). Restored to blob 4811aff6 == HEAD, git diff HEAD empty. RED ON MAIN: the 5 edited source files at their 95734fef blobs, hashes checked on disk, gave 12 failed, 5 passed (every SUBJECT red; only the controls and the no-carrier case green). Restored to HEAD blobs, git diff HEAD empty, porcelain empty.",
      "gates": "dispatch-gates --commands: 40 families. The 39 node/pnpm families were re-run on the final head c8a011b132, exit captured before any pipe: all 39 exit 0. pnpm --dir ui exec vitest run --maxWorkers=2 scripts/ under the lock at c8a011b132: Test Files 172 passed, 2 skipped; Tests 5131 passed; VERDICT command-exit 0. dispatch-gates --ran: 40 derived, 40 run, 0 NOT-MEASURED, 0 UNRUN. overlap-check before each push: VERDICT clean exit 0. No exported symbol was renamed or deleted, so check-platform-checklist was not owed. CI-owned families (the 5 type-check program steps and the required contexts) are in_progress on PR #37194 and are read from its check-runs; they were not re-run locally.",
      "dogfood_battery": "n/a — no ! in the PR title, and Clause-② is yes with no (narrowing) arm",
      "mcp_calls": "0",
      "api_writes": "2 — relay repository_dispatch pr_create (POST /repos/objectstack-ai/objectstack/pulls, PR #37194, read-back identical, assignee os-justin); post-stamped issue comment POST /repos/objectstack-ai/objectstack/issues/37053/comments (this os-dev-report)",
      "open_questions": [
        {
          "question": "A currency axis prints the compact default with the symbol (CN¥12K, ¥30万), not formatMeasure's full cell amount, which deviates from the dispatch's 'through formatMeasure' for the currency unit only. formatMeasure has no compact notation. Its amount (CN¥1,200,000.00) is wider than the 48 px value-axis band, and the leading symbol is the part that gets cut off. Keep the compact currency ticks?",
          "options": [
            "A: keep the compact currency ticks (this PR)",
            "B: formatMeasure's full amount plus a value-axis band sized from its widest tick. This touches the plot-width fit and the X_AXIS_ALL_LABELS_MAX_BUCKETS derivation, about +1 day with browser verification",
            "C: add a notation option to formatMeasure in @object-ui/core (outside this card's surface) and route the currency ticks through it compactly"
          ],
          "recommendation": "A, because it is the axis' existing amount convention, it fits the band in every locale measured, and it carries the same Intl symbol the table prints; C is the tidy follow-up if one formatter home is wanted"
        },
        {
          "question": "Test placement: the dispatch ordered new test files named for the card. AGENTS.md (ruling record 6583487846) puts a new pin for a component that has a shared harness file into that file as a top-level describe; the #37051 pin went into AdvancedChartImpl.axisLabels.test.tsx. This PR follows the dispatch. Move the chart pin into the axisLabels harness?",
          "options": [
            "A: keep the card-named files (this PR)",
            "B: move the chart describe into AdvancedChartImpl.axisLabels.test.tsx, a test-only edit"
          ],
          "recommendation": "A unless the seat reads axisLabels.test.tsx as the shared harness the ruling means; the package already holds dozens of card-named AdvancedChartImpl test files"
        }
      ],
      "security_findings": "none",
      "out_of_scope_findings": [
        "carrier: repo:objectstack#4 seat · noted, not filed — the static SDUI chart node's mirror ChartDataSeriesSchema (ui/packages/types, z.looseObject) does not refuse series[].measureFormat by name as it refuses aggregate, so an author writing it on a static chart node has it honoured; the spec's strict ChartSeriesSchema refuses it. A by-name refusal is a ui/packages/types edit, outside this card's surface. Dedupe words: measureFormat, ChartDataSeriesSchema, renderer-internal carrier, aggregate refusal",
        "carrier: none · noted in Acceptance notes only — measureFormatCarrier is written twice (report and dashboard producers) because its shared home, @object-ui/core beside buildChartSeries' aggregateOf, is outside the surface"
      ],
      "deviations": "(1) File surface read: 'the chart renderer's internal props type beside it' was read as NormalizedSeries plus normalizeSeries (normalizeChartSchema.ts) and the dataKey arm of ChartRendererProps (ChartRenderer.tsx), where the named precedent series[].aggregate lives. The pure helpers (sharedMeasureFormat, measureTickFormatter, compactTickFormatter's currency argument) sit in normalizeChartSchema.ts beside formatterFor. (2) The currency ticks are compact rather than formatMeasure's full amount; see open_questions[0]. (3) Two early runs of the three new test files were declared narrowed: they ran unlocked at --maxWorkers=1 while a sibling dogfood battery held the lock for more than 30 minutes. They failed to start (no spec dist). Every result cited above came from runs under the lock."
    }
  10. objectstack-fleet commented on Nov 25, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ

    Ruling recorded · 2026-11-25T04:45Z · the currency arm of PR #37194, put to the maintainer in seat repo:objectstack#4's session.

    • The question. Ruling B routes axis ticks through formatMeasure. For currency that premise fails: formatMeasure has no compact notation, so a full amount (CN¥1,200,000.00) overflows the 48px axis band and the currency symbol is the part that gets cut. The options were:
      • A: compact plus the currency symbol from the same Intl source (CN¥1.2M).
      • B: full amounts, with the band sized to the widest tick.
      • C: add a notation option to formatMeasure.
    • The maintainer's answer, verbatim: 「A」.
    • What follows:
  11. objectstack-fleet commented on Nov 25, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#4 · os-justin · session_01QSeKYmRepQK9DkZeU7F53D

    Delivered · area a4-U · 2026-11-25T06:12Z · PR #37194 merged as a386a1d8 (L1 ACCEPT 7154194178; maintainer ruling 7153146695 on the currency arm)

  12. removed
    pm:dispatched
    on Nov 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:uxdomain:uipriority:p2

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions