Skip to content

Table aggregation, chart tooltips, and the calcs rename (0.10.0) - #9

Merged
dankor merged 1 commit into
mainfrom
improving-charts
Aug 20, 2026
Merged

dankor merged 1 commit into
mainfrom
improving-charts

Conversation

@dankor

@dankor dankor commented Aug 20, 2026

Copy link
Copy Markdown
Owner

BREAKING: measures: is now calcs:, dashboard: is now layout:, and a chart's measure: is calc:. The old names are not accepted — an existing dashboard must be updated.

Charts

  • Table gains columns, measures and sort: it groups and aggregates, or stays row-by-row when measures is empty. Measure cells and column headers carry the same hover card the other charts use, and clicking a row crossfilters on its whole combination of dimension values.
  • Bar gains top, direction and an optional y, plus a paged legend, an automatic time grain with a picker, and windowing for a long axis.
  • Pie gains a paged legend with clickable rows.

Calcs

  • A column calc may carry name/description to relabel a raw column wherever it is displayed, without renaming what the YAML refers to. This needed a rule change: a self-reference in a formula now means the dataset column.
  • str2dt() parses text dates, including timezone offsets.
  • A null grouping key is one group, not one row per measure.

Fixes

  • Chart tooltips anchor to real CSS boxes (an anchor-name on an SVG shape silently fails), are opaque and sized to their text, and clear the shape they describe. A stale duplicated block in bar/chart.css had been overriding the rebuilt bar tooltip entirely.
  • A chart that cannot render shows an error card instead of leaving the cell spinning forever — htmx only swaps a 2xx, so an exception was invisible.
  • An embedded table keeps its calcs through search and pagination; it re-renders its own cell rather than calling a route that cannot see the calcs: block.
  • A header's or separator's toolbar buttons are clickable again.

Sample and docs

  • files/orders.csv regenerated to 120 rows via a checked-in generator, shaped so the demo can show grain switching, legend paging, null groups and a row-level formula.
  • The starter dashboard is now a commented quick guide across three tabs.
  • New guards: chart CSS coherence (duplicate selectors, unbalanced braces, literal markup in comments) and route-level tests for the htmx wiring.

504 tests pass.

BREAKING: `measures:` is now `calcs:`, `dashboard:` is now `layout:`, and a
chart's `measure:` is `calc:`. The old names are not accepted — an existing
dashboard must be updated.

Charts
- Table gains `columns`, `measures` and `sort`: it groups and aggregates, or
  stays row-by-row when `measures` is empty. Measure cells and column headers
  carry the same hover card the other charts use, and clicking a row
  crossfilters on its whole combination of dimension values.
- Bar gains `top`, `direction` and an optional `y`, plus a paged legend, an
  automatic time grain with a picker, and windowing for a long axis.
- Pie gains a paged legend with clickable rows.

Calcs
- A column calc may carry `name`/`description` to relabel a raw column wherever
  it is displayed, without renaming what the YAML refers to. This needed a rule
  change: a self-reference in a formula now means the dataset column.
- `str2dt()` parses text dates, including timezone offsets.
- A null grouping key is one group, not one row per measure.

Fixes
- Chart tooltips anchor to real CSS boxes (an `anchor-name` on an SVG shape
  silently fails), are opaque and sized to their text, and clear the shape they
  describe. A stale duplicated block in bar/chart.css had been overriding the
  rebuilt bar tooltip entirely.
- A chart that cannot render shows an error card instead of leaving the cell
  spinning forever — htmx only swaps a 2xx, so an exception was invisible.
- An embedded table keeps its calcs through search and pagination; it re-renders
  its own cell rather than calling a route that cannot see the `calcs:` block.
- A header's or separator's toolbar buttons are clickable again.

Sample and docs
- `files/orders.csv` regenerated to 120 rows via a checked-in generator, shaped
  so the demo can show grain switching, legend paging, null groups and a
  row-level formula.
- The starter dashboard is now a commented quick guide across three tabs.
- New guards: chart CSS coherence (duplicate selectors, unbalanced braces,
  literal markup in comments) and route-level tests for the htmx wiring.

504 tests pass.
@dankor
dankor merged commit d74c5d9 into main Aug 20, 2026
2 checks passed
@dankor
dankor deleted the improving-charts branch August 20, 2026 23:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant