Skip to content

A pivoted chart's drill title shows the raw series key, so an identity-keyed group's drawer reads [null] instead of its label #4682

Description

@yinlianghui

Measured while implementing #4673 (PR #4681), filed rather than widened into it — the fix it would need edits a region held by #4672.

What is wrong

DatasetWidget.handleChartDrill composes the drill drawer's title out of the click event's raw fields:

constpivoted=dimensions.length>=2&&values.length===1;consttitle=[ev?.category,pivoted ? ev?.series : undefined].filter(Boolean).map(String).join(' / ');

ev.series is a renderer dataKey, not a display label. For every ordinary group those are the same string, which is why this has read correctly so far. They are not the same string once a group keys by its IDENTITY rather than by its label.

After #4673 that is reachable: when two distinct second-dimension groups paint the same legend text — the null bucket beside a record whose stored value literally spells (None), which is #4508's collision 2 on the series axis — each group keys its column by chartBucketId. The drill then resolves to the correct rows (that is the whole point of the identity), but the drawer is titled

Backlog / [null]

where the user clicked a segment labelled (None).

Scope of the harm

Cosmetic and bounded: the records shown are the right records, and the case needs a stored value that spells the localized null-category label. It is filed because the title is the only place a user can check WHICH bucket they opened, and an opaque JSON id there is exactly the kind of thing that reads as a bug in the data rather than in the title.

Why it was not fixed in #4681

The honest fix is to carry the group's display label alongside its key — a seriesLabel on ChartSegmentClickEvent (@object-ui/core), written by AdvancedChartImpl's click handlers and read here instead of ev.series. buildChartSeries already computes that label; it is series[].label, and nothing currently forwards it.

That means editing AdvancedChartImpl.handleCartesianClick, which #4672 holds and is actively rewriting. Blocked-by: #4672.

Note that ev.series must keep being the KEY for the lookup itself — findChartSeriesRow resolves it through the same key assignment buildChartSeries made. Only the title should read the label.

Related: #4673, #4681, #4508, #4672.


Generated by Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions