Found while implementing #7402 (scatter joins the compareTo-ignoring list). Filed unassigned, not fixed there — out of that card's declared scope.
The divergence
There are now two declarations of "which chart families ignore compareTo", and they do not agree:
| site | list | effect |
|---|
packages/plugin-charts/src/ObjectChart.tsx — supportsCompareTo | pie · donut · funnel · scatter (scatter added by #7402) | skips the comparison fetch entirely; no __comparison column, no overlay series |
packages/plugin-dashboard/src/DatasetWidget.tsx — comparisonSeries | scatter only (added by #7402) | pie / donut / funnel still forward compareTo to the executor, still receive MEASURE__compare columns, and still get a variant: 'comparison' series appended |
What actually happens on the dashboard path today
A type: 'pie' (or donut / funnel) dataset widget with compareTo:
- lowers the comparison window and runs the extra dataset query — real work on the server;
- gets
MEASURE__compare columns back; - appends a second series
{ dataKey: 'MEASURE__compare', variant: 'comparison' } to the chart schema; - the renderer drops it — the pie arm (
AdvancedChartImpl.tsx, chartType === 'pie' || chartType === 'donut') draws series[0]?.dataKey and nothing else.
So the published statement ("pie / donut / funnel ignore compareTo") holds visually, but only because the renderer happens to look at one series. The cost is a doubled dataset query per compare-to pie widget plus a synthesised series nothing consumes, and the two lists are free to drift further apart.
Suggested direction (not a ruling)
Host ONE predicate both paths read. @object-ui/core's chart-presentation is the precedent home: buildChartSeries / mergeAuthoredPresentation were lifted there for exactly this reason (see that module's header — a second copy of the split beside it is what objectui#4389 filed as a defect), and both packages already depend on @object-ui/core at runtime, while @object-ui/plugin-charts is only a devDependency of plugin-dashboard, so the dashboard cannot import the predicate from where it lives today.
⚠️ Landing that would change dashboard behaviour for pie / donut / funnel (the comparison query stops running) — a behaviour statement change, so it wants its own decision, which is why #7402 deliberately did not do it.
Reachability
compareTo on a pie/donut/funnel dataset widget: 0 authored instances in-repo (grep over examples/**/*.json finds no compareTo at all; control "type": "bar" fires at 5 example files). Incidence in cloud tenant metadata is unmeasurable from here.
Related
#7402 (the scatter exclusion that created the second list) · #7194 · objectui#4389 (the precedent that duplicate chart-presentation logic is a defect)
Found while implementing #7402 (scatter joins the
compareTo-ignoring list). Filed unassigned, not fixed there — out of that card's declared scope.The divergence
There are now two declarations of "which chart families ignore
compareTo", and they do not agree:packages/plugin-charts/src/ObjectChart.tsx—supportsCompareTo__comparisoncolumn, no overlay seriespackages/plugin-dashboard/src/DatasetWidget.tsx—comparisonSeriescompareToto the executor, still receiveMEASURE__comparecolumns, and still get avariant: 'comparison'series appendedWhat actually happens on the dashboard path today
A
type: 'pie'(ordonut/funnel) dataset widget withcompareTo:MEASURE__comparecolumns back;{ dataKey: 'MEASURE__compare', variant: 'comparison' }to the chart schema;AdvancedChartImpl.tsx,chartType === 'pie' || chartType === 'donut') drawsseries[0]?.dataKeyand nothing else.So the published statement ("pie / donut / funnel ignore
compareTo") holds visually, but only because the renderer happens to look at one series. The cost is a doubled dataset query per compare-to pie widget plus a synthesised series nothing consumes, and the two lists are free to drift further apart.Suggested direction (not a ruling)
Host ONE predicate both paths read.
@object-ui/core'schart-presentationis the precedent home:buildChartSeries/mergeAuthoredPresentationwere lifted there for exactly this reason (see that module's header — a second copy of the split beside it is what objectui#4389 filed as a defect), and both packages already depend on@object-ui/coreat runtime, while@object-ui/plugin-chartsis only a devDependency ofplugin-dashboard, so the dashboard cannot import the predicate from where it lives today.Reachability
compareToon a pie/donut/funnel dataset widget: 0 authored instances in-repo (grepoverexamples/**/*.jsonfinds nocompareToat all; control"type": "bar"fires at 5 example files). Incidence in cloud tenant metadata is unmeasurable from here.Related
#7402 (the scatter exclusion that created the second list) · #7194 · objectui#4389 (the precedent that duplicate chart-presentation logic is a defect)