@umriss-ui/charts 0.15.0 → 0.34.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 +43 -3
- package/README.md +18 -8
- package/dist/charts.js +4415 -4309
- package/dist/de.d.ts +8 -5
- package/dist/index.d.ts +76 -195
- package/dist/wording/de.js +2 -0
- package/docs/llms-full.md +120 -218
- package/package.json +4 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
# Changes to `@umriss-ui/charts`
|
|
2
2
|
|
|
3
3
|
This document describes what changes for **callers** of the package: exports,
|
|
4
|
-
props, behaviour.
|
|
5
|
-
decisions that are invisible from outside — stands in the repository's journal
|
|
6
|
-
(`docs/journal.md`) and in the specs under `.scratch/`.
|
|
4
|
+
props, behaviour.
|
|
7
5
|
|
|
8
6
|
**The numbers.** The middle digit rises when something is added; the last one
|
|
9
7
|
when something is repaired. As long as the first digit is `0`, no number
|
|
@@ -12,6 +10,8 @@ well: **whatever changes existing behaviour stands under a heading "Changed" of
|
|
|
12
10
|
its own**, no matter which digit rose. Whoever reads only one section before an
|
|
13
11
|
upgrade reads that one.
|
|
14
12
|
|
|
13
|
+
From 0.34.0 all five packages share one number: they are released together, and a package without a change of its own still gets a heading for it.
|
|
14
|
+
|
|
15
15
|
**Names read forwards.** Where an entry describes a name that has since been
|
|
16
16
|
renamed, it is named here as it is called today; names that were removed stand
|
|
17
17
|
as they stood.
|
|
@@ -29,6 +29,46 @@ interface was still expected to move before `0.3.0`.
|
|
|
29
29
|
|
|
30
30
|
---
|
|
31
31
|
|
|
32
|
+
## 0.34.0 – A view is set, not handed back, and one locale (Oct. 2026)
|
|
33
|
+
|
|
34
|
+
From this version all five packages carry one number and are released
|
|
35
|
+
together.
|
|
36
|
+
|
|
37
|
+
### Changed
|
|
38
|
+
|
|
39
|
+
- **Numbers, dates and times follow the wording, not the browser.** Numbers used to be formatted in `navigator.language` and time labels were fixed `en-GB`, so a German browser showed `1.204,5` on an axis under a core `Stat` reading `1,204.5`, and a German application got English month names. The wording now carries the locale as a new field `locale` - `"en-GB"` by default, `"de-DE"` in `@umriss-ui/charts/wording/de` - and every number, date and time the chart formats (ticks, tooltip, data table, what a screen reader hears) follows it. A partial wording without `locale` keeps the default; a `tickFormat` or `format` of your own still wins; the clock stays 24-hour. An application that relied on the browser's language for its numbers passes the German wording, or a wording with its own `locale`.
|
|
40
|
+
|
|
41
|
+
- **`initialView` is read once, and `setView` is new.** A different `initialView` on a later render is now ignored, as React ignores a changed `defaultValue`; it used to be applied whenever its content differed from the last one handed in. To go to a view later, call the new `setView(view)` that `useChart` returns: it applies a whole view, and what the view leaves out is shown whole again. `setView` is not reported through `onViewChange`, which reports what the reader did, so two charts kept in step by `onViewChange: (v) => other.setView(v)` in both directions do not answer each other. A caller that kept the reported view in state and handed it back as `initialView` writes `setView` instead: restoring a kept view is `setView(kept)`, and the state that mirrors the chart's view becomes `view` from the hook. `Echoes`, the rule that told a view reported and handed back late from one handed in, is no longer exported.
|
|
42
|
+
|
|
43
|
+
- **Ten exports and one dead member are gone.** `ruleOutlier`, `ruleRun`, `ruleTrend`, `ruleTwoOfThree`, `sigmaFromLimit`, `defaultRules`, `paretoDefaults`, `toWorkingTime`, `mapSeries` and `workingTicks` are no longer exported from the package; nothing in the library or its documentation asked a caller to import them. `ControlChart`'s `rules` prop is unchanged and still takes a `Partial<RuleOptions>`. The static `ChartScene.classTick` is removed as well. `workingCalendar`, `calendarFrom`, `toWallClock` and the other working-time helpers stay.
|
|
44
|
+
|
|
45
|
+
### Fixed
|
|
46
|
+
|
|
47
|
+
- **A bound without a finite value is no bound.** A limit of `Infinity` on the lower side, or `-Infinity` on the upper, counted as violated by every value; `@umriss-ui/core` already ignored such a bound, and the two now agree.
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## 0.16.0 – A stack's total in the data table (Oct. 2026)
|
|
52
|
+
|
|
53
|
+
### Added
|
|
54
|
+
|
|
55
|
+
- **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`).
|
|
56
|
+
|
|
57
|
+
- **A stack's total in the data table.** The table of a stacked chart ends each
|
|
58
|
+
stack's members with a "Total" column (German "Summe"): the sum of the
|
|
59
|
+
stack's members at the row's x, written as the tooltip writes it - a
|
|
60
|
+
normalised stack's members show their shares and its total the sum of the
|
|
61
|
+
readings. A hidden member is out of the total. The charts demo shows it on
|
|
62
|
+
the Tooltip page, "Read a stack's total in the table".
|
|
63
|
+
|
|
64
|
+
### Changed
|
|
65
|
+
|
|
66
|
+
- **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.
|
|
67
|
+
|
|
68
|
+
- **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`.
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
32
72
|
## 0.15.0 – A chosen hit, a histogram, and zoom keys without a tooltip (Oct. 2026)
|
|
33
73
|
|
|
34
74
|
### Changed
|
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
|
|
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
|
|
@@ -70,7 +75,10 @@ reader hears each value once the keys rest and a summary of the whole. A chart
|
|
|
70
75
|
with a zoomable x axis is one as well, without a tooltip: there is nothing to
|
|
71
76
|
walk, and plus, minus, Shift with an arrow and 0 zoom and pan it. `onSelect` on
|
|
72
77
|
`useChart` hears a click on a hit and Enter on the walked one; the chart keeps
|
|
73
|
-
no selection. The words
|
|
78
|
+
no selection. The words, and with them the numbers and the dates and times of the
|
|
79
|
+
axes, tooltip, data table and screen-reader text, are English (`en-GB`, 24-hour
|
|
80
|
+
clock); German (`de-DE`) comes from its own subpath. The `locale` of the
|
|
81
|
+
wording is the one input - the browser's language is not read:
|
|
74
82
|
|
|
75
83
|
```tsx
|
|
76
84
|
import { GERMAN_CHARTS_WORDING } from "@umriss-ui/charts/wording/de";
|
|
@@ -110,9 +118,10 @@ loaded: Geist when the application has it, the system fonts otherwise.
|
|
|
110
118
|
pans by wheel, pinch, drag and keys within its `zoomLimits`, and a 'Show
|
|
111
119
|
all' button brings the whole back; the legend hides and shows a series on a
|
|
112
120
|
click and shows only it on a double click. `useChart(rows, { initialView,
|
|
113
|
-
onViewChange })` takes a start and reports
|
|
114
|
-
view - charts in step
|
|
115
|
-
`
|
|
121
|
+
onViewChange })` takes a start, read once, and reports what the reader does,
|
|
122
|
+
always the whole view - charts in step send each other theirs through
|
|
123
|
+
`setView`, which is not reported; `setDomain`, `toggleSeries`, `showOnly`
|
|
124
|
+
and `showAllSeries` stand on what the hook hands back.
|
|
116
125
|
* **A chart that is loading says so**, as the table does: `loading` keeps
|
|
117
126
|
and dims a course already drawn, and where there is nothing yet a
|
|
118
127
|
silhouette of the chart to come shimmers in the plot (ADR-0042).
|
|
@@ -130,11 +139,12 @@ loaded: Geist when the application has it, the system fonts otherwise.
|
|
|
130
139
|
[`docs/capabilities.md`](docs/capabilities.md) under "Performance" — they are
|
|
131
140
|
not repeated here, so that a new measurement has one place to go.
|
|
132
141
|
|
|
133
|
-
What it deliberately cannot do — animations, a log
|
|
134
|
-
|
|
142
|
+
What it deliberately cannot do — animations, a log scale, pie, donut and
|
|
143
|
+
radar — stands in the same record, with the reason,
|
|
135
144
|
and across all five packages in
|
|
136
145
|
[ADR-0032](../../docs/adr/0032-what-umriss-is-not.md). Stacking is not among
|
|
137
|
-
them: bars and areas stack (`stack`, `normalize`).
|
|
146
|
+
them: bars and areas stack (`stack`, `normalize`). Horizontal bars are the
|
|
147
|
+
next kind to come (ADR-0059).
|
|
138
148
|
|
|
139
149
|
## More
|
|
140
150
|
|