Table aggregation, chart tooltips, and the calcs rename (0.10.0) - #9
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
BREAKING:
measures:is nowcalcs:,dashboard:is nowlayout:, and a chart'smeasure:iscalc:. The old names are not accepted — an existing dashboard must be updated.Charts
columns,measuresandsort: it groups and aggregates, or stays row-by-row whenmeasuresis 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.top,directionand an optionaly, plus a paged legend, an automatic time grain with a picker, and windowing for a long axis.Calcs
name/descriptionto 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.Fixes
anchor-nameon 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.calcs:block.Sample and docs
files/orders.csvregenerated 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.504 tests pass.