@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 +100 -0
- package/README.md +13 -5
- package/dist/charts.js +2598 -2263
- package/dist/de.d.ts +8 -0
- package/dist/index.d.ts +177 -44
- package/dist/wording/de.js +4 -2
- package/docs/llms-full.md +877 -896
- package/package.json +2 -2
package/dist/de.d.ts
CHANGED
|
@@ -11,6 +11,12 @@ declare interface ChartsWording {
|
|
|
11
11
|
visibleRange: (from: string, to: string) => string;
|
|
12
12
|
/** The summary's lowest and highest value of one series in that stretch. */
|
|
13
13
|
seriesExtent: (name: string, min: string, max: string) => string;
|
|
14
|
+
/** The summary's labelled limits, each with its value in its axis' format
|
|
15
|
+
(a band's two edges as one value). */
|
|
16
|
+
limitList: (limits: readonly {
|
|
17
|
+
name: string;
|
|
18
|
+
value: string;
|
|
19
|
+
}[]) => string;
|
|
14
20
|
/** What is read after a key: the position, then each series with its value
|
|
15
21
|
(and its own x where it stands on another x axis), the emphasised one
|
|
16
22
|
first. */
|
|
@@ -26,6 +32,8 @@ declare interface ChartsWording {
|
|
|
26
32
|
percent: (value: string) => string;
|
|
27
33
|
/** The keys that walk the chart. */
|
|
28
34
|
walkHelp: string;
|
|
35
|
+
/** The key that reports the Active point - only where `onSelect` is given. */
|
|
36
|
+
selectHelp: string;
|
|
29
37
|
/** The keys that zoom and pan it - only where the chart can be zoomed. */
|
|
30
38
|
zoomHelp: string;
|
|
31
39
|
/** The keys of the legend's entries - only where it has one to press. */
|
package/dist/index.d.ts
CHANGED
|
@@ -110,8 +110,9 @@ export declare interface AxisConfig<T = unknown> {
|
|
|
110
110
|
orientation: AxisOrientation;
|
|
111
111
|
position: AxisPosition;
|
|
112
112
|
/** Where a row lies along the axis; an x axis' only - along y the series
|
|
113
|
-
place their rows.
|
|
114
|
-
|
|
113
|
+
place their rows. A number is a position or an instant, a string a
|
|
114
|
+
category, a `Date` an instant (ADR-0052). */
|
|
115
|
+
accessor?: (d: T, index: number) => AxisValue;
|
|
115
116
|
label?: string;
|
|
116
117
|
tickCount?: number;
|
|
117
118
|
tickFormat?: (v: number) => string;
|
|
@@ -122,12 +123,17 @@ export declare interface AxisConfig<T = unknown> {
|
|
|
122
123
|
@default only the first registered axis per orientation
|
|
123
124
|
@remarks R-4.15 */
|
|
124
125
|
grid?: boolean;
|
|
125
|
-
/** Fixed tick values instead of the 1-2-5 algorithm
|
|
126
|
-
|
|
127
|
-
Pareto. */
|
|
126
|
+
/** Fixed tick values instead of the 1-2-5 algorithm, on a numeric axis: an
|
|
127
|
+
hour axis' named hours, a lane grid. */
|
|
128
128
|
ticks?: readonly number[];
|
|
129
|
-
/** The
|
|
130
|
-
|
|
129
|
+
/** The categories of the axis, in their order: the list is the order and
|
|
130
|
+
the extent, and makes the axis a category axis (ADR-0052). */
|
|
131
|
+
categories?: readonly string[];
|
|
132
|
+
/** What is written for a category, wherever it is written. */
|
|
133
|
+
categoryLabel?: (category: string) => string;
|
|
134
|
+
/** The values are instants - milliseconds, and where this is said ISO 8601
|
|
135
|
+
strings as well: ticks on local boundaries, labels by level. A calendar
|
|
136
|
+
implies it, and so do rows that bring a `Date` (ADR-0052). */
|
|
131
137
|
time?: boolean;
|
|
132
138
|
/** Working calendar: the intervals in which time counts. With it,
|
|
133
139
|
materialisation maps wall clock time onto working time before the scale
|
|
@@ -143,6 +149,13 @@ export declare interface AxisConfig<T = unknown> {
|
|
|
143
149
|
zoomLimits?: ZoomLimits;
|
|
144
150
|
}
|
|
145
151
|
|
|
152
|
+
/** The fields of a row an axis can read - or, with `V`, those that hold only
|
|
153
|
+
some of what an axis reads: a matrix' row is a position or a category,
|
|
154
|
+
never an instant. */
|
|
155
|
+
export declare type AxisField<T, V = AxisValue> = NoInfer<{
|
|
156
|
+
[K in keyof T & string]-?: T[K] extends V ? K : never;
|
|
157
|
+
}[keyof T & string]>;
|
|
158
|
+
|
|
146
159
|
/** Whether an axis or a limit runs along x or along y. */
|
|
147
160
|
export declare type AxisOrientation = "x" | "y";
|
|
148
161
|
|
|
@@ -153,6 +166,14 @@ export declare type AxisPosition = "bottom" | "top" | "left" | "right";
|
|
|
153
166
|
/** The span each zoomable x axis shows, by axis `id`, in the axis' units. */
|
|
154
167
|
export declare type AxisSpans = Readonly<Record<string, readonly [number, number]>>;
|
|
155
168
|
|
|
169
|
+
/** What an axis reads from a row (ADR-0052): a number - a position, or an
|
|
170
|
+
instant on a time axis -, a string, which is a category, or a `Date`,
|
|
171
|
+
which is an instant. The type of the value decides what kind the axis is,
|
|
172
|
+
never its content: `"2024"` is a category, `2024` a number. On an axis
|
|
173
|
+
that says `time` a string is an ISO 8601 instant. null/undefined is no
|
|
174
|
+
place. */
|
|
175
|
+
export declare type AxisValue = number | string | Date | null | undefined;
|
|
176
|
+
|
|
156
177
|
/** The props of `Bar`. */
|
|
157
178
|
export declare interface BarProps<T> {
|
|
158
179
|
/** Height - a number field of the row or a function of it;
|
|
@@ -203,6 +224,43 @@ export declare interface BarSeriesConfig<T = unknown> extends SeriesBase<T>, Sta
|
|
|
203
224
|
barWidth: number;
|
|
204
225
|
}
|
|
205
226
|
|
|
227
|
+
/** A bin, the way it is drawn. */
|
|
228
|
+
export declare interface Bin {
|
|
229
|
+
/** Lower edge; the bin holds it. */
|
|
230
|
+
readonly from: number;
|
|
231
|
+
/** Upper edge; the bin holds it only if it is the last one. */
|
|
232
|
+
readonly to: number;
|
|
233
|
+
/** The middle, `(from + to) / 2` - the bar's x. */
|
|
234
|
+
readonly x: number;
|
|
235
|
+
/** How many values fall in it. */
|
|
236
|
+
readonly count: number;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
/** Counts values into bins of equal width.
|
|
240
|
+
|
|
241
|
+
A value on an edge belongs to the bin that edge starts - `[from, to)` - but
|
|
242
|
+
the last bin is closed, so the greatest value of a domain is counted and not
|
|
243
|
+
lost. Values that are not finite (`NaN`, ±Infinity, `null`, `undefined`)
|
|
244
|
+
are skipped, as a gap is on a chart. Without values there are no bins; with
|
|
245
|
+
values there is at least one, even when they are all equal. */
|
|
246
|
+
export declare function bin(values: readonly (number | null | undefined)[], options?: BinOptions): Bin[];
|
|
247
|
+
|
|
248
|
+
export declare function bin<T>(rows: readonly T[], value: (row: T) => number | null | undefined, options?: BinOptions): Bin[];
|
|
249
|
+
|
|
250
|
+
/** The settings of `bin`. */
|
|
251
|
+
export declare interface BinOptions {
|
|
252
|
+
/** The width of a bin. Wins over `count`. Without a `domain` the edges are
|
|
253
|
+
multiples of it. */
|
|
254
|
+
readonly width?: number;
|
|
255
|
+
/** About how many bins: the width becomes the next 1-2-5 step, so the number
|
|
256
|
+
comes out near it and not exactly - with a `domain`, exactly.
|
|
257
|
+
@default 10 */
|
|
258
|
+
readonly count?: number;
|
|
259
|
+
/** The span the bins cover, the first edge on its start and the last on its
|
|
260
|
+
end. Values outside it are left out, not clamped into the end bins. */
|
|
261
|
+
readonly domain?: readonly [number, number];
|
|
262
|
+
}
|
|
263
|
+
|
|
206
264
|
/** The named channels of a box: one number per point, NaN where the median
|
|
207
265
|
is a gap; and its outliers (ADR-0040). */
|
|
208
266
|
export declare interface BoxChannels extends BoxNumbers<Float64Array> {
|
|
@@ -328,7 +386,7 @@ export declare type CalendarInput = WorkingCalendar | readonly WorkingInterval[]
|
|
|
328
386
|
|
|
329
387
|
/** What `useChart` takes besides the rows: the view to start from and the
|
|
330
388
|
handler that hears every change of it. */
|
|
331
|
-
export declare interface ChartOptions {
|
|
389
|
+
export declare interface ChartOptions<Z = unknown> {
|
|
332
390
|
/** The view to start from, and to go to whenever one differing in content
|
|
333
391
|
from the last is handed in - the same view again changes nothing, and
|
|
334
392
|
what it leaves out is reset; one the chart reported itself, handed back
|
|
@@ -340,6 +398,13 @@ export declare interface ChartOptions {
|
|
|
340
398
|
or to hand another chart as its `initialView`. A pan or zoom is reported
|
|
341
399
|
at most once per frame. Not called for the view the chart starts with. */
|
|
342
400
|
onViewChange?: (view: ChartView) => void;
|
|
401
|
+
/** The reader chose a point: a click on a hit (a tap too), or Enter on the
|
|
402
|
+
Active point - the same hit the tooltip's `render` receives. Once per
|
|
403
|
+
click; the end of a drag does not report, and the second click of a
|
|
404
|
+
double click does not either. The chart holds no selection and draws
|
|
405
|
+
none: what is chosen is the application's state. Needs a `<Tooltip>`,
|
|
406
|
+
which makes the hits; the hit does not travel over `syncId`. */
|
|
407
|
+
onSelect?: (hit: TooltipHit<Z>) => void;
|
|
343
408
|
}
|
|
344
409
|
|
|
345
410
|
/** What `useChart` hands back: the chart and its parts, typed at the row `Z`,
|
|
@@ -357,7 +422,7 @@ export declare interface ChartParts<Z> {
|
|
|
357
422
|
Area: <T = Z>(props: AreaProps<T>) => null;
|
|
358
423
|
Bar: <T = Z>(props: BarProps<T>) => null;
|
|
359
424
|
Scatter: <T = Z>(props: ScatterProps<T>) => null;
|
|
360
|
-
StateBand: <T = Z>(props: StateBandProps<T>) => null;
|
|
425
|
+
StateBand: <T = Z>(props: StateBandProps<T> & OneLane) => null;
|
|
361
426
|
Matrix: <T = Z>(props: MatrixProps<T>) => null;
|
|
362
427
|
BoxPlot: <T = Z>(props: BoxPlotProps<T>) => null;
|
|
363
428
|
/** How the reader is looking at the chart. */
|
|
@@ -464,6 +529,12 @@ export declare interface ChartsWording {
|
|
|
464
529
|
visibleRange: (from: string, to: string) => string;
|
|
465
530
|
/** The summary's lowest and highest value of one series in that stretch. */
|
|
466
531
|
seriesExtent: (name: string, min: string, max: string) => string;
|
|
532
|
+
/** The summary's labelled limits, each with its value in its axis' format
|
|
533
|
+
(a band's two edges as one value). */
|
|
534
|
+
limitList: (limits: readonly {
|
|
535
|
+
name: string;
|
|
536
|
+
value: string;
|
|
537
|
+
}[]) => string;
|
|
467
538
|
/** What is read after a key: the position, then each series with its value
|
|
468
539
|
(and its own x where it stands on another x axis), the emphasised one
|
|
469
540
|
first. */
|
|
@@ -479,6 +550,8 @@ export declare interface ChartsWording {
|
|
|
479
550
|
percent: (value: string) => string;
|
|
480
551
|
/** The keys that walk the chart. */
|
|
481
552
|
walkHelp: string;
|
|
553
|
+
/** The key that reports the Active point - only where `onSelect` is given. */
|
|
554
|
+
selectHelp: string;
|
|
482
555
|
/** The keys that zoom and pan it - only where the chart can be zoomed. */
|
|
483
556
|
zoomHelp: string;
|
|
484
557
|
/** The keys of the legend's entries - only where it has one to press. */
|
|
@@ -548,10 +621,22 @@ declare interface CommonProps {
|
|
|
548
621
|
@default only on the first axis of its orientation
|
|
549
622
|
@remarks R-4.15 */
|
|
550
623
|
grid?: boolean;
|
|
551
|
-
/** Fixed tick values instead of the 1-2-5 algorithm
|
|
552
|
-
|
|
553
|
-
|
|
624
|
+
/** Fixed tick values instead of the 1-2-5 algorithm, on a numeric axis: an
|
|
625
|
+
hour axis' named hours, a lane grid. An axis that reads categories needs
|
|
626
|
+
none - every category has its tick. */
|
|
554
627
|
ticks?: readonly number[];
|
|
628
|
+
/** The categories of the axis, in their order. Without it they stand in
|
|
629
|
+
the order the rows first bring them. With it the list is the order and
|
|
630
|
+
the extent: a category no row carries keeps its empty place, and a row
|
|
631
|
+
whose category is not listed is not drawn - DEV names it. It makes the
|
|
632
|
+
axis a category axis whatever the rows hold (ADR-0052). */
|
|
633
|
+
categories?: readonly string[];
|
|
634
|
+
/** What is written for a category - under its tick, in the tooltip, the
|
|
635
|
+
readout and the data table - where the rows hold a key and not a name.
|
|
636
|
+
Two categories may share a label and keep two places. Compared by its
|
|
637
|
+
source text, as `tickFormat` is.
|
|
638
|
+
@default the category itself */
|
|
639
|
+
categoryLabel?: (category: string) => string;
|
|
555
640
|
}
|
|
556
641
|
|
|
557
642
|
/** A control chart inside a `Chart`: the values as a line, the control limits
|
|
@@ -753,11 +838,12 @@ export declare interface LimitBandConfig extends LimitBase {
|
|
|
753
838
|
/** The props of `LimitBand`: a `LimitLine`'s, with a range in place of
|
|
754
839
|
`value`. */
|
|
755
840
|
export declare interface LimitBandProps extends LimitCommonProps {
|
|
756
|
-
/** Lower edge of the band, in domain units of its axis
|
|
757
|
-
|
|
841
|
+
/** Lower edge of the band, in domain units of its axis; along a time axis
|
|
842
|
+
an instant, in milliseconds or as a `Date`. */
|
|
843
|
+
from: number | Date;
|
|
758
844
|
/** Upper edge, in domain units of its axis. A band drawn backwards (`from` above `to`) is drawn between
|
|
759
845
|
the two all the same - the pair is a range, not a direction. */
|
|
760
|
-
to: number;
|
|
846
|
+
to: number | Date;
|
|
761
847
|
}
|
|
762
848
|
|
|
763
849
|
declare interface LimitBase {
|
|
@@ -825,8 +911,9 @@ export declare interface LimitLineConfig extends LimitBase {
|
|
|
825
911
|
|
|
826
912
|
/** The props of `LimitLine`. */
|
|
827
913
|
export declare interface LimitLineProps extends LimitCommonProps {
|
|
828
|
-
/** Where the line lies, in domain units of its axis
|
|
829
|
-
|
|
914
|
+
/** Where the line lies, in domain units of its axis; along a time axis
|
|
915
|
+
an instant, in milliseconds or as a `Date`. */
|
|
916
|
+
value: number | Date;
|
|
830
917
|
}
|
|
831
918
|
|
|
832
919
|
/** What a limit stands for. The difference is not cosmetic: a specification
|
|
@@ -978,9 +1065,12 @@ export declare type MatrixColoring = {
|
|
|
978
1065
|
|
|
979
1066
|
/** The props of `Matrix`. */
|
|
980
1067
|
export declare interface MatrixProps<T> {
|
|
981
|
-
/**
|
|
982
|
-
|
|
983
|
-
|
|
1068
|
+
/** The row on the y axis - a field of the data's row or a function of it.
|
|
1069
|
+
A number is a position, as every series' y is; a string is a category:
|
|
1070
|
+
the y axis then has a named row per distinct one, the first at the top,
|
|
1071
|
+
in the order the data bring them or the y axis' `categories`
|
|
1072
|
+
(ADR-0052). Never an instant: a `Date` is refused. */
|
|
1073
|
+
value: AxisField<T, number | string | null | undefined> | ((d: T, index: number) => number | string | null | undefined);
|
|
984
1074
|
/** The level that decides the colour - a number field of the row or a
|
|
985
1075
|
function of it. A missing level is a hole, not a zero. */
|
|
986
1076
|
level: Value<T>;
|
|
@@ -1008,7 +1098,9 @@ export declare interface MatrixProps<T> {
|
|
|
1008
1098
|
}
|
|
1009
1099
|
|
|
1010
1100
|
/** A `Matrix` as the chart holds it once registered: its base accessor is the
|
|
1011
|
-
row, `level` the colour.
|
|
1101
|
+
row, `level` the colour. The row may be named: where the accessor yields a
|
|
1102
|
+
string, materialisation gives it its category's place (ADR-0052) - the one
|
|
1103
|
+
series kind whose base accessor reads more than a number. */
|
|
1012
1104
|
export declare interface MatrixSeriesConfig<T = unknown> extends SeriesBase<T> {
|
|
1013
1105
|
kind: "matrix";
|
|
1014
1106
|
/** The level that decides the colour - the third channel (ADR-0011).
|
|
@@ -1025,6 +1117,17 @@ export declare type NumberField<T> = NoInfer<{
|
|
|
1025
1117
|
[K in keyof T & string]-?: T[K] extends number | null | undefined ? K : never;
|
|
1026
1118
|
}[keyof T & string]>;
|
|
1027
1119
|
|
|
1120
|
+
/** A lane is named or given by its edges: the compiler refuses both at once.
|
|
1121
|
+
Beside the props and not in them, so that `StateBandProps` stays an
|
|
1122
|
+
interface another can extend. */
|
|
1123
|
+
export declare type OneLane = {
|
|
1124
|
+
lane: string;
|
|
1125
|
+
laneFrom?: undefined;
|
|
1126
|
+
laneTo?: undefined;
|
|
1127
|
+
} | {
|
|
1128
|
+
lane?: undefined;
|
|
1129
|
+
};
|
|
1130
|
+
|
|
1028
1131
|
/** Space in CSS pixels on each side of a rectangle. */
|
|
1029
1132
|
export declare interface Padding {
|
|
1030
1133
|
top: number;
|
|
@@ -1054,8 +1157,8 @@ export declare const paretoDefaults: Omit<ParetoOptions, "remainderName">;
|
|
|
1054
1157
|
export declare interface ParetoEntry {
|
|
1055
1158
|
readonly name: string;
|
|
1056
1159
|
readonly value: number;
|
|
1057
|
-
/**
|
|
1058
|
-
|
|
1160
|
+
/** The entry's rank from 0, in the order drawn - its place on an x axis
|
|
1161
|
+
that reads `name`, and an x value for one that reads numbers. */
|
|
1059
1162
|
readonly index: number;
|
|
1060
1163
|
/** Share of the total, 0…1. */
|
|
1061
1164
|
readonly share: number;
|
|
@@ -1318,7 +1421,8 @@ declare interface Stackable {
|
|
|
1318
1421
|
normalize?: boolean;
|
|
1319
1422
|
}
|
|
1320
1423
|
|
|
1321
|
-
/** The props of `StateBand`.
|
|
1424
|
+
/** The props of `StateBand`. Its lane is named, or given by its two edges -
|
|
1425
|
+
one way or the other (`OneLane`). */
|
|
1322
1426
|
export declare interface StateBandProps<T> {
|
|
1323
1427
|
/** Index of the state in `states` - a number field of the row or a
|
|
1324
1428
|
function of it; null/undefined/NaN/±Infinity is a gap -
|
|
@@ -1340,9 +1444,16 @@ export declare interface StateBandProps<T> {
|
|
|
1340
1444
|
unnamed series is a colour nobody can look up.
|
|
1341
1445
|
@default "Series n", after its place in the chart */
|
|
1342
1446
|
name?: string;
|
|
1343
|
-
/**
|
|
1447
|
+
/** The lane by its name: a category of the y axis, whose place the band
|
|
1448
|
+
takes, as wide as a bar is. The y axis then lists a lane per name, the
|
|
1449
|
+
first at the top, in the bands' order or its own `categories`
|
|
1450
|
+
(ADR-0052). Not together with `laneFrom` or `laneTo`. */
|
|
1451
|
+
lane?: string;
|
|
1452
|
+
/** Lower edge of the lane in domain units of a numeric y axis.
|
|
1453
|
+
@default the beginning of the axis' domain */
|
|
1344
1454
|
laneFrom?: number;
|
|
1345
|
-
/** Upper edge of the lane in domain units of
|
|
1455
|
+
/** Upper edge of the lane in domain units of a numeric y axis.
|
|
1456
|
+
@default the end of the axis' domain */
|
|
1346
1457
|
laneTo?: number;
|
|
1347
1458
|
}
|
|
1348
1459
|
|
|
@@ -1359,6 +1470,9 @@ export declare interface StateSeriesConfig<T = unknown> extends SeriesBase<T> {
|
|
|
1359
1470
|
/** The closed set of states. The accessor yields the index into it - a number,
|
|
1360
1471
|
not a key (ADR-0007). */
|
|
1361
1472
|
states: readonly StateEntry[];
|
|
1473
|
+
/** The lane by its name: a category of the y axis, whose place the band
|
|
1474
|
+
takes (ADR-0052). */
|
|
1475
|
+
lane?: string;
|
|
1362
1476
|
/** Lower edge of the lane in domain units of the y axis; without a value the
|
|
1363
1477
|
beginning of the axis domain. */
|
|
1364
1478
|
laneFrom?: number;
|
|
@@ -1385,6 +1499,7 @@ export declare function Tooltip<T>(props: TooltipProps<T>): null;
|
|
|
1385
1499
|
/** A `Tooltip` as the chart holds it once registered. */
|
|
1386
1500
|
export declare interface TooltipConfig<T = unknown> {
|
|
1387
1501
|
mode: "x" | "nearest";
|
|
1502
|
+
limits?: boolean;
|
|
1388
1503
|
render?: (hit: TooltipHit<T>) => ReactNode;
|
|
1389
1504
|
}
|
|
1390
1505
|
|
|
@@ -1438,6 +1553,12 @@ export declare interface TooltipPoint<T = unknown> {
|
|
|
1438
1553
|
export declare interface TooltipProps<T> {
|
|
1439
1554
|
/** "x": every series at the x position; "nearest": only the nearest point. */
|
|
1440
1555
|
mode?: "x" | "nearest";
|
|
1556
|
+
/** Adds a row for every labelled `LimitLine` and `LimitBand` on the hit's y
|
|
1557
|
+
axis - its label and value in that axis' format - to the built-in
|
|
1558
|
+
tooltip, and the same to what a key reads out. Limits are not series and
|
|
1559
|
+
stay out of the tooltip unless asked for.
|
|
1560
|
+
@default false */
|
|
1561
|
+
limits?: boolean;
|
|
1441
1562
|
/** Render prop for content of one's own. Compared by its source text, like
|
|
1442
1563
|
`tickFormat` - with the same closure limit.
|
|
1443
1564
|
@default the built-in tooltip */
|
|
@@ -1486,7 +1607,7 @@ export declare function toWorkingTimeClamped(wallClock: number, input: CalendarI
|
|
|
1486
1607
|
@returns `Chart`, `XAxis`, `YAxis` and every series kind - each keeps its
|
|
1487
1608
|
identity over the renders -, the `view`, its `domains` and `hidden`, and
|
|
1488
1609
|
the setters that change them. */
|
|
1489
|
-
export declare function useChart<Z>(rows: readonly Z[], options?: ChartOptions): ChartParts<Z>;
|
|
1610
|
+
export declare function useChart<Z>(rows: readonly Z[], options?: ChartOptions<Z>): ChartParts<Z>;
|
|
1490
1611
|
|
|
1491
1612
|
/** A value read from the row (ADR-0048): the name of a number field, compared
|
|
1492
1613
|
by its name, or a function, compared by its source text (`ValueFunction`). */
|
|
@@ -1593,28 +1714,38 @@ export declare function workingTimeTicks(input: CalendarInput, from: number, to:
|
|
|
1593
1714
|
|
|
1594
1715
|
/** The props of `XAxis`. */
|
|
1595
1716
|
export declare interface XAxisProps<T> extends CommonProps {
|
|
1596
|
-
/** Where a row lies on this axis: a
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1717
|
+
/** Where a row lies on this axis: a field of the row, compared by its
|
|
1718
|
+
name, or a function of it, compared by its source text as a series' is
|
|
1719
|
+
(`ValueFunction`) - with the same closure limit. A number is a position,
|
|
1720
|
+
a `Date` an instant, a string a category: every distinct one gets a
|
|
1721
|
+
place of its own, in the order the rows bring them, a tick and its name
|
|
1722
|
+
as the label (ADR-0052). The type decides, never the content - `"2024"`
|
|
1723
|
+
is a category, `2024` a number - and a row without a value has no
|
|
1724
|
+
place. The axis reads the rows
|
|
1725
|
+
of every series bound to it; where those bring their own `data`, name
|
|
1600
1726
|
their row: `<XAxis<HourCount> value="hour" />`. */
|
|
1601
|
-
value:
|
|
1727
|
+
value: AxisField<T> | ((d: T, index: number) => AxisValue);
|
|
1602
1728
|
/** `"nice"` widens the data's extent to ticks - to named `ticks` where
|
|
1603
1729
|
there are any, on a time axis to whole units of a step of hours or
|
|
1604
|
-
longer -, `"data"` keeps it, a pair is fixed
|
|
1605
|
-
|
|
1606
|
-
it
|
|
1607
|
-
|
|
1730
|
+
longer -, `"data"` keeps it, a pair is fixed: numbers, on a time axis
|
|
1731
|
+
milliseconds or two `Date`s, on a category axis places. On a `zoomable`
|
|
1732
|
+
axis it is the start: what the axis shows while the chart's view names
|
|
1733
|
+
no span for it. */
|
|
1734
|
+
domain?: "nice" | "data" | readonly [number, number] | readonly [Date, Date];
|
|
1608
1735
|
/** Which edge the axis stands at. A second x axis on the opposite edge is how
|
|
1609
1736
|
a series counts in a unit of its own. */
|
|
1610
1737
|
position?: "bottom" | "top";
|
|
1611
|
-
/** The values are instants
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1738
|
+
/** The values are instants: milliseconds since the epoch, or with `time`
|
|
1739
|
+
said ISO 8601 strings as an API sends them, read by the platform's rule -
|
|
1740
|
+
a date with a time and no offset is local time, a date alone is UTC; a
|
|
1741
|
+
string that is none is not drawn. Rows that hold a `Date` put the axis
|
|
1742
|
+
in time without `time`. Ticks on local boundaries from the minute to the
|
|
1743
|
+
month, labels by level in en-GB with a 24-hour clock - `15:00`, `17 Mar`,
|
|
1744
|
+
`Mar 2026` - and the date on the first tick and on the first of a new
|
|
1745
|
+
day (`17 Mar 00:00`); a day tick there carries the year. The tooltip's x
|
|
1746
|
+
value carries the seconds where the readings lie less than a minute
|
|
1747
|
+
apart. Another language is a `tickFormat`, which is handed the instant
|
|
1748
|
+
in milliseconds. `calendar` implies it. */
|
|
1618
1749
|
time?: boolean;
|
|
1619
1750
|
/** Working calendar: the intervals in which time counts. With it the axis
|
|
1620
1751
|
stands in working time - nights and weekends are out, and every
|
|
@@ -1637,7 +1768,9 @@ export declare interface XAxisProps<T> extends CommonProps {
|
|
|
1637
1768
|
}
|
|
1638
1769
|
|
|
1639
1770
|
/** The props of `YAxis`. It reads no value of its own: where a row lies
|
|
1640
|
-
along y is its series' `value`.
|
|
1771
|
+
along y is its series' `value`. It has categories where a `Matrix` reads
|
|
1772
|
+
its rows from a string or a `StateBand` names its `lane`; the first stands
|
|
1773
|
+
at the top (ADR-0052). */
|
|
1641
1774
|
export declare interface YAxisProps extends CommonProps {
|
|
1642
1775
|
/** As on the x axis, and `"visible"`: what the series show inside their x
|
|
1643
1776
|
axis' domain - a zoomed hour gets the hour's range, not the week's -,
|
package/dist/wording/de.js
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
const
|
|
1
|
+
const i = {
|
|
2
2
|
roleDescription: "Diagramm",
|
|
3
3
|
empty: "Keine Daten",
|
|
4
4
|
seriesList: (e) => `${e.length === 1 ? "1 Serie" : `${e.length} Serien`}: ${e.join(", ")}.`,
|
|
5
5
|
visibleRange: (e, n) => `Von ${e} bis ${n}.`,
|
|
6
6
|
seriesExtent: (e, n, t) => `${e} von ${n} bis ${t}.`,
|
|
7
|
+
limitList: (e) => `Grenzen: ${e.map((n) => `${n.name} ${n.value}`).join(", ")}.`,
|
|
7
8
|
readout: (e, n) => [`${e}.`, ...n.map((t) => `${t.name} ${t.value}${t.x === "" ? "" : ` bei ${t.x}`}.`)].join(" "),
|
|
8
9
|
stackTotal: "Summe",
|
|
9
10
|
percent: (e) => `${e} %`,
|
|
10
11
|
walkHelp: "Pfeil links und rechts gehen durch die Werte, Pfeil hoch und runter wechseln die Serie, Pos1 und Ende springen zum ersten und letzten Wert, Escape hebt die Markierung auf.",
|
|
12
|
+
selectHelp: "Enter wählt den Punkt.",
|
|
11
13
|
zoomHelp: "Plus und Minus zoomen, Umschalt mit Pfeil links oder rechts verschiebt, 0 kehrt zum eigenen Bereich der Achse zurück.",
|
|
12
14
|
legendHelp: "In der Legende blendet Enter eine Serie aus oder ein, Umschalt+Enter zeigt nur sie.",
|
|
13
15
|
allShown: "Sonst wäre nichts mehr zu sehen, darum werden alle Serien gezeigt.",
|
|
@@ -31,5 +33,5 @@ const r = {
|
|
|
31
33
|
downsampled: (e) => `Ausgedünnt aus ${e.toLocaleString("de-DE")} Messwerten: erster, kleinster, größter und letzter Wert je Abschnitt.`
|
|
32
34
|
};
|
|
33
35
|
export {
|
|
34
|
-
|
|
36
|
+
i as GERMAN_CHARTS_WORDING
|
|
35
37
|
};
|