@stealthscale/component-charts 0.1.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/LICENSE +21 -0
- package/README.md +1862 -0
- package/dist/cyclonedx/bom.json +1 -0
- package/dist/index.d.ts +4332 -0
- package/dist/index.js +14711 -0
- package/dist/recipe-ZKqGhtpf.js +1054 -0
- package/dist/rolldown-runtime-D7D4PA-g.js +13 -0
- package/dist/theme.d.ts +11 -0
- package/dist/theme.js +22 -0
- package/package.json +84 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,4332 @@
|
|
|
1
|
+
import { ComponentProps, ReactElement, ReactNode } from "react";
|
|
2
|
+
import { Hue, Palette, SERIES } from "@stealthscale/theme/authoring";
|
|
3
|
+
import { YAxisProps } from "recharts";
|
|
4
|
+
import { DayOfWeek } from "@internationalized/date";
|
|
5
|
+
//#region src/chart/colors.d.ts
|
|
6
|
+
/**
|
|
7
|
+
* Describes one of the theme's series colors by name, from `series.1` to `series.8`.
|
|
8
|
+
*/
|
|
9
|
+
type SeriesColor = `series.${(typeof SERIES)[number]}`;
|
|
10
|
+
/**
|
|
11
|
+
* Describes the color a series takes: a hue, a semantic palette or one of the series colors.
|
|
12
|
+
*
|
|
13
|
+
* @remarks
|
|
14
|
+
* A series with a meaning of its own takes a semantic palette, such as `error` for a threshold.
|
|
15
|
+
* A series that names a series color keeps it at any position, such as the same series in two
|
|
16
|
+
* charts.
|
|
17
|
+
*/
|
|
18
|
+
type ChartColor = Hue | Palette | SeriesColor;
|
|
19
|
+
/**
|
|
20
|
+
* Returns the CSS value of a palette's `chart` role, or of the series color a name states, which a
|
|
21
|
+
* mark or a recharts child such as a `ReferenceLine` takes as its `stroke` or `fill`.
|
|
22
|
+
*
|
|
23
|
+
* @remarks
|
|
24
|
+
* The theme sets the `chart` role to the lightest color of the palette's hue that keeps 3:1 or
|
|
25
|
+
* more against the page and the panel, and each theme's contrast check requires that ratio. On
|
|
26
|
+
* the foundation's light page the hues' chart colors are at 63 to 66% lightness, and their solids
|
|
27
|
+
* at 47 to 58%. The contrast check measures every series color at the same ratio.
|
|
28
|
+
* @param color - The hue, the palette or the series color.
|
|
29
|
+
*/
|
|
30
|
+
declare function colorOf(color: ChartColor): string;
|
|
31
|
+
//#endregion
|
|
32
|
+
//#region src/chart/tooltip.d.ts
|
|
33
|
+
/**
|
|
34
|
+
* Describes one value recharts passes for a series.
|
|
35
|
+
*/
|
|
36
|
+
interface TooltipEntry {
|
|
37
|
+
/**
|
|
38
|
+
* Field the series reads, which is the series' key on a cartesian chart.
|
|
39
|
+
*/
|
|
40
|
+
readonly dataKey?: unknown;
|
|
41
|
+
/**
|
|
42
|
+
* Name of the entry, which is the series' key for a pie's sector and a band.
|
|
43
|
+
*/
|
|
44
|
+
readonly name?: unknown;
|
|
45
|
+
/**
|
|
46
|
+
* Row the entry was read from.
|
|
47
|
+
*/
|
|
48
|
+
readonly payload?: unknown;
|
|
49
|
+
/**
|
|
50
|
+
* Value of the series at the category, or a band's two ends.
|
|
51
|
+
*/
|
|
52
|
+
readonly value?: unknown;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Describes the props of the tooltip: the formatters the caller passes, and what recharts passes.
|
|
56
|
+
*/
|
|
57
|
+
interface TooltipProps {
|
|
58
|
+
/**
|
|
59
|
+
* Whether recharts' keyboard layer is on, which makes the panel assertive. Recharts passes it.
|
|
60
|
+
*/
|
|
61
|
+
readonly accessibilityLayer?: boolean | undefined;
|
|
62
|
+
/**
|
|
63
|
+
* Whether recharts shows the tooltip. Recharts passes it.
|
|
64
|
+
*/
|
|
65
|
+
readonly active?: boolean | undefined;
|
|
66
|
+
/**
|
|
67
|
+
* Returns the CSS color of an entry's swatch, for a mark whose color changes from row to row.
|
|
68
|
+
* The series' color unless stated.
|
|
69
|
+
*/
|
|
70
|
+
readonly entryColor?: ((entry: TooltipEntry) => string) | undefined;
|
|
71
|
+
/**
|
|
72
|
+
* Writes the category, such as a day. The category's own text unless stated.
|
|
73
|
+
*/
|
|
74
|
+
readonly formatLabel?: ((value: unknown) => string) | undefined;
|
|
75
|
+
/**
|
|
76
|
+
* Writes each series' value, such as an amount in a currency, given the value and its entry. A
|
|
77
|
+
* number in the chart's locale unless stated, and a band's two ends as a range.
|
|
78
|
+
*/
|
|
79
|
+
readonly formatValue?: ((value: unknown, entry: TooltipEntry) => string) | undefined;
|
|
80
|
+
/**
|
|
81
|
+
* Returns the heading from the entries shown, for a tooltip about one point rather than one
|
|
82
|
+
* category, such as a scatter's. The category, written by `formatLabel`, unless stated.
|
|
83
|
+
*/
|
|
84
|
+
readonly headingOf?: ((entries: readonly TooltipEntry[]) => ReactNode) | undefined;
|
|
85
|
+
/**
|
|
86
|
+
* Category the tooltip is for. Recharts passes it.
|
|
87
|
+
*/
|
|
88
|
+
readonly label?: unknown;
|
|
89
|
+
/**
|
|
90
|
+
* Returns a row's name, such as the title of the axis a scatter's value is on. The series' label
|
|
91
|
+
* unless stated.
|
|
92
|
+
*/
|
|
93
|
+
readonly nameOf?: ((entry: TooltipEntry) => ReactNode) | undefined;
|
|
94
|
+
/**
|
|
95
|
+
* Returns the notes about the category, such as the annotations at it, which render after the
|
|
96
|
+
* rows. None unless stated.
|
|
97
|
+
*/
|
|
98
|
+
readonly notesOf?: ((label: unknown) => readonly TooltipNote[]) | undefined;
|
|
99
|
+
/**
|
|
100
|
+
* Values at the category, one per series. Recharts passes them.
|
|
101
|
+
*/
|
|
102
|
+
readonly payload?: readonly TooltipEntry[] | undefined;
|
|
103
|
+
/**
|
|
104
|
+
* Returns the rows of a tooltip about one datum with several numbers, such as a box's median and
|
|
105
|
+
* quartiles, from the entries shown. The rows render without a swatch. A row per shown series
|
|
106
|
+
* unless stated.
|
|
107
|
+
*/
|
|
108
|
+
readonly rowsOf?: ((entries: readonly TooltipEntry[]) => readonly TooltipRow[]) | undefined;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Describes a note about a category: its words and the color of its swatch.
|
|
112
|
+
*/
|
|
113
|
+
interface TooltipNote {
|
|
114
|
+
/**
|
|
115
|
+
* CSS value of the note's swatch.
|
|
116
|
+
*/
|
|
117
|
+
readonly color: string;
|
|
118
|
+
/**
|
|
119
|
+
* Key of the note among the tooltip's rows.
|
|
120
|
+
*/
|
|
121
|
+
readonly key: string;
|
|
122
|
+
/**
|
|
123
|
+
* Words of the note, such as "Deploy 4.12".
|
|
124
|
+
*/
|
|
125
|
+
readonly text: ReactNode;
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Describes a row of a tooltip about one datum: a name and the value the caller wrote.
|
|
129
|
+
*/
|
|
130
|
+
interface TooltipRow {
|
|
131
|
+
/**
|
|
132
|
+
* Key of the row among the tooltip's rows.
|
|
133
|
+
*/
|
|
134
|
+
readonly key: string;
|
|
135
|
+
/**
|
|
136
|
+
* Name of the number, such as "Median".
|
|
137
|
+
*/
|
|
138
|
+
readonly name: ReactNode;
|
|
139
|
+
/**
|
|
140
|
+
* Number as the caller wrote it, such as "62ms".
|
|
141
|
+
*/
|
|
142
|
+
readonly value: ReactNode;
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Renders the panel, with the category and a row per shown series while recharts shows the
|
|
146
|
+
* tooltip, or the rows `rowsOf` returns, then the notes about the category.
|
|
147
|
+
*
|
|
148
|
+
* @param props - The formatters, and what recharts passes.
|
|
149
|
+
*/
|
|
150
|
+
declare function Tooltip$1({ accessibilityLayer, active, formatLabel, headingOf, label, notesOf, payload, rowsOf, ...writers }: TooltipProps): ReactElement;
|
|
151
|
+
//#endregion
|
|
152
|
+
//#region src/cartesian/annotations.d.ts
|
|
153
|
+
/**
|
|
154
|
+
* Describes one mark pinned to a chart's data: a moment, a period or a point.
|
|
155
|
+
*/
|
|
156
|
+
interface Annotation {
|
|
157
|
+
/**
|
|
158
|
+
* Category the mark is at, or the category its period starts at.
|
|
159
|
+
*/
|
|
160
|
+
readonly at: number | string;
|
|
161
|
+
/**
|
|
162
|
+
* Palette of the mark, such as `warning` for a flagged point. The neutral palette unless stated.
|
|
163
|
+
*/
|
|
164
|
+
readonly color?: ChartColor | undefined;
|
|
165
|
+
/**
|
|
166
|
+
* Identity of the mark, unique among the chart's annotations.
|
|
167
|
+
*/
|
|
168
|
+
readonly key: string;
|
|
169
|
+
/**
|
|
170
|
+
* Words for the mark, written on the plot and in the tooltip at its category.
|
|
171
|
+
*/
|
|
172
|
+
readonly label: string;
|
|
173
|
+
/**
|
|
174
|
+
* Category the mark's period ends at, which makes the mark a period.
|
|
175
|
+
*/
|
|
176
|
+
readonly until?: number | string | undefined;
|
|
177
|
+
/**
|
|
178
|
+
* Value of the point the mark rings, which makes the mark a point.
|
|
179
|
+
*/
|
|
180
|
+
readonly value?: number | undefined;
|
|
181
|
+
}
|
|
182
|
+
//#endregion
|
|
183
|
+
//#region src/chart/use-chart.d.ts
|
|
184
|
+
/**
|
|
185
|
+
* Describes a series the caller states.
|
|
186
|
+
*/
|
|
187
|
+
interface SeriesOptions {
|
|
188
|
+
/**
|
|
189
|
+
* Palette the series takes its color from. The theme's series color at its position unless
|
|
190
|
+
* stated.
|
|
191
|
+
*/
|
|
192
|
+
readonly color?: ChartColor | undefined;
|
|
193
|
+
/**
|
|
194
|
+
* Share of the ink, `fg`, in percent, the series' color mixes in: 0 keeps the color, 100 is the
|
|
195
|
+
* ink. The mix keeps 3:1 or more against the page. None unless stated.
|
|
196
|
+
*/
|
|
197
|
+
readonly ink?: number | undefined;
|
|
198
|
+
/**
|
|
199
|
+
* Field of each row the series reads, which a recharts mark takes as its `dataKey`.
|
|
200
|
+
*/
|
|
201
|
+
readonly key: string;
|
|
202
|
+
/**
|
|
203
|
+
* Name the tooltip and the legend show. The key unless stated.
|
|
204
|
+
*/
|
|
205
|
+
readonly label?: ReactNode | undefined;
|
|
206
|
+
}
|
|
207
|
+
/**
|
|
208
|
+
* Describes a series as the chart resolved it.
|
|
209
|
+
*/
|
|
210
|
+
interface Series {
|
|
211
|
+
/**
|
|
212
|
+
* CSS value of the series' color, which a mark takes as its `stroke` or `fill`.
|
|
213
|
+
*/
|
|
214
|
+
readonly color: string;
|
|
215
|
+
/**
|
|
216
|
+
* Whether the legend hides the series. A mark takes it as `hide`.
|
|
217
|
+
*/
|
|
218
|
+
readonly hidden: boolean;
|
|
219
|
+
/**
|
|
220
|
+
* Field of each row the series reads.
|
|
221
|
+
*/
|
|
222
|
+
readonly key: string;
|
|
223
|
+
/**
|
|
224
|
+
* Name the tooltip and the legend show.
|
|
225
|
+
*/
|
|
226
|
+
readonly label: ReactNode;
|
|
227
|
+
/**
|
|
228
|
+
* CSS value of the series' opacity, which a mark takes as `opacity`: the recipe's faded opacity
|
|
229
|
+
* while the legend points at another series, else 1.
|
|
230
|
+
*/
|
|
231
|
+
readonly opacity: string;
|
|
232
|
+
}
|
|
233
|
+
/**
|
|
234
|
+
* Describes what `useChart` takes.
|
|
235
|
+
*
|
|
236
|
+
* @typeParam Row - One row of the data.
|
|
237
|
+
*/
|
|
238
|
+
interface ChartOptions<Row> {
|
|
239
|
+
/**
|
|
240
|
+
* Rows the chart plots, in order. The array passes to recharts as it is.
|
|
241
|
+
*/
|
|
242
|
+
readonly data: Row[];
|
|
243
|
+
/**
|
|
244
|
+
* Keys of the series hidden when the chart first renders, for the uncontrolled case.
|
|
245
|
+
*/
|
|
246
|
+
readonly defaultHiddenKeys?: readonly string[] | undefined;
|
|
247
|
+
/**
|
|
248
|
+
* Keys of the series the legend hides, where the caller controls them.
|
|
249
|
+
*/
|
|
250
|
+
readonly hiddenKeys?: readonly string[] | undefined;
|
|
251
|
+
/**
|
|
252
|
+
* Locale the values are written in. The locale in scope unless stated.
|
|
253
|
+
*/
|
|
254
|
+
readonly locale?: string | undefined;
|
|
255
|
+
/**
|
|
256
|
+
* Called with every key hidden after a press in the legend.
|
|
257
|
+
*/
|
|
258
|
+
readonly onHiddenKeysChange?: ((hidden: readonly string[]) => void) | undefined;
|
|
259
|
+
/**
|
|
260
|
+
* Series the chart plots, in the order the legend lists them.
|
|
261
|
+
*/
|
|
262
|
+
readonly series: readonly SeriesOptions[];
|
|
263
|
+
}
|
|
264
|
+
/**
|
|
265
|
+
* Describes what `useChart` returns, which `Chart.Root` hands to the parts.
|
|
266
|
+
*
|
|
267
|
+
* @typeParam Row - One row of the data.
|
|
268
|
+
*/
|
|
269
|
+
interface ChartApi<Row = unknown> {
|
|
270
|
+
/**
|
|
271
|
+
* Returns the CSS value of a series' color, or `currentColor` for a key no series has.
|
|
272
|
+
*/
|
|
273
|
+
readonly color: (key: string) => string;
|
|
274
|
+
/**
|
|
275
|
+
* Rows the chart plots, the array the caller passed, which a recharts chart takes as `data`.
|
|
276
|
+
*/
|
|
277
|
+
readonly data: Row[];
|
|
278
|
+
/**
|
|
279
|
+
* Returns a function that writes an instant in the chart's locale.
|
|
280
|
+
*/
|
|
281
|
+
readonly formatDate: (options?: Intl.DateTimeFormatOptions) => (value: unknown) => string;
|
|
282
|
+
/**
|
|
283
|
+
* Returns a function that writes a number in the chart's locale.
|
|
284
|
+
*/
|
|
285
|
+
readonly formatNumber: (options?: Intl.NumberFormatOptions) => (value: unknown) => string;
|
|
286
|
+
/**
|
|
287
|
+
* Returns whether the legend hides a series.
|
|
288
|
+
*/
|
|
289
|
+
readonly hidden: (key: string) => boolean;
|
|
290
|
+
/**
|
|
291
|
+
* Points the legend at a series, or at none without a key. The pointer and focus on a legend
|
|
292
|
+
* item call it.
|
|
293
|
+
*/
|
|
294
|
+
readonly highlight: (key?: string) => void;
|
|
295
|
+
/**
|
|
296
|
+
* Key of the series the legend points at. Every other series' `opacity` is the faded one.
|
|
297
|
+
*/
|
|
298
|
+
readonly highlighted: string | undefined;
|
|
299
|
+
/**
|
|
300
|
+
* Locale the chart writes in: `locale`, else the nearest `LocaleProvider`'s, else the runtime's.
|
|
301
|
+
*/
|
|
302
|
+
readonly locale: string;
|
|
303
|
+
/**
|
|
304
|
+
* Returns the CSS value of a series' opacity, which a mark takes as `opacity`, or 1 for a key no
|
|
305
|
+
* series has.
|
|
306
|
+
*/
|
|
307
|
+
readonly opacity: (key: string) => string;
|
|
308
|
+
/**
|
|
309
|
+
* Hides or shows series after a press in the legend: the pressed series switched for a plain
|
|
310
|
+
* press, the pressed series alone for a press with Ctrl or Cmd.
|
|
311
|
+
*/
|
|
312
|
+
readonly press: (key: string, alone: boolean) => void;
|
|
313
|
+
/**
|
|
314
|
+
* Series as the chart resolved them, in order.
|
|
315
|
+
*/
|
|
316
|
+
readonly series: readonly Series[];
|
|
317
|
+
}
|
|
318
|
+
/**
|
|
319
|
+
* Returns a chart's rows, resolved series and formatters, with the hidden series in state.
|
|
320
|
+
*
|
|
321
|
+
* @remarks
|
|
322
|
+
* A caller controls the hidden keys through `hiddenKeys` and `onHiddenKeysChange`. Without them
|
|
323
|
+
* the hook keeps the keys in state, starting from `defaultHiddenKeys`. The locale is `locale`,
|
|
324
|
+
* else the nearest `LocaleProvider`'s, else the runtime's.
|
|
325
|
+
* @typeParam Row - One row of the data.
|
|
326
|
+
*/
|
|
327
|
+
declare function useChart<Row>(options: ChartOptions<Row>): ChartApi<Row>;
|
|
328
|
+
//#endregion
|
|
329
|
+
//#region src/chart/root.d.ts
|
|
330
|
+
/**
|
|
331
|
+
* Renders the `figure` that provides the recipe's variants.
|
|
332
|
+
*/
|
|
333
|
+
declare const Figure: import("@stealthscale/theme").StyledComponent<"figure", {
|
|
334
|
+
readonly ratio?: "golden" | "landscape" | "portrait" | "rows" | "square" | "ultrawide" | "video" | "wide";
|
|
335
|
+
}>;
|
|
336
|
+
/**
|
|
337
|
+
* Describes the props of the root: the chart, the recipe's variants and the props of a `figure`.
|
|
338
|
+
*/
|
|
339
|
+
interface RootProps extends ComponentProps<typeof Figure> {
|
|
340
|
+
/**
|
|
341
|
+
* Chart `useChart` returns, which every part reads.
|
|
342
|
+
*/
|
|
343
|
+
readonly chart: ChartApi;
|
|
344
|
+
}
|
|
345
|
+
/**
|
|
346
|
+
* Renders the figure inside the chart's provider, named by its caption while one renders.
|
|
347
|
+
*
|
|
348
|
+
* @param props - The chart, the recipe's variants and the props of a `figure`.
|
|
349
|
+
* @returns The `figure` element inside the chart's provider.
|
|
350
|
+
*/
|
|
351
|
+
declare function Root({ chart, ...props }: RootProps): ReactElement;
|
|
352
|
+
//#endregion
|
|
353
|
+
//#region src/gauge-chart/bands.d.ts
|
|
354
|
+
/**
|
|
355
|
+
* Describes one zone of a gauge's range: where it ends, its name and its palette.
|
|
356
|
+
*/
|
|
357
|
+
interface GaugeZone {
|
|
358
|
+
/**
|
|
359
|
+
* Palette the zone and a reading inside it take, such as `success`, `warning` or `error`. The
|
|
360
|
+
* neutral palette unless stated.
|
|
361
|
+
*/
|
|
362
|
+
readonly color?: ChartColor | undefined;
|
|
363
|
+
/**
|
|
364
|
+
* Name of the zone, written under the reading while the reading is inside it.
|
|
365
|
+
*/
|
|
366
|
+
readonly label?: ReactNode;
|
|
367
|
+
/**
|
|
368
|
+
* Value the zone ends at. It starts where the zone before it ends, or at the range's minimum. A
|
|
369
|
+
* zone that ends past the maximum, `Infinity` included, ends at the maximum.
|
|
370
|
+
*/
|
|
371
|
+
readonly upTo: number;
|
|
372
|
+
}
|
|
373
|
+
/**
|
|
374
|
+
* Describes one band of the dial: the span of a zone, or the part of the range no zone covers.
|
|
375
|
+
*/
|
|
376
|
+
interface GaugeBand {
|
|
377
|
+
/**
|
|
378
|
+
* Palette of the zone, or none for a zone without one and for the part no zone covers.
|
|
379
|
+
*/
|
|
380
|
+
readonly color?: ChartColor | undefined;
|
|
381
|
+
/**
|
|
382
|
+
* Value the band starts at.
|
|
383
|
+
*/
|
|
384
|
+
readonly from: number;
|
|
385
|
+
/**
|
|
386
|
+
* Name of the zone, or none for the part no zone covers.
|
|
387
|
+
*/
|
|
388
|
+
readonly label?: ReactNode;
|
|
389
|
+
/**
|
|
390
|
+
* Value the band ends at.
|
|
391
|
+
*/
|
|
392
|
+
readonly to: number;
|
|
393
|
+
/**
|
|
394
|
+
* Whether the band is the part of the range no zone covers.
|
|
395
|
+
*/
|
|
396
|
+
readonly uncovered: boolean;
|
|
397
|
+
}
|
|
398
|
+
/**
|
|
399
|
+
* Returns the zones as bands of the range from `min` to `max`: sorted by where they end, each
|
|
400
|
+
* starting where the one before it ends, clamped to the range, and the part past the last zone as
|
|
401
|
+
* an uncovered band.
|
|
402
|
+
*
|
|
403
|
+
* @remarks
|
|
404
|
+
* A zone whose end is `NaN` is left out, and so is a zone that ends at or before the zone before
|
|
405
|
+
* it. The part of the range no zone covers renders as the dial's track rather than as the last
|
|
406
|
+
* zone, so a gauge that classifies part of its range shows which part.
|
|
407
|
+
* @param zones - The zones in any order.
|
|
408
|
+
* @param min - The value the range starts at.
|
|
409
|
+
* @param max - The value the range ends at.
|
|
410
|
+
*/
|
|
411
|
+
export declare function gaugeBands(zones: readonly GaugeZone[], min: number, max: number): GaugeBand[];
|
|
412
|
+
/**
|
|
413
|
+
* Returns the band a value is in: the first whose end the value has not passed, else the last.
|
|
414
|
+
*
|
|
415
|
+
* @param bands - The bands `gaugeBands` returns.
|
|
416
|
+
* @param value - The value within the range.
|
|
417
|
+
*/
|
|
418
|
+
export declare function gaugeBandAt(bands: readonly GaugeBand[], value: number): GaugeBand | undefined;
|
|
419
|
+
//#endregion
|
|
420
|
+
//#region src/cartesian/types.d.ts
|
|
421
|
+
/**
|
|
422
|
+
* Describes a series of a cartesian preset: the kit's series, and whether its line is dashed.
|
|
423
|
+
*/
|
|
424
|
+
interface CartesianSeries extends SeriesOptions {
|
|
425
|
+
/**
|
|
426
|
+
* Whether the series' line renders dashed, as a target or a projection does. A series with
|
|
427
|
+
* `previousOf` renders dashed unless stated.
|
|
428
|
+
*/
|
|
429
|
+
readonly dashed?: boolean | undefined;
|
|
430
|
+
/**
|
|
431
|
+
* Key of the series this series is the earlier period of, such as last week's revenue for this
|
|
432
|
+
* week's. The series takes the neutral palette unless it states a color, and the tooltip writes
|
|
433
|
+
* the change from it after the other series' value.
|
|
434
|
+
*/
|
|
435
|
+
readonly previousOf?: string | undefined;
|
|
436
|
+
}
|
|
437
|
+
/**
|
|
438
|
+
* Describes a series of a bar chart: the preset's series, and the target each bar is measured
|
|
439
|
+
* against.
|
|
440
|
+
*/
|
|
441
|
+
interface BarSeries extends CartesianSeries {
|
|
442
|
+
/**
|
|
443
|
+
* Field of each row the series' target reads, which a tick across the row's bar marks. A row
|
|
444
|
+
* without a finite number in it renders no tick.
|
|
445
|
+
*/
|
|
446
|
+
readonly target?: string | undefined;
|
|
447
|
+
}
|
|
448
|
+
/**
|
|
449
|
+
* Describes whether a line runs straight between two points or is smoothed through them.
|
|
450
|
+
*/
|
|
451
|
+
type Curve = "linear" | "monotone";
|
|
452
|
+
/**
|
|
453
|
+
* Describes the mark a series renders as.
|
|
454
|
+
*/
|
|
455
|
+
type Mark = "area" | "bar" | "line";
|
|
456
|
+
/**
|
|
457
|
+
* Describes the value axis a series reads: the one at the plot's start edge or the one at its end
|
|
458
|
+
* edge.
|
|
459
|
+
*/
|
|
460
|
+
type ValueAxis = "end" | "start";
|
|
461
|
+
/**
|
|
462
|
+
* Describes a series of a combo chart: the preset's series, the mark it renders as and the value
|
|
463
|
+
* axis it reads.
|
|
464
|
+
*/
|
|
465
|
+
interface ComboSeries extends CartesianSeries {
|
|
466
|
+
/**
|
|
467
|
+
* Value axis the series reads. The start axis unless stated. An end axis renders while a series
|
|
468
|
+
* reads it.
|
|
469
|
+
*/
|
|
470
|
+
readonly axis?: undefined | ValueAxis;
|
|
471
|
+
/**
|
|
472
|
+
* Mark the series renders as.
|
|
473
|
+
*/
|
|
474
|
+
readonly mark: Mark;
|
|
475
|
+
}
|
|
476
|
+
/**
|
|
477
|
+
* Describes a band: a series plotted as the area between two fields of each row, such as the low
|
|
478
|
+
* and high ends of a forecast.
|
|
479
|
+
*/
|
|
480
|
+
interface RangeBand extends SeriesOptions {
|
|
481
|
+
/**
|
|
482
|
+
* Field of each row the band's upper edge reads.
|
|
483
|
+
*/
|
|
484
|
+
readonly high: string;
|
|
485
|
+
/**
|
|
486
|
+
* Field of each row the band's lower edge reads.
|
|
487
|
+
*/
|
|
488
|
+
readonly low: string;
|
|
489
|
+
}
|
|
490
|
+
/**
|
|
491
|
+
* Describes the props a bar chart adds to a preset's: the target's name and the zones of the value
|
|
492
|
+
* axis, which together make each bar a bullet graph.
|
|
493
|
+
*/
|
|
494
|
+
interface BulletProps {
|
|
495
|
+
/**
|
|
496
|
+
* Name of a bar's target in the tooltip and in the key. "Target" unless stated.
|
|
497
|
+
*/
|
|
498
|
+
readonly targetLabel?: string | undefined;
|
|
499
|
+
/**
|
|
500
|
+
* Zones of the value axis, such as poor, fair and good, which fill each bar's row behind a
|
|
501
|
+
* measure 42% of its thickness. The zones resolve against the value axis' domain, which
|
|
502
|
+
* `valueDomain` states. None unless stated.
|
|
503
|
+
*/
|
|
504
|
+
readonly zones?: readonly GaugeZone[] | undefined;
|
|
505
|
+
}
|
|
506
|
+
/**
|
|
507
|
+
* Describes the props every cartesian preset takes.
|
|
508
|
+
*
|
|
509
|
+
* @remarks
|
|
510
|
+
* The figure's props leave out `grid`, the style prop, because a preset takes `grid` as the
|
|
511
|
+
* switch of its grid lines.
|
|
512
|
+
* @typeParam Row - One row of the data.
|
|
513
|
+
*/
|
|
514
|
+
interface CartesianProps<Row> extends Omit<ChartOptions<Row>, "series">, Omit<RootProps, "chart" | "children" | "grid"> {
|
|
515
|
+
/**
|
|
516
|
+
* Whether the marks animate in, which they do only outside reduced motion.
|
|
517
|
+
*/
|
|
518
|
+
readonly animate?: boolean | undefined;
|
|
519
|
+
/**
|
|
520
|
+
* Marks pinned to the data, a moment, a period or a point each, which the tooltip lists at their
|
|
521
|
+
* category. None unless stated.
|
|
522
|
+
*/
|
|
523
|
+
readonly annotations?: readonly Annotation[] | undefined;
|
|
524
|
+
/**
|
|
525
|
+
* Finding the chart shows, in words, which names the figure.
|
|
526
|
+
*/
|
|
527
|
+
readonly caption?: ReactNode;
|
|
528
|
+
/**
|
|
529
|
+
* Field of each row the category axis reads, such as a day or a plan.
|
|
530
|
+
*/
|
|
531
|
+
readonly categoryKey: Extract<keyof Row, string>;
|
|
532
|
+
/**
|
|
533
|
+
* Recharts elements rendered inside the chart after the marks, such as a `ReferenceLine`.
|
|
534
|
+
*/
|
|
535
|
+
readonly children?: ReactNode;
|
|
536
|
+
/**
|
|
537
|
+
* Index in `data` of the row the tooltip shows when the chart first renders, until the pointer
|
|
538
|
+
* or a key moves it. No tooltip shows at first unless stated.
|
|
539
|
+
*/
|
|
540
|
+
readonly defaultIndex?: number | undefined;
|
|
541
|
+
/**
|
|
542
|
+
* Message the chart renders in the plot's place while it has no rows.
|
|
543
|
+
*/
|
|
544
|
+
readonly empty?: ReactNode;
|
|
545
|
+
/**
|
|
546
|
+
* Whether lines cross the plot at the value ticks.
|
|
547
|
+
*/
|
|
548
|
+
readonly grid?: boolean | undefined;
|
|
549
|
+
/**
|
|
550
|
+
* Accessible name of the chart's keyboard layer, such as "Revenue per day".
|
|
551
|
+
*/
|
|
552
|
+
readonly label: string;
|
|
553
|
+
/**
|
|
554
|
+
* `Intl.DateTimeFormat` options the category ticks and the tooltip's heading are written with,
|
|
555
|
+
* for a time axis. The category as it is unless stated.
|
|
556
|
+
*/
|
|
557
|
+
readonly labelOptions?: Intl.DateTimeFormatOptions | undefined;
|
|
558
|
+
/**
|
|
559
|
+
* Whether the legend renders below the plot. It renders while two or more series have rows
|
|
560
|
+
* unless stated.
|
|
561
|
+
*/
|
|
562
|
+
readonly legend?: boolean | undefined;
|
|
563
|
+
/**
|
|
564
|
+
* Accessible name of the legend's group of buttons.
|
|
565
|
+
*/
|
|
566
|
+
readonly legendLabel?: string | undefined;
|
|
567
|
+
/**
|
|
568
|
+
* Series the chart plots, in the order the legend lists them.
|
|
569
|
+
*/
|
|
570
|
+
readonly series: readonly CartesianSeries[];
|
|
571
|
+
/**
|
|
572
|
+
* Domain of the value axis in recharts' terms, such as `[0, 100]`. From zero unless stated.
|
|
573
|
+
*/
|
|
574
|
+
readonly valueDomain?: YAxisProps["domain"];
|
|
575
|
+
/**
|
|
576
|
+
* `Intl.NumberFormat` options the value ticks and the tooltip's values are written with.
|
|
577
|
+
*/
|
|
578
|
+
readonly valueOptions?: Intl.NumberFormatOptions | undefined;
|
|
579
|
+
}
|
|
580
|
+
//#endregion
|
|
581
|
+
//#region src/area-chart/area-chart.d.ts
|
|
582
|
+
/**
|
|
583
|
+
* Describes the props of an area chart: the cartesian props and the path of each area's edge.
|
|
584
|
+
*
|
|
585
|
+
* @typeParam Row - One row of the data.
|
|
586
|
+
*/
|
|
587
|
+
interface AreaChartProps<Row> extends CartesianProps<Row> {
|
|
588
|
+
/**
|
|
589
|
+
* Path of each area's edge between two points. Smoothed through them unless stated.
|
|
590
|
+
*/
|
|
591
|
+
readonly curve?: Curve | undefined;
|
|
592
|
+
}
|
|
593
|
+
/**
|
|
594
|
+
* Renders the chart's figure around an area per series.
|
|
595
|
+
*
|
|
596
|
+
* @typeParam Row - One row of the data.
|
|
597
|
+
* @param props - The rows, the series, the words and the curve.
|
|
598
|
+
*/
|
|
599
|
+
export declare function AreaChart<Row>({ curve, ...props }: AreaChartProps<Row>): ReactElement;
|
|
600
|
+
//#endregion
|
|
601
|
+
//#region src/bar-chart/bar-chart.d.ts
|
|
602
|
+
/**
|
|
603
|
+
* Describes the props of a bar chart: the cartesian props, series that may read a target, and the
|
|
604
|
+
* zones of the value axis.
|
|
605
|
+
*
|
|
606
|
+
* @typeParam Row - One row of the data.
|
|
607
|
+
*/
|
|
608
|
+
interface BarChartProps<Row> extends BulletProps, Omit<CartesianProps<Row>, "series"> {
|
|
609
|
+
/**
|
|
610
|
+
* Series the chart plots, in the order the legend lists them, each with the field its targets
|
|
611
|
+
* read where it has targets.
|
|
612
|
+
*/
|
|
613
|
+
readonly series: readonly BarSeries[];
|
|
614
|
+
}
|
|
615
|
+
/**
|
|
616
|
+
* Renders the chart's figure around a bar per series in each category.
|
|
617
|
+
*
|
|
618
|
+
* @typeParam Row - One row of the data.
|
|
619
|
+
* @param props - The rows, the series, the words, the targets and the zones.
|
|
620
|
+
*/
|
|
621
|
+
export declare function BarChart<Row>(props: BarChartProps<Row>): ReactElement;
|
|
622
|
+
//#endregion
|
|
623
|
+
//#region src/chart/caption.d.ts
|
|
624
|
+
/**
|
|
625
|
+
* Renders the `figcaption` with the chart's caption class.
|
|
626
|
+
*/
|
|
627
|
+
declare const Figcaption: import("@stealthscale/theme").StyledComponent<"figcaption", {}>;
|
|
628
|
+
/**
|
|
629
|
+
* Describes the props of the caption: the props of a `figcaption`.
|
|
630
|
+
*/
|
|
631
|
+
type CaptionProps = ComponentProps<typeof Figcaption>;
|
|
632
|
+
/**
|
|
633
|
+
* Renders the caption with the ID the figure is labelled by.
|
|
634
|
+
*
|
|
635
|
+
* @param props - The finding and the props of a `figcaption`.
|
|
636
|
+
*/
|
|
637
|
+
declare function Caption(props: CaptionProps): ReactElement;
|
|
638
|
+
//#endregion
|
|
639
|
+
//#region src/chart/crosshair.d.ts
|
|
640
|
+
/**
|
|
641
|
+
* Describes the props of the crosshair: the series it follows.
|
|
642
|
+
*/
|
|
643
|
+
interface CrosshairProps {
|
|
644
|
+
/**
|
|
645
|
+
* Key of the series whose value the guide marks.
|
|
646
|
+
*/
|
|
647
|
+
readonly dataKey: string;
|
|
648
|
+
}
|
|
649
|
+
/**
|
|
650
|
+
* Renders the guide at the active row's value, or nothing without one.
|
|
651
|
+
*
|
|
652
|
+
* @param props - The series the guide follows.
|
|
653
|
+
*/
|
|
654
|
+
declare function Crosshair({ dataKey }: CrosshairProps): null | ReactElement;
|
|
655
|
+
//#endregion
|
|
656
|
+
//#region src/chart/empty.d.ts
|
|
657
|
+
/**
|
|
658
|
+
* Renders the `div` with the chart's empty class.
|
|
659
|
+
*/
|
|
660
|
+
declare const Box$2: import("@stealthscale/theme").StyledComponent<"div", {}>;
|
|
661
|
+
/**
|
|
662
|
+
* Describes the props of the empty state: the props of a `div`.
|
|
663
|
+
*/
|
|
664
|
+
type EmptyProps = ComponentProps<typeof Box$2>;
|
|
665
|
+
/**
|
|
666
|
+
* Renders the children while the chart has no rows, and nothing once it has one.
|
|
667
|
+
*
|
|
668
|
+
* @param props - The words and the props of a `div`.
|
|
669
|
+
*/
|
|
670
|
+
declare function Empty(props: EmptyProps): null | ReactElement;
|
|
671
|
+
//#endregion
|
|
672
|
+
//#region src/chart/key-item.d.ts
|
|
673
|
+
/**
|
|
674
|
+
* Renders the `li` with the chart's key item class.
|
|
675
|
+
*/
|
|
676
|
+
declare const Item: import("@stealthscale/theme").StyledComponent<"li", {}>;
|
|
677
|
+
/**
|
|
678
|
+
* Describes the props of a key's entry: the glyph, the name and the props of an `li`.
|
|
679
|
+
*/
|
|
680
|
+
interface KeyItemProps extends ComponentProps<typeof Item> {
|
|
681
|
+
/**
|
|
682
|
+
* Picture of the part, an `svg` the recipe sizes to the text.
|
|
683
|
+
*/
|
|
684
|
+
readonly glyph: ReactNode;
|
|
685
|
+
}
|
|
686
|
+
/**
|
|
687
|
+
* Renders the glyph and the name.
|
|
688
|
+
*
|
|
689
|
+
* @param props - The glyph, the name and the props of an `li`.
|
|
690
|
+
*/
|
|
691
|
+
declare function KeyItem({ children, glyph, ...props }: KeyItemProps): ReactElement;
|
|
692
|
+
//#endregion
|
|
693
|
+
//#region src/chart/key.d.ts
|
|
694
|
+
/**
|
|
695
|
+
* Renders the `ul` with the chart's key class.
|
|
696
|
+
*/
|
|
697
|
+
declare const List: import("@stealthscale/theme").StyledComponent<"ul", {}>;
|
|
698
|
+
/**
|
|
699
|
+
* Describes the props of the key: the props of a `ul`.
|
|
700
|
+
*/
|
|
701
|
+
type KeyProps = ComponentProps<typeof List>;
|
|
702
|
+
/**
|
|
703
|
+
* Renders the list of the key's entries.
|
|
704
|
+
*
|
|
705
|
+
* @param props - The entries and the props of a `ul`.
|
|
706
|
+
*/
|
|
707
|
+
declare function Key(props: KeyProps): ReactElement;
|
|
708
|
+
//#endregion
|
|
709
|
+
//#region src/chart/legend.d.ts
|
|
710
|
+
/**
|
|
711
|
+
* Renders the `fieldset` with the chart's legend class.
|
|
712
|
+
*/
|
|
713
|
+
declare const Group: import("@stealthscale/theme").StyledComponent<"fieldset", {}>;
|
|
714
|
+
/**
|
|
715
|
+
* Describes the props of the legend: its name and the props of a `fieldset`.
|
|
716
|
+
*/
|
|
717
|
+
interface LegendProps extends ComponentProps<typeof Group> {
|
|
718
|
+
/**
|
|
719
|
+
* Name of the group of buttons, read before the first one.
|
|
720
|
+
*/
|
|
721
|
+
readonly label?: string | undefined;
|
|
722
|
+
}
|
|
723
|
+
/**
|
|
724
|
+
* Renders a button per series with its swatch and name, in the order of the series.
|
|
725
|
+
*
|
|
726
|
+
* @param props - The group's name and the props of a `fieldset`.
|
|
727
|
+
*/
|
|
728
|
+
declare function Legend({ label, ...props }: LegendProps): ReactElement;
|
|
729
|
+
//#endregion
|
|
730
|
+
//#region src/chart/plot.d.ts
|
|
731
|
+
/**
|
|
732
|
+
* Renders the `div` with the chart's plot class.
|
|
733
|
+
*/
|
|
734
|
+
declare const Box$1: import("@stealthscale/theme").StyledComponent<"div", {}>;
|
|
735
|
+
/**
|
|
736
|
+
* Describes the props of the plot: one recharts chart, the content over its middle and the props
|
|
737
|
+
* of a `div`.
|
|
738
|
+
*/
|
|
739
|
+
interface PlotProps extends Omit<ComponentProps<typeof Box$1>, "children"> {
|
|
740
|
+
/**
|
|
741
|
+
* Figure over the middle of the plot, such as the total in a donut's hole.
|
|
742
|
+
*/
|
|
743
|
+
readonly center?: ReactNode;
|
|
744
|
+
/**
|
|
745
|
+
* Words under the figure in the middle, such as what the total counts.
|
|
746
|
+
*/
|
|
747
|
+
readonly centerLabel?: ReactNode;
|
|
748
|
+
/**
|
|
749
|
+
* The recharts chart, such as a `LineChart` with its axes and marks.
|
|
750
|
+
*/
|
|
751
|
+
readonly children: ReactElement;
|
|
752
|
+
}
|
|
753
|
+
/**
|
|
754
|
+
* Renders the chart in a box as wide as the figure, or nothing while the chart has no rows.
|
|
755
|
+
*
|
|
756
|
+
* @param props - The recharts chart, the content over its middle and the props of a `div`.
|
|
757
|
+
*/
|
|
758
|
+
declare function Plot({ center, centerLabel, children, ...props }: PlotProps): null | ReactElement;
|
|
759
|
+
declare namespace index_d_exports {
|
|
760
|
+
export { Caption, CaptionProps, ChartApi, ChartColor, ChartOptions, Crosshair, CrosshairProps, Empty, EmptyProps, Key, KeyItem, KeyItemProps, KeyProps, Legend, LegendProps, Plot, PlotProps, Root, RootProps, Series, SeriesOptions, Tooltip$1 as Tooltip, TooltipEntry, TooltipNote, TooltipProps, TooltipRow, colorOf, useChart };
|
|
761
|
+
}
|
|
762
|
+
//#endregion
|
|
763
|
+
//#region src/stats/box.d.ts
|
|
764
|
+
/**
|
|
765
|
+
* Summarises values as a box plot renders them: the five numbers, Tukey's whiskers, and the
|
|
766
|
+
* outliers past them.
|
|
767
|
+
*
|
|
768
|
+
* @remarks
|
|
769
|
+
* The whiskers are not the minimum and the maximum. Each extends to the furthest value still
|
|
770
|
+
* within `whisker` times the interquartile range of the box, and every value past a whisker is
|
|
771
|
+
* an outlier, so a box plot shows an outlier as its own point. A whisker ends at the box's edge
|
|
772
|
+
* when no value lies between the edge and its reach. Quartiles are type 7, as `quantile` reads
|
|
773
|
+
* them.
|
|
774
|
+
*/
|
|
775
|
+
/**
|
|
776
|
+
* Describes the summary of a set of values that a box plot renders.
|
|
777
|
+
*/
|
|
778
|
+
interface BoxSummary {
|
|
779
|
+
/**
|
|
780
|
+
* Number of values summarised. A box of four values is not a distribution.
|
|
781
|
+
*/
|
|
782
|
+
readonly count: number;
|
|
783
|
+
/**
|
|
784
|
+
* Interquartile range, `q3 - q1`: the spread of the middle half.
|
|
785
|
+
*/
|
|
786
|
+
readonly iqr: number;
|
|
787
|
+
/**
|
|
788
|
+
* Largest value, an outlier included.
|
|
789
|
+
*/
|
|
790
|
+
readonly max: number;
|
|
791
|
+
/**
|
|
792
|
+
* Middle value.
|
|
793
|
+
*/
|
|
794
|
+
readonly median: number;
|
|
795
|
+
/**
|
|
796
|
+
* Smallest value, an outlier included.
|
|
797
|
+
*/
|
|
798
|
+
readonly min: number;
|
|
799
|
+
/**
|
|
800
|
+
* Values past the whiskers, in ascending order.
|
|
801
|
+
*/
|
|
802
|
+
readonly outliers: readonly number[];
|
|
803
|
+
/**
|
|
804
|
+
* First quartile, the lower edge of the box.
|
|
805
|
+
*/
|
|
806
|
+
readonly q1: number;
|
|
807
|
+
/**
|
|
808
|
+
* Third quartile, the upper edge of the box.
|
|
809
|
+
*/
|
|
810
|
+
readonly q3: number;
|
|
811
|
+
/**
|
|
812
|
+
* Largest value within the whisker's reach above the box, or the third quartile.
|
|
813
|
+
*/
|
|
814
|
+
readonly whiskerHigh: number;
|
|
815
|
+
/**
|
|
816
|
+
* Smallest value within the whisker's reach below the box, or the first quartile.
|
|
817
|
+
*/
|
|
818
|
+
readonly whiskerLow: number;
|
|
819
|
+
}
|
|
820
|
+
/**
|
|
821
|
+
* Returns the box plot's summary of the values, or nothing without a finite value.
|
|
822
|
+
*
|
|
823
|
+
* @remarks
|
|
824
|
+
* A value that is not a finite number is left out. A negative `whisker` reads as 0.
|
|
825
|
+
* @param values - The values, of any type and in any order.
|
|
826
|
+
* @param whisker - The whisker's reach in interquartile ranges.
|
|
827
|
+
*/
|
|
828
|
+
export declare function boxStats(values: readonly unknown[], whisker?: number): BoxSummary | undefined;
|
|
829
|
+
//#endregion
|
|
830
|
+
//#region src/box-plot/box-plot.d.ts
|
|
831
|
+
/**
|
|
832
|
+
* Describes a group of a box plot: its key, its name, and its values or a summary of them.
|
|
833
|
+
*/
|
|
834
|
+
interface BoxGroup {
|
|
835
|
+
/**
|
|
836
|
+
* Key of the group.
|
|
837
|
+
*/
|
|
838
|
+
readonly key: string;
|
|
839
|
+
/**
|
|
840
|
+
* Name of the group, which the category axis and the tooltip write.
|
|
841
|
+
*/
|
|
842
|
+
readonly label: string;
|
|
843
|
+
/**
|
|
844
|
+
* Summary to render, for values summarised elsewhere, such as in a query. The chart renders it
|
|
845
|
+
* in place of `values`.
|
|
846
|
+
*/
|
|
847
|
+
readonly summary?: BoxSummary | undefined;
|
|
848
|
+
/**
|
|
849
|
+
* Values of the group, one per thing measured. A value that is not a finite number is left out.
|
|
850
|
+
*/
|
|
851
|
+
readonly values?: readonly unknown[] | undefined;
|
|
852
|
+
}
|
|
853
|
+
/**
|
|
854
|
+
* Describes the props of a box plot: the groups, the words, the switches and the figure's props.
|
|
855
|
+
*/
|
|
856
|
+
interface BoxPlotProps extends Omit<RootProps, "chart" | "children" | "color" | "grid"> {
|
|
857
|
+
/**
|
|
858
|
+
* Whether the boxes grow in, which they do only outside reduced motion.
|
|
859
|
+
*/
|
|
860
|
+
readonly animate?: boolean | undefined;
|
|
861
|
+
/**
|
|
862
|
+
* Finding the chart shows, in words, which names the figure.
|
|
863
|
+
*/
|
|
864
|
+
readonly caption?: ReactNode;
|
|
865
|
+
/**
|
|
866
|
+
* Recharts elements rendered inside the chart after the boxes, such as a `ReferenceLine`.
|
|
867
|
+
*/
|
|
868
|
+
readonly children?: ReactNode;
|
|
869
|
+
/**
|
|
870
|
+
* Palette the boxes take their color from. The theme's first series color unless stated.
|
|
871
|
+
*/
|
|
872
|
+
readonly color?: ChartColor | undefined;
|
|
873
|
+
/**
|
|
874
|
+
* Name of the number of values in the tooltip.
|
|
875
|
+
*/
|
|
876
|
+
readonly countLabel?: ReactNode;
|
|
877
|
+
/**
|
|
878
|
+
* Index of the group the tooltip shows when the chart first renders. None unless stated.
|
|
879
|
+
*/
|
|
880
|
+
readonly defaultIndex?: number | undefined;
|
|
881
|
+
/**
|
|
882
|
+
* Message the chart renders in the plot's place while no group has a value.
|
|
883
|
+
*/
|
|
884
|
+
readonly empty?: ReactNode;
|
|
885
|
+
/**
|
|
886
|
+
* Whether lines cross the plot at the value ticks.
|
|
887
|
+
*/
|
|
888
|
+
readonly grid?: boolean | undefined;
|
|
889
|
+
/**
|
|
890
|
+
* Groups the chart compares, in the order the category axis lists them.
|
|
891
|
+
*/
|
|
892
|
+
readonly groups: readonly BoxGroup[];
|
|
893
|
+
/**
|
|
894
|
+
* Accessible name of the chart's keyboard layer, such as "Response times by region".
|
|
895
|
+
*/
|
|
896
|
+
readonly label: string;
|
|
897
|
+
/**
|
|
898
|
+
* Whether the key naming the box's parts renders below the plot.
|
|
899
|
+
*/
|
|
900
|
+
readonly legend?: boolean | undefined;
|
|
901
|
+
/**
|
|
902
|
+
* Locale the values are written in. The locale in scope unless stated.
|
|
903
|
+
*/
|
|
904
|
+
readonly locale?: string | undefined;
|
|
905
|
+
/**
|
|
906
|
+
* Name of the median in the tooltip and the key.
|
|
907
|
+
*/
|
|
908
|
+
readonly medianLabel?: ReactNode;
|
|
909
|
+
/**
|
|
910
|
+
* Whether each outlier renders as a point.
|
|
911
|
+
*/
|
|
912
|
+
readonly outliers?: boolean | undefined;
|
|
913
|
+
/**
|
|
914
|
+
* Name of the outliers in the tooltip and the key.
|
|
915
|
+
*/
|
|
916
|
+
readonly outliersLabel?: ReactNode;
|
|
917
|
+
/**
|
|
918
|
+
* Name of the box, the first quartile to the third, in the tooltip and the key.
|
|
919
|
+
*/
|
|
920
|
+
readonly quartilesLabel?: ReactNode;
|
|
921
|
+
/**
|
|
922
|
+
* Domain of the value axis in recharts' terms, such as `[0, 500]`. Rounded around the values
|
|
923
|
+
* unless stated.
|
|
924
|
+
*/
|
|
925
|
+
readonly valueDomain?: YAxisProps["domain"];
|
|
926
|
+
/**
|
|
927
|
+
* `Intl.NumberFormat` options the value ticks and the tooltip's values are written with.
|
|
928
|
+
*/
|
|
929
|
+
readonly valueOptions?: Intl.NumberFormatOptions | undefined;
|
|
930
|
+
/**
|
|
931
|
+
* Reach of a whisker past the box in interquartile ranges. Tukey's 1.5 unless stated.
|
|
932
|
+
*/
|
|
933
|
+
readonly whisker?: number | undefined;
|
|
934
|
+
/**
|
|
935
|
+
* Name of the whiskers' reach in the tooltip and the key.
|
|
936
|
+
*/
|
|
937
|
+
readonly whiskersLabel?: ReactNode;
|
|
938
|
+
}
|
|
939
|
+
/**
|
|
940
|
+
* Renders the chart's figure around the boxes, the key and the caption.
|
|
941
|
+
*
|
|
942
|
+
* @param props - The groups, the words, the switches and the figure's props.
|
|
943
|
+
*/
|
|
944
|
+
export declare function BoxPlot({ animate, caption, children, color, countLabel, defaultIndex, empty, grid, groups, label, legend, locale, medianLabel, outliers, outliersLabel, quartilesLabel, valueDomain, valueOptions, whisker, whiskersLabel, ...root }: BoxPlotProps): ReactElement;
|
|
945
|
+
//#endregion
|
|
946
|
+
//#region src/scatter-plot/span.d.ts
|
|
947
|
+
/**
|
|
948
|
+
* Describes the span of an axis: its lowest and its highest value.
|
|
949
|
+
*/
|
|
950
|
+
type Span = readonly [number, number];
|
|
951
|
+
//#endregion
|
|
952
|
+
//#region src/scatter-plot/quadrants.d.ts
|
|
953
|
+
/**
|
|
954
|
+
* Describes one of the four quadrants by the reading direction: the start side is the left in a
|
|
955
|
+
* left-to-right document.
|
|
956
|
+
*/
|
|
957
|
+
type QuadrantId = "bottomEnd" | "bottomStart" | "topEnd" | "topStart";
|
|
958
|
+
/**
|
|
959
|
+
* Describes where two dividing lines cross the axes.
|
|
960
|
+
*/
|
|
961
|
+
interface Division {
|
|
962
|
+
/**
|
|
963
|
+
* Value on the x axis the vertical line crosses at.
|
|
964
|
+
*/
|
|
965
|
+
readonly x: number;
|
|
966
|
+
/**
|
|
967
|
+
* Value on the y axis the horizontal line crosses at.
|
|
968
|
+
*/
|
|
969
|
+
readonly y: number;
|
|
970
|
+
}
|
|
971
|
+
/**
|
|
972
|
+
* Describes the quadrants a scatter divides into: the name of each, and where the two lines
|
|
973
|
+
* divide.
|
|
974
|
+
*/
|
|
975
|
+
interface Quadrants {
|
|
976
|
+
/**
|
|
977
|
+
* Name of each quadrant, keyed by the reading direction.
|
|
978
|
+
*/
|
|
979
|
+
readonly names: Readonly<Record<QuadrantId, string>>;
|
|
980
|
+
/**
|
|
981
|
+
* Value on the x axis the quadrants divide at. The middle of the x axis' span unless stated:
|
|
982
|
+
* its domain's two numbers, 0 to 1 for an axis with named ends, else the points' x values.
|
|
983
|
+
*/
|
|
984
|
+
readonly x?: number | undefined;
|
|
985
|
+
/**
|
|
986
|
+
* Value on the y axis the quadrants divide at. The middle of the y axis' span unless stated.
|
|
987
|
+
*/
|
|
988
|
+
readonly y?: number | undefined;
|
|
989
|
+
}
|
|
990
|
+
/**
|
|
991
|
+
* Describes how `spreadPoints` spreads a scatter's points.
|
|
992
|
+
*/
|
|
993
|
+
interface SpreadOptions<Point> {
|
|
994
|
+
/**
|
|
995
|
+
* Share of each axis' span two points keep apart. 0.06 unless stated.
|
|
996
|
+
*/
|
|
997
|
+
readonly distance?: number | undefined;
|
|
998
|
+
/**
|
|
999
|
+
* Values the quadrants divide at, which no point moves across. The middle of each span unless
|
|
1000
|
+
* stated.
|
|
1001
|
+
*/
|
|
1002
|
+
readonly division?: Division | undefined;
|
|
1003
|
+
/**
|
|
1004
|
+
* Span of the x axis.
|
|
1005
|
+
*/
|
|
1006
|
+
readonly x: Span;
|
|
1007
|
+
/**
|
|
1008
|
+
* Field of each point the x axis reads.
|
|
1009
|
+
*/
|
|
1010
|
+
readonly xKey: Extract<keyof Point, string>;
|
|
1011
|
+
/**
|
|
1012
|
+
* Span of the y axis.
|
|
1013
|
+
*/
|
|
1014
|
+
readonly y: Span;
|
|
1015
|
+
/**
|
|
1016
|
+
* Field of each point the y axis reads.
|
|
1017
|
+
*/
|
|
1018
|
+
readonly yKey: Extract<keyof Point, string>;
|
|
1019
|
+
}
|
|
1020
|
+
/**
|
|
1021
|
+
* Returns the quadrant a point falls in. A point on a dividing line belongs to the upper side or
|
|
1022
|
+
* the end side.
|
|
1023
|
+
*
|
|
1024
|
+
* @param x - The point's value on the x axis.
|
|
1025
|
+
* @param y - The point's value on the y axis.
|
|
1026
|
+
* @param division - The values the quadrants divide at.
|
|
1027
|
+
*/
|
|
1028
|
+
export declare function quadrantOf(x: number, y: number, division: Division): QuadrantId;
|
|
1029
|
+
/**
|
|
1030
|
+
* Returns the points in the order given, each moved until it keeps `distance` from the points
|
|
1031
|
+
* before it, and never across a dividing line.
|
|
1032
|
+
*
|
|
1033
|
+
* @remarks
|
|
1034
|
+
* A point without a finite value on both axes is returned as it is and takes no place. A span
|
|
1035
|
+
* clamps each point to the axis, so every moved point is inside the plot.
|
|
1036
|
+
* @typeParam Point - One point, with a numeric field per axis.
|
|
1037
|
+
* @param points - The points to place.
|
|
1038
|
+
* @param options - The axes' fields and spans, the distance and the division.
|
|
1039
|
+
*/
|
|
1040
|
+
export declare function spreadPoints<Point extends object>(points: readonly Point[], options: SpreadOptions<Point>): Point[];
|
|
1041
|
+
//#endregion
|
|
1042
|
+
//#region src/scatter-plot/types.d.ts
|
|
1043
|
+
/**
|
|
1044
|
+
* Describes the figure's props: the props of `Chart.Root` a scatter passes on.
|
|
1045
|
+
*/
|
|
1046
|
+
type ScatterFigure = Omit<RootProps, "chart" | "children" | "grid">;
|
|
1047
|
+
/**
|
|
1048
|
+
* Describes a series of a scatter: the kit's series and its own points.
|
|
1049
|
+
*
|
|
1050
|
+
* @typeParam Point - One point of the series.
|
|
1051
|
+
*/
|
|
1052
|
+
interface ScatterSeries<Point> extends SeriesOptions {
|
|
1053
|
+
/**
|
|
1054
|
+
* Points of the series, each with its own x and y.
|
|
1055
|
+
*/
|
|
1056
|
+
readonly points: readonly Point[];
|
|
1057
|
+
}
|
|
1058
|
+
/**
|
|
1059
|
+
* Describes the props of a scatter plot: the series and their points, the axes, the size of a
|
|
1060
|
+
* point, the quadrants, the words, the switches and the figure's props.
|
|
1061
|
+
*
|
|
1062
|
+
* @typeParam Point - One point of a series.
|
|
1063
|
+
*/
|
|
1064
|
+
interface ScatterPlotProps<Point> extends Omit<ChartOptions<Point>, "data" | "series">, ScatterFigure {
|
|
1065
|
+
/**
|
|
1066
|
+
* Whether the points animate in, which they do only outside reduced motion.
|
|
1067
|
+
*/
|
|
1068
|
+
readonly animate?: boolean | undefined;
|
|
1069
|
+
/**
|
|
1070
|
+
* Finding the chart shows, in words, which names the figure.
|
|
1071
|
+
*/
|
|
1072
|
+
readonly caption?: ReactNode;
|
|
1073
|
+
/**
|
|
1074
|
+
* Recharts elements rendered inside the chart after the points, such as a `RegressionOverlay`.
|
|
1075
|
+
*/
|
|
1076
|
+
readonly children?: ReactNode;
|
|
1077
|
+
/**
|
|
1078
|
+
* Index in the first series' points of the point the tooltip shows when the chart first renders.
|
|
1079
|
+
* No tooltip shows at first unless stated.
|
|
1080
|
+
*/
|
|
1081
|
+
readonly defaultIndex?: number | undefined;
|
|
1082
|
+
/**
|
|
1083
|
+
* Message the chart renders in the plot's place while no series has a point.
|
|
1084
|
+
*/
|
|
1085
|
+
readonly empty?: ReactNode;
|
|
1086
|
+
/**
|
|
1087
|
+
* Whether lines cross the plot at the ticks of both axes.
|
|
1088
|
+
*/
|
|
1089
|
+
readonly grid?: boolean | undefined;
|
|
1090
|
+
/**
|
|
1091
|
+
* Accessible name of the chart's keyboard layer, such as "Deal size by sales cycle".
|
|
1092
|
+
*/
|
|
1093
|
+
readonly label: string;
|
|
1094
|
+
/**
|
|
1095
|
+
* Field of each point whose words are written beside it and head its tooltip, such as a vendor's
|
|
1096
|
+
* name.
|
|
1097
|
+
*/
|
|
1098
|
+
readonly labelKey?: Extract<keyof Point, string> | undefined;
|
|
1099
|
+
/**
|
|
1100
|
+
* Whether the legend renders below the plot. It renders while two or more series have points
|
|
1101
|
+
* unless stated.
|
|
1102
|
+
*/
|
|
1103
|
+
readonly legend?: boolean | undefined;
|
|
1104
|
+
/**
|
|
1105
|
+
* Accessible name of the legend's group of buttons.
|
|
1106
|
+
*/
|
|
1107
|
+
readonly legendLabel?: string | undefined;
|
|
1108
|
+
/**
|
|
1109
|
+
* Quadrants the plot divides into: two dashed lines, the name of each quadrant in its corner,
|
|
1110
|
+
* and the quadrant of each point after its name in the tooltip.
|
|
1111
|
+
*/
|
|
1112
|
+
readonly quadrants?: Quadrants | undefined;
|
|
1113
|
+
/**
|
|
1114
|
+
* Series the chart plots, in the order the legend lists them.
|
|
1115
|
+
*/
|
|
1116
|
+
readonly series: ReadonlyArray<ScatterSeries<Point>>;
|
|
1117
|
+
/**
|
|
1118
|
+
* Area of every point in square pixels, while no field sizes the points.
|
|
1119
|
+
*/
|
|
1120
|
+
readonly size?: number | undefined;
|
|
1121
|
+
/**
|
|
1122
|
+
* Field of each point its area reads, for a bubble chart.
|
|
1123
|
+
*/
|
|
1124
|
+
readonly sizeKey?: Extract<keyof Point, string> | undefined;
|
|
1125
|
+
/**
|
|
1126
|
+
* Name of the size's field, which the tooltip writes beside the value.
|
|
1127
|
+
*/
|
|
1128
|
+
readonly sizeLabel?: string | undefined;
|
|
1129
|
+
/**
|
|
1130
|
+
* `Intl.NumberFormat` options the tooltip writes the size with.
|
|
1131
|
+
*/
|
|
1132
|
+
readonly sizeOptions?: Intl.NumberFormatOptions | undefined;
|
|
1133
|
+
/**
|
|
1134
|
+
* Smallest and largest area of a sized point, in square pixels.
|
|
1135
|
+
*/
|
|
1136
|
+
readonly sizeRange?: readonly [number, number] | undefined;
|
|
1137
|
+
/**
|
|
1138
|
+
* Domain of the x axis in recharts' terms. Recharts' rounded domain unless stated.
|
|
1139
|
+
*/
|
|
1140
|
+
readonly xDomain?: YAxisProps["domain"];
|
|
1141
|
+
/**
|
|
1142
|
+
* Words for the x axis' two ends, the low end's first, such as "Rare" and "Certain", written in
|
|
1143
|
+
* place of its ticks. The axis then spans `xDomain`, 0 to 1 unless it states two numbers.
|
|
1144
|
+
*/
|
|
1145
|
+
readonly xEnds?: readonly [string, string] | undefined;
|
|
1146
|
+
/**
|
|
1147
|
+
* Field of each point the x axis reads.
|
|
1148
|
+
*/
|
|
1149
|
+
readonly xKey: Extract<keyof Point, string>;
|
|
1150
|
+
/**
|
|
1151
|
+
* Title of the x axis, which the tooltip repeats beside the x value.
|
|
1152
|
+
*/
|
|
1153
|
+
readonly xLabel: string;
|
|
1154
|
+
/**
|
|
1155
|
+
* `Intl.NumberFormat` options the x ticks and the tooltip's x value are written with.
|
|
1156
|
+
*/
|
|
1157
|
+
readonly xOptions?: Intl.NumberFormatOptions | undefined;
|
|
1158
|
+
/**
|
|
1159
|
+
* Domain of the y axis in recharts' terms. Recharts' rounded domain unless stated.
|
|
1160
|
+
*/
|
|
1161
|
+
readonly yDomain?: YAxisProps["domain"];
|
|
1162
|
+
/**
|
|
1163
|
+
* Words for the y axis' two ends, the low end's first, written in place of its ticks. The axis
|
|
1164
|
+
* then spans `yDomain`, 0 to 1 unless it states two numbers.
|
|
1165
|
+
*/
|
|
1166
|
+
readonly yEnds?: readonly [string, string] | undefined;
|
|
1167
|
+
/**
|
|
1168
|
+
* Field of each point the y axis reads.
|
|
1169
|
+
*/
|
|
1170
|
+
readonly yKey: Extract<keyof Point, string>;
|
|
1171
|
+
/**
|
|
1172
|
+
* Title of the y axis, which the tooltip repeats beside the y value.
|
|
1173
|
+
*/
|
|
1174
|
+
readonly yLabel: string;
|
|
1175
|
+
/**
|
|
1176
|
+
* `Intl.NumberFormat` options the y ticks and the tooltip's y value are written with.
|
|
1177
|
+
*/
|
|
1178
|
+
readonly yOptions?: Intl.NumberFormatOptions | undefined;
|
|
1179
|
+
}
|
|
1180
|
+
//#endregion
|
|
1181
|
+
//#region src/bubble-chart/bubble-chart.d.ts
|
|
1182
|
+
/**
|
|
1183
|
+
* Describes the props of a bubble chart: a scatter's props with the field its points' area reads.
|
|
1184
|
+
*
|
|
1185
|
+
* @typeParam Point - One point of a series.
|
|
1186
|
+
*/
|
|
1187
|
+
interface BubbleChartProps<Point> extends Omit<ScatterPlotProps<Point>, "size" | "sizeKey" | "sizeLabel"> {
|
|
1188
|
+
/**
|
|
1189
|
+
* Field of each point its area reads.
|
|
1190
|
+
*/
|
|
1191
|
+
readonly sizeKey: Extract<keyof Point, string>;
|
|
1192
|
+
/**
|
|
1193
|
+
* Name of the size's field, which the tooltip writes beside the value.
|
|
1194
|
+
*/
|
|
1195
|
+
readonly sizeLabel: string;
|
|
1196
|
+
}
|
|
1197
|
+
/**
|
|
1198
|
+
* Renders the scatter with each point's area read from `sizeKey`.
|
|
1199
|
+
*
|
|
1200
|
+
* @typeParam Point - One point of a series.
|
|
1201
|
+
* @param props - A scatter's props with the size's field and its name.
|
|
1202
|
+
*/
|
|
1203
|
+
export declare function BubbleChart<Point extends object>(props: BubbleChartProps<Point>): ReactElement;
|
|
1204
|
+
//#endregion
|
|
1205
|
+
//#region src/burndown-chart/rows.d.ts
|
|
1206
|
+
/**
|
|
1207
|
+
* Turns a burndown's readings into rows with the ideal line and the projection past the last
|
|
1208
|
+
* reading, and names the period the projection falls to zero.
|
|
1209
|
+
*/
|
|
1210
|
+
/**
|
|
1211
|
+
* Describes one period of a burndown.
|
|
1212
|
+
*/
|
|
1213
|
+
interface BurndownPoint {
|
|
1214
|
+
/**
|
|
1215
|
+
* Name of the period, such as a day of a sprint.
|
|
1216
|
+
*/
|
|
1217
|
+
readonly at: string;
|
|
1218
|
+
/**
|
|
1219
|
+
* Work left at the end of the period. Missing for a period that has not happened.
|
|
1220
|
+
*/
|
|
1221
|
+
readonly remaining?: number | undefined;
|
|
1222
|
+
}
|
|
1223
|
+
/**
|
|
1224
|
+
* Describes one row a burndown chart plots.
|
|
1225
|
+
*/
|
|
1226
|
+
interface BurndownRow {
|
|
1227
|
+
/**
|
|
1228
|
+
* Name of the period.
|
|
1229
|
+
*/
|
|
1230
|
+
readonly at: string;
|
|
1231
|
+
/**
|
|
1232
|
+
* Work a constant rate leaves at the end of the period.
|
|
1233
|
+
*/
|
|
1234
|
+
readonly ideal: number;
|
|
1235
|
+
/**
|
|
1236
|
+
* Work the trend leaves at the end of the period, from the last reading on.
|
|
1237
|
+
*/
|
|
1238
|
+
readonly projected?: number | undefined;
|
|
1239
|
+
/**
|
|
1240
|
+
* Work left at the end of the period, where it was read.
|
|
1241
|
+
*/
|
|
1242
|
+
readonly remaining?: number | undefined;
|
|
1243
|
+
}
|
|
1244
|
+
/**
|
|
1245
|
+
* Describes the plan a burndown is measured against.
|
|
1246
|
+
*/
|
|
1247
|
+
interface BurndownOptions {
|
|
1248
|
+
/**
|
|
1249
|
+
* Number of periods the plan covers. The number of points unless stated.
|
|
1250
|
+
*/
|
|
1251
|
+
readonly periods?: number | undefined;
|
|
1252
|
+
/**
|
|
1253
|
+
* Work at the start. The first reading unless stated.
|
|
1254
|
+
*/
|
|
1255
|
+
readonly total?: number | undefined;
|
|
1256
|
+
}
|
|
1257
|
+
/**
|
|
1258
|
+
* Returns the period's index at which the trend, projected from the last reading, falls to zero.
|
|
1259
|
+
*
|
|
1260
|
+
* @remarks
|
|
1261
|
+
* The index is fractional and can lie past the end of the plan, which is the finding a caption
|
|
1262
|
+
* states. Nothing comes back with fewer than two readings, or where the work does not fall.
|
|
1263
|
+
* @param points - The periods, in order.
|
|
1264
|
+
*/
|
|
1265
|
+
export declare function burndownFinish(points: readonly BurndownPoint[]): number | undefined;
|
|
1266
|
+
/**
|
|
1267
|
+
* Returns a row per period with the ideal line, the readings and the projection.
|
|
1268
|
+
*
|
|
1269
|
+
* @remarks
|
|
1270
|
+
* The ideal line runs straight from the total to zero over the plan's periods. The projection
|
|
1271
|
+
* starts at the last reading and falls at the trend's rate, never below zero, so it meets the
|
|
1272
|
+
* readings' line.
|
|
1273
|
+
* @param points - The periods, in order.
|
|
1274
|
+
* @param options - The plan's periods and total.
|
|
1275
|
+
*/
|
|
1276
|
+
export declare function burndownRows(points: readonly BurndownPoint[], options?: BurndownOptions): BurndownRow[];
|
|
1277
|
+
//#endregion
|
|
1278
|
+
//#region src/burndown-chart/burndown-chart.d.ts
|
|
1279
|
+
/**
|
|
1280
|
+
* Describes the props of a burndown chart: the cartesian props without rows or series, the
|
|
1281
|
+
* readings, the plan and the lines' names.
|
|
1282
|
+
*/
|
|
1283
|
+
interface BurndownChartProps extends Omit<CartesianProps<BurndownRow>, "categoryKey" | "data" | "series"> {
|
|
1284
|
+
/**
|
|
1285
|
+
* Name of the ideal line in the legend and the tooltip.
|
|
1286
|
+
*/
|
|
1287
|
+
readonly idealLabel?: ReactNode;
|
|
1288
|
+
/**
|
|
1289
|
+
* Number of periods the plan covers. The number of points unless stated.
|
|
1290
|
+
*/
|
|
1291
|
+
readonly periods?: number | undefined;
|
|
1292
|
+
/**
|
|
1293
|
+
* Periods, in order, each with the work left where it was read.
|
|
1294
|
+
*/
|
|
1295
|
+
readonly points: readonly BurndownPoint[];
|
|
1296
|
+
/**
|
|
1297
|
+
* Name of the projection in the legend and the tooltip.
|
|
1298
|
+
*/
|
|
1299
|
+
readonly projectedLabel?: ReactNode;
|
|
1300
|
+
/**
|
|
1301
|
+
* Whether the trend is plotted past the last reading.
|
|
1302
|
+
*/
|
|
1303
|
+
readonly projection?: boolean | undefined;
|
|
1304
|
+
/**
|
|
1305
|
+
* Name of the readings' line in the legend and the tooltip.
|
|
1306
|
+
*/
|
|
1307
|
+
readonly remainingLabel?: ReactNode;
|
|
1308
|
+
/**
|
|
1309
|
+
* Work at the start. The first reading unless stated.
|
|
1310
|
+
*/
|
|
1311
|
+
readonly total?: number | undefined;
|
|
1312
|
+
}
|
|
1313
|
+
/**
|
|
1314
|
+
* Renders the chart's figure around the readings, the ideal line and the projection.
|
|
1315
|
+
*
|
|
1316
|
+
* @param props - The readings, the plan, the words and the projection.
|
|
1317
|
+
*/
|
|
1318
|
+
export declare function BurndownChart({ idealLabel, periods, points, projectedLabel, projection, remainingLabel, total, valueOptions, ...props }: BurndownChartProps): ReactElement;
|
|
1319
|
+
//#endregion
|
|
1320
|
+
//#region src/candlestick-chart/candles.d.ts
|
|
1321
|
+
/**
|
|
1322
|
+
* Reads the candles of a candlestick chart from rows: each period's open, high, low and close, the
|
|
1323
|
+
* direction its body takes, and how far it moved.
|
|
1324
|
+
*
|
|
1325
|
+
* @remarks
|
|
1326
|
+
* A candle's direction is its close against its own open, not against the period before, because
|
|
1327
|
+
* the body is the shape on screen: a rising body in the falling color reads as a fault. A candle
|
|
1328
|
+
* with the other convention's direction passes the previous close as its open.
|
|
1329
|
+
*/
|
|
1330
|
+
/**
|
|
1331
|
+
* Describes one period's prices.
|
|
1332
|
+
*/
|
|
1333
|
+
interface Candle {
|
|
1334
|
+
/**
|
|
1335
|
+
* Price the period closed at.
|
|
1336
|
+
*/
|
|
1337
|
+
readonly close: number;
|
|
1338
|
+
/**
|
|
1339
|
+
* Highest price in the period, the top of the wick.
|
|
1340
|
+
*/
|
|
1341
|
+
readonly high: number;
|
|
1342
|
+
/**
|
|
1343
|
+
* Lowest price in the period, the bottom of the wick.
|
|
1344
|
+
*/
|
|
1345
|
+
readonly low: number;
|
|
1346
|
+
/**
|
|
1347
|
+
* Price the period opened at.
|
|
1348
|
+
*/
|
|
1349
|
+
readonly open: number;
|
|
1350
|
+
}
|
|
1351
|
+
/**
|
|
1352
|
+
* Describes whether a period closed above, below or at its open.
|
|
1353
|
+
*/
|
|
1354
|
+
type CandleDirection = "down" | "flat" | "up";
|
|
1355
|
+
/**
|
|
1356
|
+
* Describes how far a period moved.
|
|
1357
|
+
*/
|
|
1358
|
+
interface CandleChange {
|
|
1359
|
+
/**
|
|
1360
|
+
* Close minus open.
|
|
1361
|
+
*/
|
|
1362
|
+
readonly absolute: number;
|
|
1363
|
+
/**
|
|
1364
|
+
* Change as a share of the open, or nothing for an open of 0, from which no share exists.
|
|
1365
|
+
*/
|
|
1366
|
+
readonly ratio: number | undefined;
|
|
1367
|
+
}
|
|
1368
|
+
/**
|
|
1369
|
+
* Returns whether a period closed above its open, below it, or at it.
|
|
1370
|
+
*
|
|
1371
|
+
* @param candle - The period's open and close.
|
|
1372
|
+
*/
|
|
1373
|
+
export declare function candleDirection({ close, open }: Pick<Candle, "close" | "open">): CandleDirection;
|
|
1374
|
+
/**
|
|
1375
|
+
* Returns how far a period moved from its open to its close, as an amount and as a share of the
|
|
1376
|
+
* open.
|
|
1377
|
+
*
|
|
1378
|
+
* @param candle - The period's open and close.
|
|
1379
|
+
*/
|
|
1380
|
+
export declare function candleChange({ close, open }: Pick<Candle, "close" | "open">): CandleChange;
|
|
1381
|
+
//#endregion
|
|
1382
|
+
//#region src/candlestick-chart/candlestick-chart.d.ts
|
|
1383
|
+
/**
|
|
1384
|
+
* Describes the props of a candlestick chart: the rows, the words, the switches and the figure's
|
|
1385
|
+
* props.
|
|
1386
|
+
*
|
|
1387
|
+
* @typeParam Row - One row of the data, with `open`, `high`, `low` and `close`.
|
|
1388
|
+
*/
|
|
1389
|
+
interface CandlestickChartProps<Row extends object> extends Omit<RootProps, "chart" | "children" | "grid"> {
|
|
1390
|
+
/**
|
|
1391
|
+
* Whether the candles grow in, which they do only outside reduced motion.
|
|
1392
|
+
*/
|
|
1393
|
+
readonly animate?: boolean | undefined;
|
|
1394
|
+
/**
|
|
1395
|
+
* Name of the body in the key.
|
|
1396
|
+
*/
|
|
1397
|
+
readonly bodyLabel?: ReactNode;
|
|
1398
|
+
/**
|
|
1399
|
+
* Finding the chart shows, in words, which names the figure.
|
|
1400
|
+
*/
|
|
1401
|
+
readonly caption?: ReactNode;
|
|
1402
|
+
/**
|
|
1403
|
+
* Field of each row the category axis reads, such as a trading day.
|
|
1404
|
+
*/
|
|
1405
|
+
readonly categoryKey: Extract<keyof Row, string>;
|
|
1406
|
+
/**
|
|
1407
|
+
* Name of the change in the tooltip.
|
|
1408
|
+
*/
|
|
1409
|
+
readonly changeLabel?: ReactNode;
|
|
1410
|
+
/**
|
|
1411
|
+
* Recharts elements rendered inside the chart after the candles, such as a `ReferenceLine`.
|
|
1412
|
+
*/
|
|
1413
|
+
readonly children?: ReactNode;
|
|
1414
|
+
/**
|
|
1415
|
+
* Name of the closing price in the tooltip.
|
|
1416
|
+
*/
|
|
1417
|
+
readonly closeLabel?: ReactNode;
|
|
1418
|
+
/**
|
|
1419
|
+
* Rows of the periods, each with `open`, `high`, `low` and `close`. A row without a finite
|
|
1420
|
+
* number in each is left out.
|
|
1421
|
+
*/
|
|
1422
|
+
readonly data: readonly Row[];
|
|
1423
|
+
/**
|
|
1424
|
+
* Index of the period the tooltip shows when the chart first renders. None unless stated.
|
|
1425
|
+
*/
|
|
1426
|
+
readonly defaultIndex?: number | undefined;
|
|
1427
|
+
/**
|
|
1428
|
+
* Name of a falling candle's color in the key.
|
|
1429
|
+
*/
|
|
1430
|
+
readonly downLabel?: ReactNode;
|
|
1431
|
+
/**
|
|
1432
|
+
* Message the chart renders in the plot's place while no row has a candle.
|
|
1433
|
+
*/
|
|
1434
|
+
readonly empty?: ReactNode;
|
|
1435
|
+
/**
|
|
1436
|
+
* Name of a flat candle's color in the key, which renders while the chart has a flat candle.
|
|
1437
|
+
*/
|
|
1438
|
+
readonly flatLabel?: ReactNode;
|
|
1439
|
+
/**
|
|
1440
|
+
* Whether lines cross the plot at the value ticks.
|
|
1441
|
+
*/
|
|
1442
|
+
readonly grid?: boolean | undefined;
|
|
1443
|
+
/**
|
|
1444
|
+
* Name of the highest price in the tooltip.
|
|
1445
|
+
*/
|
|
1446
|
+
readonly highLabel?: ReactNode;
|
|
1447
|
+
/**
|
|
1448
|
+
* Accessible name of the chart's keyboard layer, such as "Daily prices of ACME".
|
|
1449
|
+
*/
|
|
1450
|
+
readonly label: string;
|
|
1451
|
+
/**
|
|
1452
|
+
* `Intl.DateTimeFormat` options the category ticks and the tooltip's heading are written with,
|
|
1453
|
+
* for periods given as dates. The category as it is unless stated.
|
|
1454
|
+
*/
|
|
1455
|
+
readonly labelOptions?: Intl.DateTimeFormatOptions | undefined;
|
|
1456
|
+
/**
|
|
1457
|
+
* Whether the key naming the colors and the parts renders below the plot.
|
|
1458
|
+
*/
|
|
1459
|
+
readonly legend?: boolean | undefined;
|
|
1460
|
+
/**
|
|
1461
|
+
* Locale the values are written in. The locale in scope unless stated.
|
|
1462
|
+
*/
|
|
1463
|
+
readonly locale?: string | undefined;
|
|
1464
|
+
/**
|
|
1465
|
+
* Name of the lowest price in the tooltip.
|
|
1466
|
+
*/
|
|
1467
|
+
readonly lowLabel?: ReactNode;
|
|
1468
|
+
/**
|
|
1469
|
+
* Name of the opening price in the tooltip.
|
|
1470
|
+
*/
|
|
1471
|
+
readonly openLabel?: ReactNode;
|
|
1472
|
+
/**
|
|
1473
|
+
* Name of a rising candle's color in the key.
|
|
1474
|
+
*/
|
|
1475
|
+
readonly upLabel?: ReactNode;
|
|
1476
|
+
/**
|
|
1477
|
+
* Domain of the value axis in recharts' terms. Rounded around the prices unless stated.
|
|
1478
|
+
*/
|
|
1479
|
+
readonly valueDomain?: YAxisProps["domain"];
|
|
1480
|
+
/**
|
|
1481
|
+
* `Intl.NumberFormat` options the value ticks, the prices and the change are written with.
|
|
1482
|
+
*/
|
|
1483
|
+
readonly valueOptions?: Intl.NumberFormatOptions | undefined;
|
|
1484
|
+
/**
|
|
1485
|
+
* Name of the wick in the key.
|
|
1486
|
+
*/
|
|
1487
|
+
readonly wickLabel?: ReactNode;
|
|
1488
|
+
}
|
|
1489
|
+
/**
|
|
1490
|
+
* Renders the chart's figure around the candles, the key and the caption.
|
|
1491
|
+
*
|
|
1492
|
+
* @typeParam Row - One row of the data, with `open`, `high`, `low` and `close`.
|
|
1493
|
+
* @param props - The rows, the words, the switches and the figure's props.
|
|
1494
|
+
*/
|
|
1495
|
+
export declare function CandlestickChart<Row extends object>({ animate, caption, categoryKey, children, data, defaultIndex, empty, grid, label, labelOptions, legend, locale, valueDomain, valueOptions, ...rest }: CandlestickChartProps<Row>): ReactElement;
|
|
1496
|
+
//#endregion
|
|
1497
|
+
//#region src/cartesian/periods.d.ts
|
|
1498
|
+
/**
|
|
1499
|
+
* Describes how `alignPeriods` merges two periods.
|
|
1500
|
+
*
|
|
1501
|
+
* @typeParam Row - One row of either period.
|
|
1502
|
+
*/
|
|
1503
|
+
interface AlignOptions<Row> {
|
|
1504
|
+
/**
|
|
1505
|
+
* Field of each row the category axis reads. The merged row keeps the previous period's own
|
|
1506
|
+
* category under the field's name and the suffix.
|
|
1507
|
+
*/
|
|
1508
|
+
readonly categoryKey: Extract<keyof Row, string>;
|
|
1509
|
+
/**
|
|
1510
|
+
* Fields copied from the previous period into each merged row.
|
|
1511
|
+
*/
|
|
1512
|
+
readonly keys: ReadonlyArray<Extract<keyof Row, string>>;
|
|
1513
|
+
/**
|
|
1514
|
+
* Suffix of each copied field's name. "Previous" unless stated, so `revenue` becomes
|
|
1515
|
+
* `revenuePrevious`.
|
|
1516
|
+
*/
|
|
1517
|
+
readonly suffix?: string | undefined;
|
|
1518
|
+
}
|
|
1519
|
+
/**
|
|
1520
|
+
* Returns a row per row of the current period, with the fields of the previous period's row at the
|
|
1521
|
+
* same position.
|
|
1522
|
+
*
|
|
1523
|
+
* @typeParam Row - One row of either period.
|
|
1524
|
+
* @param current - The current period's rows, in order.
|
|
1525
|
+
* @param previous - The previous period's rows, in order.
|
|
1526
|
+
* @param options - The category field, the copied fields and their suffix.
|
|
1527
|
+
*/
|
|
1528
|
+
export declare function alignPeriods<Row extends Record<string, unknown>>(current: readonly Row[], previous: readonly Row[], options: AlignOptions<Row>): Array<Record<string, unknown>>;
|
|
1529
|
+
//#endregion
|
|
1530
|
+
//#region src/sankey-chart/flows.d.ts
|
|
1531
|
+
/**
|
|
1532
|
+
* Describes one node of a flow graph: its key, its name and its color.
|
|
1533
|
+
*/
|
|
1534
|
+
interface SankeyNode {
|
|
1535
|
+
/**
|
|
1536
|
+
* Palette of the node and of the flows it sends. The theme's series color at the node's place
|
|
1537
|
+
* unless stated.
|
|
1538
|
+
*/
|
|
1539
|
+
readonly color?: ChartColor | undefined;
|
|
1540
|
+
/**
|
|
1541
|
+
* Key the flows name the node by.
|
|
1542
|
+
*/
|
|
1543
|
+
readonly key: string;
|
|
1544
|
+
/**
|
|
1545
|
+
* Name written beside the node and in the tooltip. The key unless stated.
|
|
1546
|
+
*/
|
|
1547
|
+
readonly label?: string | undefined;
|
|
1548
|
+
}
|
|
1549
|
+
/**
|
|
1550
|
+
* Describes one flow of a flow graph: `value` moves from the node keyed `from` to the node keyed
|
|
1551
|
+
* `to`.
|
|
1552
|
+
*/
|
|
1553
|
+
interface SankeyFlow {
|
|
1554
|
+
/**
|
|
1555
|
+
* Key of the node the flow leaves.
|
|
1556
|
+
*/
|
|
1557
|
+
readonly from: string;
|
|
1558
|
+
/**
|
|
1559
|
+
* Key of the node the flow enters.
|
|
1560
|
+
*/
|
|
1561
|
+
readonly to: string;
|
|
1562
|
+
/**
|
|
1563
|
+
* Amount that flows, such as a count of people or of money.
|
|
1564
|
+
*/
|
|
1565
|
+
readonly value: number;
|
|
1566
|
+
}
|
|
1567
|
+
/**
|
|
1568
|
+
* Describes a node's balance: everything that flows into it and out of it.
|
|
1569
|
+
*/
|
|
1570
|
+
interface SankeyBalance {
|
|
1571
|
+
/**
|
|
1572
|
+
* Sum of the flows into the node, 0 for a source.
|
|
1573
|
+
*/
|
|
1574
|
+
readonly inflow: number;
|
|
1575
|
+
/**
|
|
1576
|
+
* Key of the node.
|
|
1577
|
+
*/
|
|
1578
|
+
readonly key: string;
|
|
1579
|
+
/**
|
|
1580
|
+
* Sum of the flows out of the node, 0 for a sink.
|
|
1581
|
+
*/
|
|
1582
|
+
readonly outflow: number;
|
|
1583
|
+
}
|
|
1584
|
+
/**
|
|
1585
|
+
* Returns the flows that close a loop against the flows before them, in their order: each flow
|
|
1586
|
+
* with a finite value above zero whose end already leads back to its start, a flow from a node to
|
|
1587
|
+
* itself included.
|
|
1588
|
+
*
|
|
1589
|
+
* @remarks
|
|
1590
|
+
* The flows are taken in order, so the flows left after removing the ones returned always render.
|
|
1591
|
+
* @param flows - The flows in the order they are stated.
|
|
1592
|
+
*/
|
|
1593
|
+
export declare function sankeyCycles(flows: readonly SankeyFlow[]): SankeyFlow[];
|
|
1594
|
+
/**
|
|
1595
|
+
* Returns each node's inflow and outflow over the flows with a finite value above zero between
|
|
1596
|
+
* two of the nodes, in the nodes' order.
|
|
1597
|
+
*
|
|
1598
|
+
* @param nodes - The nodes, whose keys the flows name.
|
|
1599
|
+
* @param flows - The flows between them.
|
|
1600
|
+
*/
|
|
1601
|
+
export declare function flowBalance(nodes: readonly SankeyNode[], flows: readonly SankeyFlow[]): SankeyBalance[];
|
|
1602
|
+
//#endregion
|
|
1603
|
+
//#region src/chord-diagram/chord-diagram.d.ts
|
|
1604
|
+
/**
|
|
1605
|
+
* Describes the props of a chord diagram: the nodes and the flows, the words and the figure's
|
|
1606
|
+
* props.
|
|
1607
|
+
*/
|
|
1608
|
+
interface ChordDiagramProps extends Omit<RootProps, "chart" | "children"> {
|
|
1609
|
+
/**
|
|
1610
|
+
* Finding the chart shows, in words, which names the figure.
|
|
1611
|
+
*/
|
|
1612
|
+
readonly caption?: ReactNode;
|
|
1613
|
+
/**
|
|
1614
|
+
* Recharts elements rendered inside the chart after the marks.
|
|
1615
|
+
*/
|
|
1616
|
+
readonly children?: ReactNode;
|
|
1617
|
+
/**
|
|
1618
|
+
* Place in the keyboard walk of the mark the readout shows when the chart first renders: each arc
|
|
1619
|
+
* in the nodes' order, then the ribbons that start on it. None unless stated.
|
|
1620
|
+
*/
|
|
1621
|
+
readonly defaultIndex?: number | undefined;
|
|
1622
|
+
/**
|
|
1623
|
+
* Message the chart renders in the plot's place while it has no flow to render.
|
|
1624
|
+
*/
|
|
1625
|
+
readonly empty?: ReactNode;
|
|
1626
|
+
/**
|
|
1627
|
+
* Flows between the nodes, by key, in any order: both ways between two nodes, and from a node to
|
|
1628
|
+
* itself.
|
|
1629
|
+
*/
|
|
1630
|
+
readonly flows: readonly SankeyFlow[];
|
|
1631
|
+
/**
|
|
1632
|
+
* Name of what flows into a node in the readout. "In" unless stated.
|
|
1633
|
+
*/
|
|
1634
|
+
readonly inflowLabel?: string | undefined;
|
|
1635
|
+
/**
|
|
1636
|
+
* Accessible name of the chart's keyboard layer, such as "Calls between services".
|
|
1637
|
+
*/
|
|
1638
|
+
readonly label: string;
|
|
1639
|
+
/**
|
|
1640
|
+
* Locale the amounts are written in. The locale in scope unless stated.
|
|
1641
|
+
*/
|
|
1642
|
+
readonly locale?: string | undefined;
|
|
1643
|
+
/**
|
|
1644
|
+
* Nodes the flows name, in the order their arcs follow each other clockwise from 12 o'clock and
|
|
1645
|
+
* the series colors take.
|
|
1646
|
+
*/
|
|
1647
|
+
readonly nodes: readonly SankeyNode[];
|
|
1648
|
+
/**
|
|
1649
|
+
* Name of what flows out of a node in the readout. "Out" unless stated.
|
|
1650
|
+
*/
|
|
1651
|
+
readonly outflowLabel?: string | undefined;
|
|
1652
|
+
/**
|
|
1653
|
+
* `Intl.NumberFormatOptions` the amounts are written with in the readout.
|
|
1654
|
+
*/
|
|
1655
|
+
readonly valueOptions?: Intl.NumberFormatOptions | undefined;
|
|
1656
|
+
}
|
|
1657
|
+
/**
|
|
1658
|
+
* Renders the chart's figure around the diagram and the caption.
|
|
1659
|
+
*
|
|
1660
|
+
* @param props - The nodes, the flows, the words and the figure's props.
|
|
1661
|
+
*/
|
|
1662
|
+
export declare function ChordDiagram({ caption, children, defaultIndex, empty, flows, inflowLabel, label, locale, nodes, outflowLabel, ratio, valueOptions, ...root }: ChordDiagramProps): ReactElement;
|
|
1663
|
+
//#endregion
|
|
1664
|
+
//#region src/chord-diagram/layout.d.ts
|
|
1665
|
+
/**
|
|
1666
|
+
* Describes a span of the circle: a node's arc, or one end of a ribbon inside it.
|
|
1667
|
+
*/
|
|
1668
|
+
interface ChordSpan {
|
|
1669
|
+
/**
|
|
1670
|
+
* End of the span, in radians from 12 o'clock, clockwise.
|
|
1671
|
+
*/
|
|
1672
|
+
readonly endAngle: number;
|
|
1673
|
+
/**
|
|
1674
|
+
* Key of the node the span is on.
|
|
1675
|
+
*/
|
|
1676
|
+
readonly key: string;
|
|
1677
|
+
/**
|
|
1678
|
+
* Start of the span, in radians from 12 o'clock, clockwise.
|
|
1679
|
+
*/
|
|
1680
|
+
readonly startAngle: number;
|
|
1681
|
+
/**
|
|
1682
|
+
* Amount the span is as long as: what an arc's node sends, or what a ribbon's end sends to the
|
|
1683
|
+
* other end.
|
|
1684
|
+
*/
|
|
1685
|
+
readonly value: number;
|
|
1686
|
+
}
|
|
1687
|
+
/**
|
|
1688
|
+
* Describes a ribbon: two nodes and the two directions between them.
|
|
1689
|
+
*/
|
|
1690
|
+
interface ChordRibbon {
|
|
1691
|
+
/**
|
|
1692
|
+
* End on the node earlier in the nodes' order, as wide as what that node sends to the other.
|
|
1693
|
+
*/
|
|
1694
|
+
readonly source: ChordSpan;
|
|
1695
|
+
/**
|
|
1696
|
+
* End on the other node, as wide as what it sends back, or the source's end for a node's flow to
|
|
1697
|
+
* itself.
|
|
1698
|
+
*/
|
|
1699
|
+
readonly target: ChordSpan;
|
|
1700
|
+
}
|
|
1701
|
+
/**
|
|
1702
|
+
* Describes a chord diagram's layout: the arcs and the ribbons.
|
|
1703
|
+
*/
|
|
1704
|
+
interface ChordLayout {
|
|
1705
|
+
/**
|
|
1706
|
+
* Arcs of the nodes a counted flow touches, in the nodes' order.
|
|
1707
|
+
*/
|
|
1708
|
+
readonly groups: readonly ChordSpan[];
|
|
1709
|
+
/**
|
|
1710
|
+
* Ribbons by their source's arc, then by their target's.
|
|
1711
|
+
*/
|
|
1712
|
+
readonly ribbons: readonly ChordRibbon[];
|
|
1713
|
+
}
|
|
1714
|
+
/**
|
|
1715
|
+
* Lays out the nodes' arcs and a ribbon per pair of nodes with a flow between them.
|
|
1716
|
+
*
|
|
1717
|
+
* @param nodes - The nodes in the order their arcs follow each other from 12 o'clock.
|
|
1718
|
+
* @param flows - The flows between them, both ways and from a node to itself.
|
|
1719
|
+
* @param pad - The space between two arcs, in radians.
|
|
1720
|
+
*/
|
|
1721
|
+
export declare function chordLayout(nodes: readonly SankeyNode[], flows: readonly SankeyFlow[], pad?: number): ChordLayout;
|
|
1722
|
+
//#endregion
|
|
1723
|
+
//#region src/heat/scale.d.ts
|
|
1724
|
+
/**
|
|
1725
|
+
* Describes the values a heat grid's scale spans.
|
|
1726
|
+
*/
|
|
1727
|
+
interface HeatmapDomain {
|
|
1728
|
+
/**
|
|
1729
|
+
* Value a cell takes the scale's strongest color at.
|
|
1730
|
+
*/
|
|
1731
|
+
readonly max: number;
|
|
1732
|
+
/**
|
|
1733
|
+
* Value a cell takes the scale's faintest color at.
|
|
1734
|
+
*/
|
|
1735
|
+
readonly min: number;
|
|
1736
|
+
}
|
|
1737
|
+
/**
|
|
1738
|
+
* Describes how a scale reads a value: `sequential` as an amount from least to most, `diverging` as
|
|
1739
|
+
* a deviation either side of a midpoint.
|
|
1740
|
+
*/
|
|
1741
|
+
type HeatmapScale = "diverging" | "sequential";
|
|
1742
|
+
/**
|
|
1743
|
+
* Describes the two colors of a diverging scale.
|
|
1744
|
+
*/
|
|
1745
|
+
interface HeatmapColors {
|
|
1746
|
+
/**
|
|
1747
|
+
* Color of a value under the midpoint.
|
|
1748
|
+
*/
|
|
1749
|
+
readonly negative: ChartColor;
|
|
1750
|
+
/**
|
|
1751
|
+
* Color of a value over the midpoint.
|
|
1752
|
+
*/
|
|
1753
|
+
readonly positive: ChartColor;
|
|
1754
|
+
}
|
|
1755
|
+
/**
|
|
1756
|
+
* Describes a reading with a value, such as a heatmap's cell or a calendar's day.
|
|
1757
|
+
*/
|
|
1758
|
+
interface Valued {
|
|
1759
|
+
/**
|
|
1760
|
+
* Value, or `null` for a reading that is missing.
|
|
1761
|
+
*/
|
|
1762
|
+
readonly value: null | number;
|
|
1763
|
+
}
|
|
1764
|
+
/**
|
|
1765
|
+
* Returns the span of the values that are finite numbers, which is a heat grid's domain unless the
|
|
1766
|
+
* caller pins one.
|
|
1767
|
+
*
|
|
1768
|
+
* @remarks
|
|
1769
|
+
* A value that is `null` or not finite is missing and does not stretch the domain. Two grids read
|
|
1770
|
+
* against each other take one domain, the span of both grids' values together.
|
|
1771
|
+
* @param cells - The readings, such as a heatmap's cells or a calendar's days.
|
|
1772
|
+
* @returns The least and the greatest value, or 0 and 0 without a value.
|
|
1773
|
+
*/
|
|
1774
|
+
export declare function heatmapDomain(cells: readonly Valued[]): HeatmapDomain;
|
|
1775
|
+
//#endregion
|
|
1776
|
+
//#region src/heatmap/cells.d.ts
|
|
1777
|
+
/**
|
|
1778
|
+
* Describes one reading: the row and the column it belongs to, its value, and the words that name
|
|
1779
|
+
* it or its value where the caller writes them.
|
|
1780
|
+
*/
|
|
1781
|
+
interface HeatmapCell {
|
|
1782
|
+
/**
|
|
1783
|
+
* Key of the column.
|
|
1784
|
+
*/
|
|
1785
|
+
readonly column: string;
|
|
1786
|
+
/**
|
|
1787
|
+
* Words that name the reading, such as its date, which the readout writes as its heading and a
|
|
1788
|
+
* screen reader reads before the value. The row's and the column's words unless stated.
|
|
1789
|
+
*/
|
|
1790
|
+
readonly label?: string | undefined;
|
|
1791
|
+
/**
|
|
1792
|
+
* Key of the row.
|
|
1793
|
+
*/
|
|
1794
|
+
readonly row: string;
|
|
1795
|
+
/**
|
|
1796
|
+
* Words the cell prints and reads for its value, such as a head count while the fill shows a
|
|
1797
|
+
* rate. The value written in `valueOptions` unless stated.
|
|
1798
|
+
*/
|
|
1799
|
+
readonly text?: string | undefined;
|
|
1800
|
+
/**
|
|
1801
|
+
* Value, or `null` for a reading that is missing, which renders apart from any value.
|
|
1802
|
+
*/
|
|
1803
|
+
readonly value: null | number;
|
|
1804
|
+
}
|
|
1805
|
+
/**
|
|
1806
|
+
* Describes the heading of a row, a column or a group of columns: the key the cells name it by and
|
|
1807
|
+
* its words.
|
|
1808
|
+
*/
|
|
1809
|
+
interface HeatmapHeading {
|
|
1810
|
+
/**
|
|
1811
|
+
* Key of the group of columns the column belongs to, one of the `groups` keys.
|
|
1812
|
+
*/
|
|
1813
|
+
readonly group?: string | undefined;
|
|
1814
|
+
/**
|
|
1815
|
+
* Whether a screen reader reads the heading alone, such as a calendar's week heading.
|
|
1816
|
+
*/
|
|
1817
|
+
readonly hidden?: boolean | undefined;
|
|
1818
|
+
/**
|
|
1819
|
+
* Key the cells name the row or the column by.
|
|
1820
|
+
*/
|
|
1821
|
+
readonly key: string;
|
|
1822
|
+
/**
|
|
1823
|
+
* Words of the heading.
|
|
1824
|
+
*/
|
|
1825
|
+
readonly label: ReactNode;
|
|
1826
|
+
}
|
|
1827
|
+
//#endregion
|
|
1828
|
+
//#region src/cohort/cohorts.d.ts
|
|
1829
|
+
/**
|
|
1830
|
+
* Describes one intake: who arrived together and how many of them remained at each period since.
|
|
1831
|
+
*/
|
|
1832
|
+
interface Cohort {
|
|
1833
|
+
/**
|
|
1834
|
+
* Key of the cohort, unique among the cohorts.
|
|
1835
|
+
*/
|
|
1836
|
+
readonly key: string;
|
|
1837
|
+
/**
|
|
1838
|
+
* Words that name the cohort, such as "Jan 2026".
|
|
1839
|
+
*/
|
|
1840
|
+
readonly label: string;
|
|
1841
|
+
/**
|
|
1842
|
+
* How many remained at each period since the cohort arrived, as far as it is observed, with
|
|
1843
|
+
* `null` for a count nobody measured.
|
|
1844
|
+
*/
|
|
1845
|
+
readonly retained: ReadonlyArray<null | number>;
|
|
1846
|
+
/**
|
|
1847
|
+
* How many arrived, the denominator of every rate of the cohort.
|
|
1848
|
+
*/
|
|
1849
|
+
readonly size: number;
|
|
1850
|
+
}
|
|
1851
|
+
/**
|
|
1852
|
+
* Describes a heatmap cell of a cohort grid, which `onSelect` receives with its cohort, its period
|
|
1853
|
+
* and its count.
|
|
1854
|
+
*/
|
|
1855
|
+
interface CohortCell extends HeatmapCell {
|
|
1856
|
+
/**
|
|
1857
|
+
* Cohort of the cell, or undefined for the average's cell.
|
|
1858
|
+
*/
|
|
1859
|
+
readonly cohort: Cohort | undefined;
|
|
1860
|
+
/**
|
|
1861
|
+
* Period of the cell, 0 being the period the cohort arrived in.
|
|
1862
|
+
*/
|
|
1863
|
+
readonly period: number;
|
|
1864
|
+
/**
|
|
1865
|
+
* How many remained, or `null` for the average and for a count nobody measured.
|
|
1866
|
+
*/
|
|
1867
|
+
readonly retained: null | number;
|
|
1868
|
+
}
|
|
1869
|
+
/**
|
|
1870
|
+
* Describes the words of a cohort grid and what its cells write.
|
|
1871
|
+
*/
|
|
1872
|
+
interface CohortOptions {
|
|
1873
|
+
/**
|
|
1874
|
+
* Words of a last row of the size-weighted rate per period, which renders while stated.
|
|
1875
|
+
*/
|
|
1876
|
+
readonly average?: string | undefined;
|
|
1877
|
+
/**
|
|
1878
|
+
* Returns the words of a cohort's row, such as its label with its size. The cohort's label unless
|
|
1879
|
+
* stated.
|
|
1880
|
+
*/
|
|
1881
|
+
readonly label?: ((cohort: Cohort) => string) | undefined;
|
|
1882
|
+
/**
|
|
1883
|
+
* Locale the counts are written in.
|
|
1884
|
+
*/
|
|
1885
|
+
readonly locale: string;
|
|
1886
|
+
/**
|
|
1887
|
+
* Value a cohort's cells write: the rate, or the count that remained. The fill is the rate either
|
|
1888
|
+
* way. `rate` unless stated.
|
|
1889
|
+
*/
|
|
1890
|
+
readonly measure?: "count" | "rate" | undefined;
|
|
1891
|
+
/**
|
|
1892
|
+
* Returns the words of a period's column, such as "M3". The period's number unless stated.
|
|
1893
|
+
*/
|
|
1894
|
+
readonly periodLabel?: ((period: number) => string) | undefined;
|
|
1895
|
+
}
|
|
1896
|
+
/**
|
|
1897
|
+
* Describes the heatmap props of a cohort grid: its cells, its periods, its cohorts, rates on a
|
|
1898
|
+
* scale from 0 to 1 written as percentages, and a sparse grid.
|
|
1899
|
+
*/
|
|
1900
|
+
interface CohortGrid {
|
|
1901
|
+
/**
|
|
1902
|
+
* Cells of the observed periods of each cohort, and of the average.
|
|
1903
|
+
*/
|
|
1904
|
+
readonly cells: readonly CohortCell[];
|
|
1905
|
+
/**
|
|
1906
|
+
* Periods, from 0 to the widest cohort's last.
|
|
1907
|
+
*/
|
|
1908
|
+
readonly columns: readonly HeatmapHeading[];
|
|
1909
|
+
/**
|
|
1910
|
+
* Scale of the rates, from 0 to 1.
|
|
1911
|
+
*/
|
|
1912
|
+
readonly domain: HeatmapDomain;
|
|
1913
|
+
/**
|
|
1914
|
+
* Cohorts in order, then the average while it renders.
|
|
1915
|
+
*/
|
|
1916
|
+
readonly rows: readonly HeatmapHeading[];
|
|
1917
|
+
/**
|
|
1918
|
+
* Whether a period past a cohort's last count is an empty place, which it is.
|
|
1919
|
+
*/
|
|
1920
|
+
readonly sparse: true;
|
|
1921
|
+
/**
|
|
1922
|
+
* Options a rate is written with, as a percentage.
|
|
1923
|
+
*/
|
|
1924
|
+
readonly valueOptions: Intl.NumberFormatOptions;
|
|
1925
|
+
}
|
|
1926
|
+
/**
|
|
1927
|
+
* Returns the share of a cohort that remained at a period, 0 being the period it arrived in, or
|
|
1928
|
+
* `null` without a count or without anyone in the cohort.
|
|
1929
|
+
*/
|
|
1930
|
+
export declare function retentionRate(cohort: Cohort, period: number): null | number;
|
|
1931
|
+
/**
|
|
1932
|
+
* Returns the share of the cohorts that remained at each period, each cohort weighed by its size,
|
|
1933
|
+
* over the cohorts with a rate at the period, or `null` at a period without one.
|
|
1934
|
+
*/
|
|
1935
|
+
export declare function cohortAverages(cohorts: readonly Cohort[]): ReadonlyArray<null | number>;
|
|
1936
|
+
/**
|
|
1937
|
+
* Returns the heatmap props of a cohort grid: a row per cohort, a column per period, a cell per
|
|
1938
|
+
* observed period of each cohort filled from its rate, and a last row of the averages while
|
|
1939
|
+
* `average` names it.
|
|
1940
|
+
*
|
|
1941
|
+
* @param cohorts - The cohorts, oldest first.
|
|
1942
|
+
* @param options - The words, the locale and what the cells write.
|
|
1943
|
+
* @returns The props to spread into `Heatmap`.
|
|
1944
|
+
*/
|
|
1945
|
+
export declare function cohortCells(cohorts: readonly Cohort[], options: CohortOptions): CohortGrid;
|
|
1946
|
+
//#endregion
|
|
1947
|
+
//#region src/cohort/series.d.ts
|
|
1948
|
+
/**
|
|
1949
|
+
* Describes a row of a retention chart: the period's words, each cohort's rate under its series
|
|
1950
|
+
* key, and the average split into its solid and its dashed part.
|
|
1951
|
+
*/
|
|
1952
|
+
interface RetentionRow {
|
|
1953
|
+
/**
|
|
1954
|
+
* Words of the period.
|
|
1955
|
+
*/
|
|
1956
|
+
readonly period: string;
|
|
1957
|
+
/**
|
|
1958
|
+
* Rate of a cohort under `cohortSeriesKey` of its key, the average, or its dashed part.
|
|
1959
|
+
*/
|
|
1960
|
+
readonly [key: string]: null | number | string;
|
|
1961
|
+
}
|
|
1962
|
+
/**
|
|
1963
|
+
* Describes the words and the colors of a retention chart.
|
|
1964
|
+
*/
|
|
1965
|
+
interface RetentionOptions {
|
|
1966
|
+
/**
|
|
1967
|
+
* Name of the average. "All cohorts" unless stated.
|
|
1968
|
+
*/
|
|
1969
|
+
readonly averageLabel?: ReactNode;
|
|
1970
|
+
/**
|
|
1971
|
+
* Color every line mixes from. The theme's first series color unless stated.
|
|
1972
|
+
*/
|
|
1973
|
+
readonly color?: ChartColor | undefined;
|
|
1974
|
+
/**
|
|
1975
|
+
* How many cohorts need a rate at a period for the average to render solid there. 3 unless
|
|
1976
|
+
* stated.
|
|
1977
|
+
*/
|
|
1978
|
+
readonly minCohorts?: number | undefined;
|
|
1979
|
+
/**
|
|
1980
|
+
* Returns the words of a period, such as "M3". The period's number unless stated.
|
|
1981
|
+
*/
|
|
1982
|
+
readonly periodLabel?: ((period: number) => string) | undefined;
|
|
1983
|
+
/**
|
|
1984
|
+
* Name of the dashed part of the average. "All cohorts, few old enough" unless stated.
|
|
1985
|
+
*/
|
|
1986
|
+
readonly sparseLabel?: ReactNode;
|
|
1987
|
+
}
|
|
1988
|
+
/**
|
|
1989
|
+
* Describes the line chart props of a retention chart: the rows, the series, a value axis from 0
|
|
1990
|
+
* to 1 and rates written as percentages.
|
|
1991
|
+
*/
|
|
1992
|
+
interface Retention {
|
|
1993
|
+
/**
|
|
1994
|
+
* Field of each row the category axis reads, the period's words.
|
|
1995
|
+
*/
|
|
1996
|
+
readonly categoryKey: "period";
|
|
1997
|
+
/**
|
|
1998
|
+
* A row per period.
|
|
1999
|
+
*/
|
|
2000
|
+
readonly data: RetentionRow[];
|
|
2001
|
+
/**
|
|
2002
|
+
* A line per cohort, oldest first, then the average's solid and dashed parts while they have a
|
|
2003
|
+
* value.
|
|
2004
|
+
*/
|
|
2005
|
+
readonly series: readonly CartesianSeries[];
|
|
2006
|
+
/**
|
|
2007
|
+
* Domain of the value axis, from 0 to 1.
|
|
2008
|
+
*/
|
|
2009
|
+
readonly valueDomain: [number, number];
|
|
2010
|
+
/**
|
|
2011
|
+
* Options a rate is written with, as a percentage.
|
|
2012
|
+
*/
|
|
2013
|
+
readonly valueOptions: Intl.NumberFormatOptions;
|
|
2014
|
+
}
|
|
2015
|
+
/**
|
|
2016
|
+
* Returns the series key of a cohort's rate from the cohort's key, which no other field of a row
|
|
2017
|
+
* takes.
|
|
2018
|
+
*
|
|
2019
|
+
* @remarks
|
|
2020
|
+
* The key is `cohort:` and the cohort's key URI-encoded with its dots as `%2E`, because recharts
|
|
2021
|
+
* reads a dot or a bracket in a key as a path. Two cohort keys never share a series key.
|
|
2022
|
+
*/
|
|
2023
|
+
export declare function cohortSeriesKey(key: string): string;
|
|
2024
|
+
/**
|
|
2025
|
+
* Returns the line chart props of a retention chart: a row per period, a line per cohort, and the
|
|
2026
|
+
* average's solid and dashed parts.
|
|
2027
|
+
*
|
|
2028
|
+
* @param cohorts - The cohorts, oldest first.
|
|
2029
|
+
* @param options - The words, the color and how many cohorts make the average solid.
|
|
2030
|
+
* @returns The props to spread into `LineChart`.
|
|
2031
|
+
*/
|
|
2032
|
+
export declare function retentionSeries(cohorts: readonly Cohort[], options?: RetentionOptions): Retention;
|
|
2033
|
+
//#endregion
|
|
2034
|
+
//#region src/combo-chart/combo-chart.d.ts
|
|
2035
|
+
/**
|
|
2036
|
+
* Describes the props of a combo chart: the cartesian props, series that state their marks and
|
|
2037
|
+
* axes, the end axis and the path of a line.
|
|
2038
|
+
*
|
|
2039
|
+
* @typeParam Row - One row of the data.
|
|
2040
|
+
*/
|
|
2041
|
+
interface ComboChartProps<Row> extends Omit<CartesianProps<Row>, "series"> {
|
|
2042
|
+
/**
|
|
2043
|
+
* Path of each line and area's edge between two points. Smoothed through them unless stated.
|
|
2044
|
+
*/
|
|
2045
|
+
readonly curve?: Curve | undefined;
|
|
2046
|
+
/**
|
|
2047
|
+
* Domain of the end axis in recharts' terms, such as `[0, 1]`. From zero unless stated.
|
|
2048
|
+
*/
|
|
2049
|
+
readonly endDomain?: YAxisProps["domain"];
|
|
2050
|
+
/**
|
|
2051
|
+
* `Intl.NumberFormat` options the end axis' ticks and its series' values are written with.
|
|
2052
|
+
*/
|
|
2053
|
+
readonly endOptions?: Intl.NumberFormatOptions | undefined;
|
|
2054
|
+
/**
|
|
2055
|
+
* Series the chart plots, each with its mark and value axis, in the order the legend lists them.
|
|
2056
|
+
*/
|
|
2057
|
+
readonly series: readonly ComboSeries[];
|
|
2058
|
+
}
|
|
2059
|
+
/**
|
|
2060
|
+
* Renders the chart's figure around a mark per series, each in the mark it states.
|
|
2061
|
+
*
|
|
2062
|
+
* @typeParam Row - One row of the data.
|
|
2063
|
+
* @param props - The rows, the series, the words, the end axis and the curve.
|
|
2064
|
+
*/
|
|
2065
|
+
export declare function ComboChart<Row>({ curve, ...props }: ComboChartProps<Row>): ReactElement;
|
|
2066
|
+
//#endregion
|
|
2067
|
+
//#region src/distribution-chart/distribution-chart.d.ts
|
|
2068
|
+
/**
|
|
2069
|
+
* Describes a series of a distribution chart: the kit's series and its own values.
|
|
2070
|
+
*/
|
|
2071
|
+
interface DistributionSeries extends SeriesOptions {
|
|
2072
|
+
/**
|
|
2073
|
+
* Values of the series, one per thing measured. A value that is not a finite number is left out.
|
|
2074
|
+
*/
|
|
2075
|
+
readonly values: readonly unknown[];
|
|
2076
|
+
}
|
|
2077
|
+
/**
|
|
2078
|
+
* Describes the props of a distribution chart: the series and their values, the bins, the words,
|
|
2079
|
+
* the switches and the figure's props.
|
|
2080
|
+
*/
|
|
2081
|
+
interface DistributionChartProps extends Omit<ChartOptions<unknown>, "data" | "series">, Omit<RootProps, "chart" | "children" | "grid"> {
|
|
2082
|
+
/**
|
|
2083
|
+
* Whether the bars animate in, which they do only outside reduced motion.
|
|
2084
|
+
*/
|
|
2085
|
+
readonly animate?: boolean | undefined;
|
|
2086
|
+
/**
|
|
2087
|
+
* Number of bins to aim for, at most 30. Freedman–Diaconis' count of every value together unless
|
|
2088
|
+
* stated.
|
|
2089
|
+
*/
|
|
2090
|
+
readonly bins?: number | undefined;
|
|
2091
|
+
/**
|
|
2092
|
+
* Finding the chart shows, in words, which names the figure.
|
|
2093
|
+
*/
|
|
2094
|
+
readonly caption?: ReactNode;
|
|
2095
|
+
/**
|
|
2096
|
+
* Recharts elements rendered inside the chart after the bars, such as a `ReferenceLine`.
|
|
2097
|
+
*/
|
|
2098
|
+
readonly children?: ReactNode;
|
|
2099
|
+
/**
|
|
2100
|
+
* Index of the bin the tooltip shows when the chart first renders. None unless stated.
|
|
2101
|
+
*/
|
|
2102
|
+
readonly defaultIndex?: number | undefined;
|
|
2103
|
+
/**
|
|
2104
|
+
* Message the chart renders in the plot's place while no series has a value.
|
|
2105
|
+
*/
|
|
2106
|
+
readonly empty?: ReactNode;
|
|
2107
|
+
/**
|
|
2108
|
+
* Whether lines cross the plot at the value ticks.
|
|
2109
|
+
*/
|
|
2110
|
+
readonly grid?: boolean | undefined;
|
|
2111
|
+
/**
|
|
2112
|
+
* Accessible name of the chart's keyboard layer, such as "Delivery times by region".
|
|
2113
|
+
*/
|
|
2114
|
+
readonly label: string;
|
|
2115
|
+
/**
|
|
2116
|
+
* Whether the legend renders below the plot. It renders while two or more series have values
|
|
2117
|
+
* unless stated.
|
|
2118
|
+
*/
|
|
2119
|
+
readonly legend?: boolean | undefined;
|
|
2120
|
+
/**
|
|
2121
|
+
* Accessible name of the legend's group of buttons.
|
|
2122
|
+
*/
|
|
2123
|
+
readonly legendLabel?: string | undefined;
|
|
2124
|
+
/**
|
|
2125
|
+
* Whether each bin reads as a share of its series' total, for series of different sizes. The
|
|
2126
|
+
* value axis and the tooltip then write percents.
|
|
2127
|
+
*/
|
|
2128
|
+
readonly normalize?: boolean | undefined;
|
|
2129
|
+
/**
|
|
2130
|
+
* Series the chart compares, in the order the legend lists them and a bin places their bars.
|
|
2131
|
+
*/
|
|
2132
|
+
readonly series: readonly DistributionSeries[];
|
|
2133
|
+
/**
|
|
2134
|
+
* `Intl.NumberFormat` options the bin edges are written with, on the axis and in the tooltip.
|
|
2135
|
+
*/
|
|
2136
|
+
readonly valueOptions?: Intl.NumberFormatOptions | undefined;
|
|
2137
|
+
}
|
|
2138
|
+
/**
|
|
2139
|
+
* Renders the chart's figure around the bars, the legend and the caption.
|
|
2140
|
+
*
|
|
2141
|
+
* @param props - The series, the bins, the words, the switches and the figure's props.
|
|
2142
|
+
*/
|
|
2143
|
+
export declare function DistributionChart({ animate, bins, caption, children, defaultHiddenKeys, defaultIndex, empty, grid, hiddenKeys, label, legend, legendLabel, locale, normalize, onHiddenKeysChange, series, valueOptions, ...root }: DistributionChartProps): ReactElement;
|
|
2144
|
+
//#endregion
|
|
2145
|
+
//#region src/polar/types.d.ts
|
|
2146
|
+
/**
|
|
2147
|
+
* Describes one slice of a pie, a part of the whole.
|
|
2148
|
+
*/
|
|
2149
|
+
interface PieSlice {
|
|
2150
|
+
/**
|
|
2151
|
+
* Palette the slice takes its color from. The theme's series color at the slice's place, largest
|
|
2152
|
+
* first, unless stated.
|
|
2153
|
+
*/
|
|
2154
|
+
readonly color?: ChartColor | undefined;
|
|
2155
|
+
/**
|
|
2156
|
+
* Key of the slice, which the legend, the tooltip and the hidden keys name.
|
|
2157
|
+
*/
|
|
2158
|
+
readonly key: string;
|
|
2159
|
+
/**
|
|
2160
|
+
* Name the tooltip and the legend show. The key unless stated.
|
|
2161
|
+
*/
|
|
2162
|
+
readonly label?: ReactNode;
|
|
2163
|
+
/**
|
|
2164
|
+
* Size of the part. A value that is not a finite number counts as zero.
|
|
2165
|
+
*/
|
|
2166
|
+
readonly value: number;
|
|
2167
|
+
}
|
|
2168
|
+
/**
|
|
2169
|
+
* Describes the props of a pie.
|
|
2170
|
+
*/
|
|
2171
|
+
interface PolarProps extends Omit<ChartOptions<PieSlice>, "data" | "series">, Omit<RootProps, "chart" | "children"> {
|
|
2172
|
+
/**
|
|
2173
|
+
* Whether the slices animate in, which they do only outside reduced motion.
|
|
2174
|
+
*/
|
|
2175
|
+
readonly animate?: boolean | undefined;
|
|
2176
|
+
/**
|
|
2177
|
+
* Finding the chart shows, in words, which names the figure.
|
|
2178
|
+
*/
|
|
2179
|
+
readonly caption?: ReactNode;
|
|
2180
|
+
/**
|
|
2181
|
+
* Recharts elements rendered inside the chart after the pie.
|
|
2182
|
+
*/
|
|
2183
|
+
readonly children?: ReactNode;
|
|
2184
|
+
/**
|
|
2185
|
+
* Index of the slice, largest first, the tooltip shows when the chart first renders. No tooltip
|
|
2186
|
+
* shows at first unless stated.
|
|
2187
|
+
*/
|
|
2188
|
+
readonly defaultIndex?: number | undefined;
|
|
2189
|
+
/**
|
|
2190
|
+
* Message the chart renders in the plot's place while it has no slices.
|
|
2191
|
+
*/
|
|
2192
|
+
readonly empty?: ReactNode;
|
|
2193
|
+
/**
|
|
2194
|
+
* Accessible name of the chart's keyboard layer, such as "Storage per kind of file".
|
|
2195
|
+
*/
|
|
2196
|
+
readonly label: string;
|
|
2197
|
+
/**
|
|
2198
|
+
* Whether the legend renders below the plot. It renders while the chart has slices unless
|
|
2199
|
+
* stated.
|
|
2200
|
+
*/
|
|
2201
|
+
readonly legend?: boolean | undefined;
|
|
2202
|
+
/**
|
|
2203
|
+
* Accessible name of the legend's group of buttons.
|
|
2204
|
+
*/
|
|
2205
|
+
readonly legendLabel?: string | undefined;
|
|
2206
|
+
/**
|
|
2207
|
+
* Largest number of slices the pie renders. The slices past it gather into one slice named by
|
|
2208
|
+
* `otherLabel`. Every slice renders unless stated.
|
|
2209
|
+
*/
|
|
2210
|
+
readonly maxSlices?: number | undefined;
|
|
2211
|
+
/**
|
|
2212
|
+
* Name of the slice the tail gathers into.
|
|
2213
|
+
*/
|
|
2214
|
+
readonly otherLabel?: ReactNode;
|
|
2215
|
+
/**
|
|
2216
|
+
* Whether each slice's share of the slices shown is written on it.
|
|
2217
|
+
*/
|
|
2218
|
+
readonly shares?: boolean | undefined;
|
|
2219
|
+
/**
|
|
2220
|
+
* Parts of the whole, in any order. The pie renders them largest first.
|
|
2221
|
+
*/
|
|
2222
|
+
readonly slices: readonly PieSlice[];
|
|
2223
|
+
/**
|
|
2224
|
+
* `Intl.NumberFormat` options the tooltip writes a slice's value with.
|
|
2225
|
+
*/
|
|
2226
|
+
readonly valueOptions?: Intl.NumberFormatOptions | undefined;
|
|
2227
|
+
}
|
|
2228
|
+
//#endregion
|
|
2229
|
+
//#region src/donut-chart/donut-chart.d.ts
|
|
2230
|
+
/**
|
|
2231
|
+
* Describes the props of a donut chart: the polar props and the content of the hole.
|
|
2232
|
+
*/
|
|
2233
|
+
interface DonutChartProps extends PolarProps {
|
|
2234
|
+
/**
|
|
2235
|
+
* Figure in the hole, such as the total the slices add up to.
|
|
2236
|
+
*/
|
|
2237
|
+
readonly center?: ReactNode;
|
|
2238
|
+
/**
|
|
2239
|
+
* Words under the figure, such as what the total counts.
|
|
2240
|
+
*/
|
|
2241
|
+
readonly centerLabel?: ReactNode;
|
|
2242
|
+
}
|
|
2243
|
+
/**
|
|
2244
|
+
* Renders the chart's figure around a ring of the slices with the figure in its hole.
|
|
2245
|
+
*
|
|
2246
|
+
* @param props - The slices, the words and the content of the hole.
|
|
2247
|
+
*/
|
|
2248
|
+
export declare function DonutChart(props: DonutChartProps): ReactElement;
|
|
2249
|
+
//#endregion
|
|
2250
|
+
//#region src/funnel-chart/steps.d.ts
|
|
2251
|
+
/**
|
|
2252
|
+
* Describes one stage of a funnel: its key, its name and its count.
|
|
2253
|
+
*/
|
|
2254
|
+
interface FunnelStage {
|
|
2255
|
+
/**
|
|
2256
|
+
* Key of the stage among the funnel's stages.
|
|
2257
|
+
*/
|
|
2258
|
+
readonly key: string;
|
|
2259
|
+
/**
|
|
2260
|
+
* Name of the stage in the table and the tooltip. The key unless stated.
|
|
2261
|
+
*/
|
|
2262
|
+
readonly label?: ReactNode;
|
|
2263
|
+
/**
|
|
2264
|
+
* Count at the stage, such as sessions or people. A value that is not a finite number or is below
|
|
2265
|
+
* zero counts as 0.
|
|
2266
|
+
*/
|
|
2267
|
+
readonly value: number;
|
|
2268
|
+
}
|
|
2269
|
+
/**
|
|
2270
|
+
* Describes one step of a funnel: a stage, its count, its two rates and the count lost before it.
|
|
2271
|
+
*/
|
|
2272
|
+
interface FunnelStep {
|
|
2273
|
+
/**
|
|
2274
|
+
* Count at this stage as a share of the count at the stage before, or `null` for the first stage.
|
|
2275
|
+
*/
|
|
2276
|
+
readonly conversion: null | number;
|
|
2277
|
+
/**
|
|
2278
|
+
* Count lost between the stage before and this stage. 0 for the first stage and for a stage that
|
|
2279
|
+
* widens.
|
|
2280
|
+
*/
|
|
2281
|
+
readonly dropped: number;
|
|
2282
|
+
/**
|
|
2283
|
+
* Count at this stage as a share of the count at the first stage.
|
|
2284
|
+
*/
|
|
2285
|
+
readonly overall: number;
|
|
2286
|
+
/**
|
|
2287
|
+
* Stage the step describes.
|
|
2288
|
+
*/
|
|
2289
|
+
readonly stage: FunnelStage;
|
|
2290
|
+
/**
|
|
2291
|
+
* Count at the stage, 0 for a value that is not a finite number or is below zero.
|
|
2292
|
+
*/
|
|
2293
|
+
readonly value: number;
|
|
2294
|
+
}
|
|
2295
|
+
/**
|
|
2296
|
+
* Returns each stage with its count, its share of the stage before, its share of the first stage
|
|
2297
|
+
* and the count lost before it.
|
|
2298
|
+
*
|
|
2299
|
+
* @remarks
|
|
2300
|
+
* A stage after a stage of 0 converts at 0, and every stage of a funnel whose first stage is 0 is
|
|
2301
|
+
* 0% of it, so an empty funnel renders rather than divides by zero.
|
|
2302
|
+
* @param stages - The stages from the top of the funnel.
|
|
2303
|
+
*/
|
|
2304
|
+
export declare function funnelSteps(stages: readonly FunnelStage[]): FunnelStep[];
|
|
2305
|
+
/**
|
|
2306
|
+
* Returns the step that loses the most, the first of equal ones, or `undefined` while no step
|
|
2307
|
+
* loses anything.
|
|
2308
|
+
*
|
|
2309
|
+
* @remarks
|
|
2310
|
+
* The steps are ranked by the count they lose, not by their rate: a step that loses 40% of 2,000
|
|
2311
|
+
* loses more people than a step that loses 80% of 50.
|
|
2312
|
+
* @param steps - The steps `funnelSteps` returns.
|
|
2313
|
+
*/
|
|
2314
|
+
export declare function biggestDrop(steps: readonly FunnelStep[]): FunnelStep | undefined;
|
|
2315
|
+
/**
|
|
2316
|
+
* Returns the stages whose count is above the count of the stage before them.
|
|
2317
|
+
*
|
|
2318
|
+
* @remarks
|
|
2319
|
+
* A stage that widens means the counts come from sets that are not nested, such as two queries
|
|
2320
|
+
* filtered apart. The chart renders it as it is, and its share of the stage before is above 100%.
|
|
2321
|
+
* @param stages - The stages from the top of the funnel.
|
|
2322
|
+
*/
|
|
2323
|
+
export declare function funnelWidenings(stages: readonly FunnelStage[]): FunnelStage[];
|
|
2324
|
+
//#endregion
|
|
2325
|
+
//#region src/funnel-chart/funnel-chart.d.ts
|
|
2326
|
+
/**
|
|
2327
|
+
* Describes the props of a funnel chart: the stages, the words, the switches and the figure's
|
|
2328
|
+
* props.
|
|
2329
|
+
*/
|
|
2330
|
+
interface FunnelChartProps extends Omit<RootProps, "chart" | "children" | "color"> {
|
|
2331
|
+
/**
|
|
2332
|
+
* Whether the stages grow in, which they do only outside reduced motion.
|
|
2333
|
+
*/
|
|
2334
|
+
readonly animate?: boolean | undefined;
|
|
2335
|
+
/**
|
|
2336
|
+
* Finding the chart shows, in words, which names the figure.
|
|
2337
|
+
*/
|
|
2338
|
+
readonly caption?: ReactNode;
|
|
2339
|
+
/**
|
|
2340
|
+
* Recharts elements rendered inside the chart after the stages.
|
|
2341
|
+
*/
|
|
2342
|
+
readonly children?: ReactNode;
|
|
2343
|
+
/**
|
|
2344
|
+
* Palette the stages take their color from. The theme's first series color unless stated.
|
|
2345
|
+
*/
|
|
2346
|
+
readonly color?: ChartColor | undefined;
|
|
2347
|
+
/**
|
|
2348
|
+
* Index of the stage the tooltip shows when the chart first renders. None unless stated.
|
|
2349
|
+
*/
|
|
2350
|
+
readonly defaultIndex?: number | undefined;
|
|
2351
|
+
/**
|
|
2352
|
+
* Message the chart renders in the plot's place while it has no stages.
|
|
2353
|
+
*/
|
|
2354
|
+
readonly empty?: ReactNode;
|
|
2355
|
+
/**
|
|
2356
|
+
* Accessible name of the chart's keyboard layer, such as "Checkout funnel".
|
|
2357
|
+
*/
|
|
2358
|
+
readonly label: string;
|
|
2359
|
+
/**
|
|
2360
|
+
* Locale the counts and the rates are written in. The locale in scope unless stated.
|
|
2361
|
+
*/
|
|
2362
|
+
readonly locale?: string | undefined;
|
|
2363
|
+
/**
|
|
2364
|
+
* Heading of each stage's share of the first stage, in the table and the tooltip. "Of first"
|
|
2365
|
+
* unless stated.
|
|
2366
|
+
*/
|
|
2367
|
+
readonly overallLabel?: string | undefined;
|
|
2368
|
+
/**
|
|
2369
|
+
* Heading of the stages' names in the table. "Stage" unless stated.
|
|
2370
|
+
*/
|
|
2371
|
+
readonly stageLabel?: string | undefined;
|
|
2372
|
+
/**
|
|
2373
|
+
* Stages from the top of the funnel, each a subset of the one before it.
|
|
2374
|
+
*/
|
|
2375
|
+
readonly stages: readonly FunnelStage[];
|
|
2376
|
+
/**
|
|
2377
|
+
* Heading of each stage's share of the stage before, in the table and the tooltip. "Of
|
|
2378
|
+
* previous" unless stated.
|
|
2379
|
+
*/
|
|
2380
|
+
readonly stepLabel?: string | undefined;
|
|
2381
|
+
/**
|
|
2382
|
+
* Whether the table of each stage's count and rates renders under the plot.
|
|
2383
|
+
*/
|
|
2384
|
+
readonly steps?: boolean | undefined;
|
|
2385
|
+
/**
|
|
2386
|
+
* Accessible name of the table's scroll area, which a screen reader announces while the table
|
|
2387
|
+
* scrolls sideways. "Conversion by stage" unless stated.
|
|
2388
|
+
*/
|
|
2389
|
+
readonly stepsLabel?: string | undefined;
|
|
2390
|
+
/**
|
|
2391
|
+
* Heading of the counts in the table and the tooltip. "Count" unless stated.
|
|
2392
|
+
*/
|
|
2393
|
+
readonly valueLabel?: string | undefined;
|
|
2394
|
+
/**
|
|
2395
|
+
* `Intl.NumberFormat` options the counts are written with, on the stages, in the table and in
|
|
2396
|
+
* the tooltip.
|
|
2397
|
+
*/
|
|
2398
|
+
readonly valueOptions?: Intl.NumberFormatOptions | undefined;
|
|
2399
|
+
/**
|
|
2400
|
+
* Whether each stage's count is written on it.
|
|
2401
|
+
*/
|
|
2402
|
+
readonly values?: boolean | undefined;
|
|
2403
|
+
}
|
|
2404
|
+
/**
|
|
2405
|
+
* Renders the chart's figure around the funnel, the table of its steps and the caption.
|
|
2406
|
+
*
|
|
2407
|
+
* @param props - The stages, the words, the switches and the figure's props.
|
|
2408
|
+
*/
|
|
2409
|
+
export declare function FunnelChart({ caption, empty, locale, overallLabel, ratio, stageLabel, stages, stepLabel, steps, stepsLabel, valueLabel, valueOptions, ...rest }: FunnelChartProps): ReactElement;
|
|
2410
|
+
//#endregion
|
|
2411
|
+
//#region src/gauge-chart/gauge-chart.d.ts
|
|
2412
|
+
/**
|
|
2413
|
+
* Describes the props of a gauge: the value and its range, the zones, the words, the switches and
|
|
2414
|
+
* the figure's props.
|
|
2415
|
+
*/
|
|
2416
|
+
interface GaugeChartProps extends Omit<RootProps, "chart" | "children" | "color"> {
|
|
2417
|
+
/**
|
|
2418
|
+
* Whether the dial fills in, which it does only outside reduced motion.
|
|
2419
|
+
*/
|
|
2420
|
+
readonly animate?: boolean | undefined;
|
|
2421
|
+
/**
|
|
2422
|
+
* Finding the chart shows, in words, which names the figure.
|
|
2423
|
+
*/
|
|
2424
|
+
readonly caption?: ReactNode;
|
|
2425
|
+
/**
|
|
2426
|
+
* Words under the figure in the middle. The name of the zone the value is in unless stated.
|
|
2427
|
+
*/
|
|
2428
|
+
readonly centerLabel?: ReactNode;
|
|
2429
|
+
/**
|
|
2430
|
+
* Recharts elements rendered inside the chart after the dial.
|
|
2431
|
+
*/
|
|
2432
|
+
readonly children?: ReactNode;
|
|
2433
|
+
/**
|
|
2434
|
+
* Palette the reading takes where its zone states none. The theme's first series color unless
|
|
2435
|
+
* stated.
|
|
2436
|
+
*/
|
|
2437
|
+
readonly color?: ChartColor | undefined;
|
|
2438
|
+
/**
|
|
2439
|
+
* Message the chart renders in the plot's place while the value is not a finite number.
|
|
2440
|
+
*/
|
|
2441
|
+
readonly empty?: ReactNode;
|
|
2442
|
+
/**
|
|
2443
|
+
* Angle the dial ends at, in recharts' degrees, where clockwise is negative. -45 unless stated.
|
|
2444
|
+
*/
|
|
2445
|
+
readonly endAngle?: number | undefined;
|
|
2446
|
+
/**
|
|
2447
|
+
* Accessible name of the meter, such as "Checkout latency".
|
|
2448
|
+
*/
|
|
2449
|
+
readonly label: string;
|
|
2450
|
+
/**
|
|
2451
|
+
* Whether the range's minimum and maximum are written under the dial's ends.
|
|
2452
|
+
*/
|
|
2453
|
+
readonly limits?: boolean | undefined;
|
|
2454
|
+
/**
|
|
2455
|
+
* Locale the values are written in. The locale in scope unless stated.
|
|
2456
|
+
*/
|
|
2457
|
+
readonly locale?: string | undefined;
|
|
2458
|
+
/**
|
|
2459
|
+
* Value the dial ends at.
|
|
2460
|
+
*/
|
|
2461
|
+
readonly max: number;
|
|
2462
|
+
/**
|
|
2463
|
+
* Value the dial starts at. 0 unless stated.
|
|
2464
|
+
*/
|
|
2465
|
+
readonly min?: number | undefined;
|
|
2466
|
+
/**
|
|
2467
|
+
* Angle the dial starts at, in recharts' degrees, where 90 is 12 o'clock. 225 unless stated.
|
|
2468
|
+
*/
|
|
2469
|
+
readonly startAngle?: number | undefined;
|
|
2470
|
+
/**
|
|
2471
|
+
* Value the gauge shows.
|
|
2472
|
+
*/
|
|
2473
|
+
readonly value: number;
|
|
2474
|
+
/**
|
|
2475
|
+
* `Intl.NumberFormat` options the figure, the range's ends and the meter's text are written with.
|
|
2476
|
+
*/
|
|
2477
|
+
readonly valueOptions?: Intl.NumberFormatOptions | undefined;
|
|
2478
|
+
/**
|
|
2479
|
+
* Zones of the range in any order, such as healthy, watch and critical. None unless stated.
|
|
2480
|
+
*/
|
|
2481
|
+
readonly zones?: readonly GaugeZone[] | undefined;
|
|
2482
|
+
}
|
|
2483
|
+
/**
|
|
2484
|
+
* Renders the chart's figure around the meter, the figure and zone in its middle, and the caption.
|
|
2485
|
+
*
|
|
2486
|
+
* @param props - The value and its range, the zones, the words, the switches and the figure's
|
|
2487
|
+
* props.
|
|
2488
|
+
*/
|
|
2489
|
+
export declare function GaugeChart({ caption, centerLabel, empty, label, locale, max, min, ratio, value, valueOptions, zones, ...rest }: GaugeChartProps): ReactElement;
|
|
2490
|
+
//#endregion
|
|
2491
|
+
//#region src/heat/grid.d.ts
|
|
2492
|
+
/**
|
|
2493
|
+
* Describes the shapes of a heat grid's cells: a block, which widens to a printed value, or a
|
|
2494
|
+
* square.
|
|
2495
|
+
*/
|
|
2496
|
+
type HeatShape = "block" | "square";
|
|
2497
|
+
/**
|
|
2498
|
+
* Describes the sizes of a heat grid's cells.
|
|
2499
|
+
*/
|
|
2500
|
+
type HeatSize = "lg" | "md" | "sm";
|
|
2501
|
+
//#endregion
|
|
2502
|
+
//#region src/heatmap/calendar.d.ts
|
|
2503
|
+
/**
|
|
2504
|
+
* Describes one day's reading: its civil date and its value.
|
|
2505
|
+
*/
|
|
2506
|
+
interface CalendarDay {
|
|
2507
|
+
/**
|
|
2508
|
+
* Civil date of the day, written `YYYY-MM-DD`.
|
|
2509
|
+
*/
|
|
2510
|
+
readonly date: string;
|
|
2511
|
+
/**
|
|
2512
|
+
* Value, or `null` for a day nobody measured.
|
|
2513
|
+
*/
|
|
2514
|
+
readonly value: null | number;
|
|
2515
|
+
}
|
|
2516
|
+
/**
|
|
2517
|
+
* Describes a day of the calendar as a heatmap cell, which `onSelect` receives with its date.
|
|
2518
|
+
*/
|
|
2519
|
+
interface CalendarCell extends HeatmapCell {
|
|
2520
|
+
/**
|
|
2521
|
+
* Civil date of the day, written `YYYY-MM-DD`.
|
|
2522
|
+
*/
|
|
2523
|
+
readonly date: string;
|
|
2524
|
+
}
|
|
2525
|
+
/**
|
|
2526
|
+
* Describes the window and the words of a calendar.
|
|
2527
|
+
*/
|
|
2528
|
+
interface CalendarOptions {
|
|
2529
|
+
/**
|
|
2530
|
+
* First day of the window, written `YYYY-MM-DD`. The earliest day unless stated.
|
|
2531
|
+
*/
|
|
2532
|
+
readonly from?: string | undefined;
|
|
2533
|
+
/**
|
|
2534
|
+
* Locale of the weekday and month words and of each day's date, and of the week's first day.
|
|
2535
|
+
*/
|
|
2536
|
+
readonly locale: string;
|
|
2537
|
+
/**
|
|
2538
|
+
* Last day of the window, written `YYYY-MM-DD`. The latest day unless stated.
|
|
2539
|
+
*/
|
|
2540
|
+
readonly to?: string | undefined;
|
|
2541
|
+
/**
|
|
2542
|
+
* Day each week starts on. The locale's first day of the week unless stated.
|
|
2543
|
+
*/
|
|
2544
|
+
readonly weekStartsOn?: DayOfWeek | undefined;
|
|
2545
|
+
}
|
|
2546
|
+
/**
|
|
2547
|
+
* Describes the heatmap props of a calendar: its days, its weeks, its months, its weekdays, and
|
|
2548
|
+
* square cells in a sparse grid.
|
|
2549
|
+
*/
|
|
2550
|
+
interface Calendar {
|
|
2551
|
+
/**
|
|
2552
|
+
* Days of the window, each with its date as its label.
|
|
2553
|
+
*/
|
|
2554
|
+
readonly cells: readonly CalendarCell[];
|
|
2555
|
+
/**
|
|
2556
|
+
* Weeks, each keyed by its first date, with a hidden heading of its dates in the window.
|
|
2557
|
+
*/
|
|
2558
|
+
readonly columns: readonly HeatmapHeading[];
|
|
2559
|
+
/**
|
|
2560
|
+
* Months the weeks belong to, the first with its year.
|
|
2561
|
+
*/
|
|
2562
|
+
readonly groups: readonly HeatmapHeading[];
|
|
2563
|
+
/**
|
|
2564
|
+
* Weekdays from the week's first day, each keyed by its `DayOfWeek`.
|
|
2565
|
+
*/
|
|
2566
|
+
readonly rows: readonly HeatmapHeading[];
|
|
2567
|
+
/**
|
|
2568
|
+
* Shape of the cells, a square per day.
|
|
2569
|
+
*/
|
|
2570
|
+
readonly shape: "square";
|
|
2571
|
+
/**
|
|
2572
|
+
* Whether a place outside the window is empty, which it is.
|
|
2573
|
+
*/
|
|
2574
|
+
readonly sparse: true;
|
|
2575
|
+
}
|
|
2576
|
+
/**
|
|
2577
|
+
* Returns the heatmap props of a calendar of daily readings: a square per day of the window, a row
|
|
2578
|
+
* per weekday, a hidden heading per week and a group per month.
|
|
2579
|
+
*
|
|
2580
|
+
* @param days - The readings, one per civil date, in any order.
|
|
2581
|
+
* @param options - The window, the locale and the week's first day.
|
|
2582
|
+
* @returns The props to spread into `Heatmap`, without cells, weeks or weekdays without a window.
|
|
2583
|
+
*/
|
|
2584
|
+
export declare function calendarCells(days: readonly CalendarDay[], options: CalendarOptions): Calendar;
|
|
2585
|
+
//#endregion
|
|
2586
|
+
//#region src/heatmap/heatmap.d.ts
|
|
2587
|
+
/**
|
|
2588
|
+
* Describes the props of a heatmap: the readings and their axes, the scale, the words and the
|
|
2589
|
+
* figure's props.
|
|
2590
|
+
*
|
|
2591
|
+
* @remarks
|
|
2592
|
+
* The figure's props leave out `color`, `columns` and `scale`, the style props, because the
|
|
2593
|
+
* heatmap takes those names for its scale and its axis.
|
|
2594
|
+
* @typeParam Cell - A reading, as the caller passes it, which `onSelect` receives.
|
|
2595
|
+
*/
|
|
2596
|
+
interface HeatmapProps<Cell extends HeatmapCell = HeatmapCell> extends Omit<RootProps, "chart" | "children" | "color" | "columns" | "onSelect" | "scale">, Pick<ChartOptions<Cell>, "locale"> {
|
|
2597
|
+
/**
|
|
2598
|
+
* Finding the heatmap shows, in words, which names the figure.
|
|
2599
|
+
*/
|
|
2600
|
+
readonly caption?: ReactNode;
|
|
2601
|
+
/**
|
|
2602
|
+
* Readings, one per pair of a row and a column, in any order.
|
|
2603
|
+
*/
|
|
2604
|
+
readonly cells: readonly Cell[];
|
|
2605
|
+
/**
|
|
2606
|
+
* Color of a sequential scale. The theme's first series color unless stated.
|
|
2607
|
+
*/
|
|
2608
|
+
readonly color?: ChartColor | undefined;
|
|
2609
|
+
/**
|
|
2610
|
+
* Colors of a diverging scale. Orange under the midpoint and blue over it unless stated.
|
|
2611
|
+
*/
|
|
2612
|
+
readonly colors?: HeatmapColors | undefined;
|
|
2613
|
+
/**
|
|
2614
|
+
* Columns in order. Each column the cells name, in the order they first name it, unless stated.
|
|
2615
|
+
*/
|
|
2616
|
+
readonly columns?: readonly HeatmapHeading[] | undefined;
|
|
2617
|
+
/**
|
|
2618
|
+
* Words over the row headings, such as what the rows are.
|
|
2619
|
+
*/
|
|
2620
|
+
readonly corner?: ReactNode;
|
|
2621
|
+
/**
|
|
2622
|
+
* Index in `cells` of the reading the readout shows when the heatmap first renders, until the
|
|
2623
|
+
* pointer or a key moves it.
|
|
2624
|
+
*/
|
|
2625
|
+
readonly defaultIndex?: number | undefined;
|
|
2626
|
+
/**
|
|
2627
|
+
* Values the scale spans. The readings' span unless stated.
|
|
2628
|
+
*/
|
|
2629
|
+
readonly domain?: HeatmapDomain | undefined;
|
|
2630
|
+
/**
|
|
2631
|
+
* Message the heatmap renders in the grid's place while it has no row or no column.
|
|
2632
|
+
*/
|
|
2633
|
+
readonly empty?: ReactNode;
|
|
2634
|
+
/**
|
|
2635
|
+
* Headings of the groups of columns, such as a calendar's months, above the columns' headings. A
|
|
2636
|
+
* group spans the consecutive columns whose `group` is its key.
|
|
2637
|
+
*/
|
|
2638
|
+
readonly groups?: readonly HeatmapHeading[] | undefined;
|
|
2639
|
+
/**
|
|
2640
|
+
* Accessible name of the grid, such as "Card authorisations per hour".
|
|
2641
|
+
*/
|
|
2642
|
+
readonly label: string;
|
|
2643
|
+
/**
|
|
2644
|
+
* Value a diverging scale takes the panel at. 0 unless stated.
|
|
2645
|
+
*/
|
|
2646
|
+
readonly midpoint?: number | undefined;
|
|
2647
|
+
/**
|
|
2648
|
+
* Words of a cell without a value, which a screen reader reads. "No data" unless stated.
|
|
2649
|
+
*/
|
|
2650
|
+
readonly missingLabel?: string | undefined;
|
|
2651
|
+
/**
|
|
2652
|
+
* Called with the reading of the cell Enter, Space or a press selects. A pair without a reading
|
|
2653
|
+
* calls nothing.
|
|
2654
|
+
*/
|
|
2655
|
+
readonly onSelect?: ((cell: Cell) => void) | undefined;
|
|
2656
|
+
/**
|
|
2657
|
+
* Rows in order. Each row the cells name, in the order they first name it, unless stated.
|
|
2658
|
+
*/
|
|
2659
|
+
readonly rows?: readonly HeatmapHeading[] | undefined;
|
|
2660
|
+
/**
|
|
2661
|
+
* How the scale reads a value. `sequential` unless stated.
|
|
2662
|
+
*/
|
|
2663
|
+
readonly scale?: HeatmapScale | undefined;
|
|
2664
|
+
/**
|
|
2665
|
+
* Shape of the cells: `block`, which widens to a printed value, or `square`, which prints none.
|
|
2666
|
+
* `block` unless stated.
|
|
2667
|
+
*/
|
|
2668
|
+
readonly shape?: HeatShape | undefined;
|
|
2669
|
+
/**
|
|
2670
|
+
* Size of the cells. `md` unless stated.
|
|
2671
|
+
*/
|
|
2672
|
+
readonly size?: HeatSize | undefined;
|
|
2673
|
+
/**
|
|
2674
|
+
* Whether a pair of a row and a column without a reading is an empty place, which the walk passes
|
|
2675
|
+
* over, in place of a missing value. `false` unless stated.
|
|
2676
|
+
*/
|
|
2677
|
+
readonly sparse?: boolean | undefined;
|
|
2678
|
+
/**
|
|
2679
|
+
* Name of the values, in the readout and the key. "Value" unless stated.
|
|
2680
|
+
*/
|
|
2681
|
+
readonly valueLabel?: ReactNode;
|
|
2682
|
+
/**
|
|
2683
|
+
* `Intl.NumberFormat` options the values are written with.
|
|
2684
|
+
*/
|
|
2685
|
+
readonly valueOptions?: Intl.NumberFormatOptions | undefined;
|
|
2686
|
+
/**
|
|
2687
|
+
* Whether each block cell prints its value.
|
|
2688
|
+
*/
|
|
2689
|
+
readonly values?: boolean | undefined;
|
|
2690
|
+
}
|
|
2691
|
+
/**
|
|
2692
|
+
* Renders the figure around the grid, the key and the caption, or the empty state while there is no
|
|
2693
|
+
* row or no column.
|
|
2694
|
+
*
|
|
2695
|
+
* @param props - The readings and their axes, the scale, the words and the figure's props.
|
|
2696
|
+
*/
|
|
2697
|
+
export declare function Heatmap<Cell extends HeatmapCell>(props: HeatmapProps<Cell>): ReactElement;
|
|
2698
|
+
//#endregion
|
|
2699
|
+
//#region src/hierarchy/hierarchy.d.ts
|
|
2700
|
+
/**
|
|
2701
|
+
* Describes one node of a hierarchy: a leaf with a value, or a parent of other nodes.
|
|
2702
|
+
*/
|
|
2703
|
+
interface HierarchyNode {
|
|
2704
|
+
/**
|
|
2705
|
+
* Nodes the part is made of. A node with `children` is a parent, even with none.
|
|
2706
|
+
*/
|
|
2707
|
+
readonly children?: readonly HierarchyNode[] | undefined;
|
|
2708
|
+
/**
|
|
2709
|
+
* Palette a top-level node's family takes its colors from. The theme's series color at the
|
|
2710
|
+
* node's place, largest first, unless stated. A deeper node's color is ignored.
|
|
2711
|
+
*/
|
|
2712
|
+
readonly color?: ChartColor | undefined;
|
|
2713
|
+
/**
|
|
2714
|
+
* Key of the node, which the legend, the tooltip and the hidden keys name.
|
|
2715
|
+
*/
|
|
2716
|
+
readonly key: string;
|
|
2717
|
+
/**
|
|
2718
|
+
* Name the chart, the tooltip and the legend show. The key unless stated.
|
|
2719
|
+
*/
|
|
2720
|
+
readonly label?: ReactNode;
|
|
2721
|
+
/**
|
|
2722
|
+
* Size of a leaf. A parent's size is its children's sum.
|
|
2723
|
+
*/
|
|
2724
|
+
readonly value?: number | undefined;
|
|
2725
|
+
}
|
|
2726
|
+
/**
|
|
2727
|
+
* Describes one leaf of a hierarchy with its place in the whole.
|
|
2728
|
+
*/
|
|
2729
|
+
interface HierarchyLeaf {
|
|
2730
|
+
/**
|
|
2731
|
+
* Key of the top-level node the leaf belongs to, its own key at the top level.
|
|
2732
|
+
*/
|
|
2733
|
+
readonly group: string;
|
|
2734
|
+
/**
|
|
2735
|
+
* Key of the leaf.
|
|
2736
|
+
*/
|
|
2737
|
+
readonly key: string;
|
|
2738
|
+
/**
|
|
2739
|
+
* Name of the leaf: its label, else its key.
|
|
2740
|
+
*/
|
|
2741
|
+
readonly label: ReactNode;
|
|
2742
|
+
/**
|
|
2743
|
+
* Share of the whole the leaf's size is, from 0 to 1. A leaf that renders nothing has a share of 0.
|
|
2744
|
+
*/
|
|
2745
|
+
readonly share: number;
|
|
2746
|
+
/**
|
|
2747
|
+
* Value of the leaf as given, 0 without one.
|
|
2748
|
+
*/
|
|
2749
|
+
readonly value: number;
|
|
2750
|
+
}
|
|
2751
|
+
/**
|
|
2752
|
+
* Returns every leaf depth first, each with its top-level group, its value as given and its share
|
|
2753
|
+
* of the whole.
|
|
2754
|
+
*
|
|
2755
|
+
* @remarks
|
|
2756
|
+
* A ranking sorts the leaves by value. The leaves the chart leaves out are those whose value is
|
|
2757
|
+
* below zero or not a finite number.
|
|
2758
|
+
* @param nodes - The top-level nodes.
|
|
2759
|
+
*/
|
|
2760
|
+
export declare function hierarchyLeaves(nodes: readonly HierarchyNode[]): HierarchyLeaf[];
|
|
2761
|
+
//#endregion
|
|
2762
|
+
//#region src/hierarchy/types.d.ts
|
|
2763
|
+
/**
|
|
2764
|
+
* Describes the props the treemap and the sunburst take.
|
|
2765
|
+
*/
|
|
2766
|
+
interface HierarchyProps extends Omit<ChartOptions<HierarchyNode>, "data" | "series">, Omit<RootProps, "chart" | "children"> {
|
|
2767
|
+
/**
|
|
2768
|
+
* Whether the marks grow in, which they do only outside reduced motion.
|
|
2769
|
+
*/
|
|
2770
|
+
readonly animate?: boolean | undefined;
|
|
2771
|
+
/**
|
|
2772
|
+
* Finding the chart shows, in words, which names the figure.
|
|
2773
|
+
*/
|
|
2774
|
+
readonly caption?: ReactNode;
|
|
2775
|
+
/**
|
|
2776
|
+
* Recharts elements rendered inside the chart after the marks.
|
|
2777
|
+
*/
|
|
2778
|
+
readonly children?: ReactNode;
|
|
2779
|
+
/**
|
|
2780
|
+
* Place in the keyboard walk of the node the tooltip shows when the chart first renders: depth
|
|
2781
|
+
* first, largest first, a parent before its parts. None unless stated.
|
|
2782
|
+
*/
|
|
2783
|
+
readonly defaultIndex?: number | undefined;
|
|
2784
|
+
/**
|
|
2785
|
+
* Message the chart renders in the plot's place while it has no nodes.
|
|
2786
|
+
*/
|
|
2787
|
+
readonly empty?: ReactNode;
|
|
2788
|
+
/**
|
|
2789
|
+
* Accessible name of the chart's keyboard layer, such as "Cloud spend by team and service".
|
|
2790
|
+
*/
|
|
2791
|
+
readonly label: string;
|
|
2792
|
+
/**
|
|
2793
|
+
* Whether the legend renders below the plot. It renders while the chart has nodes unless stated.
|
|
2794
|
+
*/
|
|
2795
|
+
readonly legend?: boolean | undefined;
|
|
2796
|
+
/**
|
|
2797
|
+
* Accessible name of the legend's group of buttons.
|
|
2798
|
+
*/
|
|
2799
|
+
readonly legendLabel?: string | undefined;
|
|
2800
|
+
/**
|
|
2801
|
+
* Top-level nodes of the hierarchy, in any order. Each level renders largest first.
|
|
2802
|
+
*/
|
|
2803
|
+
readonly nodes: readonly HierarchyNode[];
|
|
2804
|
+
/**
|
|
2805
|
+
* Name of a node's share of the nodes shown in the tooltip. "Of total" unless stated.
|
|
2806
|
+
*/
|
|
2807
|
+
readonly shareLabel?: string | undefined;
|
|
2808
|
+
/**
|
|
2809
|
+
* Name of a node's size in the tooltip. "Value" unless stated.
|
|
2810
|
+
*/
|
|
2811
|
+
readonly valueLabel?: string | undefined;
|
|
2812
|
+
/**
|
|
2813
|
+
* `Intl.NumberFormat` options the sizes are written with, on the marks, in the legend and in the
|
|
2814
|
+
* tooltip.
|
|
2815
|
+
*/
|
|
2816
|
+
readonly valueOptions?: Intl.NumberFormatOptions | undefined;
|
|
2817
|
+
/**
|
|
2818
|
+
* Whether the legend writes each family's total beside its name, and a treemap's tile its value
|
|
2819
|
+
* and share under its name.
|
|
2820
|
+
*/
|
|
2821
|
+
readonly values?: boolean | undefined;
|
|
2822
|
+
}
|
|
2823
|
+
//#endregion
|
|
2824
|
+
//#region src/histogram-chart/bins.d.ts
|
|
2825
|
+
/**
|
|
2826
|
+
* Counts values into the bins of a histogram.
|
|
2827
|
+
*
|
|
2828
|
+
* @remarks
|
|
2829
|
+
* The bins decide what a histogram shows: too few hide the shape, too many turn it into noise.
|
|
2830
|
+
* The count comes from Freedman–Diaconis' rule, which reads the interquartile range and so
|
|
2831
|
+
* ignores a few outliers. The width snaps to the nearest of 1, 2 or 5 times a power of ten, as
|
|
2832
|
+
* d3's and Vega's bins do, so the edges read as round numbers, and one step coarser where the
|
|
2833
|
+
* bins would pass 30. Every bin is half-open, from its lower edge up to its upper edge, except
|
|
2834
|
+
* the last, which includes its upper edge, so the largest value is counted.
|
|
2835
|
+
*/
|
|
2836
|
+
/**
|
|
2837
|
+
* Describes one bin: its two edges and the count of values in it.
|
|
2838
|
+
*/
|
|
2839
|
+
interface ChartBin {
|
|
2840
|
+
/**
|
|
2841
|
+
* Number of values in the bin.
|
|
2842
|
+
*/
|
|
2843
|
+
readonly count: number;
|
|
2844
|
+
/**
|
|
2845
|
+
* Lower edge, which the bin includes.
|
|
2846
|
+
*/
|
|
2847
|
+
readonly from: number;
|
|
2848
|
+
/**
|
|
2849
|
+
* Upper edge, which only the last bin includes.
|
|
2850
|
+
*/
|
|
2851
|
+
readonly to: number;
|
|
2852
|
+
}
|
|
2853
|
+
/**
|
|
2854
|
+
* Describes how values are binned.
|
|
2855
|
+
*/
|
|
2856
|
+
interface BinOptions {
|
|
2857
|
+
/**
|
|
2858
|
+
* Number of bins to aim for, at most 30. Freedman–Diaconis' count unless stated.
|
|
2859
|
+
*/
|
|
2860
|
+
readonly bins?: number | undefined;
|
|
2861
|
+
/**
|
|
2862
|
+
* Range to bin, which the first bin starts at. The values' own range unless stated. A value
|
|
2863
|
+
* outside the bins is left out.
|
|
2864
|
+
*/
|
|
2865
|
+
readonly domain?: readonly [number, number] | undefined;
|
|
2866
|
+
}
|
|
2867
|
+
/**
|
|
2868
|
+
* Returns the number of bins a set of values takes: Freedman–Diaconis' count, else Sturges' where
|
|
2869
|
+
* the middle half of the values has no spread, at most 30.
|
|
2870
|
+
*
|
|
2871
|
+
* @remarks
|
|
2872
|
+
* Freedman–Diaconis sets the width to twice the interquartile range over the cube root of the
|
|
2873
|
+
* count. Where a quarter or more of the values tie, the interquartile range is 0 and the rule
|
|
2874
|
+
* asks for infinitely many bins, so Sturges' `log2(n) + 1` replaces it.
|
|
2875
|
+
* @param values - The values, in any order.
|
|
2876
|
+
*/
|
|
2877
|
+
export declare function binCount(values: readonly number[]): number;
|
|
2878
|
+
/**
|
|
2879
|
+
* Returns the values counted into bins of a round width, in ascending order.
|
|
2880
|
+
*
|
|
2881
|
+
* @remarks
|
|
2882
|
+
* A value that is not a finite number is left out. `bins` is a target, because the width snaps to
|
|
2883
|
+
* a round number and the first edge to a multiple of it. A `domain` fixes the first edge and the
|
|
2884
|
+
* range, and its width snaps too. A domain whose upper edge is not above its lower edge bins
|
|
2885
|
+
* nothing. Values that are all equal make one bin a tenth of the value wide.
|
|
2886
|
+
* @param values - The values, of any type.
|
|
2887
|
+
* @param options - The number of bins to aim for and the range to bin.
|
|
2888
|
+
*/
|
|
2889
|
+
export declare function binValues(values: readonly unknown[], options?: BinOptions): ChartBin[];
|
|
2890
|
+
//#endregion
|
|
2891
|
+
//#region src/histogram-chart/histogram-chart.d.ts
|
|
2892
|
+
/**
|
|
2893
|
+
* Describes the props of a histogram: the values, the bins, the words, the switches and the
|
|
2894
|
+
* figure's props.
|
|
2895
|
+
*/
|
|
2896
|
+
interface HistogramChartProps extends Omit<RootProps, "chart" | "children" | "color" | "grid"> {
|
|
2897
|
+
/**
|
|
2898
|
+
* Whether the bars animate in, which they do only outside reduced motion.
|
|
2899
|
+
*/
|
|
2900
|
+
readonly animate?: boolean | undefined;
|
|
2901
|
+
/**
|
|
2902
|
+
* Number of bins to aim for, at most 30. Freedman–Diaconis' count unless stated.
|
|
2903
|
+
*/
|
|
2904
|
+
readonly bins?: number | undefined;
|
|
2905
|
+
/**
|
|
2906
|
+
* Finding the chart shows, in words, which names the figure.
|
|
2907
|
+
*/
|
|
2908
|
+
readonly caption?: ReactNode;
|
|
2909
|
+
/**
|
|
2910
|
+
* Recharts elements rendered inside the chart after the bars, such as a `ReferenceLine`.
|
|
2911
|
+
*/
|
|
2912
|
+
readonly children?: ReactNode;
|
|
2913
|
+
/**
|
|
2914
|
+
* Palette the bars take their color from. The theme's first series color unless stated.
|
|
2915
|
+
*/
|
|
2916
|
+
readonly color?: ChartColor | undefined;
|
|
2917
|
+
/**
|
|
2918
|
+
* Name of the counts in the tooltip.
|
|
2919
|
+
*/
|
|
2920
|
+
readonly countLabel?: ReactNode;
|
|
2921
|
+
/**
|
|
2922
|
+
* Index of the bin the tooltip shows when the chart first renders. None unless stated.
|
|
2923
|
+
*/
|
|
2924
|
+
readonly defaultIndex?: number | undefined;
|
|
2925
|
+
/**
|
|
2926
|
+
* Range to bin, which the first bin starts at. The values' own range unless stated. A value
|
|
2927
|
+
* outside the bins is left out.
|
|
2928
|
+
*/
|
|
2929
|
+
readonly domain?: readonly [number, number] | undefined;
|
|
2930
|
+
/**
|
|
2931
|
+
* Message the chart renders in the plot's place while it has no values.
|
|
2932
|
+
*/
|
|
2933
|
+
readonly empty?: ReactNode;
|
|
2934
|
+
/**
|
|
2935
|
+
* Whether lines cross the plot at the count ticks.
|
|
2936
|
+
*/
|
|
2937
|
+
readonly grid?: boolean | undefined;
|
|
2938
|
+
/**
|
|
2939
|
+
* Accessible name of the chart's keyboard layer, such as "Response times of the checkout API".
|
|
2940
|
+
*/
|
|
2941
|
+
readonly label: string;
|
|
2942
|
+
/**
|
|
2943
|
+
* Locale the values are written in. The locale in scope unless stated.
|
|
2944
|
+
*/
|
|
2945
|
+
readonly locale?: string | undefined;
|
|
2946
|
+
/**
|
|
2947
|
+
* `Intl.NumberFormat` options the bin edges are written with, on the axis and in the tooltip.
|
|
2948
|
+
*/
|
|
2949
|
+
readonly valueOptions?: Intl.NumberFormatOptions | undefined;
|
|
2950
|
+
/**
|
|
2951
|
+
* Values to count, one per thing measured. A value that is not a finite number is left out.
|
|
2952
|
+
*/
|
|
2953
|
+
readonly values: readonly unknown[];
|
|
2954
|
+
}
|
|
2955
|
+
/**
|
|
2956
|
+
* Renders the chart's figure around the bars.
|
|
2957
|
+
*
|
|
2958
|
+
* @param props - The values, the bins, the words, the switches and the figure's props.
|
|
2959
|
+
*/
|
|
2960
|
+
export declare function HistogramChart({ animate, bins, caption, children, color, countLabel, defaultIndex, domain, empty, grid, label, locale, valueOptions, values, ...root }: HistogramChartProps): ReactElement;
|
|
2961
|
+
//#endregion
|
|
2962
|
+
//#region src/horizontal-bar-chart/horizontal-bar-chart.d.ts
|
|
2963
|
+
/**
|
|
2964
|
+
* Describes the props of a horizontal bar chart: a bar chart's props.
|
|
2965
|
+
*
|
|
2966
|
+
* @typeParam Row - One row of the data.
|
|
2967
|
+
*/
|
|
2968
|
+
type HorizontalBarChartProps<Row> = BarChartProps<Row>;
|
|
2969
|
+
/**
|
|
2970
|
+
* Renders the chart's figure around a horizontal bar per series in each category.
|
|
2971
|
+
*
|
|
2972
|
+
* @typeParam Row - One row of the data.
|
|
2973
|
+
* @param props - The rows, the series, the words, the targets and the zones.
|
|
2974
|
+
*/
|
|
2975
|
+
export declare function HorizontalBarChart<Row>(props: HorizontalBarChartProps<Row>): ReactElement;
|
|
2976
|
+
//#endregion
|
|
2977
|
+
//#region src/line-chart/line-chart.d.ts
|
|
2978
|
+
/**
|
|
2979
|
+
* Describes the props of a line chart: the cartesian props and the path between two points.
|
|
2980
|
+
*
|
|
2981
|
+
* @typeParam Row - One row of the data.
|
|
2982
|
+
*/
|
|
2983
|
+
interface LineChartProps<Row> extends CartesianProps<Row> {
|
|
2984
|
+
/**
|
|
2985
|
+
* Path of each line between two points. Smoothed through them unless stated.
|
|
2986
|
+
*/
|
|
2987
|
+
readonly curve?: Curve | undefined;
|
|
2988
|
+
}
|
|
2989
|
+
/**
|
|
2990
|
+
* Renders the chart's figure around a line per series.
|
|
2991
|
+
*
|
|
2992
|
+
* @typeParam Row - One row of the data.
|
|
2993
|
+
* @param props - The rows, the series, the words and the curve.
|
|
2994
|
+
*/
|
|
2995
|
+
export declare function LineChart<Row>({ curve, ...props }: LineChartProps<Row>): ReactElement;
|
|
2996
|
+
//#endregion
|
|
2997
|
+
//#region src/pareto-chart/pareto-chart.d.ts
|
|
2998
|
+
/**
|
|
2999
|
+
* Describes the props of a Pareto chart: the cartesian props without series, the field the bars
|
|
3000
|
+
* read, and the threshold.
|
|
3001
|
+
*
|
|
3002
|
+
* @typeParam Row - One row of the data.
|
|
3003
|
+
*/
|
|
3004
|
+
interface ParetoChartProps<Row> extends Omit<CartesianProps<Row>, "series"> {
|
|
3005
|
+
/**
|
|
3006
|
+
* Name of the running share's line in the legend and the tooltip.
|
|
3007
|
+
*/
|
|
3008
|
+
readonly cumulativeLabel?: ReactNode;
|
|
3009
|
+
/**
|
|
3010
|
+
* Share of the total the dashed line marks, from 0 to 1. 0 renders no line.
|
|
3011
|
+
*/
|
|
3012
|
+
readonly threshold?: number | undefined;
|
|
3013
|
+
/**
|
|
3014
|
+
* Words written on the threshold's line, such as "80% of tickets". None unless stated.
|
|
3015
|
+
*/
|
|
3016
|
+
readonly thresholdLabel?: string | undefined;
|
|
3017
|
+
/**
|
|
3018
|
+
* Field of each row the bars read.
|
|
3019
|
+
*/
|
|
3020
|
+
readonly valueKey: Extract<keyof Row, string>;
|
|
3021
|
+
/**
|
|
3022
|
+
* Name of the bars in the legend and the tooltip. The field's name unless stated.
|
|
3023
|
+
*/
|
|
3024
|
+
readonly valueLabel?: ReactNode;
|
|
3025
|
+
}
|
|
3026
|
+
/**
|
|
3027
|
+
* Renders the chart's figure around the sorted bars, the running share and the threshold.
|
|
3028
|
+
*
|
|
3029
|
+
* @typeParam Row - One row of the data.
|
|
3030
|
+
* @param props - The rows, the field the bars read, the words and the threshold.
|
|
3031
|
+
*/
|
|
3032
|
+
export declare function ParetoChart<Row extends object>({ children, cumulativeLabel, data, threshold, thresholdLabel, valueKey, valueLabel, ...props }: ParetoChartProps<Row>): ReactElement;
|
|
3033
|
+
//#endregion
|
|
3034
|
+
//#region src/pareto-chart/rows.d.ts
|
|
3035
|
+
/**
|
|
3036
|
+
* Sorts a Pareto chart's rows by size and adds each row's share and the running share of the
|
|
3037
|
+
* total.
|
|
3038
|
+
*/
|
|
3039
|
+
/**
|
|
3040
|
+
* Describes the shares a Pareto chart adds to each row.
|
|
3041
|
+
*/
|
|
3042
|
+
interface ParetoShares {
|
|
3043
|
+
/**
|
|
3044
|
+
* Running share of the total after this row, from 0 to 1.
|
|
3045
|
+
*/
|
|
3046
|
+
readonly cumulative: number;
|
|
3047
|
+
/**
|
|
3048
|
+
* This row's share of the total, from 0 to 1.
|
|
3049
|
+
*/
|
|
3050
|
+
readonly share: number;
|
|
3051
|
+
}
|
|
3052
|
+
/**
|
|
3053
|
+
* Returns the rows sorted largest first, each with its share and the running share of the total.
|
|
3054
|
+
*
|
|
3055
|
+
* @remarks
|
|
3056
|
+
* The sort and the running share are the analysis, so a caption or a table reads these numbers
|
|
3057
|
+
* and does not compute its own. A value that is not a finite number counts as zero. Without a
|
|
3058
|
+
* total every share is zero.
|
|
3059
|
+
* @typeParam Row - One row of the data.
|
|
3060
|
+
* @param rows - The rows, in any order.
|
|
3061
|
+
* @param valueKey - The field each row's value is read from.
|
|
3062
|
+
*/
|
|
3063
|
+
export declare function paretoRows<Row extends object>(rows: readonly Row[], valueKey: Extract<keyof Row, string>): Array<ParetoShares & Row>;
|
|
3064
|
+
/**
|
|
3065
|
+
* Returns how many rows it takes to add up to a share of the total, such as the four causes of
|
|
3066
|
+
* nineteen that account for 80% of the failures.
|
|
3067
|
+
*
|
|
3068
|
+
* @param rows - The rows `paretoRows` returns.
|
|
3069
|
+
* @param threshold - The share the running share must meet, from 0 to 1.
|
|
3070
|
+
*/
|
|
3071
|
+
export declare function paretoCutoff(rows: readonly ParetoShares[], threshold?: number): number;
|
|
3072
|
+
//#endregion
|
|
3073
|
+
//#region src/percent-stacked-bar/percent-stacked-bar.d.ts
|
|
3074
|
+
/**
|
|
3075
|
+
* Describes the props of a percent stacked bar chart: the cartesian props.
|
|
3076
|
+
*
|
|
3077
|
+
* @typeParam Row - One row of the data.
|
|
3078
|
+
*/
|
|
3079
|
+
type PercentStackedBarProps<Row> = CartesianProps<Row>;
|
|
3080
|
+
/**
|
|
3081
|
+
* Renders the chart's figure around a bar of 100% per category, split into its series' shares.
|
|
3082
|
+
*
|
|
3083
|
+
* @typeParam Row - One row of the data.
|
|
3084
|
+
* @param props - The rows, the series and the words.
|
|
3085
|
+
*/
|
|
3086
|
+
export declare function PercentStackedBar<Row>(props: PercentStackedBarProps<Row>): ReactElement;
|
|
3087
|
+
//#endregion
|
|
3088
|
+
//#region src/pie-chart/pie-chart.d.ts
|
|
3089
|
+
/**
|
|
3090
|
+
* Describes the props of a pie chart: the polar props.
|
|
3091
|
+
*/
|
|
3092
|
+
type PieChartProps = PolarProps;
|
|
3093
|
+
/**
|
|
3094
|
+
* Renders the chart's figure around a whole pie of the slices.
|
|
3095
|
+
*
|
|
3096
|
+
* @param props - The slices and the words.
|
|
3097
|
+
*/
|
|
3098
|
+
export declare function PieChart(props: PieChartProps): ReactElement;
|
|
3099
|
+
//#endregion
|
|
3100
|
+
//#region src/polar-area-chart/polar-area-chart.d.ts
|
|
3101
|
+
/**
|
|
3102
|
+
* Describes the props of a polar area chart: the slices, the scale, the words, the switches and
|
|
3103
|
+
* the figure's props.
|
|
3104
|
+
*/
|
|
3105
|
+
interface PolarAreaChartProps extends Omit<ChartOptions<PieSlice>, "data" | "series">, Omit<RootProps, "chart" | "children" | "color"> {
|
|
3106
|
+
/**
|
|
3107
|
+
* Whether the wedges grow in, which they do only outside reduced motion.
|
|
3108
|
+
*/
|
|
3109
|
+
readonly animate?: boolean | undefined;
|
|
3110
|
+
/**
|
|
3111
|
+
* Finding the chart shows, in words, which names the figure.
|
|
3112
|
+
*/
|
|
3113
|
+
readonly caption?: ReactNode;
|
|
3114
|
+
/**
|
|
3115
|
+
* Recharts elements rendered inside the chart after the wedges.
|
|
3116
|
+
*/
|
|
3117
|
+
readonly children?: ReactNode;
|
|
3118
|
+
/**
|
|
3119
|
+
* Palette every wedge takes its color from, unless its slice states one. The theme's first
|
|
3120
|
+
* series color unless stated.
|
|
3121
|
+
*/
|
|
3122
|
+
readonly color?: ChartColor | undefined;
|
|
3123
|
+
/**
|
|
3124
|
+
* Index of the slice the tooltip shows when the chart first renders. None unless stated.
|
|
3125
|
+
*/
|
|
3126
|
+
readonly defaultIndex?: number | undefined;
|
|
3127
|
+
/**
|
|
3128
|
+
* Message the chart renders in the plot's place while it has no slices.
|
|
3129
|
+
*/
|
|
3130
|
+
readonly empty?: ReactNode;
|
|
3131
|
+
/**
|
|
3132
|
+
* Accessible name of the chart's keyboard layer, such as "Requests by hour".
|
|
3133
|
+
*/
|
|
3134
|
+
readonly label: string;
|
|
3135
|
+
/**
|
|
3136
|
+
* Whether the legend renders below the plot. It renders while the chart has slices unless
|
|
3137
|
+
* stated.
|
|
3138
|
+
*/
|
|
3139
|
+
readonly legend?: boolean | undefined;
|
|
3140
|
+
/**
|
|
3141
|
+
* Accessible name of the legend's group of buttons.
|
|
3142
|
+
*/
|
|
3143
|
+
readonly legendLabel?: string | undefined;
|
|
3144
|
+
/**
|
|
3145
|
+
* Value of a full radius, such as a capacity. The largest value shown unless stated.
|
|
3146
|
+
*/
|
|
3147
|
+
readonly max?: number | undefined;
|
|
3148
|
+
/**
|
|
3149
|
+
* Whether each slice's name renders around the rose.
|
|
3150
|
+
*/
|
|
3151
|
+
readonly names?: boolean | undefined;
|
|
3152
|
+
/**
|
|
3153
|
+
* Categories of the cycle in their order, such as hours or months, the first at 12 o'clock.
|
|
3154
|
+
*/
|
|
3155
|
+
readonly slices: readonly PieSlice[];
|
|
3156
|
+
/**
|
|
3157
|
+
* `Intl.NumberFormat` options the legend's and the tooltip's values are written with.
|
|
3158
|
+
*/
|
|
3159
|
+
readonly valueOptions?: Intl.NumberFormatOptions | undefined;
|
|
3160
|
+
/**
|
|
3161
|
+
* Whether the legend writes each slice's value beside its name.
|
|
3162
|
+
*/
|
|
3163
|
+
readonly values?: boolean | undefined;
|
|
3164
|
+
}
|
|
3165
|
+
/**
|
|
3166
|
+
* Renders the chart's figure around the wedges, the legend and the caption.
|
|
3167
|
+
*
|
|
3168
|
+
* @param props - The slices, the scale, the words, the switches and the figure's props.
|
|
3169
|
+
*/
|
|
3170
|
+
export declare function PolarAreaChart({ caption, color, defaultHiddenKeys, empty, hiddenKeys, legend, legendLabel, locale, onHiddenKeysChange, ratio, slices, valueOptions, values, ...rest }: PolarAreaChartProps): ReactElement;
|
|
3171
|
+
//#endregion
|
|
3172
|
+
//#region src/polar-area-chart/wedges.d.ts
|
|
3173
|
+
/**
|
|
3174
|
+
* Returns the radius of a wedge as a share of the full radius, so the wedge's area follows its
|
|
3175
|
+
* value: √(value / max), at most 1, and 0 for a value or a max that is not above zero.
|
|
3176
|
+
*
|
|
3177
|
+
* @remarks
|
|
3178
|
+
* A wedge's area grows with the square of its radius. A wedge worth four times another is twice
|
|
3179
|
+
* as long and covers four times the area. A radius in proportion to the value would render it
|
|
3180
|
+
* four times as long, with sixteen times the area.
|
|
3181
|
+
*/
|
|
3182
|
+
export declare function areaRadius(value: number, max: number): number;
|
|
3183
|
+
//#endregion
|
|
3184
|
+
//#region src/radar-chart/radar-chart.d.ts
|
|
3185
|
+
/**
|
|
3186
|
+
* Describes a series of a radar chart: the kit's series, and whether its polygon fills.
|
|
3187
|
+
*/
|
|
3188
|
+
interface RadarSeries extends SeriesOptions {
|
|
3189
|
+
/**
|
|
3190
|
+
* Whether the polygon fills at 0.25 of its color. Filled unless stated.
|
|
3191
|
+
*/
|
|
3192
|
+
readonly filled?: boolean | undefined;
|
|
3193
|
+
}
|
|
3194
|
+
/**
|
|
3195
|
+
* Describes the props of a radar chart: the cartesian props, its series and the radius ticks.
|
|
3196
|
+
*
|
|
3197
|
+
* @remarks
|
|
3198
|
+
* The figure's props leave out `scale`, the style prop, because the chart takes `scale` as the
|
|
3199
|
+
* switch of its radius ticks. The props leave out `annotations`, because the spokes are not a
|
|
3200
|
+
* category axis to mark.
|
|
3201
|
+
* @typeParam Row - One row of the data, one per spoke.
|
|
3202
|
+
*/
|
|
3203
|
+
interface RadarChartProps<Row> extends Omit<CartesianProps<Row>, "annotations" | "scale" | "series"> {
|
|
3204
|
+
/**
|
|
3205
|
+
* Whether the radius axis writes its ticks up the spoke at 12 o'clock.
|
|
3206
|
+
*/
|
|
3207
|
+
readonly scale?: boolean | undefined;
|
|
3208
|
+
/**
|
|
3209
|
+
* Series the chart plots, in the order the legend lists them.
|
|
3210
|
+
*/
|
|
3211
|
+
readonly series: readonly RadarSeries[];
|
|
3212
|
+
}
|
|
3213
|
+
/**
|
|
3214
|
+
* Renders the chart's figure around a polygon per series, the legend and the caption.
|
|
3215
|
+
*
|
|
3216
|
+
* @typeParam Row - One row of the data, one per spoke.
|
|
3217
|
+
* @param props - The rows, the series, the words and the switches.
|
|
3218
|
+
*/
|
|
3219
|
+
export declare function RadarChart<Row>({ animate, caption, categoryKey, children, data, defaultHiddenKeys, defaultIndex, empty, grid, hiddenKeys, label, labelOptions, legend, legendLabel, locale, onHiddenKeysChange, ratio, scale, series, valueDomain, valueOptions, ...root }: RadarChartProps<Row>): ReactElement;
|
|
3220
|
+
//#endregion
|
|
3221
|
+
//#region src/radial-bar-chart/rings.d.ts
|
|
3222
|
+
/**
|
|
3223
|
+
* Describes one bar of a radial bar chart, a ring read against the value of a full turn.
|
|
3224
|
+
*/
|
|
3225
|
+
interface RadialBarDatum {
|
|
3226
|
+
/**
|
|
3227
|
+
* Palette the ring takes its color from. The theme's series color at the bar's place unless
|
|
3228
|
+
* stated.
|
|
3229
|
+
*/
|
|
3230
|
+
readonly color?: ChartColor | undefined;
|
|
3231
|
+
/**
|
|
3232
|
+
* Key of the bar, which the legend, the tooltip and the hidden keys name.
|
|
3233
|
+
*/
|
|
3234
|
+
readonly key: string;
|
|
3235
|
+
/**
|
|
3236
|
+
* Name the tooltip and the legend show. The key unless stated.
|
|
3237
|
+
*/
|
|
3238
|
+
readonly label?: ReactNode;
|
|
3239
|
+
/**
|
|
3240
|
+
* Measure the ring shows. A value that is not a finite number counts as zero.
|
|
3241
|
+
*/
|
|
3242
|
+
readonly value: number;
|
|
3243
|
+
}
|
|
3244
|
+
//#endregion
|
|
3245
|
+
//#region src/radial-bar-chart/radial-bar-chart.d.ts
|
|
3246
|
+
/**
|
|
3247
|
+
* Describes the props of a radial bar chart: the bars, the scale, the words, the switches and the
|
|
3248
|
+
* figure's props.
|
|
3249
|
+
*/
|
|
3250
|
+
interface RadialBarChartProps extends Omit<ChartOptions<RadialBarDatum>, "data" | "series">, Omit<RootProps, "chart" | "children"> {
|
|
3251
|
+
/**
|
|
3252
|
+
* Whether the rings grow in, which they do only outside reduced motion.
|
|
3253
|
+
*/
|
|
3254
|
+
readonly animate?: boolean | undefined;
|
|
3255
|
+
/**
|
|
3256
|
+
* Bars of the chart, one ring each, the outermost first.
|
|
3257
|
+
*/
|
|
3258
|
+
readonly bars: readonly RadialBarDatum[];
|
|
3259
|
+
/**
|
|
3260
|
+
* Finding the chart shows, in words, which names the figure.
|
|
3261
|
+
*/
|
|
3262
|
+
readonly caption?: ReactNode;
|
|
3263
|
+
/**
|
|
3264
|
+
* Recharts elements rendered inside the chart after the rings.
|
|
3265
|
+
*/
|
|
3266
|
+
readonly children?: ReactNode;
|
|
3267
|
+
/**
|
|
3268
|
+
* Index of the bar the tooltip shows when the chart first renders. None unless stated.
|
|
3269
|
+
*/
|
|
3270
|
+
readonly defaultIndex?: number | undefined;
|
|
3271
|
+
/**
|
|
3272
|
+
* Message the chart renders in the plot's place while it has no bars.
|
|
3273
|
+
*/
|
|
3274
|
+
readonly empty?: ReactNode;
|
|
3275
|
+
/**
|
|
3276
|
+
* Angle the rings end at, in recharts' degrees, where clockwise is negative. -270 unless stated.
|
|
3277
|
+
*/
|
|
3278
|
+
readonly endAngle?: number | undefined;
|
|
3279
|
+
/**
|
|
3280
|
+
* Accessible name of the chart's keyboard layer, such as "Plan usage".
|
|
3281
|
+
*/
|
|
3282
|
+
readonly label: string;
|
|
3283
|
+
/**
|
|
3284
|
+
* Whether the legend renders below the plot. It renders while the chart has bars unless stated.
|
|
3285
|
+
*/
|
|
3286
|
+
readonly legend?: boolean | undefined;
|
|
3287
|
+
/**
|
|
3288
|
+
* Accessible name of the legend's group of buttons.
|
|
3289
|
+
*/
|
|
3290
|
+
readonly legendLabel?: string | undefined;
|
|
3291
|
+
/**
|
|
3292
|
+
* Value of a full turn, such as a quota, a target or a capacity. The largest value shown unless
|
|
3293
|
+
* stated.
|
|
3294
|
+
*/
|
|
3295
|
+
readonly max?: number | undefined;
|
|
3296
|
+
/**
|
|
3297
|
+
* Angle the rings start at, in recharts' degrees, where 90 is 12 o'clock. 90 unless stated.
|
|
3298
|
+
*/
|
|
3299
|
+
readonly startAngle?: number | undefined;
|
|
3300
|
+
/**
|
|
3301
|
+
* Whether each ring's remainder renders as a track behind it.
|
|
3302
|
+
*/
|
|
3303
|
+
readonly track?: boolean | undefined;
|
|
3304
|
+
/**
|
|
3305
|
+
* `Intl.NumberFormat` options the legend's and the tooltip's values are written with.
|
|
3306
|
+
*/
|
|
3307
|
+
readonly valueOptions?: Intl.NumberFormatOptions | undefined;
|
|
3308
|
+
/**
|
|
3309
|
+
* Whether the legend writes each ring's value beside its name.
|
|
3310
|
+
*/
|
|
3311
|
+
readonly values?: boolean | undefined;
|
|
3312
|
+
}
|
|
3313
|
+
/**
|
|
3314
|
+
* Renders the chart's figure around the rings, the legend and the caption.
|
|
3315
|
+
*
|
|
3316
|
+
* @param props - The bars, the scale, the words, the switches and the figure's props.
|
|
3317
|
+
*/
|
|
3318
|
+
export declare function RadialBarChart({ bars, caption, defaultHiddenKeys, empty, hiddenKeys, legend, legendLabel, locale, onHiddenKeysChange, ratio, valueOptions, values, ...rest }: RadialBarChartProps): ReactElement;
|
|
3319
|
+
//#endregion
|
|
3320
|
+
//#region src/range-chart/range-chart.d.ts
|
|
3321
|
+
/**
|
|
3322
|
+
* Describes the props of a range chart: the cartesian props, the band, the lines over it and the
|
|
3323
|
+
* path of a line.
|
|
3324
|
+
*
|
|
3325
|
+
* @typeParam Row - One row of the data.
|
|
3326
|
+
*/
|
|
3327
|
+
interface RangeChartProps<Row> extends Omit<CartesianProps<Row>, "series"> {
|
|
3328
|
+
/**
|
|
3329
|
+
* Band between two fields of each row, such as the low and high ends of a forecast.
|
|
3330
|
+
*/
|
|
3331
|
+
readonly band: RangeBand;
|
|
3332
|
+
/**
|
|
3333
|
+
* Path of each line and of the band's edges between two points. Smoothed through them unless
|
|
3334
|
+
* stated.
|
|
3335
|
+
*/
|
|
3336
|
+
readonly curve?: Curve | undefined;
|
|
3337
|
+
/**
|
|
3338
|
+
* Series plotted as lines over the band, such as the estimate or the actual value.
|
|
3339
|
+
*/
|
|
3340
|
+
readonly series?: readonly CartesianSeries[] | undefined;
|
|
3341
|
+
}
|
|
3342
|
+
/**
|
|
3343
|
+
* Renders the chart's figure around the band and a line per series over it.
|
|
3344
|
+
*
|
|
3345
|
+
* @typeParam Row - One row of the data.
|
|
3346
|
+
* @param props - The rows, the band, the series, the words and the curve.
|
|
3347
|
+
*/
|
|
3348
|
+
export declare function RangeChart<Row>({ band, curve, series, ...props }: RangeChartProps<Row>): ReactElement;
|
|
3349
|
+
//#endregion
|
|
3350
|
+
//#region src/cartesian/fit.d.ts
|
|
3351
|
+
/**
|
|
3352
|
+
* Describes the least-squares line through a set of points.
|
|
3353
|
+
*/
|
|
3354
|
+
interface LinearFit {
|
|
3355
|
+
/**
|
|
3356
|
+
* Value of the line where `x` is 0.
|
|
3357
|
+
*/
|
|
3358
|
+
readonly intercept: number;
|
|
3359
|
+
/**
|
|
3360
|
+
* Share of the variance the line accounts for, from 0 to 1.
|
|
3361
|
+
*/
|
|
3362
|
+
readonly r2: number;
|
|
3363
|
+
/**
|
|
3364
|
+
* Change of the line's value per unit of `x`.
|
|
3365
|
+
*/
|
|
3366
|
+
readonly slope: number;
|
|
3367
|
+
}
|
|
3368
|
+
//#endregion
|
|
3369
|
+
//#region src/regression-overlay/regression-overlay.d.ts
|
|
3370
|
+
/**
|
|
3371
|
+
* Describes the props of a trend line: the points it fits, the fields their x and y are read from,
|
|
3372
|
+
* and the series it summarises.
|
|
3373
|
+
*
|
|
3374
|
+
* @typeParam Point - One point of the scatter.
|
|
3375
|
+
*/
|
|
3376
|
+
interface RegressionOverlayProps<Point> {
|
|
3377
|
+
/**
|
|
3378
|
+
* Points to fit, the same points a scatter's series renders.
|
|
3379
|
+
*/
|
|
3380
|
+
readonly data: readonly Point[];
|
|
3381
|
+
/**
|
|
3382
|
+
* Key of the series the line summarises, whose color the line takes and whose legend state it
|
|
3383
|
+
* follows. The line takes the neutral palette's chart color and ignores the legend unless stated.
|
|
3384
|
+
*/
|
|
3385
|
+
readonly series?: string | undefined;
|
|
3386
|
+
/**
|
|
3387
|
+
* Field each point's x is read from.
|
|
3388
|
+
*/
|
|
3389
|
+
readonly xKey: Extract<keyof Point, string>;
|
|
3390
|
+
/**
|
|
3391
|
+
* Field each point's y is read from.
|
|
3392
|
+
*/
|
|
3393
|
+
readonly yKey: Extract<keyof Point, string>;
|
|
3394
|
+
}
|
|
3395
|
+
/**
|
|
3396
|
+
* Renders the trend line as recharts' `ReferenceLine` segment, or nothing where no line fits or
|
|
3397
|
+
* the legend hides the line's series.
|
|
3398
|
+
*
|
|
3399
|
+
* @typeParam Point - One point of the scatter.
|
|
3400
|
+
* @param props - The points, the fields their x and y are read from, and the series.
|
|
3401
|
+
*/
|
|
3402
|
+
export declare function RegressionOverlay<Point>({ data, series, xKey, yKey }: RegressionOverlayProps<Point>): null | ReactElement;
|
|
3403
|
+
//#endregion
|
|
3404
|
+
//#region src/regression-overlay/regression.d.ts
|
|
3405
|
+
/**
|
|
3406
|
+
* Returns the least-squares line through the points and how much of the variance it accounts for,
|
|
3407
|
+
* or nothing where no line fits.
|
|
3408
|
+
*
|
|
3409
|
+
* @remarks
|
|
3410
|
+
* A point whose x or y is not a finite number is left out. No line fits fewer than two points, or
|
|
3411
|
+
* points on one vertical line. `r2` is the page's evidence for rendering the line at all: a line
|
|
3412
|
+
* through a cloud with an r² of 0.04 pictures a relationship that is not there.
|
|
3413
|
+
* @param points - The points, in any order.
|
|
3414
|
+
* @param xKey - The field each point's x is read from.
|
|
3415
|
+
* @param yKey - The field each point's y is read from.
|
|
3416
|
+
*/
|
|
3417
|
+
export declare function linearRegression(points: readonly unknown[], xKey: string, yKey: string): LinearFit | undefined;
|
|
3418
|
+
//#endregion
|
|
3419
|
+
//#region src/sankey-chart/sankey-chart.d.ts
|
|
3420
|
+
/**
|
|
3421
|
+
* Describes the props of a sankey chart: the nodes and the flows, the words, the switches and the
|
|
3422
|
+
* figure's props.
|
|
3423
|
+
*/
|
|
3424
|
+
interface SankeyChartProps extends Omit<RootProps, "chart" | "children"> {
|
|
3425
|
+
/**
|
|
3426
|
+
* Finding the chart shows, in words, which names the figure.
|
|
3427
|
+
*/
|
|
3428
|
+
readonly caption?: ReactNode;
|
|
3429
|
+
/**
|
|
3430
|
+
* Recharts elements rendered inside the chart after the marks.
|
|
3431
|
+
*/
|
|
3432
|
+
readonly children?: ReactNode;
|
|
3433
|
+
/**
|
|
3434
|
+
* Place in the keyboard walk of the mark the tooltip shows when the chart first renders: each
|
|
3435
|
+
* node in the caller's order, then the flows it sends. None unless stated.
|
|
3436
|
+
*/
|
|
3437
|
+
readonly defaultIndex?: number | undefined;
|
|
3438
|
+
/**
|
|
3439
|
+
* Message the chart renders in the plot's place while it has no flow to render.
|
|
3440
|
+
*/
|
|
3441
|
+
readonly empty?: ReactNode;
|
|
3442
|
+
/**
|
|
3443
|
+
* Flows between the nodes, by key, in any order.
|
|
3444
|
+
*/
|
|
3445
|
+
readonly flows: readonly SankeyFlow[];
|
|
3446
|
+
/**
|
|
3447
|
+
* Name of what flows into a node in the tooltip. "In" unless stated.
|
|
3448
|
+
*/
|
|
3449
|
+
readonly inflowLabel?: string | undefined;
|
|
3450
|
+
/**
|
|
3451
|
+
* Accessible name of the chart's keyboard layer, such as "Visitors by channel and outcome".
|
|
3452
|
+
*/
|
|
3453
|
+
readonly label: string;
|
|
3454
|
+
/**
|
|
3455
|
+
* Locale the values are written in. The locale in scope unless stated.
|
|
3456
|
+
*/
|
|
3457
|
+
readonly locale?: string | undefined;
|
|
3458
|
+
/**
|
|
3459
|
+
* Nodes the flows name, in the order the walk visits them and the series colors take.
|
|
3460
|
+
*/
|
|
3461
|
+
readonly nodes: readonly SankeyNode[];
|
|
3462
|
+
/**
|
|
3463
|
+
* Name of what flows out of a node in the tooltip. "Out" unless stated.
|
|
3464
|
+
*/
|
|
3465
|
+
readonly outflowLabel?: string | undefined;
|
|
3466
|
+
/**
|
|
3467
|
+
* Name of a flow's share of what its source sends in the tooltip. "Of source" unless stated.
|
|
3468
|
+
*/
|
|
3469
|
+
readonly shareLabel?: string | undefined;
|
|
3470
|
+
/**
|
|
3471
|
+
* Name of a flow's value in the tooltip. "Value" unless stated.
|
|
3472
|
+
*/
|
|
3473
|
+
readonly valueLabel?: string | undefined;
|
|
3474
|
+
/**
|
|
3475
|
+
* `Intl.NumberFormatOptions` the values are written with, beside the nodes and in the tooltip.
|
|
3476
|
+
*/
|
|
3477
|
+
readonly valueOptions?: Intl.NumberFormatOptions | undefined;
|
|
3478
|
+
/**
|
|
3479
|
+
* Whether each node writes its value under its name where its bar is two lines tall.
|
|
3480
|
+
*/
|
|
3481
|
+
readonly values?: boolean | undefined;
|
|
3482
|
+
}
|
|
3483
|
+
/**
|
|
3484
|
+
* Renders the chart's figure around the sankey and the caption.
|
|
3485
|
+
*
|
|
3486
|
+
* @param props - The nodes, the flows, the words, the switches and the figure's props.
|
|
3487
|
+
*/
|
|
3488
|
+
export declare function SankeyChart({ caption, empty, flows, inflowLabel, locale, nodes, outflowLabel, ratio, shareLabel, valueLabel, valueOptions, ...rest }: SankeyChartProps): ReactElement;
|
|
3489
|
+
//#endregion
|
|
3490
|
+
//#region src/scatter-plot/scatter-plot.d.ts
|
|
3491
|
+
/**
|
|
3492
|
+
* Renders the chart's figure around the points, the legend and the caption.
|
|
3493
|
+
*
|
|
3494
|
+
* @typeParam Point - One point of a series.
|
|
3495
|
+
* @param props - The series, the axes, the size of a point, the quadrants, the words and the
|
|
3496
|
+
* figure's props.
|
|
3497
|
+
*/
|
|
3498
|
+
export declare function ScatterPlot<Point extends object>(props: ScatterPlotProps<Point>): ReactElement;
|
|
3499
|
+
//#endregion
|
|
3500
|
+
//#region src/spark/box.d.ts
|
|
3501
|
+
/**
|
|
3502
|
+
* Renders the bound box a sparkline and a sparkbar render their run in.
|
|
3503
|
+
*
|
|
3504
|
+
* @remarks
|
|
3505
|
+
* The box is a `div`, because recharts renders `div` wrappers inside it, so a spark goes in a
|
|
3506
|
+
* table cell or a row of a layout and not inside a paragraph.
|
|
3507
|
+
*/
|
|
3508
|
+
/**
|
|
3509
|
+
* Renders the spark's `div` with the recipe's variants.
|
|
3510
|
+
*/
|
|
3511
|
+
declare const Box: import("@stealthscale/theme").StyledComponent<"div", {
|
|
3512
|
+
readonly size?: "lg" | "md" | "sm";
|
|
3513
|
+
readonly stretch?: boolean;
|
|
3514
|
+
}>;
|
|
3515
|
+
//#endregion
|
|
3516
|
+
//#region src/spark/rows.d.ts
|
|
3517
|
+
/**
|
|
3518
|
+
* Reads a run's values into the rows recharts plots, and names a run for assistive technology.
|
|
3519
|
+
*/
|
|
3520
|
+
/**
|
|
3521
|
+
* Describes one value of a run: a number, or nothing where a reading is missing.
|
|
3522
|
+
*/
|
|
3523
|
+
type SparkValue = null | number | undefined;
|
|
3524
|
+
//#endregion
|
|
3525
|
+
//#region src/sparkbar/sparkbar.d.ts
|
|
3526
|
+
/**
|
|
3527
|
+
* Describes the props of a sparkbar: the run, its colors and the props of the box.
|
|
3528
|
+
*/
|
|
3529
|
+
interface SparkbarProps extends Omit<ComponentProps<typeof Box>, "children" | "color"> {
|
|
3530
|
+
/**
|
|
3531
|
+
* Whether the bars animate in, which they do only outside reduced motion.
|
|
3532
|
+
*/
|
|
3533
|
+
readonly animate?: boolean | undefined;
|
|
3534
|
+
/**
|
|
3535
|
+
* Value a dashed line marks across the run, such as a target.
|
|
3536
|
+
*/
|
|
3537
|
+
readonly baseline?: number | undefined;
|
|
3538
|
+
/**
|
|
3539
|
+
* Palette the bars take their color from. The theme's first series color unless stated.
|
|
3540
|
+
*/
|
|
3541
|
+
readonly color?: ChartColor | undefined;
|
|
3542
|
+
/**
|
|
3543
|
+
* Name of a run shown on its own. A run without one is hidden from assistive technology.
|
|
3544
|
+
*/
|
|
3545
|
+
readonly label?: string | undefined;
|
|
3546
|
+
/**
|
|
3547
|
+
* Whether a value under zero takes the error palette's chart color.
|
|
3548
|
+
*/
|
|
3549
|
+
readonly signed?: boolean | undefined;
|
|
3550
|
+
/**
|
|
3551
|
+
* The run, oldest first. A value that is not a finite number leaves its period empty.
|
|
3552
|
+
*/
|
|
3553
|
+
readonly values: readonly SparkValue[];
|
|
3554
|
+
}
|
|
3555
|
+
/**
|
|
3556
|
+
* Renders the run as bars from zero in its box.
|
|
3557
|
+
*
|
|
3558
|
+
* @param props - The run, its colors and the props of the box.
|
|
3559
|
+
*/
|
|
3560
|
+
export declare function Sparkbar({ animate, baseline, color, label, signed, values, ...props }: SparkbarProps): ReactElement;
|
|
3561
|
+
//#endregion
|
|
3562
|
+
//#region src/sparkline/sparkline.d.ts
|
|
3563
|
+
/**
|
|
3564
|
+
* Describes the props of a sparkline: the run, its color and shape, and the props of the box.
|
|
3565
|
+
*/
|
|
3566
|
+
interface SparklineProps extends Omit<ComponentProps<typeof Box>, "children" | "color"> {
|
|
3567
|
+
/**
|
|
3568
|
+
* Whether the line animates in, which it does only outside reduced motion.
|
|
3569
|
+
*/
|
|
3570
|
+
readonly animate?: boolean | undefined;
|
|
3571
|
+
/**
|
|
3572
|
+
* Whether the chart's gradient fills under the line.
|
|
3573
|
+
*/
|
|
3574
|
+
readonly area?: boolean | undefined;
|
|
3575
|
+
/**
|
|
3576
|
+
* Value a dashed line marks across the run, such as a target.
|
|
3577
|
+
*/
|
|
3578
|
+
readonly baseline?: number | undefined;
|
|
3579
|
+
/**
|
|
3580
|
+
* Palette the line takes its color from. The theme's first series color unless stated.
|
|
3581
|
+
*/
|
|
3582
|
+
readonly color?: ChartColor | undefined;
|
|
3583
|
+
/**
|
|
3584
|
+
* Path of the line between two values.
|
|
3585
|
+
*/
|
|
3586
|
+
readonly curve?: Curve | undefined;
|
|
3587
|
+
/**
|
|
3588
|
+
* Name of a run shown on its own. A run without one is hidden from assistive technology.
|
|
3589
|
+
*/
|
|
3590
|
+
readonly label?: string | undefined;
|
|
3591
|
+
/**
|
|
3592
|
+
* The run, oldest first. A value that is not a finite number leaves a gap.
|
|
3593
|
+
*/
|
|
3594
|
+
readonly values: readonly SparkValue[];
|
|
3595
|
+
}
|
|
3596
|
+
/**
|
|
3597
|
+
* Renders the run as a line in its box.
|
|
3598
|
+
*
|
|
3599
|
+
* @param props - The run, its color and shape, and the props of the box.
|
|
3600
|
+
*/
|
|
3601
|
+
export declare function Sparkline({ animate, area, baseline, color, curve, label, values, ...props }: SparklineProps): ReactElement;
|
|
3602
|
+
//#endregion
|
|
3603
|
+
//#region src/stacked-area-chart/stacked-area-chart.d.ts
|
|
3604
|
+
/**
|
|
3605
|
+
* Describes the props of a stacked area chart: the cartesian props, the edges' path and the share.
|
|
3606
|
+
*
|
|
3607
|
+
* @typeParam Row - One row of the data.
|
|
3608
|
+
*/
|
|
3609
|
+
interface StackedAreaChartProps<Row> extends CartesianProps<Row> {
|
|
3610
|
+
/**
|
|
3611
|
+
* Path of each band's edge between two points. Smoothed through them unless stated.
|
|
3612
|
+
*/
|
|
3613
|
+
readonly curve?: Curve | undefined;
|
|
3614
|
+
/**
|
|
3615
|
+
* Whether every point sums to 100%, so the chart shows each series' share.
|
|
3616
|
+
*/
|
|
3617
|
+
readonly percent?: boolean | undefined;
|
|
3618
|
+
}
|
|
3619
|
+
/**
|
|
3620
|
+
* Renders the chart's figure around the series stacked into bands.
|
|
3621
|
+
*
|
|
3622
|
+
* @typeParam Row - One row of the data.
|
|
3623
|
+
* @param props - The rows, the series, the words, the curve and the share.
|
|
3624
|
+
*/
|
|
3625
|
+
export declare function StackedAreaChart<Row>({ curve, percent, ...props }: StackedAreaChartProps<Row>): ReactElement;
|
|
3626
|
+
//#endregion
|
|
3627
|
+
//#region src/stacked-bar-chart/stacked-bar-chart.d.ts
|
|
3628
|
+
/**
|
|
3629
|
+
* Describes the props of a stacked bar chart: the cartesian props.
|
|
3630
|
+
*
|
|
3631
|
+
* @typeParam Row - One row of the data.
|
|
3632
|
+
*/
|
|
3633
|
+
type StackedBarChartProps<Row> = CartesianProps<Row>;
|
|
3634
|
+
/**
|
|
3635
|
+
* Renders the chart's figure around a bar per category, split into its series.
|
|
3636
|
+
*
|
|
3637
|
+
* @typeParam Row - One row of the data.
|
|
3638
|
+
* @param props - The rows, the series and the words.
|
|
3639
|
+
*/
|
|
3640
|
+
export declare function StackedBarChart<Row>(props: StackedBarChartProps<Row>): ReactElement;
|
|
3641
|
+
//#endregion
|
|
3642
|
+
//#region src/stats/density.d.ts
|
|
3643
|
+
/**
|
|
3644
|
+
* Estimates the density of values as a violin plot renders it: Silverman's bandwidth, a Gaussian
|
|
3645
|
+
* kernel density on an even grid from the smallest value to the largest, and the density's peaks.
|
|
3646
|
+
*
|
|
3647
|
+
* @remarks
|
|
3648
|
+
* The grid stops at the smallest and the largest value. A Gaussian kernel puts mass past the
|
|
3649
|
+
* data, such as below zero for a duration, so an outline sampled there would show values no one
|
|
3650
|
+
* measured. The bandwidth decides the shape: too narrow turns sampling noise into peaks, too wide
|
|
3651
|
+
* smooths a second peak away.
|
|
3652
|
+
*/
|
|
3653
|
+
/**
|
|
3654
|
+
* Describes one point of an estimated density.
|
|
3655
|
+
*/
|
|
3656
|
+
interface DensityPoint {
|
|
3657
|
+
/**
|
|
3658
|
+
* Probability density at the value, which integrates to 1 over every value, not a probability.
|
|
3659
|
+
*/
|
|
3660
|
+
readonly density: number;
|
|
3661
|
+
/**
|
|
3662
|
+
* Value the density is sampled at.
|
|
3663
|
+
*/
|
|
3664
|
+
readonly value: number;
|
|
3665
|
+
}
|
|
3666
|
+
/**
|
|
3667
|
+
* Describes how a density is estimated.
|
|
3668
|
+
*/
|
|
3669
|
+
interface DensityOptions {
|
|
3670
|
+
/**
|
|
3671
|
+
* Standard deviation of the Gaussian kernel, in the values' own units. Silverman's bandwidth
|
|
3672
|
+
* unless stated.
|
|
3673
|
+
*/
|
|
3674
|
+
readonly bandwidth?: number | undefined;
|
|
3675
|
+
/**
|
|
3676
|
+
* Number of points the density is sampled at, at least 2. 64 unless stated.
|
|
3677
|
+
*/
|
|
3678
|
+
readonly resolution?: number | undefined;
|
|
3679
|
+
}
|
|
3680
|
+
/**
|
|
3681
|
+
* Returns Silverman's bandwidth for a Gaussian kernel over the values: 0.9 times the smaller of the
|
|
3682
|
+
* standard deviation and the interquartile range over 1.34, times the count to the power of -1/5.
|
|
3683
|
+
*
|
|
3684
|
+
* @remarks
|
|
3685
|
+
* The interquartile range keeps one far value from smoothing the whole shape flat, and the
|
|
3686
|
+
* standard deviation replaces it while the middle half has no spread. Values without spread, one
|
|
3687
|
+
* value or equal ones, have a bandwidth of 0. A value that is not a finite number is left out.
|
|
3688
|
+
* @param values - The values, of any type and in any order.
|
|
3689
|
+
*/
|
|
3690
|
+
export declare function silvermanBandwidth(values: readonly unknown[]): number;
|
|
3691
|
+
/**
|
|
3692
|
+
* Returns a Gaussian kernel density of the values, sampled at even steps from the smallest value to
|
|
3693
|
+
* the largest, or no points without a finite value.
|
|
3694
|
+
*
|
|
3695
|
+
* @remarks
|
|
3696
|
+
* A bandwidth of 0, as for equal values, has no shape to smooth, so the density is one point at
|
|
3697
|
+
* the smallest value, with all the mass. A value that is not a finite number is left out.
|
|
3698
|
+
* @param values - The values, of any type and in any order.
|
|
3699
|
+
* @param options - The kernel's bandwidth and the number of points.
|
|
3700
|
+
*/
|
|
3701
|
+
export declare function kernelDensity(values: readonly unknown[], options?: DensityOptions): DensityPoint[];
|
|
3702
|
+
/**
|
|
3703
|
+
* Returns the values a density peaks at, in ascending order: each local maximum at least `floor`
|
|
3704
|
+
* of the tallest, a run of equal densities read as one peak at its middle.
|
|
3705
|
+
*
|
|
3706
|
+
* @remarks
|
|
3707
|
+
* The floor is a height, not a test of significance. Two peaks of different widths differ in
|
|
3708
|
+
* height even when both are plain to see, so the floor is low. No floor tells a real peak from
|
|
3709
|
+
* one a narrow bandwidth invents.
|
|
3710
|
+
* @param density - The density, in ascending order of value.
|
|
3711
|
+
* @param floor - The share of the tallest peak's height a peak needs.
|
|
3712
|
+
*/
|
|
3713
|
+
export declare function densityPeaks(density: readonly DensityPoint[], floor?: number): number[];
|
|
3714
|
+
//#endregion
|
|
3715
|
+
//#region src/stats/quantile.d.ts
|
|
3716
|
+
/**
|
|
3717
|
+
* Reads a quantile of sorted values, the one definition every distribution chart in the package
|
|
3718
|
+
* shares.
|
|
3719
|
+
*/
|
|
3720
|
+
/**
|
|
3721
|
+
* Returns the value below which a share of the sorted values falls, interpolated between the two
|
|
3722
|
+
* nearest values.
|
|
3723
|
+
*
|
|
3724
|
+
* @remarks
|
|
3725
|
+
* This is R's type 7, Excel's `PERCENTILE.INC`, SQL's `PERCENTILE_CONT` and NumPy's default.
|
|
3726
|
+
* Nine definitions are in common use, and they disagree on small samples, so a caller that
|
|
3727
|
+
* summarises values elsewhere reads this one to match the chart. A share outside 0 to 1 reads the
|
|
3728
|
+
* nearest end. No values return `NaN`.
|
|
3729
|
+
* @param sorted - The values, in ascending order.
|
|
3730
|
+
* @param share - The share of values below the quantile, from 0 to 1.
|
|
3731
|
+
*/
|
|
3732
|
+
export declare function quantile(sorted: readonly number[], share: number): number;
|
|
3733
|
+
//#endregion
|
|
3734
|
+
//#region src/step-line-chart/step-line-chart.d.ts
|
|
3735
|
+
/**
|
|
3736
|
+
* Describes the props of a step line chart: the cartesian props.
|
|
3737
|
+
*
|
|
3738
|
+
* @typeParam Row - One row of the data.
|
|
3739
|
+
*/
|
|
3740
|
+
type StepLineChartProps<Row> = CartesianProps<Row>;
|
|
3741
|
+
/**
|
|
3742
|
+
* Renders the chart's figure around a line of steps per series.
|
|
3743
|
+
*
|
|
3744
|
+
* @typeParam Row - One row of the data.
|
|
3745
|
+
* @param props - The rows, the series and the words.
|
|
3746
|
+
*/
|
|
3747
|
+
export declare function StepLineChart<Row>(props: StepLineChartProps<Row>): ReactElement;
|
|
3748
|
+
//#endregion
|
|
3749
|
+
//#region src/stream-graph/order.d.ts
|
|
3750
|
+
/**
|
|
3751
|
+
* Orders a stream graph's series inside out: the series whose mass arrives early in the middle of
|
|
3752
|
+
* the stack, the late ones outside.
|
|
3753
|
+
*
|
|
3754
|
+
* @remarks
|
|
3755
|
+
* Recharts supplies the moving baseline (`stackOffset="wiggle"`). Without the order a series that
|
|
3756
|
+
* appears late is threaded through the middle and moves every band above it. The order is Byron
|
|
3757
|
+
* and Wattenberg's ("Stacked Graphs: Geometry and Aesthetics", 2008).
|
|
3758
|
+
*/
|
|
3759
|
+
/**
|
|
3760
|
+
* Returns where a series' mass is along the rows: the index of its centre of gravity, or NaN for
|
|
3761
|
+
* a series with no positive value.
|
|
3762
|
+
*
|
|
3763
|
+
* @param data - The rows, in order.
|
|
3764
|
+
* @param key - The series' field.
|
|
3765
|
+
*/
|
|
3766
|
+
export declare function streamOnset(data: readonly unknown[], key: string): number;
|
|
3767
|
+
/**
|
|
3768
|
+
* Returns the keys bottom of the stack first, ordered inside out.
|
|
3769
|
+
*
|
|
3770
|
+
* @remarks
|
|
3771
|
+
* The keys are sorted by onset and dealt onto whichever of two piles is lighter, and the lower
|
|
3772
|
+
* pile is reversed, so the earliest onset is at the join in the middle. A series without
|
|
3773
|
+
* weight goes outermost. Fewer than three keys keep their order.
|
|
3774
|
+
* @param data - The rows, in order.
|
|
3775
|
+
* @param keys - The series' fields.
|
|
3776
|
+
*/
|
|
3777
|
+
export declare function insideOutOrder(data: readonly unknown[], keys: readonly string[]): string[];
|
|
3778
|
+
//#endregion
|
|
3779
|
+
//#region src/stream-graph/stream-graph.d.ts
|
|
3780
|
+
/**
|
|
3781
|
+
* Describes the props of a stream graph: the cartesian props, the baseline, the order and the path
|
|
3782
|
+
* of a band's edge.
|
|
3783
|
+
*
|
|
3784
|
+
* @typeParam Row - One row of the data.
|
|
3785
|
+
*/
|
|
3786
|
+
interface StreamGraphProps<Row> extends CartesianProps<Row> {
|
|
3787
|
+
/**
|
|
3788
|
+
* How the baseline moves: `wiggle` keeps the bands as still as it can, `silhouette` centres the
|
|
3789
|
+
* stack on a straight line.
|
|
3790
|
+
*/
|
|
3791
|
+
readonly baseline?: "silhouette" | "wiggle" | undefined;
|
|
3792
|
+
/**
|
|
3793
|
+
* Path of each band's edge between two points. Smoothed through them unless stated, because a
|
|
3794
|
+
* straight segment reads as a crease in every band at every point.
|
|
3795
|
+
*/
|
|
3796
|
+
readonly curve?: Curve | undefined;
|
|
3797
|
+
/**
|
|
3798
|
+
* Whether the bands stack inside out, the early ones in the middle. The series' order, bottom
|
|
3799
|
+
* first, when off.
|
|
3800
|
+
*/
|
|
3801
|
+
readonly insideOut?: boolean | undefined;
|
|
3802
|
+
}
|
|
3803
|
+
/**
|
|
3804
|
+
* Renders the chart's figure around the series stacked about a moving baseline.
|
|
3805
|
+
*
|
|
3806
|
+
* @typeParam Row - One row of the data.
|
|
3807
|
+
* @param props - The rows, the series, the words, the baseline and the order.
|
|
3808
|
+
*/
|
|
3809
|
+
export declare function StreamGraph<Row>({ baseline, curve, data, grid, insideOut, legend, series, ...props }: StreamGraphProps<Row>): ReactElement;
|
|
3810
|
+
//#endregion
|
|
3811
|
+
//#region src/sunburst-chart/sunburst-chart.d.ts
|
|
3812
|
+
/**
|
|
3813
|
+
* Describes the props of a sunburst chart: a hierarchy chart's props and the content of the hole.
|
|
3814
|
+
*/
|
|
3815
|
+
interface SunburstChartProps extends HierarchyProps {
|
|
3816
|
+
/**
|
|
3817
|
+
* Figure in the hole, such as the total the top-level nodes add up to.
|
|
3818
|
+
*/
|
|
3819
|
+
readonly center?: ReactNode;
|
|
3820
|
+
/**
|
|
3821
|
+
* Words under the figure, such as what the total counts.
|
|
3822
|
+
*/
|
|
3823
|
+
readonly centerLabel?: ReactNode;
|
|
3824
|
+
}
|
|
3825
|
+
/**
|
|
3826
|
+
* Renders the chart's figure around the rings, the figure in the hole, the legend and the caption.
|
|
3827
|
+
*
|
|
3828
|
+
* @param props - The nodes, the words, the switches, the content of the hole and the figure's
|
|
3829
|
+
* props.
|
|
3830
|
+
*/
|
|
3831
|
+
export declare function SunburstChart({ caption, center, centerLabel, defaultHiddenKeys, empty, hiddenKeys, legend, legendLabel, locale, nodes, onHiddenKeysChange, ratio, shareLabel, valueLabel, valueOptions, values, ...rest }: SunburstChartProps): ReactElement;
|
|
3832
|
+
//#endregion
|
|
3833
|
+
//#region src/events/layout.d.ts
|
|
3834
|
+
/**
|
|
3835
|
+
* Describes one moment: a deploy, an alert, a release.
|
|
3836
|
+
*/
|
|
3837
|
+
interface TimelineEvent {
|
|
3838
|
+
/**
|
|
3839
|
+
* Instant the moment happened: a `Date`, milliseconds since the epoch, or an ISO 8601 string.
|
|
3840
|
+
*/
|
|
3841
|
+
readonly at: Date | number | string;
|
|
3842
|
+
/**
|
|
3843
|
+
* Color of the moment's marker. The theme's first series color unless stated.
|
|
3844
|
+
*/
|
|
3845
|
+
readonly color?: ChartColor | undefined;
|
|
3846
|
+
/**
|
|
3847
|
+
* Identity of the moment, unique among the events.
|
|
3848
|
+
*/
|
|
3849
|
+
readonly key: string;
|
|
3850
|
+
/**
|
|
3851
|
+
* Words for the moment, which the tooltip writes.
|
|
3852
|
+
*/
|
|
3853
|
+
readonly label: string;
|
|
3854
|
+
/**
|
|
3855
|
+
* Key of the lane the moment belongs to, such as a service. The other lane unless stated.
|
|
3856
|
+
*/
|
|
3857
|
+
readonly lane?: string | undefined;
|
|
3858
|
+
}
|
|
3859
|
+
/**
|
|
3860
|
+
* Describes moments of one lane close enough together that one marker renders them all.
|
|
3861
|
+
*/
|
|
3862
|
+
interface EventCluster {
|
|
3863
|
+
/**
|
|
3864
|
+
* Instant of the first moment, in milliseconds since the epoch.
|
|
3865
|
+
*/
|
|
3866
|
+
readonly at: number;
|
|
3867
|
+
/**
|
|
3868
|
+
* Moments of the cluster in time order. One moment is a plain marker.
|
|
3869
|
+
*/
|
|
3870
|
+
readonly events: readonly TimelineEvent[];
|
|
3871
|
+
/**
|
|
3872
|
+
* Key of the first moment, which identifies the cluster.
|
|
3873
|
+
*/
|
|
3874
|
+
readonly key: string;
|
|
3875
|
+
/**
|
|
3876
|
+
* Key of the cluster's lane.
|
|
3877
|
+
*/
|
|
3878
|
+
readonly lane: string;
|
|
3879
|
+
/**
|
|
3880
|
+
* Instant of the last moment, in milliseconds since the epoch.
|
|
3881
|
+
*/
|
|
3882
|
+
readonly last: number;
|
|
3883
|
+
/**
|
|
3884
|
+
* Share of the window from its start to the cluster's first moment, from 0 to 1.
|
|
3885
|
+
*/
|
|
3886
|
+
readonly share: number;
|
|
3887
|
+
}
|
|
3888
|
+
/**
|
|
3889
|
+
* Describes one lane: its key and its clusters in time order.
|
|
3890
|
+
*/
|
|
3891
|
+
interface EventLane {
|
|
3892
|
+
/**
|
|
3893
|
+
* Clusters of the lane in time order, none where no moment of the lane is inside the window.
|
|
3894
|
+
*/
|
|
3895
|
+
readonly clusters: readonly EventCluster[];
|
|
3896
|
+
/**
|
|
3897
|
+
* Key of the lane, or `OTHER_LANE` for the moments that name none.
|
|
3898
|
+
*/
|
|
3899
|
+
readonly key: string;
|
|
3900
|
+
}
|
|
3901
|
+
/**
|
|
3902
|
+
* Describes the window and the lanes `layoutEvents` returns.
|
|
3903
|
+
*/
|
|
3904
|
+
interface EventLayout {
|
|
3905
|
+
/**
|
|
3906
|
+
* Instant the window ends at, in milliseconds since the epoch.
|
|
3907
|
+
*/
|
|
3908
|
+
readonly end: number;
|
|
3909
|
+
/**
|
|
3910
|
+
* Lanes in order.
|
|
3911
|
+
*/
|
|
3912
|
+
readonly lanes: readonly EventLane[];
|
|
3913
|
+
/**
|
|
3914
|
+
* Instant the window starts at, in milliseconds since the epoch.
|
|
3915
|
+
*/
|
|
3916
|
+
readonly start: number;
|
|
3917
|
+
}
|
|
3918
|
+
/**
|
|
3919
|
+
* Describes how `layoutEvents` lays moments out.
|
|
3920
|
+
*/
|
|
3921
|
+
interface LayoutOptions {
|
|
3922
|
+
/**
|
|
3923
|
+
* Keys of the lanes in order. A moment of a lane not listed is left out.
|
|
3924
|
+
*/
|
|
3925
|
+
readonly lanes?: readonly string[] | undefined;
|
|
3926
|
+
/**
|
|
3927
|
+
* Share of the window two moments of a lane keep apart before they join one cluster. 0.02 unless
|
|
3928
|
+
* stated.
|
|
3929
|
+
*/
|
|
3930
|
+
readonly minGap?: number | undefined;
|
|
3931
|
+
/**
|
|
3932
|
+
* Instant the window starts at. The earliest moment unless stated.
|
|
3933
|
+
*/
|
|
3934
|
+
readonly since?: Date | number | string | undefined;
|
|
3935
|
+
/**
|
|
3936
|
+
* Instant the window ends at. The latest moment unless stated.
|
|
3937
|
+
*/
|
|
3938
|
+
readonly until?: Date | number | string | undefined;
|
|
3939
|
+
}
|
|
3940
|
+
/**
|
|
3941
|
+
* Key of the lane of the moments that name no lane.
|
|
3942
|
+
*/
|
|
3943
|
+
export declare const OTHER_LANE = "";
|
|
3944
|
+
/**
|
|
3945
|
+
* Returns the window and the lanes of clusters the moments lay out into.
|
|
3946
|
+
*
|
|
3947
|
+
* @remarks
|
|
3948
|
+
* A moment whose instant cannot be read, or outside the window, is left out. The window spans
|
|
3949
|
+
* every readable moment unless `since` and `until` state it, so a caller who shows part of the
|
|
3950
|
+
* moments states the window and the markers keep their places.
|
|
3951
|
+
* @param events - The moments in any order.
|
|
3952
|
+
* @param options - The lanes, the gap and the window.
|
|
3953
|
+
*/
|
|
3954
|
+
export declare function layoutEvents(events: readonly TimelineEvent[], options?: LayoutOptions): EventLayout;
|
|
3955
|
+
//#endregion
|
|
3956
|
+
//#region src/timeline-chart/types.d.ts
|
|
3957
|
+
/**
|
|
3958
|
+
* Describes one lane of a timeline: the key its moments name, and its name on the lane axis.
|
|
3959
|
+
*/
|
|
3960
|
+
interface TimelineLane {
|
|
3961
|
+
/**
|
|
3962
|
+
* Key the moments of the lane state in their `lane`.
|
|
3963
|
+
*/
|
|
3964
|
+
readonly key: string;
|
|
3965
|
+
/**
|
|
3966
|
+
* Name of the lane on the lane axis and in the tooltip.
|
|
3967
|
+
*/
|
|
3968
|
+
readonly label: string;
|
|
3969
|
+
}
|
|
3970
|
+
/**
|
|
3971
|
+
* Describes the props of a timeline: the moments, the lanes, the window, the words, the switches
|
|
3972
|
+
* and the figure's props.
|
|
3973
|
+
*
|
|
3974
|
+
* @remarks
|
|
3975
|
+
* The chart sets the plot's height from its lanes, so it takes no `ratio`.
|
|
3976
|
+
*/
|
|
3977
|
+
interface TimelineChartProps extends Omit<RootProps, "chart" | "children" | "grid" | "onSelect" | "ratio"> {
|
|
3978
|
+
/**
|
|
3979
|
+
* Whether the markers animate in, which they do only outside reduced motion.
|
|
3980
|
+
*/
|
|
3981
|
+
readonly animate?: boolean | undefined;
|
|
3982
|
+
/**
|
|
3983
|
+
* Finding the chart shows, in words, which names the figure.
|
|
3984
|
+
*/
|
|
3985
|
+
readonly caption?: ReactNode;
|
|
3986
|
+
/**
|
|
3987
|
+
* Recharts elements rendered inside the chart after the markers, such as a `ReferenceLine` at the
|
|
3988
|
+
* current time.
|
|
3989
|
+
*/
|
|
3990
|
+
readonly children?: ReactNode;
|
|
3991
|
+
/**
|
|
3992
|
+
* Place in the keyboard walk of the marker the tooltip shows when the chart first renders. No
|
|
3993
|
+
* tooltip shows at first unless stated.
|
|
3994
|
+
*/
|
|
3995
|
+
readonly defaultIndex?: number | undefined;
|
|
3996
|
+
/**
|
|
3997
|
+
* Message the chart renders in the plot's place while no moment is inside the window.
|
|
3998
|
+
*/
|
|
3999
|
+
readonly empty?: ReactNode;
|
|
4000
|
+
/**
|
|
4001
|
+
* Moments the chart places, in any order.
|
|
4002
|
+
*/
|
|
4003
|
+
readonly events: readonly TimelineEvent[];
|
|
4004
|
+
/**
|
|
4005
|
+
* Accessible name of the chart's keyboard layer, such as "Deploys and incidents today".
|
|
4006
|
+
*/
|
|
4007
|
+
readonly label: string;
|
|
4008
|
+
/**
|
|
4009
|
+
* `Intl.DateTimeFormat` options the time ticks and the tooltip's times are written with.
|
|
4010
|
+
*/
|
|
4011
|
+
readonly labelOptions?: Intl.DateTimeFormatOptions | undefined;
|
|
4012
|
+
/**
|
|
4013
|
+
* Lanes in order, each with its name. Each lane the moments name, in the order they first name
|
|
4014
|
+
* it, unless stated. A moment of a lane not listed is left out.
|
|
4015
|
+
*/
|
|
4016
|
+
readonly lanes?: readonly TimelineLane[] | undefined;
|
|
4017
|
+
/**
|
|
4018
|
+
* Locale the times are written in.
|
|
4019
|
+
*/
|
|
4020
|
+
readonly locale?: string | undefined;
|
|
4021
|
+
/**
|
|
4022
|
+
* Share of the window two moments of a lane keep apart before one marker renders both.
|
|
4023
|
+
*/
|
|
4024
|
+
readonly minGap?: number | undefined;
|
|
4025
|
+
/**
|
|
4026
|
+
* Writes the row that counts the moments of a marker its tooltip does not list.
|
|
4027
|
+
*/
|
|
4028
|
+
readonly moreLabel?: ((count: number) => string) | undefined;
|
|
4029
|
+
/**
|
|
4030
|
+
* Called with a marker's moments when a press or the keys select the marker.
|
|
4031
|
+
*/
|
|
4032
|
+
readonly onSelect?: ((events: readonly TimelineEvent[]) => void) | undefined;
|
|
4033
|
+
/**
|
|
4034
|
+
* Name of the lane of the moments that name no lane.
|
|
4035
|
+
*/
|
|
4036
|
+
readonly otherLabel?: string | undefined;
|
|
4037
|
+
/**
|
|
4038
|
+
* Instant the window starts at. The earliest moment unless stated.
|
|
4039
|
+
*/
|
|
4040
|
+
readonly since?: Date | number | string | undefined;
|
|
4041
|
+
/**
|
|
4042
|
+
* Number of times the time axis writes, evenly spaced, both ends included.
|
|
4043
|
+
*/
|
|
4044
|
+
readonly ticks?: number | undefined;
|
|
4045
|
+
/**
|
|
4046
|
+
* Instant the window ends at. The latest moment unless stated.
|
|
4047
|
+
*/
|
|
4048
|
+
readonly until?: Date | number | string | undefined;
|
|
4049
|
+
}
|
|
4050
|
+
//#endregion
|
|
4051
|
+
//#region src/timeline-chart/timeline-chart.d.ts
|
|
4052
|
+
/**
|
|
4053
|
+
* Renders the chart's figure around the lanes, the markers and the caption.
|
|
4054
|
+
*
|
|
4055
|
+
* @param props - The moments, the lanes, the window, the words, the switches and the figure's
|
|
4056
|
+
* props.
|
|
4057
|
+
*/
|
|
4058
|
+
export declare function TimelineChart({ animate, caption, children, defaultIndex, empty, events, label, labelOptions, lanes, locale, minGap, moreLabel, onSelect, otherLabel, since, ticks, until, ...root }: TimelineChartProps): ReactElement;
|
|
4059
|
+
//#endregion
|
|
4060
|
+
//#region src/treemap-chart/treemap-chart.d.ts
|
|
4061
|
+
/**
|
|
4062
|
+
* Describes the props of a treemap chart: a hierarchy chart's props.
|
|
4063
|
+
*/
|
|
4064
|
+
type TreemapChartProps = HierarchyProps;
|
|
4065
|
+
/**
|
|
4066
|
+
* Renders the chart's figure around the tiles, the legend and the caption.
|
|
4067
|
+
*
|
|
4068
|
+
* @param props - The nodes, the words, the switches and the figure's props.
|
|
4069
|
+
*/
|
|
4070
|
+
export declare function TreemapChart({ caption, defaultHiddenKeys, empty, hiddenKeys, legend, legendLabel, locale, nodes, onHiddenKeysChange, ratio, shareLabel, valueLabel, valueOptions, values, ...rest }: TreemapChartProps): ReactElement;
|
|
4071
|
+
//#endregion
|
|
4072
|
+
//#region src/violin-plot/violin-plot.d.ts
|
|
4073
|
+
/**
|
|
4074
|
+
* Describes a group of a violin plot: its key, its name and its values.
|
|
4075
|
+
*/
|
|
4076
|
+
interface ViolinGroup {
|
|
4077
|
+
/**
|
|
4078
|
+
* Key of the group.
|
|
4079
|
+
*/
|
|
4080
|
+
readonly key: string;
|
|
4081
|
+
/**
|
|
4082
|
+
* Name of the group, which the category axis and the tooltip write.
|
|
4083
|
+
*/
|
|
4084
|
+
readonly label: string;
|
|
4085
|
+
/**
|
|
4086
|
+
* Values of the group, one per thing measured. A value that is not a finite number is left out.
|
|
4087
|
+
*/
|
|
4088
|
+
readonly values: readonly unknown[];
|
|
4089
|
+
}
|
|
4090
|
+
/**
|
|
4091
|
+
* Describes the props of a violin plot: the groups, the kernel, the words, the switches and the
|
|
4092
|
+
* figure's props.
|
|
4093
|
+
*/
|
|
4094
|
+
interface ViolinPlotProps extends Omit<RootProps, "chart" | "children" | "color" | "grid"> {
|
|
4095
|
+
/**
|
|
4096
|
+
* Whether the violins grow in, which they do only outside reduced motion.
|
|
4097
|
+
*/
|
|
4098
|
+
readonly animate?: boolean | undefined;
|
|
4099
|
+
/**
|
|
4100
|
+
* Standard deviation of the Gaussian kernel for every group, in the values' own units.
|
|
4101
|
+
* Silverman's bandwidth of each group unless stated.
|
|
4102
|
+
*/
|
|
4103
|
+
readonly bandwidth?: number | undefined;
|
|
4104
|
+
/**
|
|
4105
|
+
* Finding the chart shows, in words, which names the figure.
|
|
4106
|
+
*/
|
|
4107
|
+
readonly caption?: ReactNode;
|
|
4108
|
+
/**
|
|
4109
|
+
* Recharts elements rendered inside the chart after the violins, such as a `ReferenceLine`.
|
|
4110
|
+
*/
|
|
4111
|
+
readonly children?: ReactNode;
|
|
4112
|
+
/**
|
|
4113
|
+
* Palette the violins take their color from. The theme's first series color unless stated.
|
|
4114
|
+
*/
|
|
4115
|
+
readonly color?: ChartColor | undefined;
|
|
4116
|
+
/**
|
|
4117
|
+
* Name of the number of values in the tooltip.
|
|
4118
|
+
*/
|
|
4119
|
+
readonly countLabel?: ReactNode;
|
|
4120
|
+
/**
|
|
4121
|
+
* Index of the group the tooltip shows when the chart first renders. None unless stated.
|
|
4122
|
+
*/
|
|
4123
|
+
readonly defaultIndex?: number | undefined;
|
|
4124
|
+
/**
|
|
4125
|
+
* Name of the outline in the key.
|
|
4126
|
+
*/
|
|
4127
|
+
readonly densityLabel?: ReactNode;
|
|
4128
|
+
/**
|
|
4129
|
+
* Message the chart renders in the plot's place while no group has a value.
|
|
4130
|
+
*/
|
|
4131
|
+
readonly empty?: ReactNode;
|
|
4132
|
+
/**
|
|
4133
|
+
* Whether lines cross the plot at the value ticks.
|
|
4134
|
+
*/
|
|
4135
|
+
readonly grid?: boolean | undefined;
|
|
4136
|
+
/**
|
|
4137
|
+
* Groups the chart compares, in the order the category axis lists them.
|
|
4138
|
+
*/
|
|
4139
|
+
readonly groups: readonly ViolinGroup[];
|
|
4140
|
+
/**
|
|
4141
|
+
* Accessible name of the chart's keyboard layer, such as "Response times by cache".
|
|
4142
|
+
*/
|
|
4143
|
+
readonly label: string;
|
|
4144
|
+
/**
|
|
4145
|
+
* Whether the key naming the violin's parts renders below the plot.
|
|
4146
|
+
*/
|
|
4147
|
+
readonly legend?: boolean | undefined;
|
|
4148
|
+
/**
|
|
4149
|
+
* Locale the values are written in. The locale in scope unless stated.
|
|
4150
|
+
*/
|
|
4151
|
+
readonly locale?: string | undefined;
|
|
4152
|
+
/**
|
|
4153
|
+
* Name of the median in the tooltip and the key.
|
|
4154
|
+
*/
|
|
4155
|
+
readonly medianLabel?: ReactNode;
|
|
4156
|
+
/**
|
|
4157
|
+
* Name of the values the density peaks at in the tooltip.
|
|
4158
|
+
*/
|
|
4159
|
+
readonly peaksLabel?: ReactNode;
|
|
4160
|
+
/**
|
|
4161
|
+
* Whether the whisker line, the quartile bar and the median point render inside each violin.
|
|
4162
|
+
*/
|
|
4163
|
+
readonly quartiles?: boolean | undefined;
|
|
4164
|
+
/**
|
|
4165
|
+
* Name of the first quartile to the third in the tooltip and the key.
|
|
4166
|
+
*/
|
|
4167
|
+
readonly quartilesLabel?: ReactNode;
|
|
4168
|
+
/**
|
|
4169
|
+
* Name of the smallest value to the largest in the tooltip.
|
|
4170
|
+
*/
|
|
4171
|
+
readonly rangeLabel?: ReactNode;
|
|
4172
|
+
/**
|
|
4173
|
+
* Number of points each density is sampled at, at least 2. 64 unless stated.
|
|
4174
|
+
*/
|
|
4175
|
+
readonly resolution?: number | undefined;
|
|
4176
|
+
/**
|
|
4177
|
+
* Domain of the value axis in recharts' terms, such as `[0, 500]`. Rounded around the values
|
|
4178
|
+
* unless stated.
|
|
4179
|
+
*/
|
|
4180
|
+
readonly valueDomain?: YAxisProps["domain"];
|
|
4181
|
+
/**
|
|
4182
|
+
* `Intl.NumberFormat` options the value ticks and the tooltip's values are written with.
|
|
4183
|
+
*/
|
|
4184
|
+
readonly valueOptions?: Intl.NumberFormatOptions | undefined;
|
|
4185
|
+
}
|
|
4186
|
+
/**
|
|
4187
|
+
* Renders the chart's figure around the violins, the key and the caption.
|
|
4188
|
+
*
|
|
4189
|
+
* @param props - The groups, the kernel, the words, the switches and the figure's props.
|
|
4190
|
+
*/
|
|
4191
|
+
export declare function ViolinPlot({ animate, bandwidth, caption, children, color, countLabel, defaultIndex, densityLabel, empty, grid, groups, label, legend, locale, medianLabel, peaksLabel, quartiles, quartilesLabel, rangeLabel, resolution, valueDomain, valueOptions, ...root }: ViolinPlotProps): ReactElement;
|
|
4192
|
+
//#endregion
|
|
4193
|
+
//#region src/waterfall-chart/bars.d.ts
|
|
4194
|
+
/**
|
|
4195
|
+
* Turns a waterfall's steps into floating bars on the running total.
|
|
4196
|
+
*/
|
|
4197
|
+
/**
|
|
4198
|
+
* Describes one step of a waterfall.
|
|
4199
|
+
*/
|
|
4200
|
+
interface WaterfallStep {
|
|
4201
|
+
/**
|
|
4202
|
+
* Key of the step.
|
|
4203
|
+
*/
|
|
4204
|
+
readonly key: string;
|
|
4205
|
+
/**
|
|
4206
|
+
* Name of the step on the category axis, such as "Refunds".
|
|
4207
|
+
*/
|
|
4208
|
+
readonly label: string;
|
|
4209
|
+
/**
|
|
4210
|
+
* Whether the step is a total, which rises from zero in place of floating on the running total.
|
|
4211
|
+
*/
|
|
4212
|
+
readonly total?: boolean | undefined;
|
|
4213
|
+
/**
|
|
4214
|
+
* Change the step makes, where a negative value subtracts. A total's `value` sets the running
|
|
4215
|
+
* total, such as an opening balance, and a total without one shows the running total. A value
|
|
4216
|
+
* that is not a finite number makes no change.
|
|
4217
|
+
*/
|
|
4218
|
+
readonly value?: number | undefined;
|
|
4219
|
+
}
|
|
4220
|
+
/**
|
|
4221
|
+
* Describes one bar a waterfall chart renders.
|
|
4222
|
+
*/
|
|
4223
|
+
interface WaterfallBar {
|
|
4224
|
+
/**
|
|
4225
|
+
* Change the step made, signed, or the running total for a total.
|
|
4226
|
+
*/
|
|
4227
|
+
readonly change: number;
|
|
4228
|
+
/**
|
|
4229
|
+
* Whether the step rose, fell or shows the total.
|
|
4230
|
+
*/
|
|
4231
|
+
readonly direction: "down" | "total" | "up";
|
|
4232
|
+
/**
|
|
4233
|
+
* Running total after the step.
|
|
4234
|
+
*/
|
|
4235
|
+
readonly end: number;
|
|
4236
|
+
/**
|
|
4237
|
+
* Key of the step.
|
|
4238
|
+
*/
|
|
4239
|
+
readonly key: string;
|
|
4240
|
+
/**
|
|
4241
|
+
* Name of the step.
|
|
4242
|
+
*/
|
|
4243
|
+
readonly label: string;
|
|
4244
|
+
/**
|
|
4245
|
+
* Values the bar floats between, the lower first: the running totals before and after the step,
|
|
4246
|
+
* or zero and the total.
|
|
4247
|
+
*/
|
|
4248
|
+
readonly span: readonly [number, number];
|
|
4249
|
+
/**
|
|
4250
|
+
* Running total before the step, or zero for a total.
|
|
4251
|
+
*/
|
|
4252
|
+
readonly start: number;
|
|
4253
|
+
}
|
|
4254
|
+
/**
|
|
4255
|
+
* Returns a bar per step: a change floats from the running total before it to the total after it,
|
|
4256
|
+
* and a total rises from zero.
|
|
4257
|
+
*
|
|
4258
|
+
* @remarks
|
|
4259
|
+
* The running total is the chart's content, so a caption reads these numbers and does not
|
|
4260
|
+
* compute its own. The running total starts at zero, and a total with a value sets it, so a
|
|
4261
|
+
* bridge opens on a balance. The steps keep their order, because the order is what happened.
|
|
4262
|
+
* @param steps - The steps, in order.
|
|
4263
|
+
*/
|
|
4264
|
+
export declare function waterfallBars(steps: readonly WaterfallStep[]): WaterfallBar[];
|
|
4265
|
+
//#endregion
|
|
4266
|
+
//#region src/waterfall-chart/waterfall-chart.d.ts
|
|
4267
|
+
/**
|
|
4268
|
+
* Describes the props of a waterfall chart: the steps, the words, the switches and the figure's
|
|
4269
|
+
* props.
|
|
4270
|
+
*/
|
|
4271
|
+
interface WaterfallChartProps extends Omit<RootProps, "chart" | "children" | "grid"> {
|
|
4272
|
+
/**
|
|
4273
|
+
* Whether the bars animate in, which they do only outside reduced motion.
|
|
4274
|
+
*/
|
|
4275
|
+
readonly animate?: boolean | undefined;
|
|
4276
|
+
/**
|
|
4277
|
+
* Finding the chart shows, in words, which names the figure.
|
|
4278
|
+
*/
|
|
4279
|
+
readonly caption?: ReactNode;
|
|
4280
|
+
/**
|
|
4281
|
+
* Recharts elements rendered inside the chart after the bars, such as a `ReferenceLine`.
|
|
4282
|
+
*/
|
|
4283
|
+
readonly children?: ReactNode;
|
|
4284
|
+
/**
|
|
4285
|
+
* Whether dashed connectors join each bar to the next at the running total.
|
|
4286
|
+
*/
|
|
4287
|
+
readonly connectors?: boolean | undefined;
|
|
4288
|
+
/**
|
|
4289
|
+
* Index of the step the tooltip shows when the chart first renders. None unless stated.
|
|
4290
|
+
*/
|
|
4291
|
+
readonly defaultIndex?: number | undefined;
|
|
4292
|
+
/**
|
|
4293
|
+
* Message the chart renders in the plot's place while it has no steps.
|
|
4294
|
+
*/
|
|
4295
|
+
readonly empty?: ReactNode;
|
|
4296
|
+
/**
|
|
4297
|
+
* Whether lines cross the plot at the value ticks.
|
|
4298
|
+
*/
|
|
4299
|
+
readonly grid?: boolean | undefined;
|
|
4300
|
+
/**
|
|
4301
|
+
* Accessible name of the chart's keyboard layer, such as "Revenue bridge for September".
|
|
4302
|
+
*/
|
|
4303
|
+
readonly label: string;
|
|
4304
|
+
/**
|
|
4305
|
+
* Locale the values are written in. The locale in scope unless stated.
|
|
4306
|
+
*/
|
|
4307
|
+
readonly locale?: string | undefined;
|
|
4308
|
+
/**
|
|
4309
|
+
* Steps, in the order they happened.
|
|
4310
|
+
*/
|
|
4311
|
+
readonly steps: readonly WaterfallStep[];
|
|
4312
|
+
/**
|
|
4313
|
+
* Name of the values in the tooltip.
|
|
4314
|
+
*/
|
|
4315
|
+
readonly valueLabel?: ReactNode;
|
|
4316
|
+
/**
|
|
4317
|
+
* Whether the chart writes each bar's signed change or total above the bar.
|
|
4318
|
+
*/
|
|
4319
|
+
readonly valueLabels?: boolean | undefined;
|
|
4320
|
+
/**
|
|
4321
|
+
* `Intl.NumberFormat` options the ticks, the tooltip and the bars' values are written with.
|
|
4322
|
+
*/
|
|
4323
|
+
readonly valueOptions?: Intl.NumberFormatOptions | undefined;
|
|
4324
|
+
}
|
|
4325
|
+
/**
|
|
4326
|
+
* Renders the chart's figure around the floating bars, their connectors and their values.
|
|
4327
|
+
*
|
|
4328
|
+
* @param props - The steps, the words, the switches and the figure's props.
|
|
4329
|
+
*/
|
|
4330
|
+
export declare function WaterfallChart({ animate, caption, children, connectors, defaultIndex, empty, grid, label, locale, steps, valueLabel, valueLabels, valueOptions, ...root }: WaterfallChartProps): ReactElement;
|
|
4331
|
+
//#endregion
|
|
4332
|
+
export { type AlignOptions, type Annotation, type AreaChartProps, type BarChartProps, type BarSeries, type BinOptions, type BoxGroup, type BoxPlotProps, type BoxSummary, type BubbleChartProps, type BulletProps, type BurndownChartProps, type BurndownOptions, type BurndownPoint, type BurndownRow, type Calendar, type CalendarCell, type CalendarDay, type CalendarOptions, type Candle, type CandleChange, type CandleDirection, type CandlestickChartProps, type CartesianProps, type CartesianSeries, index_d_exports as Chart, type ChartBin, type ChordDiagramProps, type ChordLayout, type ChordRibbon, type ChordSpan, type Cohort, type CohortCell, type CohortGrid, type CohortOptions, type ComboChartProps, type ComboSeries, type Curve, type DensityOptions, type DensityPoint, type DistributionChartProps, type DistributionSeries, type Division, type DonutChartProps, type EventCluster, type EventLane, type EventLayout, type FunnelChartProps, type FunnelStage, type FunnelStep, type GaugeBand, type GaugeChartProps, type GaugeZone, type HeatShape, type HeatSize, type HeatmapCell, type HeatmapColors, type HeatmapDomain, type HeatmapHeading, type HeatmapProps, type HeatmapScale, type HierarchyLeaf, type HierarchyNode, type HierarchyProps, type HistogramChartProps, type HorizontalBarChartProps, type LayoutOptions, type LineChartProps, type LinearFit, type Mark, type ParetoChartProps, type ParetoShares, type PercentStackedBarProps, type PieChartProps, type PieSlice, type PolarAreaChartProps, type PolarProps, type QuadrantId, type Quadrants, type RadarChartProps, type RadarSeries, type RadialBarChartProps, type RadialBarDatum, type RangeBand, type RangeChartProps, type RegressionOverlayProps, type Retention, type RetentionOptions, type RetentionRow, type SankeyBalance, type SankeyChartProps, type SankeyFlow, type SankeyNode, type ScatterPlotProps, type ScatterSeries, type Span, type SparkbarProps, type SparklineProps, type SpreadOptions, type StackedAreaChartProps, type StackedBarChartProps, type StepLineChartProps, type StreamGraphProps, type SunburstChartProps, type TimelineChartProps, type TimelineEvent, type TimelineLane, type TreemapChartProps, type ValueAxis, type Valued, type ViolinGroup, type ViolinPlotProps, type WaterfallBar, type WaterfallChartProps, type WaterfallStep };
|