@umriss-ui/charts 0.13.0 → 0.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -29,6 +29,106 @@ interface was still expected to move before `0.3.0`.
29
29
 
30
30
  ---
31
31
 
32
+ ## 0.15.0 – A chosen hit, a histogram, and zoom keys without a tooltip (Oct. 2026)
33
+
34
+ ### Changed
35
+
36
+ - **A chart with a zoomable x axis is one tab stop even without a
37
+ `<Tooltip>`** (ADR-0030). Its plot is `role="application"` with the role
38
+ description "chart" and takes the focus, so `+`, `-`, Shift+←/→ and `0`
39
+ reach a keyboard. There is no Active point to walk: the arrows without Shift
40
+ do nothing. After a zoom or pan key the polite live region reads the span in
41
+ view ("From 10 to 90."); the summary names the zoom keys and not the walk's.
42
+ A chart with a tooltip, and one with neither, are unchanged.
43
+ - **The summary names the labelled limits.** A chart with a `LimitLine` or
44
+ `LimitBand` that has a `label` adds "Limits: Objective 300 ms, Warning band
45
+ 250 ms – 300 ms." to the text the plot is described by - each value in its own
46
+ axis' format, a band's two edges as one value. A limit without a label is left
47
+ out; a chart without labelled limits reads as before. The wording has a new
48
+ entry, `limitList`, so a custom `ChartsWording` needs it.
49
+
50
+ ### Added
51
+
52
+ - **`bin()`**, the arithmetic behind a histogram: `bin(values, { width, count,
53
+ domain })`, or `bin(rows, value, options)`, returns rows with `from`, `to`,
54
+ the middle `x` and `count` for a `Bar` on a numeric x axis. The edges are on
55
+ the 1-2-5 grid of the ticks; a value on an edge falls into the bin that edge
56
+ starts, the last bin is closed, and what is not a finite number is skipped.
57
+ A given `domain` is taken as it is, and values outside it are left out.
58
+ Exports `Bin` and `BinOptions`. One example, "Count readings into a
59
+ histogram", on the Bar page.
60
+ - **`<Tooltip limits />`**, off by default: the built-in tooltip adds one row
61
+ per labelled limit of the hit's y axis, its label and value in that axis'
62
+ format, and what a key reads out says the same. One example on the Tooltip
63
+ page.
64
+ - **`onSelect`**, an option of `useChart(rows, { onSelect })`: a click or a tap
65
+ on a hit, and Enter on the Active point, call it with the hit - the
66
+ `TooltipHit` a custom tooltip's `render` receives, typed at the row. Once per
67
+ click; the end of a drag that pans does not report, a double click reports on
68
+ its first click and then resets the zoom as before. The chart holds no
69
+ selection and draws none: what is chosen is the application's state. It
70
+ needs a `<Tooltip>` for its hits (the development build warns without) and
71
+ the hit does not travel over `syncId`. Where it is given, the summary names
72
+ Enter; the wording has a new entry, `selectHelp`, so a custom
73
+ `ChartsWording` needs it. `ChartOptions` takes the row type as a parameter
74
+ (`ChartOptions<Z>`, default `unknown`). One example, "Choose a hit", on the
75
+ Tooltip page.
76
+
77
+ ---
78
+
79
+ ## 0.14.0 – A chart reads its rows as they come (Oct. 2026)
80
+
81
+ A chart takes rows as an application has them (ADR-0052). A category is a
82
+ value: `<XAxis value="costCentre" />` over rows that hold a name gives every
83
+ distinct one a place, a tick and its label - no position computed per row, no
84
+ `ticks` listed, no `tickFormat` that looks the name up. An instant is a value:
85
+ a `Date`, or with `time` the ISO string an API sends. Numeric positions with
86
+ named ticks keep working as they did; nothing is taken away.
87
+
88
+ ### Added
89
+
90
+ - **A category on the x axis.** `XAxis value` reads a string field or a
91
+ function returning a string.
92
+ - Every distinct category gets a place, in the order the rows first bring
93
+ them - the series in the order they are declared, a hidden one included.
94
+ - The category is its label: under the tick, in the tooltip, the keyboard
95
+ readout, the summary and the data table.
96
+ - The rows may come in any order; a hit and a `value` function's `index`
97
+ still name your row. A row without a category is left out.
98
+ - The type decides, never the content: `"2024"` is a category, `2024` a
99
+ number. One axis has one kind; DEV names a series that brings the other.
100
+ - Bars stand side by side and stack, a line stands on the middle of a
101
+ category, zoom works in places.
102
+ - **`categories` on `XAxis` and `YAxis`**: your own list, which is the order
103
+ and the extent. A category no row carries keeps its empty place; a row whose
104
+ category is not listed is not drawn, and DEV names it.
105
+ - **`categoryLabel` on `XAxis` and `YAxis`**: what is written for a category
106
+ where the rows hold a key and not a name. Two categories may share a label.
107
+ - **Categories along y.** `Matrix value` reads a string field, and the y axis
108
+ lists a row per category; the tooltip names a cell's row. `StateBand lane`
109
+ names the band's lane, a category of its y axis - instead of `laneFrom` and
110
+ `laneTo`, which stay for a numeric axis; the compiler refuses both at once.
111
+ The first category stands at the top. A series of numbers on a y axis that
112
+ has categories is not drawn: one axis has one kind.
113
+ - **A `Date` on the x axis** puts the axis in time without `time`.
114
+ - **ISO 8601 strings with `time`.** A date with a time and no offset is local
115
+ time, a date alone is UTC - the platform's rule. A string that is no instant
116
+ is not drawn, and DEV names its row.
117
+ - **A `Date` where you name a place in time**: a fixed `domain` pair on
118
+ `XAxis`, `value` on `LimitLine`, `from` and `to` on `LimitBand`.
119
+ - **Types**: `AxisValue`, `AxisField`, `OneLane`.
120
+
121
+ ### Changed
122
+
123
+ - **A category axis spans its places with half a step at either end**,
124
+ whatever stands on it. A line over categories therefore begins half a step
125
+ inside the plot, where a line over the positions 0, 1, 2 began at its edge.
126
+ Only an axis that reads categories is affected.
127
+ - **`tickFormat`, `ticks` and `tickCount` do not apply to an axis that reads
128
+ categories**; DEV says so. They keep their job on a numeric and a time axis.
129
+
130
+ ---
131
+
32
132
  ## 0.13.0 – A chart fills its frame, never below its floor (Oct. 2026)
33
133
 
34
134
  ### Changed
package/README.md CHANGED
@@ -66,8 +66,11 @@ the chart takes it away; a finger swiping over the chart scrolls the page.
66
66
 
67
67
  **By keyboard and screen reader**, a chart with a `<Tooltip>` is one tab stop:
68
68
  the arrows walk its values, ↑/↓ choose the series read first, and a screen
69
- reader hears each value once the keys rest and a summary of the whole. The
70
- words are English; German comes from its own subpath:
69
+ reader hears each value once the keys rest and a summary of the whole. A chart
70
+ with a zoomable x axis is one as well, without a tooltip: there is nothing to
71
+ walk, and plus, minus, Shift with an arrow and 0 zoom and pan it. `onSelect` on
72
+ `useChart` hears a click on a hit and Enter on the walked one; the chart keeps
73
+ no selection. The words are English; German comes from its own subpath:
71
74
 
72
75
  ```tsx
73
76
  import { GERMAN_CHARTS_WORDING } from "@umriss-ui/charts/wording/de";
@@ -97,6 +100,10 @@ loaded: Geist when the application has it, the system fonts otherwise.
97
100
  * **Seven series kinds** in one chart on shared axes: `Line`, `Area`, `Bar`,
98
101
  `BoxPlot`, `Scatter`, `StateBand`, `Matrix`. Occupancy — work on people or vehicles, idle time,
99
102
  double bookings — is `@umriss-ui/schedule`'s (ADR-0026).
103
+ * **Rows as they come** (ADR-0052): an axis reads a category from a string -
104
+ a place, a tick and its name each, in the rows' order or your own
105
+ `categories` - and an instant from a `Date` or, with `time`, from the ISO
106
+ string an API sends. No position computed per row, no tick list, no lookup.
100
107
  * **Several axes per orientation**, each with its own extent; only the first
101
108
  registered axis per orientation draws a grid.
102
109
  * **The chart holds its own view** (ADR-0047): an `XAxis zoomable` zooms and
@@ -110,8 +117,9 @@ loaded: Geist when the application has it, the system fonts otherwise.
110
117
  and dims a course already drawn, and where there is nothing yet a
111
118
  silhouette of the chart to come shimmers in the plot (ADR-0042).
112
119
  * **The instruments**: `LimitLine` and `LimitBand`, `ControlChart` with its four
113
- rule violations, `pareto()` with a collected remainder, and a working-time
114
- axis that takes the empty hours out and marks every removed span.
120
+ rule violations, `pareto()` with a collected remainder, `bin()` for a
121
+ histogram, and a working-time axis that takes the empty hours out and marks
122
+ every removed span. `<Tooltip limits />` reads the labelled limits at a hit.
115
123
  * **The pure modules are exported**, not hidden: `assess`, `controlLimits`,
116
124
  `zones`, `violations`, `pareto`, `workingCalendar` and the rest. Whoever
117
125
  wants to draw something other than the composition offers should reach the
@@ -122,7 +130,7 @@ loaded: Geist when the application has it, the system fonts otherwise.
122
130
  [`docs/capabilities.md`](docs/capabilities.md) under "Performance" — they are
123
131
  not repeated here, so that a new measurement has one place to go.
124
132
 
125
- What it deliberately cannot do — animations, a log or category scale,
133
+ What it deliberately cannot do — animations, a log or band scale,
126
134
  horizontal bars, pie and radar — stands in the same record, with the reason,
127
135
  and across all five packages in
128
136
  [ADR-0032](../../docs/adr/0032-what-umriss-is-not.md). Stacking is not among