Add chart line styling and table column alignment options - #62
Conversation
Adds y.beginAtZero, y.curve/curves, y.dash/dashes and y.colors for line/area/combo charts, plus columns[].align for tables, across the model, JSON schema, validator, TS types and the renderer. Includes docs, skill updates and an example dashboard.
Prompt To Fix All With AI### Issue 1
pkg/dashboard/model.go:215
**Table alignment is never applied**
When a table column specifies `align`, YAML dashboards carry the value to the frontend but `TableWidget` ignores it, while JavaScript dashboard loading drops it entirely, causing headers and cells to retain their inferred alignment instead of the configured override.
### Issue 2
frontend/src/components/widgets/ChartWidget.tsx:1113-1116
**Combo styling bypasses new options**
When a combo chart configures `beginAtZero`, curve, dash, or color options, its separate rendering branch does not use these helpers or `yDomain`, causing the chart to remain auto-scaled with monotone, solid, palette-colored series.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Reviews (1): Last reviewed commit: "Add chart line styling and table column ..." | Re-trigger Greptile |
…s in the renderer
|
Reviews (2): Last reviewed commit: "Apply curve/dash/color/zero to combo cha..." | Re-trigger Greptile |
Replaces y.curves/y.dashes/y.colors with a single y.series map
({column: {color, curve, dash}}) and adds y.markers, across the model,
schema, validator, TS types, and Recharts renderer, plus docs, skills,
and the example dashboard.
Prompt To Fix All With AI### Issue 1
pkg/dashboard/model.go:215
**TSX loader drops table alignment**
When a TSX/JSX dashboard configures a table column with `align`, `asTableColumns` constructs the model without copying that property, causing the server to omit it and the frontend to use inferred alignment instead.
### Issue 2
frontend/src/components/widgets/ChartWidget.tsx:1413-1415
**Combo lines ignore marker settings**
When a sparse combo chart omits `y.markers` or explicitly enables it, this line hardcodes markers off instead of using the shared density-aware marker logic, causing all combo line points to remain hidden.
```suggestion
strokeWidth={1.5}
dot={dotFor(rows.length)}
isAnimationActive={false}
```
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Reviews (3): Last reviewed commit: "Group per-series chart style under y.ser..." | Re-trigger Greptile |
|
Reviews (4): Last reviewed commit: "Honor markers on combo lines; carry alig..." | Re-trigger Greptile |
|
Reviews (5): Last reviewed commit: "Carry per-series line style inline on y...." | Re-trigger Greptile |
|
Reviews (6): Last reviewed commit: "gofmt model.go" | Re-trigger Greptile |
|
Reviews (7): Last reviewed commit: "Show chart-wide curve/dash plus inline o..." | Re-trigger Greptile |
b23c410 to
6fbf19d
Compare
|
Reviews (8): Last reviewed commit: "Show grouped per-series overrides in the..." | Re-trigger Greptile |
6fbf19d to
04f4ff8
Compare
|
Reviews (9): Last reviewed commit: "Add per-series line styling via a widget..." | Re-trigger Greptile |
Per-series color/curve/dash overrides live in a widget-level `series` map (a sibling of `y`) keyed by y-column; `y.field` stays a plain column list. Covers the model, validator, TSX loader, JSON schema, React renderer, docs, and example.
04f4ff8 to
a39d6db
Compare
|
Reviews (10): Last reviewed commit: "Add per-series line styling via a widget..." | Re-trigger Greptile |
Adds per-series line styling to line/area/combo charts — curve, dash pattern, and colour, each with a chart-wide default plus a start-Y-at-zero toggle — and a per-column text alignment option for tables. Wired through the model, JSON schema, validator, TS types, and the renderer, with docs, skill updates, and an example dashboard.