@acronis-platform/ui-react 0.58.0 → 0.61.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/README.md +5 -5
- package/dist/components/ui/app-shell/app-shell.js.map +1 -1
- package/dist/components/ui/area-chart/area-chart.js +210 -119
- package/dist/components/ui/area-chart/area-chart.js.map +1 -1
- package/dist/components/ui/avatar/avatar.js +26 -23
- package/dist/components/ui/avatar/avatar.js.map +1 -1
- package/dist/components/ui/bar-chart/bar-chart.js +595 -149
- package/dist/components/ui/bar-chart/bar-chart.js.map +1 -1
- package/dist/components/ui/calendar/calendar.js +17 -15
- package/dist/components/ui/calendar/calendar.js.map +1 -1
- package/dist/components/ui/carousel-dialog/carousel-dialog.js +87 -0
- package/dist/components/ui/carousel-dialog/carousel-dialog.js.map +1 -0
- package/dist/components/ui/category-bar/category-bar.js +147 -0
- package/dist/components/ui/category-bar/category-bar.js.map +1 -0
- package/dist/components/ui/chart/chart-format.js +170 -0
- package/dist/components/ui/chart/chart-format.js.map +1 -0
- package/dist/components/ui/chart/chart.js +204 -150
- package/dist/components/ui/chart/chart.js.map +1 -1
- package/dist/components/ui/composed-chart/composed-chart.js +423 -98
- package/dist/components/ui/composed-chart/composed-chart.js.map +1 -1
- package/dist/components/ui/confidence-cone/confidence-cone.js +306 -172
- package/dist/components/ui/confidence-cone/confidence-cone.js.map +1 -1
- package/dist/components/ui/dialog/dialog.js +29 -29
- package/dist/components/ui/dialog/dialog.js.map +1 -1
- package/dist/components/ui/dialog-footer-carousel/dialog-footer-carousel.js +57 -0
- package/dist/components/ui/dialog-footer-carousel/dialog-footer-carousel.js.map +1 -0
- package/dist/components/ui/dialog-footer-default/dialog-footer-default.js +1 -1
- package/dist/components/ui/dialog-footer-default/dialog-footer-default.js.map +1 -1
- package/dist/components/ui/dialog-welcome/dialog-welcome.js +272 -0
- package/dist/components/ui/dialog-welcome/dialog-welcome.js.map +1 -0
- package/dist/components/ui/funnel-chart/funnel-chart.js +245 -51
- package/dist/components/ui/funnel-chart/funnel-chart.js.map +1 -1
- package/dist/components/ui/histogram/histogram.js +96 -64
- package/dist/components/ui/histogram/histogram.js.map +1 -1
- package/dist/components/ui/input/input.js.map +1 -1
- package/dist/components/ui/line-chart/line-chart.js +230 -159
- package/dist/components/ui/line-chart/line-chart.js.map +1 -1
- package/dist/components/ui/metric/metric.js +88 -70
- package/dist/components/ui/metric/metric.js.map +1 -1
- package/dist/components/ui/pie-chart/pie-chart.js +234 -80
- package/dist/components/ui/pie-chart/pie-chart.js.map +1 -1
- package/dist/components/ui/radar-chart/radar-chart.js +210 -57
- package/dist/components/ui/radar-chart/radar-chart.js.map +1 -1
- package/dist/components/ui/radial-bar-chart/radial-bar-chart.js +358 -50
- package/dist/components/ui/radial-bar-chart/radial-bar-chart.js.map +1 -1
- package/dist/components/ui/sankey-chart/sankey-chart.js +199 -0
- package/dist/components/ui/sankey-chart/sankey-chart.js.map +1 -0
- package/dist/components/ui/scatter-chart/scatter-chart.js +86 -50
- package/dist/components/ui/scatter-chart/scatter-chart.js.map +1 -1
- package/dist/components/ui/timeline/timeline.js +206 -142
- package/dist/components/ui/timeline/timeline.js.map +1 -1
- package/dist/components/ui/toolbar/toolbar.js +82 -92
- package/dist/components/ui/toolbar/toolbar.js.map +1 -1
- package/dist/components/ui/treemap/treemap.js +183 -59
- package/dist/components/ui/treemap/treemap.js.map +1 -1
- package/dist/index.js +481 -439
- package/dist/index.js.map +1 -1
- package/dist/lib/breakpoints.js +9 -6
- package/dist/lib/breakpoints.js.map +1 -1
- package/dist/node_modules/.pnpm/embla-carousel-react@8.6.0_react@19.2.6/node_modules/embla-carousel-react/esm/embla-carousel-react.esm.js +25 -0
- package/dist/node_modules/.pnpm/embla-carousel-react@8.6.0_react@19.2.6/node_modules/embla-carousel-react/esm/embla-carousel-react.esm.js.map +1 -0
- package/dist/node_modules/.pnpm/embla-carousel-reactive-utils@8.6.0_embla-carousel@8.6.0/node_modules/embla-carousel-reactive-utils/esm/embla-carousel-reactive-utils.esm.js +36 -0
- package/dist/node_modules/.pnpm/embla-carousel-reactive-utils@8.6.0_embla-carousel@8.6.0/node_modules/embla-carousel-reactive-utils/esm/embla-carousel-reactive-utils.esm.js.map +1 -0
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/embla-carousel.esm.js +1205 -0
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/embla-carousel.esm.js.map +1 -0
- package/dist/react.js +481 -439
- package/dist/react.js.map +1 -1
- package/dist/src/components/ui/area-chart/area-chart.d.ts +52 -17
- package/dist/src/components/ui/area-chart/index.d.ts +1 -1
- package/dist/src/components/ui/avatar/avatar.d.ts +1 -1
- package/dist/src/components/ui/bar-chart/bar-chart.d.ts +152 -29
- package/dist/src/components/ui/bar-chart/index.d.ts +1 -1
- package/dist/src/components/ui/button/button.d.ts +1 -1
- package/dist/src/components/ui/button-menu/button-menu.d.ts +1 -1
- package/dist/src/components/ui/carousel-dialog/carousel-dialog.d.ts +28 -0
- package/dist/src/components/ui/carousel-dialog/index.d.ts +1 -0
- package/dist/src/components/ui/category-bar/category-bar.d.ts +51 -0
- package/dist/src/components/ui/category-bar/index.d.ts +1 -0
- package/dist/src/components/ui/chart/__tests__/chart-format.test.d.ts +1 -0
- package/dist/src/components/ui/chart/__tests__/chart-layout.d.ts +63 -0
- package/dist/src/components/ui/chart/__tests__/chart-layout.test.d.ts +1 -0
- package/dist/src/components/ui/chart/chart-format.d.ts +526 -0
- package/dist/src/components/ui/chart/chart.d.ts +11 -3
- package/dist/src/components/ui/chart/index.d.ts +3 -1
- package/dist/src/components/ui/composed-chart/composed-chart.d.ts +154 -20
- package/dist/src/components/ui/composed-chart/index.d.ts +1 -1
- package/dist/src/components/ui/confidence-cone/confidence-cone.d.ts +138 -37
- package/dist/src/components/ui/confidence-cone/index.d.ts +1 -1
- package/dist/src/components/ui/dialog-footer-carousel/dialog-footer-carousel.d.ts +9 -0
- package/dist/src/components/ui/dialog-footer-carousel/index.d.ts +1 -0
- package/dist/src/components/ui/dialog-welcome/dialog-welcome.d.ts +54 -0
- package/dist/src/components/ui/dialog-welcome/dialog-welcome.docs.d.ts +55 -0
- package/dist/src/components/ui/dialog-welcome/index.d.ts +1 -0
- package/dist/src/components/ui/funnel-chart/funnel-chart.d.ts +201 -3
- package/dist/src/components/ui/funnel-chart/index.d.ts +1 -1
- package/dist/src/components/ui/histogram/histogram.d.ts +2 -17
- package/dist/src/components/ui/line-chart/index.d.ts +1 -1
- package/dist/src/components/ui/line-chart/line-chart.d.ts +50 -17
- package/dist/src/components/ui/pie-chart/index.d.ts +1 -1
- package/dist/src/components/ui/pie-chart/pie-chart.d.ts +145 -4
- package/dist/src/components/ui/radar-chart/index.d.ts +1 -1
- package/dist/src/components/ui/radar-chart/radar-chart.d.ts +219 -6
- package/dist/src/components/ui/radial-bar-chart/index.d.ts +1 -1
- package/dist/src/components/ui/radial-bar-chart/radial-bar-chart.d.ts +215 -9
- package/dist/src/components/ui/sankey-chart/index.d.ts +2 -0
- package/dist/src/components/ui/sankey-chart/sankey-chart.d.ts +69 -0
- package/dist/src/components/ui/scatter-chart/scatter-chart.d.ts +2 -17
- package/dist/src/components/ui/timeline/index.d.ts +1 -1
- package/dist/src/components/ui/timeline/timeline.d.ts +79 -20
- package/dist/src/components/ui/treemap/index.d.ts +1 -1
- package/dist/src/components/ui/treemap/treemap.d.ts +68 -8
- package/dist/src/index.d.ts +5 -1
- package/dist/ui-react.css +1 -1
- package/package.json +5 -4
- package/dist/components/ui/search-global/search-global.js +0 -60
- package/dist/components/ui/search-global/search-global.js.map +0 -1
- package/dist/src/components/ui/search-global/index.d.ts +0 -1
- package/dist/src/components/ui/search-global/search-global.d.ts +0 -7
|
@@ -1,11 +1,89 @@
|
|
|
1
1
|
import { VariantProps } from 'class-variance-authority';
|
|
2
|
-
import {
|
|
2
|
+
import { AxisDomainItem } from 'recharts';
|
|
3
|
+
import { ChartTooltip, ChartConfig, ChartAnimationProps, ChartDataLabelProps, CartesianLabelPosition } from '../chart';
|
|
3
4
|
import * as React from 'react';
|
|
4
5
|
declare const radarChartVariants: (props?: ({
|
|
5
6
|
gridType?: "circle" | "polygon" | null | undefined;
|
|
6
7
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
/** Per-series overrides, keyed by the series' `dataKeys` entry. */
|
|
9
|
+
export interface RadarChartSeriesSettings {
|
|
10
|
+
/**
|
|
11
|
+
* Fill for this series' area, overriding its `config` color. Reference an
|
|
12
|
+
* existing semantic `--ui-*` token, same as `config`.
|
|
13
|
+
*/
|
|
14
|
+
color?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Outline color, when it should read differently from the fill (e.g. a solid
|
|
17
|
+
* outline over a barely-tinted area). Defaults to the fill.
|
|
18
|
+
*
|
|
19
|
+
* recharts derives a Radar's legend/tooltip color from its stroke first, so
|
|
20
|
+
* setting this alone also recolors that series' legend swatch and tooltip dot
|
|
21
|
+
* — set `color` too if the marker should keep following the fill.
|
|
22
|
+
*/
|
|
23
|
+
stroke?: string;
|
|
24
|
+
/** Fill opacity for this series, overriding the chart-level `fillOpacity`. */
|
|
25
|
+
fillOpacity?: number;
|
|
26
|
+
/** Outline width for this series, overriding the chart-level `strokeWidth`. */
|
|
27
|
+
strokeWidth?: number;
|
|
28
|
+
/** Per-point dots for this series, overriding the chart-level `showDots`. */
|
|
29
|
+
dot?: boolean;
|
|
30
|
+
/** Dot radius for this series, overriding the chart-level `dotRadius`. */
|
|
31
|
+
dotRadius?: number;
|
|
32
|
+
/**
|
|
33
|
+
* Highlight this series' hovered point, overriding the chart-level
|
|
34
|
+
* `activeDot`.
|
|
35
|
+
*/
|
|
36
|
+
activeDot?: boolean;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Map the `radiusAxisDomain` preset to a recharts radius-axis `domain`. Exported
|
|
40
|
+
* for unit tests; not part of the package's public API.
|
|
41
|
+
*
|
|
42
|
+
* The radius axis is what scales the web, so this is the difference between "the
|
|
43
|
+
* largest value in the data reaches the outer ring" (recharts' own behavior, and
|
|
44
|
+
* what an unset preset keeps) and "the outer ring is a known maximum" (`fixed`
|
|
45
|
+
* plus `radiusAxisDomainMax`). The two only mean something together: a `fixed`
|
|
46
|
+
* preset with no maximum falls back to the data's own top, i.e. that same
|
|
47
|
+
* default.
|
|
48
|
+
*/
|
|
49
|
+
export declare function radarRadiusAxisDomain(preset: 'auto' | 'fixed' | undefined, max: number | undefined): Readonly<[AxisDomainItem, AxisDomainItem]> | undefined;
|
|
50
|
+
/** The chart-level styling a `seriesSettings` entry overrides. */
|
|
51
|
+
export interface RadarSeriesDefaults {
|
|
52
|
+
fillOpacity: number;
|
|
53
|
+
strokeWidth: number;
|
|
54
|
+
showDots: boolean;
|
|
55
|
+
dotRadius: number;
|
|
56
|
+
activeDot: boolean | undefined;
|
|
57
|
+
}
|
|
58
|
+
/** Resolved recharts `<Radar>` styling for one series. */
|
|
59
|
+
export interface RadarSeriesStyle {
|
|
60
|
+
fill: string;
|
|
61
|
+
stroke: string;
|
|
62
|
+
fillOpacity: number;
|
|
63
|
+
strokeWidth: number;
|
|
64
|
+
dot: {
|
|
65
|
+
r: number;
|
|
66
|
+
} | false;
|
|
67
|
+
activeDot: boolean | undefined;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Fold a series' `seriesSettings` entry over the chart-level styling. Exported
|
|
71
|
+
* for unit tests; not part of the package's public API.
|
|
72
|
+
*
|
|
73
|
+
* Every fallback is `??`, not `||`, so a deliberate falsy override survives —
|
|
74
|
+
* `fillOpacity: 0` (outline only), `strokeWidth: 0` (fill only), `dot: false`
|
|
75
|
+
* and `activeDot: false` all have to beat a truthy chart-level value. An
|
|
76
|
+
* un-overridden fill stays the `--color-<key>` custom property the shared
|
|
77
|
+
* `ChartContainer` injects from `config`, so the series a caller doesn't name
|
|
78
|
+
* keeps reading its config color.
|
|
79
|
+
*/
|
|
80
|
+
export declare function radarSeriesStyle(key: string, settings: RadarChartSeriesSettings | undefined, defaults: RadarSeriesDefaults): RadarSeriesStyle;
|
|
81
|
+
export interface RadarChartProps extends Omit<React.ComponentProps<'div'>, 'children'>, VariantProps<typeof radarChartVariants>, ChartAnimationProps, ChartDataLabelProps {
|
|
82
|
+
/**
|
|
83
|
+
* Row-per-axis data. Each object holds the `angleKey` label + one numeric field
|
|
84
|
+
* per series. Every plotted series needs a value in every row: recharts places a
|
|
85
|
+
* missing one at the centre, which reads as a zero rather than as a gap.
|
|
86
|
+
*/
|
|
9
87
|
data: ReadonlyArray<Record<string, string | number>>;
|
|
10
88
|
/**
|
|
11
89
|
* Per-series map of `label` / `color` (imported from the shared `Chart`
|
|
@@ -18,23 +96,158 @@ export interface RadarChartProps extends Omit<React.ComponentProps<'div'>, 'chil
|
|
|
18
96
|
dataKeys: string[];
|
|
19
97
|
/** The categorical axis key placed around the web (e.g. `"subject"`). */
|
|
20
98
|
angleKey: string;
|
|
99
|
+
/**
|
|
100
|
+
* Per-series style overrides, keyed by a `dataKeys` entry — color, outline, and
|
|
101
|
+
* dots for one series while the rest keep the chart-level values. Keys that
|
|
102
|
+
* aren't plotted are ignored. An overridden `color` — or `stroke`, which
|
|
103
|
+
* recharts reads first — follows through to that series' legend swatch and
|
|
104
|
+
* tooltip dot.
|
|
105
|
+
*/
|
|
106
|
+
seriesSettings?: Record<string, RadarChartSeriesSettings>;
|
|
21
107
|
/** Fill opacity of each radar area. */
|
|
22
108
|
fillOpacity?: number;
|
|
23
109
|
/** Stroke width of each radar outline. */
|
|
24
110
|
strokeWidth?: number;
|
|
25
111
|
/** Render a dot at each axis point. */
|
|
26
112
|
showDots?: boolean;
|
|
113
|
+
/** Radius of the per-point dots when `showDots` is on. */
|
|
114
|
+
dotRadius?: number;
|
|
115
|
+
/**
|
|
116
|
+
* Enlarge the hovered point's dot. On by default (recharts' behavior) — pass
|
|
117
|
+
* `false` for a chart that shouldn't react to the pointer at all.
|
|
118
|
+
*/
|
|
119
|
+
activeDot?: boolean;
|
|
27
120
|
/** Render the polar grid (the web). */
|
|
28
121
|
showGrid?: boolean;
|
|
122
|
+
/**
|
|
123
|
+
* Draw the grid's spokes — the radial lines from the centre out to each
|
|
124
|
+
* category. Defaults to `true`; off leaves only the concentric rings.
|
|
125
|
+
*/
|
|
126
|
+
radialLines?: boolean;
|
|
127
|
+
/**
|
|
128
|
+
* Render the categorical axis around the web (its spoke labels, tick lines,
|
|
129
|
+
* and outer line). Defaults to `true`. Turning it off keeps the axis itself —
|
|
130
|
+
* so the tooltip still names each category — and only hides its chrome.
|
|
131
|
+
*/
|
|
132
|
+
showAngleAxis?: boolean;
|
|
133
|
+
/** Place the spoke labels outside the web (default) or inside it. */
|
|
134
|
+
angleAxisOrientation?: 'inner' | 'outer';
|
|
135
|
+
/** Draw the line around the web that the spoke labels sit against. Defaults to `true`. */
|
|
136
|
+
angleAxisLine?: boolean;
|
|
137
|
+
/**
|
|
138
|
+
* Shape of that line: straight-edged `polygon` (recharts' default) or a smooth
|
|
139
|
+
* `circle`. Independent of `gridType`, so pair them to keep a circular web's
|
|
140
|
+
* outline circular too.
|
|
141
|
+
*/
|
|
142
|
+
angleAxisLineType?: 'polygon' | 'circle';
|
|
143
|
+
/** Draw a tick line from the axis line to each spoke label. Defaults to `true`. */
|
|
144
|
+
angleTickLine?: boolean;
|
|
145
|
+
/**
|
|
146
|
+
* Distance from the web to the spoke labels, in px (recharts' default is 8).
|
|
147
|
+
* Left alone, `showLabels` widens it so a vertex's value can't land on its own
|
|
148
|
+
* category label.
|
|
149
|
+
*/
|
|
150
|
+
angleTickSize?: number;
|
|
151
|
+
/**
|
|
152
|
+
* Render the value scale — a radial axis of ticks from the centre outward, so
|
|
153
|
+
* an area can be read as a number and not only compared to its neighbours.
|
|
154
|
+
* Defaults to `false` (recharts draws no radius axis unless asked).
|
|
155
|
+
*
|
|
156
|
+
* `radiusAxisAngle` and `radiusAxisOrientation` only describe the drawn scale,
|
|
157
|
+
* so they need it shown. `radiusAxisDomain`, `radiusAxisReversed` and
|
|
158
|
+
* `radiusAxisTickCount` apply while it's hidden too — the first two scale the
|
|
159
|
+
* web, and the third sets how many rings the grid draws (recharts takes the
|
|
160
|
+
* grid's concentric radii from the radius axis' ticks).
|
|
161
|
+
*/
|
|
162
|
+
showRadiusAxis?: boolean;
|
|
163
|
+
/**
|
|
164
|
+
* Angle the value scale is drawn at, in degrees counter-clockwise from 3
|
|
165
|
+
* o'clock (recharts' default is `0`). Point it *between* two spokes: on a
|
|
166
|
+
* spoke, the outermost tick collides with that category's own label.
|
|
167
|
+
*
|
|
168
|
+
* The ticks sit over the areas at any angle — a radar's plot area is its
|
|
169
|
+
* areas — so this trades one overlap for none of the other.
|
|
170
|
+
*/
|
|
171
|
+
radiusAxisAngle?: number;
|
|
172
|
+
/** Which side of the scale its tick labels sit on. Defaults to `right`. */
|
|
173
|
+
radiusAxisOrientation?: 'left' | 'right' | 'middle';
|
|
174
|
+
/**
|
|
175
|
+
* How the value scale is bounded — and with it the web, since the radius axis
|
|
176
|
+
* is what maps a value to a radius:
|
|
177
|
+
*
|
|
178
|
+
* - unset — recharts' own scaling: the data's largest value reaches the outer
|
|
179
|
+
* ring, so two charts of the same metric aren't comparable.
|
|
180
|
+
* - `fixed` — pin the outer ring to `radiusAxisDomainMax` (the metric's own
|
|
181
|
+
* maximum, e.g. a score out of 150), which is what makes a radar readable as
|
|
182
|
+
* an absolute profile rather than a relative one.
|
|
183
|
+
* - `auto` — fit the data at both ends; the scale need not start at 0.
|
|
184
|
+
*
|
|
185
|
+
* Takes effect whether or not the scale is shown, so a chart can be scaled to a
|
|
186
|
+
* known maximum without displaying the ticks.
|
|
187
|
+
*/
|
|
188
|
+
radiusAxisDomain?: 'auto' | 'fixed';
|
|
189
|
+
/**
|
|
190
|
+
* The value at the outer ring when `radiusAxisDomain` is `fixed`. Must be
|
|
191
|
+
* positive — a `0` or negative maximum can't bound an outward-growing scale, so
|
|
192
|
+
* it falls back to the data's own top.
|
|
193
|
+
*/
|
|
194
|
+
radiusAxisDomainMax?: number;
|
|
195
|
+
/**
|
|
196
|
+
* Desired number of ticks on the value scale (a hint, not exact). Defaults to
|
|
197
|
+
* recharts' `5`. Also sets how many rings the grid draws, whether or not the
|
|
198
|
+
* scale itself is shown.
|
|
199
|
+
*/
|
|
200
|
+
radiusAxisTickCount?: number;
|
|
201
|
+
/**
|
|
202
|
+
* Invert the value scale — the maximum at the centre and 0 at the outer ring —
|
|
203
|
+
* for a metric where less is better (latency, error rate), so a good profile
|
|
204
|
+
* still reads as a large area.
|
|
205
|
+
*/
|
|
206
|
+
radiusAxisReversed?: boolean;
|
|
207
|
+
/** Horizontal centre of the web, in px or a percentage of the width. Defaults to `50%`. */
|
|
208
|
+
cx?: number | string;
|
|
209
|
+
/** Vertical centre of the web, in px or a percentage of the height. Defaults to `50%`. */
|
|
210
|
+
cy?: number | string;
|
|
211
|
+
/** Angle the first category sits at, in degrees. Defaults to `90` (12 o'clock). */
|
|
212
|
+
startAngle?: number;
|
|
213
|
+
/**
|
|
214
|
+
* Angle the sweep ends at, in degrees. Defaults to `-270` — a full turn
|
|
215
|
+
* clockwise from `startAngle`. Together the two rotate the web (or wrap the
|
|
216
|
+
* categories into a partial sweep).
|
|
217
|
+
*/
|
|
218
|
+
endAngle?: number;
|
|
219
|
+
/**
|
|
220
|
+
* Radius of the hole at the centre, in px or a percentage of the available
|
|
221
|
+
* radius. Defaults to `0`. Also lifts the grid and the areas off the centre,
|
|
222
|
+
* which separates the series where they all bottom out.
|
|
223
|
+
*/
|
|
224
|
+
innerRadius?: number | string;
|
|
225
|
+
/** Outer radius of the web, in px or a percentage of the available radius. Defaults to `80%`. */
|
|
226
|
+
outerRadius?: number | string;
|
|
227
|
+
/**
|
|
228
|
+
* Plot-area margin, in px. Omit it entirely to use recharts' default (5 on
|
|
229
|
+
* every side) — passing the object replaces all four, and recharts fills the
|
|
230
|
+
* sides you leave out with `0`, not with `5`. Name every side you want.
|
|
231
|
+
*/
|
|
232
|
+
margin?: {
|
|
233
|
+
top?: number;
|
|
234
|
+
right?: number;
|
|
235
|
+
bottom?: number;
|
|
236
|
+
left?: number;
|
|
237
|
+
};
|
|
29
238
|
showTooltip?: boolean;
|
|
30
239
|
showLegend?: boolean;
|
|
240
|
+
/** Which side of the chart the legend sits on. Defaults to `bottom`. */
|
|
241
|
+
legendPosition?: 'top' | 'bottom';
|
|
31
242
|
/**
|
|
32
243
|
* Replace the default tooltip. Pass a configured `ChartTooltipContent`
|
|
33
|
-
* (imported from this library) — e.g. with a `formatter` / `labelFormatter`
|
|
34
|
-
*
|
|
35
|
-
*
|
|
244
|
+
* (imported from this library) — e.g. with a `formatter` / `labelFormatter` —
|
|
245
|
+
* to customize formatting, per-series rows, or extra fields without composing
|
|
246
|
+
* recharts yourself. Ignored when `showTooltip` is false.
|
|
36
247
|
*/
|
|
37
248
|
tooltipContent?: React.ComponentProps<typeof ChartTooltip>['content'];
|
|
249
|
+
/** Position of the value labels when `showLabels` is on. Defaults to `top`. */
|
|
250
|
+
labelPosition?: CartesianLabelPosition;
|
|
38
251
|
}
|
|
39
252
|
declare const RadarChart: React.ForwardRefExoticComponent<Omit<RadarChartProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
40
253
|
export { RadarChart, radarChartVariants };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { RadialBarChart, type RadialBarChartProps, } from './radial-bar-chart';
|
|
1
|
+
export { RadialBarChart, type RadialBarChartProps, type RadialBarChartCenterLabel, type RadialBarChartLabelFormat, } from './radial-bar-chart';
|
|
@@ -1,22 +1,148 @@
|
|
|
1
|
-
import { ChartTooltip, ChartConfig } from '../chart';
|
|
1
|
+
import { ChartTooltip, ChartConfig, ChartAnimationProps, ChartDataLabelProps, PolarLabelPosition, TickFormatter } from '../chart';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
|
|
3
|
+
/** Row-per-arc datum: the `nameKey` label plus each metric's numeric value. */
|
|
4
|
+
type RadialBarChartDatum = Record<string, string | number>;
|
|
5
|
+
/** What an arc's data label reads. */
|
|
6
|
+
export type RadialBarChartLabelFormat = 'value' | 'name-value';
|
|
7
|
+
export interface RadialBarChartCenterLabel {
|
|
8
|
+
/** Headline metric rendered large in the hole (e.g. the gauge's value). */
|
|
9
|
+
value?: string | number;
|
|
10
|
+
/** Caption rendered under the value. */
|
|
11
|
+
label?: string | number;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Compose one arc's data-label text. Exported for unit tests; not part of the
|
|
15
|
+
* package's public API.
|
|
16
|
+
*
|
|
17
|
+
* `labelFormatter` only ever formats the numeric part, so a chart's labels and
|
|
18
|
+
* its tooltip stay in the same units under either format. A nullish value yields
|
|
19
|
+
* an empty label, which recharts renders as no `<text>` at all.
|
|
20
|
+
*/
|
|
21
|
+
export declare function radialBarChartLabelText(options: {
|
|
22
|
+
format: RadialBarChartLabelFormat;
|
|
23
|
+
name: string | number | undefined;
|
|
24
|
+
value: string | number | undefined;
|
|
25
|
+
formatter?: TickFormatter;
|
|
26
|
+
}): string;
|
|
27
|
+
/** One piece of a segmented gauge's ring: a length in degrees and what it is. */
|
|
28
|
+
export interface RadialBarChartSegment {
|
|
29
|
+
/** Synthetic series key — stable for a given (index, kind). */
|
|
30
|
+
key: string;
|
|
31
|
+
/** Angular length of the piece, in degrees. */
|
|
32
|
+
degrees: number;
|
|
33
|
+
/** `value` is the metric, `track` the unreached remainder, `gap` the notch. */
|
|
34
|
+
kind: 'value' | 'track' | 'gap';
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Cut a gauge's sweep into equal segments separated by gaps, and split the
|
|
38
|
+
* segment the value ends inside into its reached and unreached parts. Exported
|
|
39
|
+
* for unit tests; not part of the package's public API.
|
|
40
|
+
*
|
|
41
|
+
* Lengths come back in **degrees**, which is what lets the ring be built as one
|
|
42
|
+
* stack of synthetic series over a `[0, sweep]` angular scale: recharts lays
|
|
43
|
+
* stacked radial bars out sequentially along the angle, so a transparent series
|
|
44
|
+
* between two colored ones reads as a real notch in the ring. A `gap` that
|
|
45
|
+
* would leave no room for the segments themselves is clamped.
|
|
46
|
+
*/
|
|
47
|
+
export declare function radialBarChartSegments(options: {
|
|
48
|
+
value: number;
|
|
49
|
+
domain: [number, number];
|
|
50
|
+
segments: number;
|
|
51
|
+
gap: number;
|
|
52
|
+
/** Absolute sweep of the chart, in degrees. */
|
|
53
|
+
sweep: number;
|
|
54
|
+
/** A full-circle sweep also needs a gap between the last segment and the first. */
|
|
55
|
+
closed: boolean;
|
|
56
|
+
}): RadialBarChartSegment[];
|
|
57
|
+
/**
|
|
58
|
+
* Fill for one piece of a segmented gauge's ring. Exported for unit tests and so
|
|
59
|
+
* the forced-open tooltip story can build a ring from the real implementation
|
|
60
|
+
* rather than a copy of it; not part of the package's public API.
|
|
61
|
+
*/
|
|
62
|
+
export declare function radialBarChartSegmentFill(kind: RadialBarChartSegment['kind'], colorName: string | number): string;
|
|
63
|
+
/**
|
|
64
|
+
* What a segmented gauge's tooltip reads. Exported for unit tests; not part of
|
|
65
|
+
* the package's public API.
|
|
66
|
+
*
|
|
67
|
+
* A segmented ring's series are pieces of geometry, so recharts would offer the
|
|
68
|
+
* hovered piece's own name and length ("seg-3-value", 41.2°). Hovering anywhere
|
|
69
|
+
* on the ring should read the metric instead, so the reading is rebuilt from the
|
|
70
|
+
* data row.
|
|
71
|
+
*/
|
|
72
|
+
export declare function radialBarChartSegmentedReading(options: {
|
|
73
|
+
config: ChartConfig;
|
|
74
|
+
row: RadialBarChartDatum;
|
|
75
|
+
nameKey: string;
|
|
76
|
+
dataKey: string;
|
|
77
|
+
/** The `valueDomain` maximum, when the gauge has one. */
|
|
78
|
+
domainMax?: number;
|
|
79
|
+
}): {
|
|
80
|
+
colorName: string;
|
|
81
|
+
label: React.ReactNode;
|
|
82
|
+
valueText: string;
|
|
83
|
+
};
|
|
84
|
+
/**
|
|
85
|
+
* The tooltip a segmented gauge shows — the same swatch/name/value layout the
|
|
86
|
+
* default `ChartTooltipContent` row uses, dot included, over the reading from
|
|
87
|
+
* `radialBarChartSegmentedReading`. Exported for the forced-open
|
|
88
|
+
* visual-regression story; not part of the package's public API.
|
|
89
|
+
*
|
|
90
|
+
* `payload` is trimmed to one row: a radial tooltip is axis-shared and collects a
|
|
91
|
+
* row from every series — two dozen identical rows for one metric.
|
|
92
|
+
* (`tooltipType="none"` only tags them, and scoping the tooltip to the hovered
|
|
93
|
+
* item instead would drop it in the corner — unlike Pie/Bar sectors, a RadialBar
|
|
94
|
+
* sector carries no tooltip coordinate.)
|
|
95
|
+
*
|
|
96
|
+
* A real component rather than a closure so it can be handed to `ChartTooltip`
|
|
97
|
+
* as an *element*: recharts `cloneElement`s an element but `createElement`s a
|
|
98
|
+
* function, and a closure rebuilt each render is a new element *type* — which
|
|
99
|
+
* remounts the tooltip on every parent render instead of updating it.
|
|
100
|
+
*/
|
|
101
|
+
export declare function RadialBarChartSegmentedTooltipContent({ active, payload, ...reading }: {
|
|
102
|
+
active?: boolean;
|
|
103
|
+
payload?: readonly unknown[];
|
|
104
|
+
config: ChartConfig;
|
|
105
|
+
row: RadialBarChartDatum;
|
|
106
|
+
nameKey: string;
|
|
107
|
+
dataKey: string;
|
|
108
|
+
domainMax?: number;
|
|
109
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
110
|
+
/**
|
|
111
|
+
* The band a multi-metric tooltip's header names. Exported for unit tests; not
|
|
112
|
+
* part of the package's public API.
|
|
113
|
+
*
|
|
114
|
+
* Each tooltip row is one metric, so the header names the band the hovered arc
|
|
115
|
+
* belongs to. recharts' own label is the radius-axis index, which reads as a
|
|
116
|
+
* bare number.
|
|
117
|
+
*/
|
|
118
|
+
export declare function radialBarChartBandName(row: RadialBarChartDatum | undefined, nameKey: string): string;
|
|
119
|
+
export interface RadialBarChartProps extends Omit<React.ComponentProps<'div'>, 'children'>, ChartAnimationProps, ChartDataLabelProps {
|
|
4
120
|
/** Row-per-arc data. Each object holds the arc's `nameKey` label + its `dataKey` numeric value. */
|
|
5
|
-
data: ReadonlyArray<
|
|
121
|
+
data: ReadonlyArray<RadialBarChartDatum>;
|
|
6
122
|
/**
|
|
7
|
-
* Per-arc map of `label` / `color`, keyed by the arc's `nameKey` value
|
|
8
|
-
* (imported from the shared `Chart`
|
|
9
|
-
* custom properties. Colors are
|
|
10
|
-
* semantic `--ui-*` token; there is no
|
|
123
|
+
* Per-arc map of `label` / `color`, keyed by the arc's `nameKey` value — or, in
|
|
124
|
+
* multi-metric mode, by each `dataKeys` entry (imported from the shared `Chart`
|
|
125
|
+
* primitives). Turned into `--color-<name>` custom properties. Colors are
|
|
126
|
+
* caller-supplied — reference an existing semantic `--ui-*` token; there is no
|
|
127
|
+
* chart palette tier yet.
|
|
11
128
|
*/
|
|
12
129
|
config: ChartConfig;
|
|
13
|
-
/** Numeric field that sizes each arc. */
|
|
130
|
+
/** Numeric field that sizes each arc. Ignored when `dataKeys` is set. */
|
|
14
131
|
dataKey: string;
|
|
132
|
+
/**
|
|
133
|
+
* Plot several metrics instead of one arc per row: one arc per key, colored and
|
|
134
|
+
* named from `config` keyed by the **key** (not by `nameKey`) — the same
|
|
135
|
+
* convention as the cartesian charts. Every metric shares one angular scale, so
|
|
136
|
+
* pair it with `valueDomain` when the metrics are measured against a known
|
|
137
|
+
* maximum. `nameKey` still names the band each metric's arc sits in.
|
|
138
|
+
*/
|
|
139
|
+
dataKeys?: string[];
|
|
15
140
|
/**
|
|
16
141
|
* Label field that names each arc (drives the legend, tooltip, and
|
|
17
142
|
* `--color-<name>` lookup). Values should be unique per chart (arcs sharing a
|
|
18
143
|
* name share one `config`/color entry) and CSS-safe — they become part of a
|
|
19
|
-
* custom-property name.
|
|
144
|
+
* custom-property name. In multi-metric mode it names the band rather than the
|
|
145
|
+
* arc, so the legend and colors come from `dataKeys` instead.
|
|
20
146
|
*/
|
|
21
147
|
nameKey: string;
|
|
22
148
|
/** Inner radius of the innermost arc. */
|
|
@@ -27,10 +153,74 @@ export interface RadialBarChartProps extends Omit<React.ComponentProps<'div'>, '
|
|
|
27
153
|
startAngle?: number;
|
|
28
154
|
/** Angle (degrees) the arcs sweep to (default is a full clockwise circle). */
|
|
29
155
|
endAngle?: number;
|
|
156
|
+
/**
|
|
157
|
+
* The value range the sweep represents, as `[min, max]`. Without it every arc
|
|
158
|
+
* is drawn relative to the largest value in the data — so a **single** value
|
|
159
|
+
* always fills the whole sweep, which is never what a gauge means. Set it to
|
|
160
|
+
* the metric's own scale (e.g. `[0, 100]` for a percentage) and each arc
|
|
161
|
+
* becomes that fraction of the sweep, over the `showBackground` track.
|
|
162
|
+
*/
|
|
163
|
+
valueDomain?: [number, number];
|
|
30
164
|
/** Corner radius on each arc's ends. */
|
|
31
165
|
cornerRadius?: number;
|
|
166
|
+
/**
|
|
167
|
+
* Horizontal center of the arcs, in px or a percentage of the width.
|
|
168
|
+
* Defaults to the middle (`50%`).
|
|
169
|
+
*/
|
|
170
|
+
cx?: number | string;
|
|
171
|
+
/**
|
|
172
|
+
* Vertical center of the arcs, in px or a percentage of the height. Defaults to
|
|
173
|
+
* the middle (`50%`) — worth moving for a half-circle gauge, whose drawn half
|
|
174
|
+
* otherwise sits in the upper half of the surface.
|
|
175
|
+
*/
|
|
176
|
+
cy?: number | string;
|
|
177
|
+
/** Thickness of each arc, in px. Omit to let the radii and the gaps size it. */
|
|
178
|
+
barSize?: number;
|
|
179
|
+
/** Gap between the arcs of different metrics in one band, in px. */
|
|
180
|
+
barGap?: number | string;
|
|
181
|
+
/** Gap between bands, in px or a percentage string. */
|
|
182
|
+
barCategoryGap?: number | string;
|
|
183
|
+
/**
|
|
184
|
+
* Smallest angle a non-zero arc may occupy, in degrees, so a tiny value stays
|
|
185
|
+
* visible (and hoverable). recharts applies the floor to a `0` as well, which
|
|
186
|
+
* reads as a small positive value — leave this unset when a metric can
|
|
187
|
+
* legitimately be zero.
|
|
188
|
+
*/
|
|
189
|
+
minAngle?: number;
|
|
190
|
+
/** Plot-area margin, in px. Omit to use recharts' default (5 on every side). */
|
|
191
|
+
margin?: {
|
|
192
|
+
top?: number;
|
|
193
|
+
right?: number;
|
|
194
|
+
bottom?: number;
|
|
195
|
+
left?: number;
|
|
196
|
+
};
|
|
197
|
+
/**
|
|
198
|
+
* Draw the gauge's ring as this many equal segments, notched apart — the
|
|
199
|
+
* segmented-gauge look. Applies to a **single-value gauge** only and needs
|
|
200
|
+
* `valueDomain` to know what a full ring means. Anything that isn't one — more
|
|
201
|
+
* than one row, `dataKeys` set, fewer than two segments, or a `dataKey` value
|
|
202
|
+
* that isn't a number (a stringified `"29"` off an API) — falls back to the
|
|
203
|
+
* normal concentric arcs, legend included, rather than erroring.
|
|
204
|
+
*
|
|
205
|
+
* The ring is then synthetic geometry rather than data rows, so the arc labels
|
|
206
|
+
* and the legend are suppressed: put the readout in `centerLabel`. The tooltip
|
|
207
|
+
* stays, and reads the metric (with the `valueDomain` maximum when there is
|
|
208
|
+
* one) wherever on the ring it is hovered. `showBackground` is redundant too —
|
|
209
|
+
* the unreached segments *are* the track.
|
|
210
|
+
*/
|
|
211
|
+
segments?: number;
|
|
212
|
+
/** Gap between a segmented gauge's segments, in degrees. Defaults to `3`. */
|
|
213
|
+
segmentGap?: number;
|
|
32
214
|
/** Render a muted background track behind each arc. */
|
|
33
215
|
showBackground?: boolean;
|
|
216
|
+
/** Draw the concentric polar grid behind the arcs. */
|
|
217
|
+
showPolarGrid?: boolean;
|
|
218
|
+
/**
|
|
219
|
+
* Custom content for the hole at the center — a headline `value` and/or a
|
|
220
|
+
* `label` caption, stacked and centered. Needs an `innerRadius` big enough to
|
|
221
|
+
* hold the text; it is not clipped to the hole.
|
|
222
|
+
*/
|
|
223
|
+
centerLabel?: RadialBarChartCenterLabel;
|
|
34
224
|
showTooltip?: boolean;
|
|
35
225
|
showLegend?: boolean;
|
|
36
226
|
/**
|
|
@@ -38,8 +228,24 @@ export interface RadialBarChartProps extends Omit<React.ComponentProps<'div'>, '
|
|
|
38
228
|
* (imported from this library) — e.g. with a `formatter` / `labelFormatter` —
|
|
39
229
|
* to customize formatting, per-arc rows, or extra fields without composing
|
|
40
230
|
* recharts yourself. Ignored when `showTooltip` is false.
|
|
231
|
+
*
|
|
232
|
+
* On a segmented gauge it takes over from the built-in reading, and the payload
|
|
233
|
+
* it receives is the ring's synthetic pieces (`seg-2-track`, a length in
|
|
234
|
+
* degrees) rather than data rows — read the metric off `payload[0].payload`.
|
|
41
235
|
*/
|
|
42
236
|
tooltipContent?: React.ComponentProps<typeof ChartTooltip>['content'];
|
|
237
|
+
/**
|
|
238
|
+
* Position of the value labels when `showLabels` is on. Defaults to
|
|
239
|
+
* `insideStart` — the labels sit inside each arc, and therefore render in the
|
|
240
|
+
* on-fill label token so they stay legible over the arc colour.
|
|
241
|
+
*/
|
|
242
|
+
labelPosition?: PolarLabelPosition;
|
|
243
|
+
/**
|
|
244
|
+
* What each data label reads when `showLabels` is on — the value alone (the
|
|
245
|
+
* default), or the arc's name and its value. The name is the row's `nameKey`
|
|
246
|
+
* value, or the metric's `config` label in multi-metric mode.
|
|
247
|
+
*/
|
|
248
|
+
labelFormat?: RadialBarChartLabelFormat;
|
|
43
249
|
}
|
|
44
250
|
declare const RadialBarChart: React.ForwardRefExoticComponent<Omit<RadialBarChartProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
45
251
|
export { RadialBarChart };
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { ChartTooltip, ChartConfig } from '../chart';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
/** A node in the flow — `name` is its color/config key (CSS-safe, unique). */
|
|
4
|
+
export interface SankeyChartNode {
|
|
5
|
+
name: string;
|
|
6
|
+
}
|
|
7
|
+
/** A directed flow between two nodes, referenced by their index in `nodes`. */
|
|
8
|
+
export interface SankeyChartLink {
|
|
9
|
+
/** Index of the source node in `data.nodes`. */
|
|
10
|
+
source: number;
|
|
11
|
+
/** Index of the target node in `data.nodes`. */
|
|
12
|
+
target: number;
|
|
13
|
+
/** Flow magnitude — drives the link's width. */
|
|
14
|
+
value: number;
|
|
15
|
+
/**
|
|
16
|
+
* Ribbon color (any CSS color, e.g. a `var(--ui-*)` token), rendered at **full
|
|
17
|
+
* opacity** so it matches its node bar. Omit to use the target node's color at
|
|
18
|
+
* 35% (the default tinted ribbon).
|
|
19
|
+
*/
|
|
20
|
+
color?: string;
|
|
21
|
+
}
|
|
22
|
+
export interface SankeyChartProps extends Omit<React.ComponentProps<'div'>, 'children'> {
|
|
23
|
+
/** The graph: `nodes` (color keys) + `links` (source/target indices + value). */
|
|
24
|
+
data: {
|
|
25
|
+
nodes: ReadonlyArray<SankeyChartNode>;
|
|
26
|
+
links: ReadonlyArray<SankeyChartLink>;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Per-node map of `label` / `color`, keyed by the node's `name` (imported from
|
|
30
|
+
* the shared `Chart` primitives). Turned into `--color-<name>` custom
|
|
31
|
+
* properties. Colors are caller-supplied — reference an existing semantic
|
|
32
|
+
* `--ui-*` token; there is no chart palette tier yet.
|
|
33
|
+
*/
|
|
34
|
+
config: ChartConfig;
|
|
35
|
+
/** Vertical gap between nodes in the same column. */
|
|
36
|
+
nodePadding?: number;
|
|
37
|
+
/** Thickness of each node bar. */
|
|
38
|
+
nodeWidth?: number;
|
|
39
|
+
/** Curviness of the links (0 = straight, 1 = fully curved). */
|
|
40
|
+
linkCurvature?: number;
|
|
41
|
+
/**
|
|
42
|
+
* Sort nodes vertically to minimize link crossings (recharts' relaxation).
|
|
43
|
+
* Defaults to `false` — nodes render in the order given by `data.nodes` within
|
|
44
|
+
* each column, which keeps curated flows tidy; set `true` to auto-order.
|
|
45
|
+
*/
|
|
46
|
+
sort?: boolean;
|
|
47
|
+
/** Render each node's label (from `config[name].label`) beside its bar. */
|
|
48
|
+
showLabels?: boolean;
|
|
49
|
+
/** Render a legend (color dot + label + value + % per node) below the chart. */
|
|
50
|
+
showLegend?: boolean;
|
|
51
|
+
/** Show a hover tooltip on nodes and links (dot + `source → target` + value). */
|
|
52
|
+
showTooltip?: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* Replace the default tooltip. Pass a configured `ChartTooltipContent`
|
|
55
|
+
* (imported from this library) — e.g. with a `formatter` / `labelFormatter` —
|
|
56
|
+
* to customize formatting without composing recharts yourself. Ignored when
|
|
57
|
+
* `showTooltip` is false.
|
|
58
|
+
*/
|
|
59
|
+
tooltipContent?: React.ComponentProps<typeof ChartTooltip>['content'];
|
|
60
|
+
}
|
|
61
|
+
export declare function makeSankeyTooltip(config: ChartConfig, links: ReadonlyArray<SankeyChartLink>, nodes: ReadonlyArray<SankeyChartNode>): ({ active, payload, }: {
|
|
62
|
+
active?: boolean;
|
|
63
|
+
payload?: ReadonlyArray<{
|
|
64
|
+
name?: string | number;
|
|
65
|
+
value?: number | string | ReadonlyArray<number | string>;
|
|
66
|
+
}>;
|
|
67
|
+
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
68
|
+
declare const SankeyChart: React.ForwardRefExoticComponent<Omit<SankeyChartProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
69
|
+
export { SankeyChart };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ChartConfig, CartesianChartProps, ChartAnimationProps } from '../chart';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
export type ScatterMarkerShape = 'circle' | 'cross' | 'diamond' | 'square' | 'star' | 'triangle' | 'wye';
|
|
4
4
|
export interface ScatterSeries {
|
|
@@ -7,7 +7,7 @@ export interface ScatterSeries {
|
|
|
7
7
|
/** This series' points — each row holds at least `xKey` and `yKey` (and `zKey` when used). */
|
|
8
8
|
data: ReadonlyArray<Record<string, number>>;
|
|
9
9
|
}
|
|
10
|
-
export interface ScatterChartProps extends Omit<React.ComponentProps<'div'>, 'children'
|
|
10
|
+
export interface ScatterChartProps extends Omit<React.ComponentProps<'div'>, 'children'>, CartesianChartProps, ChartAnimationProps {
|
|
11
11
|
/** One `<Scatter>` per entry — each with its own point array. Use a single entry for an ungrouped scatter. */
|
|
12
12
|
series: ScatterSeries[];
|
|
13
13
|
/**
|
|
@@ -21,30 +21,15 @@ export interface ScatterChartProps extends Omit<React.ComponentProps<'div'>, 'ch
|
|
|
21
21
|
xKey: string;
|
|
22
22
|
/** Numeric field for the vertical axis. */
|
|
23
23
|
yKey: string;
|
|
24
|
-
/** Title rendered beneath the horizontal (X) axis. */
|
|
25
|
-
xAxisLabel?: string;
|
|
26
|
-
/** Title rendered beside the vertical (Y) axis (rotated). */
|
|
27
|
-
yAxisLabel?: string;
|
|
28
24
|
/** Unit suffix appended to X-axis tick values (recharts `unit`). */
|
|
29
25
|
xUnit?: string;
|
|
30
|
-
/** Unit suffix appended to Y-axis tick values (recharts `unit`). */
|
|
31
|
-
yUnit?: string;
|
|
32
26
|
/** Optional numeric field mapped to point size (a bubble chart), via recharts `ZAxis`. */
|
|
33
27
|
zKey?: string;
|
|
34
28
|
/** Point-size range `[min, max]` the `zKey` maps into. Ignored when `zKey` is unset (points use recharts' default size). */
|
|
35
29
|
zRange?: [number, number];
|
|
36
30
|
/** Marker shape for every point. */
|
|
37
31
|
shape?: ScatterMarkerShape;
|
|
38
|
-
showGrid?: boolean;
|
|
39
|
-
showTooltip?: boolean;
|
|
40
32
|
showLegend?: boolean;
|
|
41
|
-
/**
|
|
42
|
-
* Replace the default tooltip. Pass a configured `ChartTooltipContent`
|
|
43
|
-
* (imported from this library) — e.g. with a `formatter` / `labelFormatter` /
|
|
44
|
-
* `indicator` — to customize formatting, per-series rows, or extra fields
|
|
45
|
-
* without composing recharts yourself. Ignored when `showTooltip` is false.
|
|
46
|
-
*/
|
|
47
|
-
tooltipContent?: React.ComponentProps<typeof ChartTooltip>['content'];
|
|
48
33
|
}
|
|
49
34
|
declare const ScatterChart: React.ForwardRefExoticComponent<Omit<ScatterChartProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
50
35
|
export { ScatterChart };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { Timeline, TimelineItem, type TimelineProps, type TimelineItemProps, type
|
|
1
|
+
export { Timeline, TimelineItem, type TimelineProps, type TimelineItemProps, type TimelineLevel, type TimelineMarkerColor, } from './timeline';
|