@umriss-ui/charts 0.47.1 → 0.49.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/dist/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import { CSSProperties } from 'react';
2
2
  import { HTMLAttributes } from 'react';
3
+ import { JSX } from 'react';
3
4
  import { ReactNode } from 'react';
4
5
  import { Ref } from 'react';
5
6
 
@@ -653,6 +654,17 @@ export declare interface ChartsWording {
653
654
  levelRange: (from: string, to: string) => string;
654
655
  }
655
656
 
657
+ /** Sets the wording of every chart below it, also one inside another package's widget. */
658
+ export declare function ChartsWordingProvider({ wording, children }: ChartsWordingProviderProps): JSX.Element;
659
+
660
+ /** The props of `ChartsWordingProvider`. */
661
+ export declare interface ChartsWordingProviderProps {
662
+ /** Entries left out stay English. German: `GERMAN_CHARTS_WORDING` from
663
+ `@umriss-ui/charts/wording/de`. A chart's own `wording` wins over it. */
664
+ wording: Partial<ChartsWording>;
665
+ children?: ReactNode;
666
+ }
667
+
656
668
  /** How a reader is looking at a chart. Whatever is at its default is absent. */
657
669
  export declare interface ChartView {
658
670
  /** The span each zoomable x axis shows, by axis `id` - a lone x axis is
package/docs/llms-full.md CHANGED
@@ -1,4 +1,4 @@
1
- # @umriss-ui/charts 0.47.1
1
+ # @umriss-ui/charts 0.49.0
2
2
 
3
3
  > React canvas chart library for data-dense dashboards - line, area, bar, box plot, scatter, control and Pareto charts. Few chart kinds, drawn well, fast.
4
4
 
@@ -1061,7 +1061,7 @@ A chart takes its container's width and follows it; give it a `height` (300 px w
1061
1061
 
1062
1062
  An instant is a `Date`, milliseconds since 1970, or - where the x axis says `time` - the ISO string an API sends ([ADR-0052](https://github.com/romanhaendler/umriss-ui/blob/main/docs/adr/0052-a-chart-reads-its-rows-as-they-come.md)). On a time axis the ticks stand on the viewer's local clock, so a day begins at local midnight. The words are English; German comes from `@umriss-ui/charts/wording/de`.
1063
1063
 
1064
- The charts take German per chart: `wording={GERMAN_CHARTS_WORDING}` from `@umriss-ui/charts/wording/de`, as [the keyboard and screen reader example](#chart-1) shows. They read no language provider, so this demo has no EN/DE switch in its header.
1064
+ The charts take German per chart: `wording={GERMAN_CHARTS_WORDING}` from `@umriss-ui/charts/wording/de`, as [the keyboard and screen reader example](#chart-1) shows - or for the whole application from one `ChartsWordingProvider` at the root (`<ChartsWordingProvider wording={GERMAN_CHARTS_WORDING}>`), a chart inside a dashboard widget included; a chart's own `wording` prop still wins. Charts read no provider of core's, so an application with both packages sets both. This demo has no EN/DE switch in its header.
1065
1065
 
1066
1066
  #### Examples
1067
1067
 
@@ -2407,9 +2407,9 @@ Measurements of the instrumentation for the benchmark page.
2407
2407
  #### Known limits
2408
2408
 
2409
2409
  - No error state of its own: where the rows could not be loaded, show an `Alert` from @umriss-ui/core. Waiting for them is `loading`.
2410
- - No pie, donut, radar or candlestick, no smoothing, animation or export, no WebGL ([ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/charts-v0.47.1/docs/adr/0032-what-umriss-is-not.md)). The share of a whole is bars on a percent axis: the Pareto page, "Shares, not counts".
2410
+ - No pie, donut, radar or candlestick, no smoothing, animation or export, no WebGL ([ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/charts-v0.49.0/docs/adr/0032-what-umriss-is-not.md)). The share of a whole is bars on a percent axis: the Pareto page, "Shares, not counts".
2411
2411
 
2412
- What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/charts-v0.47.1/docs/adr/0032-what-umriss-is-not.md).
2412
+ What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/charts-v0.49.0/docs/adr/0032-what-umriss-is-not.md).
2413
2413
 
2414
2414
  ### Axis
2415
2415
 
@@ -3175,7 +3175,7 @@ export default function SmallMultiples() {
3175
3175
 
3176
3176
  ##### Values over decades
3177
3177
 
3178
- The chart's scales are straight: a log scale would break the affine mapping its axes rely on ([ADR-0001](https://github.com/romanhaendler/umriss-ui/blob/main/docs/adr/0001-affine-scale-contract.md), [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/charts-v0.47.1/docs/adr/0032-what-umriss-is-not.md)). So the value is `Math.log10` of the reading, `ticks` stand at 1 to 9 times every power of ten, `tickFormat` labels only the whole powers, and the series' `format` writes `10 ** v`, so that the tooltip shows the reading and not its logarithm.
3178
+ The chart's scales are straight: a log scale would break the affine mapping its axes rely on ([ADR-0001](https://github.com/romanhaendler/umriss-ui/blob/main/docs/adr/0001-affine-scale-contract.md), [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/charts-v0.49.0/docs/adr/0032-what-umriss-is-not.md)). So the value is `Math.log10` of the reading, `ticks` stand at 1 to 9 times every power of ten, `tickFormat` labels only the whole powers, and the series' `format` writes `10 ** v`, so that the tooltip shows the reading and not its logarithm.
3179
3179
 
3180
3180
  ```tsx
3181
3181
  import { Tooltip, useChart } from "@umriss-ui/charts";
@@ -3426,10 +3426,10 @@ nothing.
3426
3426
 
3427
3427
  #### Known limits
3428
3428
 
3429
- - No logarithmic and no band scale: compute the logarithm in `value`; a category is a place on the linear scale ([ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/charts-v0.47.1/docs/adr/0032-what-umriss-is-not.md), [ADR-0052](https://github.com/romanhaendler/umriss-ui/blob/main/docs/adr/0052-a-chart-reads-its-rows-as-they-come.md)).
3429
+ - No logarithmic and no band scale: compute the logarithm in `value`; a category is a place on the linear scale ([ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/charts-v0.49.0/docs/adr/0032-what-umriss-is-not.md), [ADR-0052](https://github.com/romanhaendler/umriss-ui/blob/main/docs/adr/0052-a-chart-reads-its-rows-as-they-come.md)).
3430
3430
  - umriss shows the reader's time ([ADR-0060](https://github.com/romanhaendler/umriss-ui/blob/main/docs/adr/0060-validation-and-a-layout-editor-are-never-time-zones-not-yet.md)).
3431
3431
 
3432
- What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/charts-v0.47.1/docs/adr/0032-what-umriss-is-not.md).
3432
+ What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/charts-v0.49.0/docs/adr/0032-what-umriss-is-not.md).
3433
3433
 
3434
3434
  ### Zoom and pan
3435
3435
 
@@ -4264,7 +4264,7 @@ The optional numbers of a box by name.
4264
4264
 
4265
4265
  - No zoom along y, no rectangle zoom and no navigator: the x span is the one zoom there is.
4266
4266
 
4267
- What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/charts-v0.47.1/docs/adr/0032-what-umriss-is-not.md).
4267
+ What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/charts-v0.49.0/docs/adr/0032-what-umriss-is-not.md).
4268
4268
 
4269
4269
  ### View
4270
4270
 
@@ -4548,7 +4548,7 @@ The optional numbers of a box by name.
4548
4548
 
4549
4549
  - The active point and the open data table are not part of the view: they are where the reader is, not how the chart is looked at.
4550
4550
 
4551
- What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/charts-v0.47.1/docs/adr/0032-what-umriss-is-not.md).
4551
+ What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/charts-v0.49.0/docs/adr/0032-what-umriss-is-not.md).
4552
4552
 
4553
4553
  ## Series
4554
4554
 
@@ -5153,9 +5153,9 @@ nothing.
5153
5153
 
5154
5154
  #### Known limits
5155
5155
 
5156
- - No smoothing: a curve between two readings would invent values nobody measured ([ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/charts-v0.47.1/docs/adr/0032-what-umriss-is-not.md)).
5156
+ - No smoothing: a curve between two readings would invent values nobody measured ([ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/charts-v0.49.0/docs/adr/0032-what-umriss-is-not.md)).
5157
5157
 
5158
- What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/charts-v0.47.1/docs/adr/0032-what-umriss-is-not.md).
5158
+ What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/charts-v0.49.0/docs/adr/0032-what-umriss-is-not.md).
5159
5159
 
5160
5160
  ### Area
5161
5161
 
@@ -6116,7 +6116,7 @@ nothing.
6116
6116
 
6117
6117
  - Horizontal bars are the next kind to come ([ADR-0059](https://github.com/romanhaendler/umriss-ui/blob/main/docs/adr/0059-the-set-of-chart-kinds-is-open.md)); until then a `Matrix` or a `Table` ranks by name.
6118
6118
 
6119
- What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/charts-v0.47.1/docs/adr/0032-what-umriss-is-not.md).
6119
+ What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/charts-v0.49.0/docs/adr/0032-what-umriss-is-not.md).
6120
6120
 
6121
6121
  ### Scatter
6122
6122
 
@@ -7159,7 +7159,7 @@ nothing.
7159
7159
 
7160
7160
  - No horizontal boxes, no violin or jittered points, no box width by count: a density is smoothing, a jitter a picture that does not repeat.
7161
7161
 
7162
- What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/charts-v0.47.1/docs/adr/0032-what-umriss-is-not.md).
7162
+ What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/charts-v0.49.0/docs/adr/0032-what-umriss-is-not.md).
7163
7163
 
7164
7164
  ### StateBand
7165
7165
 
@@ -11801,6 +11801,16 @@ Everything `@umriss-ui/charts` exports, with its signature. A component's props
11801
11801
 
11802
11802
  #### Components
11803
11803
 
11804
+ ##### `ChartsWordingProvider`
11805
+
11806
+ Sets the wording of every chart below it, also one inside another package's widget.
11807
+
11808
+ ```ts
11809
+ function ChartsWordingProvider({ wording, children }: ChartsWordingProviderProps): import("react").JSX.Element;
11810
+ ```
11811
+
11812
+ Used on [Installation](#installation).
11813
+
11804
11814
  ##### `ControlChart`
11805
11815
 
11806
11816
  [ControlChart](#controlchart) – Centre line, control limits and the rule violations of a process (an SPC or Shewhart chart). Reach for it to see a process drift before it leaves its specification.
@@ -12580,6 +12590,15 @@ Everything the charts put out as text.
12580
12590
  | `downsampled` *required* | `(readings: number) => string` | — | Added to the caption where the table shows the downsampled course: how many readings its rows stand for. |
12581
12591
  | `levelRange` *required* | `(from: string, to: string) => string` | — | Added to the name of a matrix' legend entry that has a colour bar: the range its colours span, both ends written in the matrix' format. The bar's own values are hidden from assistive technology. |
12582
12592
 
12593
+ ##### `ChartsWordingProviderProps`
12594
+
12595
+ The props of `ChartsWordingProvider`.
12596
+
12597
+ | Prop | Type | Default | Description |
12598
+ |---|---|---|---|
12599
+ | `wording` *required* | `Partial<``ChartsWording``>` | — | Entries left out stay English. German: `GERMAN_CHARTS_WORDING` from `@umriss-ui/charts/wording/de`. A chart's own `wording` wins over it. |
12600
+ | `children` | `ReactNode` | — | |
12601
+
12583
12602
  ##### `ChartView`
12584
12603
 
12585
12604
  Its table stands on [View](#view).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umriss-ui/charts",
3
- "version": "0.47.1",
3
+ "version": "0.49.0",
4
4
  "description": "React canvas chart library for data-dense dashboards - line, area, bar, box plot, scatter, control and Pareto charts. Few chart kinds, drawn well, fast.",
5
5
  "license": "MIT",
6
6
  "author": "Roman Händler",
@@ -77,7 +77,7 @@
77
77
  "@fontsource/geist-mono": "^5.3.0",
78
78
  "@fontsource/geist-sans": "^5.3.0",
79
79
  "@umriss-ui/demo": "0.0.0",
80
- "@umriss-ui/core": "0.47.1",
80
+ "@umriss-ui/core": "0.49.0",
81
81
  "@types/node": "^22.20.2",
82
82
  "@types/react": "^19.0.0",
83
83
  "@types/react-dom": "^19.0.0",
@@ -97,7 +97,7 @@
97
97
  "build:demo": "vite build --config vite.demo.config.ts",
98
98
  "typecheck": "tsc --noEmit",
99
99
  "typecheck:demo": "pnpm run props && tsc --noEmit -p tsconfig.demo.json",
100
- "check:site": "pnpm run props -- --check",
100
+ "check:site": "pnpm run props -- --check && node --disable-warning=ExperimentalWarning --experimental-strip-types ../../scripts/checkReadmeLinks.ts",
101
101
  "preview:demo": "vite preview --config vite.demo.config.ts --port 4174 --strictPort",
102
102
  "test:unit": "vitest run",
103
103
  "check:dist": "node --disable-warning=ExperimentalWarning --experimental-strip-types ../../scripts/check-dist.ts charts.js charts.css"