Skip to content

A report chart derives neither the dimension's option COLOURS nor its declared category order — the same dimension on a dashboard chart gets both #4906

Description

@yinlianghui

Summary

DatasetReportChart (packages/plugin-report/src/DatasetReportRenderer.tsx) resolves its dimension's option labelsuseDatasetDimensionLabelsrelabelDimensions — but nothing else the dashboard derives from the same field metadata. Two chart props the dashboard computes and the report does not:

  • categoryColorsbuildOptionColorMap over the category dimension's select/lookup options, so a health dimension paints its own green/amber/red. The report chart forwards only an author-supplied colors record (added by objectui#4877); with none authored it falls to the positional palette.
  • categoryOrderbuildCategoryOrder over the field's declared picklist order (framework#3588), which is what makes a funnel read as the authored pipeline rather than value-descending.

Both helpers already live in @object-ui/core and are called by DatasetWidget; the report path calls neither.

Measured

Grep over packages/plugin-report/src/ for buildOptionColorMap|buildCategoryOrder|categoryColors|categoryOrder returns no hit in any source file (only a test asserting the authored-colors split of objectui#4877). DatasetWidget.tsx passes both onto its chart schema.

Why this is filed as an observation, not a defect

Nothing renders wrong today: the chart draws, the numbers are right, and every category is distinguishable — the palette is positional instead of semantic, and a funnel's stages sort by value instead of by declared order. It is cross-surface drift, visible only when the same dataset dimension is put on a dashboard and in a report side by side. Filed plainly rather than sat on, and left for triage to grade.

Found while

Implementing objectui#4877 / objectui#4878, which routed this same forwarding line through buildChartSeries and chartConfigPresentation. Deliberately out of both cards' scope: neither asks for a new derivation, and adding one would have widened a fix into a feature.

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