Skip to content
This repository was archived by the owner on Nov 4, 2026. It is now read-only.
This repository was archived by the owner on Nov 4, 2026. It is now read-only.

combo dashboard widgets render as grouped bars — DatasetWidget has no combo family and refuses to forward series/xAxis/yAxis on the dataset path #4229

Closed

Description

@huangyiirene

Symptom

A dashboard widget authoring a genuine combo chart:

chartConfig.series = [
  { name: 'task_count',   type: 'bar',  yAxis: 'left'  },
  { name: 'avg_progress', type: 'line', yAxis: 'right' },
]

plus two yAxis entries renders as two bar series on one shared 0–100 axis. Measured in the DOM:

Selector Observed Expected
.recharts-bar 2 1
.recharts-bar-rectangle 4 —
.recharts-line-curve 0 1
.recharts-yAxis 1 2

So the authored per-series type and the left/right axis split are both silently dropped: a bar-and-line dual-axis chart degrades into a grouped bar chart, and avg_progress (a 0–100 percentage) is plotted against the same axis as task_count (a raw count).

Reproduced 3× on independent fresh browser launches.

Not a stale-bundle artifact — verified against objectui origin/main, which is 138 commits ahead of the vendored pin (09987b68), and it behaves identically.

Root cause

Source-confirmed, and it is two halves, both in plugin-dashboard/src/DatasetWidget.tsx:

  1. No combo family. The widget resolves the chart family with CHART_TYPE_MAP[widgetType] ?? 'bar', and CHART_TYPE_MAP has no combo entry — so combo falls through to the 'bar' default. That alone explains bars-not-lines.
  2. The series are never forwarded. chartConfigPresentation() in the same file deliberately does not forward series / xAxis / yAxis on the ADR-0021 dataset path, on the stated grounds that "they are DERIVED from the dataset selection". So even with a combo entry added, the authored per-series type and axis binding could never reach the renderer.

The design tension this exposes (worth a decision before someone patches half of it)

widgetDispatch.ts on origin/main routes combo as a SERIES_CHART_TYPES member, commenting that "the chart renderer has always drawn it (it derives the base family from the series)".

That is exactly the contradiction: the dispatch layer's justification for combo needing no special handling is that the renderer derives the family from series — but on the dataset path series is precisely what DatasetWidget refuses to forward. The two halves of the codebase hold opposite beliefs about who owns series on the dataset path. Fixing only half (adding a CHART_TYPE_MAP.combo entry) yields a chart that is nominally a combo but still has no line and one axis; fixing only the other half (forwarding series) collides with the "derived from dataset selection" invariant. Please settle which layer owns it, then fix both sides consistently.

Untested caveat recorded in the same run

kpi / gauge / solid-gauge / bullet all render value-only — pixel-identical to metric. No dial, no arc, no bullet target band was drawn for any of them. This was recorded as an honest caveat, not ticked as passing and not separately reproduced; it may be the same "no entry in the family map" shape or may be four distinct gaps. Worth a look while this file is open.

The other 19 chart variants pass with mark counts reconciled against API buckets, and compareTo renders its comparison series correctly.

Reproduction

  1. Boot the showcase (framework a86db175, vendored console 09987b68).
  2. Open /_console/apps/com.example.showcase/dashboard/showcase_chart_gallery.
  3. Wait for the loader to appear then clear, and let the board settle.
  4. Inside the "Task Count vs Avg Progress" card (widget combo_count_vs_progress), count .recharts-bar, .recharts-bar-rectangle, .recharts-line-curve, .recharts-yAxis.
  5. Observe 2 / 4 / 0 / 1 against the expected 1 / — / 1 / 2. Reproduced 3×.

Re-check the two source halves:

rg -n "CHART_TYPE_MAP|chartConfigPresentation" plugin-dashboard/src/DatasetWidget.tsx
rg -n "SERIES_CHART_TYPES|combo" src/**/widgetDispatch.ts

Related

Possibly a regression of — or unfinished follow-through on — #2880 (closed completed by #2883, "ObjectChart honors the spec ChartConfig author shape"). That issue's S2 explicitly scoped dual axes as yAxis[].position + series[].yAxis: 'left'|'right', noting "combo 目前按 series 类型隐式分配,改为显式绑定优先" — the exact binding that is inert here. #2880 landed the normalisation in ObjectChart; the dataset path through DatasetWidget appears never to have been carried over, which is consistent with what this run measured.

Source

Extracted from the QA run objectstack-ai/objectstack#7515 (framework a86db175). Checklist item chart-type-matrix.

Activity

  1. self-assigned this
    on Aug 11, 2026
  2. yinlianghui commented on Aug 11, 2026

    @yinlianghui
    Contributor

    CLAIM + 代决 — session session_017Qqyix2QcnpUC9XeYVDzx3(objectui whole-repo PM seat;以产品长期稳定角度代决,否决窗口开放)。Branch: claude/issue-4229-combo-dataset-path。

    卡片要求先裁的问题——dataset 路径上 series 归谁——裁:数据归 dataset,呈现归作者(merge-forward),锚定 #2880/S2 已裁的显式绑定优先:

    1. "derived from the dataset selection" 不变量只正确地覆盖数据形状(哪些字段成为 series、行与桶),不覆盖呈现属性。per-series type、series[].yAxis: 'left'|'right'、yAxis[] 轴定义是作者意图,ObjectChart:兑现 ChartConfig 作者形状(type / xAxis.field / yAxis[].field / series[].name)与轴表现属性(framework#3701 对齐) #2880 已裁 ObjectChart 尊重它们;dataset 路径从未接续,正是本缺陷。
    2. 执行形状:dataset 路径继续推导 series 成员列表;作者 chartConfig 中按 name/key 匹配到推导 series 的呈现属性合并其上(显式绑定优先,ObjectChart:兑现 ChartConfig 作者形状(type / xAxis.field / yAxis[].field / series[].name)与轴表现属性(framework#3701 对齐) #2880 S2 延伸到 dataset 路径)。作者条目点名 dataset 选择之外的度量 ⇒ 忽略(成员归 dataset);推导出而作者未配的 series ⇒ 保持家族默认。轴(yAxis[] 双轴)与 xAxis 呈现属性同规则转发。
    3. CHART_TYPE_MAP 补 combo 条目,家族语义与 renderer 既有 combo(由 series 派生基族)一致。两半必须同 PR 一致落地——卡片已警告单修任一半都是坏状态。
    4. kpi/gauge/solid-gauge/bullet 的 caveat 不入本卡范围:趁文件打开做低成本测量并以 finding 记录(可能是同形状 map 缺口也可能是四个独立缺陷),不顺手修。

    Surface:plugin-dashboard/src/DatasetWidget.tsx(chartConfigPresentation + CHART_TYPE_MAP)+ 测试;ObjectChart / widgetDispatch 只读。无在飞持有者(#4273/#4275 已落,#4040 批次2 排除 plugin-dashboard)。


    Generated by Claude Code

  3. yinlianghui commented on Aug 11, 2026

    @yinlianghui
    Contributor

    ACCEPT — PM review of record (session session_017Qqyix2QcnpUC9XeYVDzx3)。

    PR #4298 按裁决(数据归 dataset、呈现归作者,merge-forward)落地,验收要点:

    Flipping ready + auto-merge。


    Generated by Claude Code

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions