Skip to content

chart-measure-unknown errors on report/list/page chart series[].name with a message that names an empty series — at the pin it is a display-name override that lands on nothing #15575

Description

@claude

Found while implementing #15463 (PR #15571). Out of scope there — that card names one rule id (chart-field-unknown, dashboard chartConfig), and this is a different id on different surfaces — but it is the same measurement, applied one rule over.

The claim

packages/lint/src/validate-chart-bindings.ts runs measureRef over series[].name for all three surfaces it covers (:231, fed by :258 for report charts and :346-:353 for list charts and dataset-bound page chart components). At error tier its message reads:

"NAME" is not a measure declared by dataset "DS". Post-ADR-0021 result rows are keyed by MEASURE NAME (e.g. "sum_amount"), not the base field (e.g. "amount"), so this series comes back empty.

Read at the @object-ui revision this repo pins (.objectui-sha = 00d3f09c500c4a45b5f27aca8af80349412faaf1), that consequence looks wrong for the series[].name position specifically, because the renderer does not build the series from it:

  • packages/plugin-report/src/DatasetReportRenderer.tsx imports mergeAuthoredSeries and says why, in its own words: "mergeAuthoredSeries — not mergeAuthoredPresentation — because a report's chart.xAxis/chart.yAxis are bare dimension/measure NAME strings, i.e. pure data on this surface". So xAxis/yAxis really are the query binding on a report, and error is right for those two positions.
  • chart.series[] is not. The same file describes it as "The author's per-chart override for ONE measure's display name — the entry of chart.series[] whose name IS that measure", matched by name against the derived series. An entry matching none is ignored, exactly as @object-ui/core src/utils/chart-presentation.ts states for the dashboard's copy: "an authored entry naming a measure that is NOT in the dataset selection is ignored — membership belongs to the dataset".

So a series[].name naming an undeclared measure does not empty a series; it is a display-name override that lands on nothing. That is the ignored-key class, not a broken query — which is precisely what #15463 measured for chart-field-unknown and what the maintainer ruling there resolved by dropping those positions to warning and rewording the message.

Why this is a card and not a patch

The tier is a product judgement, the same one #15463 put to the PM rather than deciding in a PR, and the answer may differ per surface. Three things need measuring per surface before anything moves:

  1. Report charts (report.chart, report.blocks[].chart) — the evidence above is direct, and xAxis/yAxis should clearly keep error.
  2. List-view charts (ListChartConfigSchema) — not yet read at the pin; the binding may genuinely be the query there.
  3. Dataset-bound page chart components — note :346-:353 merges axisRefs and seriesRefs into one series array before :231 walks it, so axis positions on that surface currently take the series limb's message. Whether that is deliberate or an accident of the shape is worth settling in the same pass.

Also worth deciding: whether chart-axis-not-selected (warning, :203, "the query does not return it, so the series plots nothing") needs the same wording pass at the series[].name position.

What to decide

  1. Leave all three surfaces at error and correct only the consequence sentence for the series[].name position.
  2. Follow chart-field-unknown errors on chartConfig binding keys the pinned renderer REFUSES — its message names a query failure that never happens #15463: drop series[].name to warning on whichever surfaces the pin shows the key is presentation-only, reword to the true consequence, and leave xAxis/yAxis at error.
  3. Something else the per-surface measurement suggests.

No recommendation offered — surfaces 2 and 3 have not been read at the pin, and #15463's lesson is that the tier follows the measurement rather than the other way round.

Filed unassigned and unlabeled for triage — not started, no branch. packages/lint/src/validate-widget-bindings.ts (the #15463 file) is NOT involved.


Generated by Claude Code

Activity

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions