You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 4, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Nov 4, 2026. It is now read-only.
Dataset chart: visualise the second dimension as grouped series (multi-dim charts) #1759
Dataset-bound chart rendering (introduced in #1757 / objectstack-ai/objectstack#1890) only honours the first dimension. When a chart's dataset selects two dimensions (e.g. dimensions: ['status', 'priority']), queryDataset correctly returns the full status × priority grouping, but the renderer maps xAxisKey = dimensions[0] and series = values, so:
the X axis repeats the first-dimension label once per second-dimension bucket (e.g. Backlog, Backlog, Done, Done, …), and
the second dimension is not visualised at all — no per-priority colour/group/legend.
The data is all there; the second dimension is just invisible. This is a pre-existing limitation of the dashboard DatasetWidget that the chart-view renderer (ObjectChart) inherited.
Proposed fix
When dimensions.length >= 2 (and a single measure), pivot the long-format result into wide-format and derive one series per second-dimension value:
xAxisKey = dimensions[0]
series = distinct values of dimensions[1] (one coloured/grouped bar series each)
cell value = values[0]
Apply consistently in bothObjectChart (plugin-charts) and DatasetWidget (plugin-dashboard) — ideally via a shared buildChartSeries(rows, dimensions, values, fields) helper so numbers/labels stay identical across surfaces.
Edge cases to define: 2 dims + N measures (ambiguous — fall back to measures-as-series on dim0), >2 dims (use first two), missing second-dim buckets (zero-fill).
Verification
showcase Task → "Hours by Status (Chart)" (dimensions: ['status','priority']) should render grouped/coloured bars by priority with a priority legend.
Activity
feat(chart): grouped series for multi-dimension dataset charts (#1759) (