@umriss-ui/charts 0.55.1 → 0.57.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/API.md +179 -21
- package/CHANGELOG.md +21 -0
- package/README.md +5 -5
- package/dist/charts.js +1227 -1247
- package/dist/de.d.ts +3 -3
- package/dist/index.d.ts +34 -18
- package/docs/llms-full.md +40 -54
- package/package.json +7 -4
package/API.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @umriss-ui/charts API
|
|
2
2
|
|
|
3
|
-
Generated by the props step (`pnpm --filter @umriss-ui/charts props`); do not edit.
|
|
3
|
+
Generated by the props step (`pnpm --filter @umriss-ui/charts props`); do not edit. Lists every export, and the props, options and returns of each component and hook, with first sentences only; the full text is `docs/llms-full.md`. What stands under `## Experimental`, or is marked `(experimental)`, may change in a minor release; everything else is the surface a break costs a major for (ADR-0083).
|
|
4
4
|
|
|
5
5
|
## Components
|
|
6
6
|
|
|
@@ -46,10 +46,13 @@ Generated by the props step (`pnpm --filter @umriss-ui/charts props`); do not ed
|
|
|
46
46
|
- DEFAULT_CHARTS_WORDING — The instance shipped by default.
|
|
47
47
|
- DEFAULT_GRADIENT — Default gradient: a sequential set, light to dark, so that it stays readable as an order of lightness even without colour.
|
|
48
48
|
- HOUR — One hour in milliseconds.
|
|
49
|
-
- LinearScale — The affine mapping from a domain onto a pixel range, and back; the scale every axis of the library uses.
|
|
50
49
|
- MINUTE — One minute in milliseconds.
|
|
51
50
|
- SECOND — One second in milliseconds, the unit of a time axis.
|
|
52
51
|
|
|
52
|
+
## Classes
|
|
53
|
+
|
|
54
|
+
- LinearScale — The affine mapping from a domain onto a pixel range, and back; the scale every axis of the library uses.
|
|
55
|
+
|
|
53
56
|
## Types
|
|
54
57
|
|
|
55
58
|
- AreaProps — The props of `Area`.
|
|
@@ -57,10 +60,10 @@ Generated by the props step (`pnpm --filter @umriss-ui/charts props`); do not ed
|
|
|
57
60
|
- Assessment — The verdict and what led to it. [verdict, limit, excess, deviation]
|
|
58
61
|
- AxisConfig — An `XAxis` or `YAxis` as the chart holds it once registered. [id, orientation, position, accessor, label, tickCount, tickFormat, domain, grid, ticks, categories, categoryLabel, time, calendar, alignTicks, zoomable, zoomLimits]
|
|
59
62
|
- AxisField — The fields of a row an axis can read - or, with `V`, those that hold only some of what an axis reads: a matrix' row is a position or a category, never an instant.
|
|
60
|
-
- AxisOrientation — Whether an axis or a limit runs along x or along y.
|
|
61
|
-
- AxisPosition — The edge of the plot an axis stands at: `bottom` or `top` for x, `left` or `right` for y.
|
|
63
|
+
- AxisOrientation — Whether an axis or a limit runs along x or along y. = "x" | "y"
|
|
64
|
+
- AxisPosition — The edge of the plot an axis stands at: `bottom` or `top` for x, `left` or `right` for y. = "bottom" | "top" | "left" | "right"
|
|
62
65
|
- AxisSpans — The span each zoomable x axis shows, by axis `id`, in the axis' units.
|
|
63
|
-
- AxisValue — What an axis reads from a row (ADR-0052): a number - a position, or an instant on a time axis -, a string, which is a category, or a `Date`, which is an instant.
|
|
66
|
+
- AxisValue — What an axis reads from a row (ADR-0052): a number - a position, or an instant on a time axis -, a string, which is a category, or a `Date`, which is an instant. = number | string | Date | null | undefined
|
|
64
67
|
- BarProps — The props of `Bar`.
|
|
65
68
|
- BarSeriesConfig — A `Bar` as the chart holds it once registered. [kind, baseline, barWidth, accessor, data, xAxisId, yAxisId, name, format, color, tone, stack, normalize]
|
|
66
69
|
- Bin — A bin, the way it is drawn. [from, to, x, count]
|
|
@@ -70,7 +73,7 @@ Generated by the props step (`pnpm --filter @umriss-ui/charts props`); do not ed
|
|
|
70
73
|
- BoxNumbers — A box's further numbers beside its median, by name. [lowerQuartile, upperQuartile, lowerWhisker, upperWhisker]
|
|
71
74
|
- BoxPlotProps — The props of `BoxPlot`.
|
|
72
75
|
- BoxSeriesConfig — A box plot (CONTEXT.md: Box). [kind, lowerQuartile, upperQuartile, lowerWhisker, upperWhisker, outliers, mean, notchLower, notchUpper, count, boxWidth, accessor, data, xAxisId, yAxisId, name, format, color, tone]
|
|
73
|
-
- CalendarInput — Every function of this module takes either: the raw list as it stands on the axis, or the calendar built from it.
|
|
76
|
+
- CalendarInput — Every function of this module takes either: the raw list as it stands on the axis, or the calendar built from it. = WorkingCalendar | readonly WorkingInterval[]
|
|
74
77
|
- ChartOptions — What `useChart` takes besides the rows: the view to start from and the handler that hears every change of it. [initialView, onViewChange, onSelect, onRange]
|
|
75
78
|
- ChartParts — What `useChart` hands back: the chart and its parts, typed at the row `Z`, its view and the setters that change it. [Chart, XAxis, YAxis, Line, Area, Bar, Scatter, StateBand, Matrix, BoxPlot, view, domains, setView, setDomain, hidden, toggleSeries, showOnly, showAllSeries, toPng]
|
|
76
79
|
- ChartPerf — Measurements of the instrumentation for the benchmark page. [materializeMs, seriesDrawMs, points]
|
|
@@ -80,7 +83,7 @@ Generated by the props step (`pnpm --filter @umriss-ui/charts props`); do not ed
|
|
|
80
83
|
- ChartsWording — Everything the charts put out as text. [locale, roleDescription, empty, seriesList, visibleRange, seriesExtent, limitList, readout, stackTotal, percent, walkHelp, selectHelp, rangeStarted, rangeMade, rangeHelp, zoomHelp, legendHelp, allShown, showAll, showData, hideData, positionColumn, rowColumn, tableCaption, upperWhisker, upperQuartile, median, lowerQuartile, lowerWhisker, outliers, mean, notch, count, outlierList, downsampled, levelRange]
|
|
81
84
|
- ChartsWordingProviderProps — The props of `ChartsWordingProvider`.
|
|
82
85
|
- ControlChartProps — The props of `ControlChart`.
|
|
83
|
-
- ControlLimitOrigin — Where the limits come from.
|
|
86
|
+
- ControlLimitOrigin — Where the limits come from. = { kind: "given", center, sigma } | { kind: "referenceWindow", from, to }
|
|
84
87
|
- ControlLimits — Centre line, estimated spread and the control limits at three sigma. [center, sigma, upper, lower]
|
|
85
88
|
- DataTableGroup — One table of the data table: the series of one x axis, or one matrix. [key, caption, columns, rows]
|
|
86
89
|
- LegendConfig — A `Legend` as the chart holds it once registered. [placement]
|
|
@@ -88,42 +91,42 @@ Generated by the props step (`pnpm --filter @umriss-ui/charts props`); do not ed
|
|
|
88
91
|
- Limit — A bound: a value, a side and a severity. [value, side, severity]
|
|
89
92
|
- LimitBandConfig — A `LimitBand` as the chart holds it once registered: the range from `from` to `to`. [kind, from, to, axisId, orientation, severity, role, label, color, inExtent]
|
|
90
93
|
- LimitBandProps — The props of `LimitBand`: a `LimitLine`'s, with a range in place of `value`.
|
|
91
|
-
- LimitConfig — Any registered limit, a line or a band, told apart by `kind`.
|
|
94
|
+
- LimitConfig — Any registered limit, a line or a band, told apart by `kind`. = LimitLineConfig | LimitBandConfig
|
|
92
95
|
- LimitLineConfig — A `LimitLine` as the chart holds it once registered. [kind, value, axisId, orientation, severity, role, label, color, inExtent]
|
|
93
96
|
- LimitLineProps — The props of `LimitLine`.
|
|
94
|
-
- LimitRole — What a limit stands for.
|
|
97
|
+
- LimitRole — What a limit stands for. = "specification" | "control" | "zone"
|
|
95
98
|
- LimitSet — The set a value is read against: its bounds and, where there is one, its target. [limits, target]
|
|
96
99
|
- LineProps — The props of `Line`.
|
|
97
100
|
- LineSeriesConfig — A `Line` as the chart holds it once registered. [kind, strokeWidth, dash, markers, step, maxGap, accessor, data, xAxisId, yAxisId, name, format, color, tone]
|
|
98
101
|
- ListField — The fields of a row whose value is a list of numbers, or absent.
|
|
99
102
|
- ListFunction — A list computed from the row - a box's outliers (ADR-0040), the function form of `ListValue`.
|
|
100
|
-
- ListValue — A list read from the row: the name of a list field or a function.
|
|
103
|
+
- ListValue — A list read from the row: the name of a list field or a function. = ListField | ListFunction
|
|
101
104
|
- MaterializedSeries — Materialised series: the draw loop works only on this. [x, y, y0, w, box, length]
|
|
102
|
-
- MatrixColoring — How a matrix colours its cells.
|
|
105
|
+
- MatrixColoring — How a matrix colours its cells. = { kind: "assessment", limits } | { kind: "gradient", stops, range }
|
|
103
106
|
- MatrixProps — The props of `Matrix`.
|
|
104
107
|
- MatrixSeriesConfig — A `Matrix` as the chart holds it once registered: its base accessor is the row, `level` the colour. [kind, level, coloring, labels, accessor, data, xAxisId, yAxisId, name, format, color, tone]
|
|
105
108
|
- NumberField — The fields of a row whose value is a number, or absent.
|
|
106
109
|
- NumberOptions — The options of `Intl.NumberFormat`, plus `decimals` for a fixed number of places (minimum and maximum alike; an Intl digit option given beside it wins). [decimals]
|
|
107
|
-
- OneLane — A lane is named or given by its edges: the compiler refuses both at once.
|
|
110
|
+
- OneLane — A lane is named or given by its edges: the compiler refuses both at once. = { lane, laneFrom, laneTo } | { lane }
|
|
108
111
|
- Padding — Space in CSS pixels on each side of a rectangle. [top, right, bottom, left]
|
|
109
112
|
- ParetoEntry — An item, the way it is drawn. [name, value, index, share, cumulative, remainder]
|
|
110
113
|
- ParetoItem — An item, the way the caller counts it. [name, value]
|
|
111
114
|
- ParetoOptions — The settings of `pareto`, complete; a call gives `ParetoSettings`. [cutoff, collectRank, remainderName]
|
|
112
115
|
- ParetoResult — What `pareto` returns: the entries as they are drawn, their total and where the cutoff is crossed. [entries, total, cutoffIndex]
|
|
113
|
-
- ParetoSettings — What a call may specify: a collect rank only together with the name of the remainder it creates.
|
|
116
|
+
- ParetoSettings — What a call may specify: a collect rank only together with the name of the remainder it creates. [cutoff]
|
|
114
117
|
- Rect — A rectangle in CSS pixels, from its top left corner. [x, y, width, height]
|
|
115
118
|
- RemovedSpan — A removed span and the place it collapses onto. [from, to, workingTime]
|
|
116
119
|
- ResolvedTheme — A chart's colours and fonts, resolved from the `--uc-*` tokens where the chart stands. [colorAxis, colorGrid, colorText, colorBg, colorWarning, colorAlarm, colorOk, font, fontMono, sizeTick, series, forced]
|
|
117
|
-
- RuleName — Name of a rule, the way it is switched on and off in `violations`.
|
|
120
|
+
- RuleName — Name of a rule, the way it is switched on and off in `violations`. = "outlier" | "run" | "trend" | "twoOfThree"
|
|
118
121
|
- RuleOptions — Which rules run, and with which run lengths. [outlier, run, trend, twoOfThree, runLength, trendLength]
|
|
119
|
-
- Scale — The mapping of an axis' values onto pixels and back, with its ticks.
|
|
122
|
+
- Scale — The mapping of an axis' values onto pixels and back, with its ticks. [domain, range, m, b, toPx(v: number): number, fromPx(px: number): number, ticks(n: number): number[]]
|
|
120
123
|
- ScatterProps — The props of `Scatter`.
|
|
121
124
|
- ScatterSeriesConfig — A `Scatter` as the chart holds it once registered. [kind, radius, accessor, data, xAxisId, yAxisId, name, format, color, tone]
|
|
122
125
|
- SeriesBase — What every series registers, whatever its kind: where its values come from, which axes it stands on, and how it is named and coloured. [accessor, data, xAxisId, yAxisId, name, format, color, tone]
|
|
123
|
-
- SeriesConfig — Any registered series, told apart by `kind`.
|
|
126
|
+
- SeriesConfig — Any registered series, told apart by `kind`. = LineSeriesConfig | AreaSeriesConfig | BarSeriesConfig | BoxSeriesConfig | ScatterSeriesConfig | StateSeriesConfig | MatrixSeriesConfig
|
|
124
127
|
- SeriesKind — The kinds of series a chart draws: `line`, `area`, `bar`, `box`, `scatter`, `state` and `matrix`.
|
|
125
|
-
- Severity — How seriously a violation weighs.
|
|
126
|
-
- Side — Whether a limit is an upper or a lower bound.
|
|
128
|
+
- Severity — How seriously a violation weighs. = "warning" | "alarm"
|
|
129
|
+
- Side — Whether a limit is an upper or a lower bound. = "upper" | "lower"
|
|
127
130
|
- StateBandProps — The props of `StateBand`.
|
|
128
131
|
- StateEntry — One state of the closed set a state series knows. [label, color]
|
|
129
132
|
- StateSeriesConfig — A `StateBand` as the chart holds it once registered: its accessor yields an index into `states`. [kind, states, lane, laneFrom, laneTo, accessor, data, xAxisId, yAxisId, name, format, color, tone]
|
|
@@ -131,10 +134,10 @@ Generated by the props step (`pnpm --filter @umriss-ui/charts props`); do not ed
|
|
|
131
134
|
- TooltipHit — What the pointer hit: the x value under it and one point per series there. [xValue, points, xPx, yPx]
|
|
132
135
|
- TooltipPoint — One hit per series in the tooltip. [seriesName, color, xValue, yValue, datum, index, baseline, level, segment, box]
|
|
133
136
|
- TooltipProps — The props of `Tooltip`.
|
|
134
|
-
- Value — A value read from the row (ADR-0048): the name of a number field, compared by its name, or a function, compared by its source text (`ValueFunction`).
|
|
135
|
-
- ValueFormat — A value format: a function, or Intl's options written in the chart's wording's locale.
|
|
137
|
+
- Value — A value read from the row (ADR-0048): the name of a number field, compared by its name, or a function, compared by its source text (`ValueFunction`). = NumberField | ValueFunction
|
|
138
|
+
- ValueFormat — A value format: a function, or Intl's options written in the chart's wording's locale. = (value: number) => string | NumberOptions
|
|
136
139
|
- ValueFunction — A **value** computed from the row - the function form of `Value`.
|
|
137
|
-
- Verdict — What a value is.
|
|
140
|
+
- Verdict — What a value is. = "ok" | "unknown" | "warning" | "alarm"
|
|
138
141
|
- Violation — A rule and the indices it violates. [rule, indices]
|
|
139
142
|
- WorkingCalendar — A working calendar: sorted, merged intervals with the working time accumulated before each one begins. [intervals, offsets, total]
|
|
140
143
|
- WorkingInterval — An interval in which time counts; thought of as half-open, but mappable from both sides at its edges: both `from` and `to` have a working time. [from, to]
|
|
@@ -250,3 +253,158 @@ Generated by the props step (`pnpm --filter @umriss-ui/charts props`); do not ed
|
|
|
250
253
|
- showOnly: (name: string) => void — Hides every series but `name`; all are shown where none carries it.
|
|
251
254
|
- showAllSeries: () => void — Shows every series again.
|
|
252
255
|
- toPng: () => Promise<Blob> — A PNG of the chart as it stands: the plot with its grid, series and limits, the axes with ticks, labels and titles, and the legend, on the chart's own ground in the colour scheme in use, at the chart's size on screen and at least twice its CSS pixels.
|
|
256
|
+
|
|
257
|
+
#### props of Chart (ChartProps)
|
|
258
|
+
|
|
259
|
+
- ref?: Ref<HTMLDivElement> — The root element, the `<div>` that `className`, `style`, `id` and the `data-*` attributes reach.
|
|
260
|
+
- width?: number | "100%" — Width in CSS pixels, or `"100%"` for the host's: the chart measures its host and follows it through a ResizeObserver. (default: "100%")
|
|
261
|
+
- height?: number — Height in CSS pixels, fixed. (default: fills the frame, at least 300 px)
|
|
262
|
+
- padding?: number | Partial<Padding> — Outer spacing of the plot area in CSS pixels. (default: 8)
|
|
263
|
+
- className?: string — Goes to the root element, as it does everywhere in this workspace.
|
|
264
|
+
- style?: CSSProperties — Goes to the root element, after the chart's own styles: a `height` or `minHeight` set here wins.
|
|
265
|
+
- empty?: ReactNode — Shown in the middle of the plot area when no visible series has a point to show - no data, only gaps, or every series hidden. (default: the wording's `empty`)
|
|
266
|
+
- loading?: boolean — The rows are on their way, as the table's `loading` says ([ADR-0042](https://github.com/romanhaendler/umriss-ui/blob/main/docs/adr/0042-a-rows-height-never-follows-what-it-shows.md)). (default: false)
|
|
267
|
+
- wording?: Partial<ChartsWording> — The chart's words ([ADR-0031](https://github.com/romanhaendler/umriss-ui/blob/main/docs/adr/0031-the-charts-carry-their-own-wording.md)); entries left out fall back to English. (default: DEFAULT_CHARTS_WORDING)
|
|
268
|
+
- timeZone?: string — An IANA time zone (`"Europe/Berlin"`) for every time axis of the chart, a calendar axis included: ticks stand on its hours and midnights, and the labels, tooltip, readout, data table and summary write its time, in the wording's `locale`. (default: the reader's zone)
|
|
269
|
+
- encoding?: "color" | "marks" — How series are told apart. (default: "color")
|
|
270
|
+
- syncId?: string — Charts with the same id share the pointer's x position, in domain units: each draws its crosshair there, the tooltip stays with the chart under the pointer.
|
|
271
|
+
- onPerf?: (perf: ChartPerf) => void — Instrumentation for the benchmark page; not needed otherwise.
|
|
272
|
+
- children?: ReactNode — The axes, series and companions of this chart.
|
|
273
|
+
|
|
274
|
+
#### props of XAxis (XAxisProps)
|
|
275
|
+
|
|
276
|
+
- id?: string — Axis id, through which series bind themselves. (default: "x")
|
|
277
|
+
- value: AxisField<T> | ((d: T, index: number) => AxisValue) — Where a row lies on this axis: a field of the row, compared by its name, or a function of it, compared by its source text as a series' is (`ValueFunction`) - with the same closure limit.
|
|
278
|
+
- domain?: "nice" | "data" | readonly [number, number] | readonly [Date, Date] — `"nice"` widens the data's extent to ticks - to named `ticks` where there are any, on a time axis to whole units of a step of hours or longer -, `"data"` keeps it, a pair is fixed: numbers, on a time axis milliseconds or two `Date`s, on a category axis places. (default: "nice")
|
|
279
|
+
- position?: "bottom" | "top" — Which edge the axis stands at. (default: "bottom")
|
|
280
|
+
- time?: boolean — The values are instants: milliseconds since the epoch, or with `time` said ISO 8601 strings as an API sends them, read by the platform's rule - a date with a time and no offset is local time, a date alone is UTC; a string that is none is not drawn.
|
|
281
|
+
- calendar?: readonly WorkingInterval[] — Working calendar: the intervals in which time counts.
|
|
282
|
+
- zoomable?: boolean — Zoom and pan: Ctrl or ⌘ with the wheel - and a pinch - zoom around the pointer, a drag, a horizontal wheel or Shift with the wheel pan, a double click goes back to `domain`; with the focus on the chart, + and − zoom, Shift with ← or → pans and 0 goes back. (default: false)
|
|
283
|
+
- zoomLimits?: ZoomLimits — The narrowest and the widest span zoom may reach, in the axis' units - milliseconds on a time axis. (default: at most the data's extent or this axis' own `domain`, whichever is wider, at least three data steps)
|
|
284
|
+
- label?: string — Axis title.
|
|
285
|
+
- tickCount?: number — Target value; the 1-2-5 algorithm may deviate.
|
|
286
|
+
- tickFormat?: ValueFormat — Label of a tick.
|
|
287
|
+
- grid?: boolean — Grid lines. (default: only on the first axis of its orientation)
|
|
288
|
+
- ticks?: readonly number[] — Fixed tick values instead of the 1-2-5 algorithm, on a numeric axis: an hour axis' named hours, a lane grid.
|
|
289
|
+
- categories?: readonly string[] — The categories of the axis, in their order.
|
|
290
|
+
- categoryLabel?: (category: string) => string — What is written for a category - under its tick, in the tooltip, the readout and the data table - where the rows hold a key and not a name. (default: the category itself)
|
|
291
|
+
|
|
292
|
+
#### props of YAxis (YAxisProps)
|
|
293
|
+
|
|
294
|
+
- id?: string — Axis id, through which series bind themselves. (default: "y")
|
|
295
|
+
- domain?: "nice" | "data" | "visible" | readonly [number, number] — As on the x axis, and `"visible"`: what the series show inside their x axis' domain - a zoomed hour gets the hour's range, not the week's -, widened to ticks as `"nice"` is. (default: "nice")
|
|
296
|
+
- alignTicks?: boolean — On a further y axis: take the first y axis' tick count and widen this axis' domain until its ticks fall on that one's grid lines, the steps still 1-2-5 - one grid serves both.
|
|
297
|
+
- position?: "left" | "right" — Which edge the axis stands at. (default: "left")
|
|
298
|
+
- label?: string — Axis title.
|
|
299
|
+
- tickCount?: number — Target value; the 1-2-5 algorithm may deviate.
|
|
300
|
+
- tickFormat?: ValueFormat — Label of a tick.
|
|
301
|
+
- grid?: boolean — Grid lines. (default: only on the first axis of its orientation)
|
|
302
|
+
- ticks?: readonly number[] — Fixed tick values instead of the 1-2-5 algorithm, on a numeric axis: an hour axis' named hours, a lane grid.
|
|
303
|
+
- categories?: readonly string[] — The categories of the axis, in their order.
|
|
304
|
+
- categoryLabel?: (category: string) => string — What is written for a category - under its tick, in the tooltip, the readout and the data table - where the rows hold a key and not a name. (default: the category itself)
|
|
305
|
+
|
|
306
|
+
#### props of Line (LineProps)
|
|
307
|
+
|
|
308
|
+
- value: Value<T> — Y value - a number field of the row or a function of it; null/undefined/NaN/±Infinity means a gap.
|
|
309
|
+
- xAxisId?: string — Binding to an x axis. (default: "x")
|
|
310
|
+
- yAxisId?: string — Binding to a y axis. (default: "y")
|
|
311
|
+
- data?: readonly T[] — Series-own data; overrides the container data.
|
|
312
|
+
- name?: string — The name in legend and tooltip. (default: "Series n", after its place in the chart)
|
|
313
|
+
- format?: ValueFormat — The value as the tooltip writes it, as a function or `NumberOptions`. (default: the y axis' `tickFormat`, else the built-in number format)
|
|
314
|
+
- color?: string — Any CSS colour value. (default: the palette's `--uc-series-N`)
|
|
315
|
+
- tone?: "ok" | "warning" | "alarm" — A role instead of a colour value; the theme resolves it.
|
|
316
|
+
- strokeWidth?: number — Line width in CSS pixels. (default: 1.5)
|
|
317
|
+
- dash?: readonly number[] — Dash pattern as a run of lengths in CSS pixels. (default: a solid line)
|
|
318
|
+
- markers?: "auto" | "always" | "never" — When the individual points are drawn as marks: `auto` every point up to 60 points and above that only a point between two gaps - it has no line to be seen by - `always`, or `never`, not even that one. (default: "auto")
|
|
319
|
+
- step?: boolean — Sample-and-hold: each value holds as a horizontal until the next sample and jumps there - a target, a digital signal.
|
|
320
|
+
- maxGap?: number — The longest step between two readings that is still drawn through, in the x axis' units: milliseconds on a time axis, working time on a calendar axis, places on a category axis. (default: no limit, a stretch without rows is bridged)
|
|
321
|
+
|
|
322
|
+
#### props of Area (AreaProps)
|
|
323
|
+
|
|
324
|
+
- value: Value<T> — Upper edge - a number field of the row or a function of it; null/undefined/NaN/±Infinity means a gap.
|
|
325
|
+
- baseline?: Value<T> — Lower edge - a number field of the row or a function of it. (default: a fixed baseline at 0)
|
|
326
|
+
- xAxisId?: string — Binding to an x axis. (default: "x")
|
|
327
|
+
- yAxisId?: string — Binding to a y axis. (default: "y")
|
|
328
|
+
- data?: readonly T[] — Series-own data; overrides the container data.
|
|
329
|
+
- name?: string — The name in legend and tooltip. (default: "Series n", after its place in the chart)
|
|
330
|
+
- format?: ValueFormat — The value as the tooltip writes it, as a function or `NumberOptions`. (default: the y axis' `tickFormat`, else the built-in number format)
|
|
331
|
+
- color?: string — Any CSS colour value. (default: the palette's `--uc-series-N`)
|
|
332
|
+
- tone?: "ok" | "warning" | "alarm" — A role instead of a colour value; the theme resolves it.
|
|
333
|
+
- stack?: string — The stack this series stands in: every Bar and Area with the same id on the same x and y axis stands on the ones registered before it.
|
|
334
|
+
- normalize?: boolean — On any member of a stack, every x of the stack sums to 100 %: each value becomes its share, and the y axis reads in percent unless it has a `tickFormat`.
|
|
335
|
+
- fillOpacity?: number — Opacity of the fill, from 0 to 1; the outline stays fully opaque. (default: 0.18)
|
|
336
|
+
- strokeWidth?: number — Width of the outline along the upper edge in CSS pixels; 0 leaves it out. (default: 1.5)
|
|
337
|
+
- dash?: readonly number[] — Dash pattern of the outline as a run of lengths in CSS pixels. (default: a solid outline)
|
|
338
|
+
- maxGap?: number — The longest step between two readings that is still filled through, in the x axis' units: milliseconds on a time axis, working time on a calendar axis, places on a category axis. (default: no limit, a stretch without rows is bridged)
|
|
339
|
+
|
|
340
|
+
#### props of Bar (BarProps)
|
|
341
|
+
|
|
342
|
+
- value: Value<T> — Height - a number field of the row or a function of it; null/undefined/NaN/±Infinity means a gap.
|
|
343
|
+
- baseline?: Value<T> — Lower edge - a number field of the row or a function of it: the bar floats from here to `value`, either way up. (default: a fixed baseline at 0)
|
|
344
|
+
- xAxisId?: string — Binding to an x axis. (default: "x")
|
|
345
|
+
- yAxisId?: string — Binding to a y axis. (default: "y")
|
|
346
|
+
- data?: readonly T[] — Series-own data; overrides the container data.
|
|
347
|
+
- name?: string — The name in legend and tooltip. (default: "Series n", after its place in the chart)
|
|
348
|
+
- format?: ValueFormat — The value as the tooltip writes it, as a function or `NumberOptions`. (default: the y axis' `tickFormat`, else the built-in number format)
|
|
349
|
+
- color?: string — Any CSS colour value. (default: the palette's `--uc-series-N`)
|
|
350
|
+
- tone?: "ok" | "warning" | "alarm" — A role instead of a colour value; the theme resolves it.
|
|
351
|
+
- stack?: string — The stack this series stands in: every Bar and Area with the same id on the same x and y axis stands on the ones registered before it.
|
|
352
|
+
- normalize?: boolean — On any member of a stack, every x of the stack sums to 100 %: each value becomes its share, and the y axis reads in percent unless it has a `tickFormat`.
|
|
353
|
+
- barWidth?: number — Width as a fraction of the step; the rest is the gap between neighbours. (default: 0.8)
|
|
354
|
+
|
|
355
|
+
#### props of Scatter (ScatterProps)
|
|
356
|
+
|
|
357
|
+
- value: Value<T> — Y value - a number field of the row or a function of it; null/undefined/NaN/±Infinity means a gap.
|
|
358
|
+
- xAxisId?: string — Binding to an x axis. (default: "x")
|
|
359
|
+
- yAxisId?: string — Binding to a y axis. (default: "y")
|
|
360
|
+
- data?: readonly T[] — Series-own data; overrides the container data.
|
|
361
|
+
- name?: string — The name in legend and tooltip. (default: "Series n", after its place in the chart)
|
|
362
|
+
- format?: ValueFormat — The value as the tooltip writes it, as a function or `NumberOptions`. (default: the y axis' `tickFormat`, else the built-in number format)
|
|
363
|
+
- color?: string — Any CSS colour value. (default: the palette's `--uc-series-N`)
|
|
364
|
+
- tone?: "ok" | "warning" | "alarm" — A role instead of a colour value; the theme resolves it.
|
|
365
|
+
- radius?: number — Point radius in CSS pixels. (default: 3)
|
|
366
|
+
|
|
367
|
+
#### props of StateBand (StateBandProps)
|
|
368
|
+
|
|
369
|
+
- value: Value<T> — Index of the state in `states` - a number field of the row or a function of it; null/undefined/NaN/±Infinity is a gap - and a gap stays a hole, it gets no colour for "unknown".
|
|
370
|
+
- states: readonly StateEntry[] — The closed set of states, in the order of their codes.
|
|
371
|
+
- xAxisId?: string — Binding to an x axis. (default: "x")
|
|
372
|
+
- yAxisId?: string — Binding to a y axis. (default: "y")
|
|
373
|
+
- data?: readonly T[] — Series-own data; overrides the container data.
|
|
374
|
+
- name?: string — The name in legend and tooltip. (default: "Series n", after its place in the chart)
|
|
375
|
+
- lane?: string — The lane by its name: a category of the y axis, whose place the band takes, as wide as a bar is.
|
|
376
|
+
- laneFrom?: number — Lower edge of the lane in domain units of a numeric y axis. (default: the beginning of the axis' domain)
|
|
377
|
+
- laneTo?: number — Upper edge of the lane in domain units of a numeric y axis. (default: the end of the axis' domain)
|
|
378
|
+
|
|
379
|
+
#### props of Matrix (MatrixProps)
|
|
380
|
+
|
|
381
|
+
- value: AxisField<T, number | string | null | undefined> | ((d: T, index: number) => nu… — The row on the y axis - a field of the data's row or a function of it.
|
|
382
|
+
- level: Value<T> — The level that decides the colour - a number field of the row or a function of it.
|
|
383
|
+
- coloring?: MatrixColoring — How the level colours a cell: by assessment against limits, or across a gradient. (default: { kind: "gradient", stops: DEFAULT_GRADIENT })
|
|
384
|
+
- xAxisId?: string — Binding to an x axis. (default: "x")
|
|
385
|
+
- yAxisId?: string — Binding to a y axis. (default: "y")
|
|
386
|
+
- data?: readonly T[] — Series-own data; overrides the container data.
|
|
387
|
+
- name?: string — The name in legend and tooltip. (default: "Series n", after its place in the chart)
|
|
388
|
+
- format?: ValueFormat — The level as the tooltip writes it, as a function or `NumberOptions`. (default: the built-in number format)
|
|
389
|
+
- labels?: boolean — Each cell writes its level in `format`, in the tick size, in the text colour over a halo of the ground colour - legible on every stop, in both themes and in forced colours. (default: false)
|
|
390
|
+
|
|
391
|
+
#### props of BoxPlot (BoxPlotProps)
|
|
392
|
+
|
|
393
|
+
- median: Value<T> — The line across the box; null/undefined/NaN/±Infinity means a gap - no box is drawn there, whatever the other numbers say.
|
|
394
|
+
- lowerQuartile: Value<T> — The box's lower edge.
|
|
395
|
+
- upperQuartile: Value<T> — The box's upper edge.
|
|
396
|
+
- lowerWhisker: Value<T> — Where the lower whisker ends - the caller's rule, not the minimum.
|
|
397
|
+
- upperWhisker: Value<T> — Where the upper whisker ends - the caller's rule, not the maximum.
|
|
398
|
+
- outliers?: ListValue<T> — The values beyond the whiskers, per box: an array, empty or missing where there are none.
|
|
399
|
+
- mean?: Value<T> — The mean, drawn as a small ×: beside the median it shows a skew.
|
|
400
|
+
- notchLower?: Value<T> — The notch's lower bound - usually of a confidence interval of the median.
|
|
401
|
+
- notchUpper?: Value<T> — The notch's upper bound; see `notchLower`.
|
|
402
|
+
- count?: Value<T> — How many values stand behind the box; read in the tooltip and the table, not drawn.
|
|
403
|
+
- xAxisId?: string — Binding to an x axis. (default: "x")
|
|
404
|
+
- yAxisId?: string — Binding to a y axis. (default: "y")
|
|
405
|
+
- data?: readonly T[] — Series-own data; overrides the container data.
|
|
406
|
+
- name?: string — The name in legend and tooltip. (default: "Series n", after its place in the chart)
|
|
407
|
+
- format?: ValueFormat — Every number of the box as the tooltip and the table write it, as a function or `NumberOptions`. (default: the y axis' `tickFormat`, else the built-in number format)
|
|
408
|
+
- color?: string — Any CSS colour value. (default: the palette's `--uc-series-N`)
|
|
409
|
+
- tone?: "ok" | "warning" | "alarm" — A role instead of a colour value; the theme resolves it.
|
|
410
|
+
- boxWidth?: number — Width as a fraction of the step, as a bar's: boxes and bars on one x axis share this fraction and stand side by side. (default: 0.8)
|
package/CHANGELOG.md
CHANGED
|
@@ -30,6 +30,27 @@ interface was still expected to move before `0.3.0`.
|
|
|
30
30
|
|
|
31
31
|
---
|
|
32
32
|
|
|
33
|
+
## 0.57.0 – `API.md` lists the props of the chart's parts; a legend is reached in the order it is drawn (Nov. 2026)
|
|
34
|
+
|
|
35
|
+
### Added
|
|
36
|
+
|
|
37
|
+
- **`API.md` lists the whole surface:** the props of `Chart`, the axes and the series parts under `useChart`, and `Scale`'s `toPx`, `fromPx` and `ticks`. What is marked `@experimental` will stand under a heading of its own, and a deprecated member last in its table.
|
|
38
|
+
|
|
39
|
+
### Changed
|
|
40
|
+
|
|
41
|
+
- **The package names Node 22 in `engines` and peers `react` and `react-dom` as `^19`** (was `>=19`), so that a later React is not promised before it has run (ADR-0083).
|
|
42
|
+
- Migration: nothing on Node 22 and React 19.
|
|
43
|
+
|
|
44
|
+
### Fixed
|
|
45
|
+
|
|
46
|
+
- **Tab reaches a legend in the order it is drawn:** before the plot at the top or left, after it at the bottom or right, in every browser.
|
|
47
|
+
- **The browser floors are the ones the source needs: Chrome 125, Firefox 121, Safari 17.5.** The documents named Chrome 123 and Firefox 120, though `round()` and `:has()` were in use; nothing changes in a browser. A test now derives the three numbers from the source. A build that pins `cssTarget` or `browserslist` to `chrome123` or `firefox120` raises them to `chrome125` and `firefox121`.
|
|
48
|
+
- **`API.md` states the defaults the code applies:** `Bar`'s `barWidth` (0.8, documented as "just under 1"), `Line`'s `strokeWidth` and `markers`, `Area`'s `fillOpacity` and `strokeWidth`, `BoxPlot`'s `boxWidth`, `Scatter`'s `radius`, `Chart`'s `padding`, and the axes' `id`, `position` and `domain`. `LinearScale` stands under "Classes".
|
|
49
|
+
|
|
50
|
+
## 0.56.0 – Released in step with the table (Nov. 2026)
|
|
51
|
+
|
|
52
|
+
No change of its own; the number moves with the table, whose columns now take `align` and stand at the start, centred or at the end.
|
|
53
|
+
|
|
33
54
|
## 0.55.1 – Released in step with the table (Nov. 2026)
|
|
34
55
|
|
|
35
56
|
No change of its own; the number moves with the table, whose heads now stand whole and line up with their columns in every sort state.
|
package/README.md
CHANGED
|
@@ -148,7 +148,7 @@ anew when the attributes of the root element or of an ancestor of a chart (a `.d
|
|
|
148
148
|
`color-scheme` on a container) or the system preference change; `invalidateTheme()` covers any other switch.
|
|
149
149
|
The text sizes (`--uc-size-tick`, `-title`, `-legend`, `-tooltip`) are in `rem` and grow with the root size. **Fonts** are not
|
|
150
150
|
loaded: Geist when the application has it, the system fonts otherwise.
|
|
151
|
-
**Browsers:** Chrome
|
|
151
|
+
**Browsers:** Chrome 125, Firefox 121, Safari 17.5 or newer.
|
|
152
152
|
|
|
153
153
|
## What it can do
|
|
154
154
|
|
|
@@ -217,7 +217,7 @@ const copy = async () =>
|
|
|
217
217
|
|
|
218
218
|
What it deliberately cannot do — animations, a log scale, pie, donut and
|
|
219
219
|
radar — stands in the same record, with the reason,
|
|
220
|
-
and across all
|
|
220
|
+
and across all seven packages in
|
|
221
221
|
[ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/main/docs/adr/0032-what-umriss-is-not.md). Stacking is not among
|
|
222
222
|
them: bars and areas stack (`stack`, `normalize`). Horizontal bars are the
|
|
223
223
|
next kind to come (ADR-0059).
|
|
@@ -252,8 +252,8 @@ passes `useFormats().timeZone` to the chart; see core's README on formats.
|
|
|
252
252
|
|
|
253
253
|
* The demo, in a checkout: `pnpm dev:charts` (port 4174). It is the documentation — every page
|
|
254
254
|
shows running examples with their source and the props table generated from
|
|
255
|
-
`src/`, each prop linked to the examples that show it.
|
|
256
|
-
|
|
255
|
+
`src/`, each prop linked to the examples that show it. Every export is listed in
|
|
256
|
+
[API.md](https://github.com/romanhaendler/umriss-ui/blob/main/packages/charts/API.md), and one search finds across all seven packages.
|
|
257
257
|
* [`CHANGELOG.md`](CHANGELOG.md) — what changes for a caller.
|
|
258
258
|
* **For a coding agent**: `docs/llms-full.md` inside the installed package —
|
|
259
259
|
the demo as one Markdown file, pinned to the installed version: every page
|
|
@@ -262,7 +262,7 @@ passes `useFormats().timeZone` to the chart; see core's README on formats.
|
|
|
262
262
|
* [`docs/capabilities.md`](https://github.com/romanhaendler/umriss-ui/blob/main/packages/charts/docs/capabilities.md) — every capability with the
|
|
263
263
|
level at which it is proved.
|
|
264
264
|
* [`../../docs/design-language.md`](https://github.com/romanhaendler/umriss-ui/blob/main/docs/design-language.md) — the design
|
|
265
|
-
language all
|
|
265
|
+
language all seven packages share.
|
|
266
266
|
|
|
267
267
|
## Testing
|
|
268
268
|
|