Skip to content

finding(plugin-charts): an all-boolean scatter coordinate draws nothing and says nothing — deliberately left unguarded by objectui#7171, because whether a boolean plots depends on its neighbours #7195

Description

@os-warren

Measured while implementing objectui#7171 (PR to follow). Recorded rather than fixed there, with the reasoning below — the residual hole is real, and its answer is almost certainly not in the renderer.

The two readings

packages/plugin-charts/src/AdvancedChartImpl.tsx, scatter arm. Both axes are type="number".

dataset marks drawn
[{xm: true, ym: 40}, {xm: false, ym: 25}] — every x boolean 0 of 2
[{xm: 10, ym: 40}, {xm: true, ym: 25}, {xm: false, ym: 60}] — one real number among them 3 of 3

Recharts needs one genuinely numeric value to build the scale, and then coerces the booleans onto it. So whether a boolean coordinate plots is a property of the OTHER rows, not of the value.

Why objectui#7171 does not guard it

That card ships no-plottable-points / unplotted-points on an authoring-side predicate. Rejecting booleans was in the first draft — the all-boolean tile had been measured drawing 0 of 2 marks in the browser sweep and looked like a sibling of null. Pinning it turned the mixed case RED, which is how the second reading above was found.

Rejecting booleans would give the all-boolean tile a correct refusal, and give the mixed tile a footnote reading "2 of 3 rows ... are not drawn" over three points visibly on screen. A false sentence about the picture is worse than the silence, by the same reasoning that decided the copy in objectui#7146 and objectui#7147, so the predicate accepts booleans and the all-boolean case stays exactly as silent as it is today. Not a regression — a narrow hole that predates the card.

Where the answer probably belongs

Upstream, at authoring time: a boolean column bound to a numeric measure is a metadata error, and refusing it where the binding is declared is both earlier and more specific than anything the renderer can say. That makes this a spec/authoring question rather than a chart one, which is why it is filed separately rather than ridden on the renderer PR.

Scope

Narrow. It needs a boolean column bound to a scatter axis and EVERY row boolean. No dataset in the sweep produced it accidentally.

Related

objectui#7171 (the sweep) · objectui#7147 / PR objectui#7169 · objectui#7146.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    domain:uiobjectui ui stream: fix lands on the published library or apps — objectui execution seatfindingpm:queuepriority:p3

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions