@umriss-ui/charts 0.14.0 → 0.16.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,74 @@ interface was still expected to move before `0.3.0`.
29
29
 
30
30
  ---
31
31
 
32
+ ## 0.16.0 – A stack's total in the data table (Oct. 2026)
33
+
34
+ ### Added
35
+
36
+ - **The unit tests run against React 18.3.1 and 19 in CI**, and the charts are rendered to a string in a test (`tests-unit/ssr.test.tsx`).
37
+
38
+ - **A stack's total in the data table.** The table of a stacked chart ends each
39
+ stack's members with a "Total" column (German "Summe"): the sum of the
40
+ stack's members at the row's x, written as the tooltip writes it - a
41
+ normalised stack's members show their shares and its total the sum of the
42
+ readings. A hidden member is out of the total. The charts demo shows it on
43
+ the Tooltip page, "Read a stack's total in the table".
44
+
45
+ ### Changed
46
+
47
+ - **Every entry begins with `"use client";`.** The built files `dist/charts.js` and `dist/wording/de.js` start with the directive, then the stylesheet import, so a bundler that splits server from client code takes each as client code. The directive is written to the built entries only; the sources are unchanged.
48
+
49
+ - **Every export is a client component.** A hook called in a Server Component now fails with React's message about a client reference, not one about `useState`.
50
+
51
+ ---
52
+
53
+ ## 0.15.0 – A chosen hit, a histogram, and zoom keys without a tooltip (Oct. 2026)
54
+
55
+ ### Changed
56
+
57
+ - **A chart with a zoomable x axis is one tab stop even without a
58
+ `<Tooltip>`** (ADR-0030). Its plot is `role="application"` with the role
59
+ description "chart" and takes the focus, so `+`, `-`, Shift+←/→ and `0`
60
+ reach a keyboard. There is no Active point to walk: the arrows without Shift
61
+ do nothing. After a zoom or pan key the polite live region reads the span in
62
+ view ("From 10 to 90."); the summary names the zoom keys and not the walk's.
63
+ A chart with a tooltip, and one with neither, are unchanged.
64
+ - **The summary names the labelled limits.** A chart with a `LimitLine` or
65
+ `LimitBand` that has a `label` adds "Limits: Objective 300 ms, Warning band
66
+ 250 ms – 300 ms." to the text the plot is described by - each value in its own
67
+ axis' format, a band's two edges as one value. A limit without a label is left
68
+ out; a chart without labelled limits reads as before. The wording has a new
69
+ entry, `limitList`, so a custom `ChartsWording` needs it.
70
+
71
+ ### Added
72
+
73
+ - **`bin()`**, the arithmetic behind a histogram: `bin(values, { width, count,
74
+ domain })`, or `bin(rows, value, options)`, returns rows with `from`, `to`,
75
+ the middle `x` and `count` for a `Bar` on a numeric x axis. The edges are on
76
+ the 1-2-5 grid of the ticks; a value on an edge falls into the bin that edge
77
+ starts, the last bin is closed, and what is not a finite number is skipped.
78
+ A given `domain` is taken as it is, and values outside it are left out.
79
+ Exports `Bin` and `BinOptions`. One example, "Count readings into a
80
+ histogram", on the Bar page.
81
+ - **`<Tooltip limits />`**, off by default: the built-in tooltip adds one row
82
+ per labelled limit of the hit's y axis, its label and value in that axis'
83
+ format, and what a key reads out says the same. One example on the Tooltip
84
+ page.
85
+ - **`onSelect`**, an option of `useChart(rows, { onSelect })`: a click or a tap
86
+ on a hit, and Enter on the Active point, call it with the hit - the
87
+ `TooltipHit` a custom tooltip's `render` receives, typed at the row. Once per
88
+ click; the end of a drag that pans does not report, a double click reports on
89
+ its first click and then resets the zoom as before. The chart holds no
90
+ selection and draws none: what is chosen is the application's state. It
91
+ needs a `<Tooltip>` for its hits (the development build warns without) and
92
+ the hit does not travel over `syncId`. Where it is given, the summary names
93
+ Enter; the wording has a new entry, `selectHelp`, so a custom
94
+ `ChartsWording` needs it. `ChartOptions` takes the row type as a parameter
95
+ (`ChartOptions<Z>`, default `unknown`). One example, "Choose a hit", on the
96
+ Tooltip page.
97
+
98
+ ---
99
+
32
100
  ## 0.14.0 – A chart reads its rows as they come (Oct. 2026)
33
101
 
34
102
  A chart takes rows as an application has them (ADR-0052). A category is a
package/README.md CHANGED
@@ -16,10 +16,15 @@ lint rule over `packages/charts/src/**` holds that fast.
16
16
  pnpm add @umriss-ui/charts
17
17
  ```
18
18
 
19
- React 18 or 19 as a peer, and nothing else. `@umriss-ui/core` is **not** a
19
+ React 18 or 19 as a peer, and nothing else; the unit tests run against 18.3 and
20
+ 19 in CI. `@umriss-ui/core` is **not** a
20
21
  dependency and not a peer dependency — if an application uses both packages, it
21
22
  does so because it chose to, not because this one required it (ADR-0020).
22
23
 
24
+ Every entry, `./wording/de` included, begins with `"use client"`, the directive a framework
25
+ with Server Components reads to treat a module as client code. No test runs
26
+ inside such a framework: the charts are rendered to a string in a test.
27
+
23
28
  ## The smallest chart that runs
24
29
 
25
30
  ```tsx
@@ -66,8 +71,11 @@ the chart takes it away; a finger swiping over the chart scrolls the page.
66
71
 
67
72
  **By keyboard and screen reader**, a chart with a `<Tooltip>` is one tab stop:
68
73
  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:
74
+ reader hears each value once the keys rest and a summary of the whole. A chart
75
+ with a zoomable x axis is one as well, without a tooltip: there is nothing to
76
+ walk, and plus, minus, Shift with an arrow and 0 zoom and pan it. `onSelect` on
77
+ `useChart` hears a click on a hit and Enter on the walked one; the chart keeps
78
+ no selection. The words are English; German comes from its own subpath:
71
79
 
72
80
  ```tsx
73
81
  import { GERMAN_CHARTS_WORDING } from "@umriss-ui/charts/wording/de";
@@ -114,8 +122,9 @@ loaded: Geist when the application has it, the system fonts otherwise.
114
122
  and dims a course already drawn, and where there is nothing yet a
115
123
  silhouette of the chart to come shimmers in the plot (ADR-0042).
116
124
  * **The instruments**: `LimitLine` and `LimitBand`, `ControlChart` with its four
117
- rule violations, `pareto()` with a collected remainder, and a working-time
118
- axis that takes the empty hours out and marks every removed span.
125
+ rule violations, `pareto()` with a collected remainder, `bin()` for a
126
+ histogram, and a working-time axis that takes the empty hours out and marks
127
+ every removed span. `<Tooltip limits />` reads the labelled limits at a hit.
119
128
  * **The pure modules are exported**, not hidden: `assess`, `controlLimits`,
120
129
  `zones`, `violations`, `pareto`, `workingCalendar` and the rest. Whoever
121
130
  wants to draw something other than the composition offers should reach the
@@ -126,11 +135,12 @@ loaded: Geist when the application has it, the system fonts otherwise.
126
135
  [`docs/capabilities.md`](docs/capabilities.md) under "Performance" — they are
127
136
  not repeated here, so that a new measurement has one place to go.
128
137
 
129
- What it deliberately cannot do — animations, a log or band scale,
130
- horizontal bars, pie and radar — stands in the same record, with the reason,
138
+ What it deliberately cannot do — animations, a log scale, pie, donut and
139
+ radar — stands in the same record, with the reason,
131
140
  and across all five packages in
132
141
  [ADR-0032](../../docs/adr/0032-what-umriss-is-not.md). Stacking is not among
133
- them: bars and areas stack (`stack`, `normalize`).
142
+ them: bars and areas stack (`stack`, `normalize`). Horizontal bars are the
143
+ next kind to come (ADR-0059).
134
144
 
135
145
  ## More
136
146