@multicomma/arkcn 0.1.2 → 0.1.3
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/package.json +1 -1
- package/registry/index.json +1 -1
- package/registry/items/accordion.json +302 -0
- package/registry/items/activity-feed.json +408 -0
- package/registry/items/alert-dialog.json +676 -0
- package/registry/items/alert.json +113 -0
- package/registry/items/angle-slider.json +378 -0
- package/registry/items/app-shell.json +2654 -1
- package/registry/items/aspect-ratio.json +36 -0
- package/registry/items/attachment.json +299 -1
- package/registry/items/avatar.json +213 -0
- package/registry/items/badge.json +44 -0
- package/registry/items/breadcrumb.json +191 -0
- package/registry/items/bubble.json +146 -0
- package/registry/items/button-group.json +110 -0
- package/registry/items/button.json +52 -0
- package/registry/items/calendar.json +499 -1
- package/registry/items/canvas.json +446 -1
- package/registry/items/card.json +192 -0
- package/registry/items/carousel.json +208 -1
- package/registry/items/cascader.json +797 -1
- package/registry/items/chart.json +1764 -1
- package/registry/items/chat.json +993 -0
- package/registry/items/checkbox.json +503 -0
- package/registry/items/clipboard.json +308 -0
- package/registry/items/collapsible.json +226 -0
- package/registry/items/color-picker.json +1261 -0
- package/registry/items/combobox.json +1123 -1
- package/registry/items/command.json +837 -1
- package/registry/items/comment-thread.json +952 -1
- package/registry/items/context-menu.json +1344 -1
- package/registry/items/data-grid.json +449 -1
- package/registry/items/data-table.json +1310 -1
- package/registry/items/date-input.json +476 -0
- package/registry/items/dialog.json +592 -0
- package/registry/items/direction.json +29 -1
- package/registry/items/drawer.json +797 -0
- package/registry/items/dropdown-menu.json +1311 -1
- package/registry/items/editable.json +503 -0
- package/registry/items/empty.json +166 -0
- package/registry/items/field.json +286 -1
- package/registry/items/file-upload.json +638 -0
- package/registry/items/floating-panel.json +720 -0
- package/registry/items/floating-toolbar.json +43 -0
- package/registry/items/format.json +109 -0
- package/registry/items/gantt.json +773 -1
- package/registry/items/hooks/use-mobile.json +1 -0
- package/registry/items/hotkeys.json +99 -1
- package/registry/items/hover-card.json +357 -0
- package/registry/items/image-cropper.json +431 -0
- package/registry/items/input-group.json +189 -0
- package/registry/items/input-otp.json +181 -0
- package/registry/items/input.json +28 -0
- package/registry/items/item.json +308 -0
- package/registry/items/json-tree-view.json +336 -0
- package/registry/items/kanban.json +624 -1
- package/registry/items/kbd.json +54 -0
- package/registry/items/label.json +28 -0
- package/registry/items/lib/controllable.json +1 -0
- package/registry/items/lib/data-table-adapter.json +1 -0
- package/registry/items/lib/drag-preview.json +1 -0
- package/registry/items/lib/form.json +1 -0
- package/registry/items/lib/history.json +1 -0
- package/registry/items/lib/row-layout.json +1 -0
- package/registry/items/lib/table.json +1 -0
- package/registry/items/lib/time.json +1 -0
- package/registry/items/lib/utils.json +1 -0
- package/registry/items/live-region.json +43 -0
- package/registry/items/marker.json +96 -0
- package/registry/items/marquee.json +300 -0
- package/registry/items/menubar.json +1282 -1
- package/registry/items/message.json +166 -0
- package/registry/items/navigation-menu.json +561 -1
- package/registry/items/node-graph.json +1037 -1
- package/registry/items/number-input.json +519 -0
- package/registry/items/pagination.json +244 -1
- package/registry/items/password-input.json +311 -0
- package/registry/items/popconfirm.json +566 -0
- package/registry/items/popover.json +615 -0
- package/registry/items/progress.json +516 -0
- package/registry/items/qr-code.json +249 -0
- package/registry/items/query-builder.json +1368 -1
- package/registry/items/radio-group.json +362 -0
- package/registry/items/rating-group.json +304 -0
- package/registry/items/resizable.json +242 -1
- package/registry/items/rich-text-editor.json +934 -1
- package/registry/items/scheduler.json +1013 -1
- package/registry/items/scroll-area.json +227 -0
- package/registry/items/segment-group.json +363 -0
- package/registry/items/select.json +956 -0
- package/registry/items/separator.json +45 -1
- package/registry/items/sheet.json +592 -0
- package/registry/items/sidebar.json +785 -1
- package/registry/items/signature-pad.json +330 -0
- package/registry/items/skeleton.json +28 -0
- package/registry/items/slider.json +799 -0
- package/registry/items/sonner.json +135 -0
- package/registry/items/spinner.json +28 -0
- package/registry/items/steps.json +483 -0
- package/registry/items/swap.json +107 -0
- package/registry/items/switch.json +362 -0
- package/registry/items/table.json +210 -0
- package/registry/items/tabs.json +326 -0
- package/registry/items/tags-input.json +640 -0
- package/registry/items/textarea.json +28 -0
- package/registry/items/timer.json +289 -0
- package/registry/items/toc.json +372 -0
- package/registry/items/toggle-group.json +214 -1
- package/registry/items/toggle.json +124 -0
- package/registry/items/tooltip.json +417 -0
- package/registry/items/tour.json +498 -0
- package/registry/items/transfer-list.json +609 -1
- package/registry/items/tree-select.json +742 -1
- package/registry/items/tree-view.json +794 -0
- package/registry/items/virtual-list.json +214 -1
- package/src/components/ui/app-shell.tsx +11 -0
- package/src/components/ui/attachment.tsx +1 -0
- package/src/components/ui/calendar.tsx +1 -0
- package/src/components/ui/canvas.tsx +8 -0
- package/src/components/ui/carousel.tsx +3 -0
- package/src/components/ui/cascader.tsx +1 -0
- package/src/components/ui/chart.tsx +10 -0
- package/src/components/ui/combobox.tsx +3 -0
- package/src/components/ui/command.tsx +1 -0
- package/src/components/ui/comment-thread.tsx +11 -0
- package/src/components/ui/context-menu.tsx +6 -0
- package/src/components/ui/data-grid.tsx +8 -0
- package/src/components/ui/data-table.tsx +6 -0
- package/src/components/ui/direction.tsx +2 -0
- package/src/components/ui/dropdown-menu.tsx +6 -0
- package/src/components/ui/field.tsx +1 -0
- package/src/components/ui/gantt.tsx +15 -0
- package/src/components/ui/hotkeys.tsx +3 -0
- package/src/components/ui/kanban.tsx +3 -0
- package/src/components/ui/menubar.tsx +6 -0
- package/src/components/ui/navigation-menu.tsx +1 -0
- package/src/components/ui/node-graph.tsx +23 -0
- package/src/components/ui/pagination.tsx +1 -0
- package/src/components/ui/query-builder.tsx +7 -0
- package/src/components/ui/resizable.tsx +1 -0
- package/src/components/ui/rich-text-editor.tsx +54 -0
- package/src/components/ui/scheduler.tsx +26 -0
- package/src/components/ui/separator.tsx +1 -0
- package/src/components/ui/sidebar.tsx +5 -0
- package/src/components/ui/toggle-group.tsx +3 -0
- package/src/components/ui/transfer-list.tsx +11 -0
- package/src/components/ui/tree-select.tsx +5 -0
- package/src/components/ui/virtual-list.tsx +7 -0
|
@@ -10,6 +10,1769 @@
|
|
|
10
10
|
"ChartLegendContent",
|
|
11
11
|
"ChartStyle"
|
|
12
12
|
],
|
|
13
|
+
"parts": [
|
|
14
|
+
{
|
|
15
|
+
"name": "ChartContainer",
|
|
16
|
+
"props": [
|
|
17
|
+
{
|
|
18
|
+
"name": "config",
|
|
19
|
+
"type": "ChartConfig",
|
|
20
|
+
"required": true,
|
|
21
|
+
"description": "Series config: label, icon, and color (or theme colors) per data key; exposed as `--color-<key>`.",
|
|
22
|
+
"from": "arkcn"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"name": "initialDimension",
|
|
26
|
+
"type": "{ width: number; height: number; }",
|
|
27
|
+
"required": false,
|
|
28
|
+
"default": "INITIAL_DIMENSION",
|
|
29
|
+
"description": "Width and height used before the container measures itself.",
|
|
30
|
+
"from": "arkcn"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"name": "children",
|
|
34
|
+
"type": "ReactNode",
|
|
35
|
+
"required": true,
|
|
36
|
+
"description": "Content rendered inside the part.",
|
|
37
|
+
"from": "@types/react"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"name": "className",
|
|
41
|
+
"type": "string",
|
|
42
|
+
"required": false,
|
|
43
|
+
"description": "Extra classes merged into the part's own classes with `cn`.",
|
|
44
|
+
"from": "@types/react"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"name": "style",
|
|
48
|
+
"type": "CSSProperties",
|
|
49
|
+
"required": false,
|
|
50
|
+
"description": "Inline styles applied to the rendered element.",
|
|
51
|
+
"from": "@types/react"
|
|
52
|
+
}
|
|
53
|
+
]
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"name": "ChartTooltip",
|
|
57
|
+
"props": [
|
|
58
|
+
{
|
|
59
|
+
"name": "active",
|
|
60
|
+
"type": "boolean",
|
|
61
|
+
"required": false,
|
|
62
|
+
"description": "If true, then Tooltip is always displayed, once an activeIndex is set by mouse over, or programmatically.\nIf false, then Tooltip is never displayed.\nIf undefined, Recharts will control when the Tooltip displays. This includes mouse and keyboard controls.",
|
|
63
|
+
"from": "recharts"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"name": "allowEscapeViewBox",
|
|
67
|
+
"type": "AllowInDimension",
|
|
68
|
+
"required": false,
|
|
69
|
+
"description": "This option allows the tooltip to extend beyond the viewBox of the chart itself.",
|
|
70
|
+
"from": "recharts"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"name": "animationDuration",
|
|
74
|
+
"type": "number",
|
|
75
|
+
"required": false,
|
|
76
|
+
"description": "Specifies the duration of animation, the unit of this option is ms.",
|
|
77
|
+
"from": "recharts"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"name": "animationEasing",
|
|
81
|
+
"type": "EasingInput",
|
|
82
|
+
"required": false,
|
|
83
|
+
"description": "The type of easing function.",
|
|
84
|
+
"from": "recharts"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"name": "axisId",
|
|
88
|
+
"type": "AxisId",
|
|
89
|
+
"required": false,
|
|
90
|
+
"description": "Tooltip always attaches itself to the \"Tooltip\" axis. Which axis is it? Depends on the layout:\n- horizontal layout -> X axis\n- vertical layout -> Y axis\n- radial layout -> radial axis\n- centric layout -> angle axis\n\nTooltip will use the default axis for the layout, unless you specify an axisId.",
|
|
91
|
+
"from": "recharts"
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"name": "content",
|
|
95
|
+
"type": "ContentType<ValueType, NameType>",
|
|
96
|
+
"required": false,
|
|
97
|
+
"description": "Renders the content of the tooltip.\n\nThis should return HTML elements, not SVG elements.\n\n- If not set, the {@link DefaultTooltipContent } component is used.\n- If set to a React element, this element will be cloned and extra props will be passed in.\n- If set to a function, the function will be called and should return HTML elements.",
|
|
98
|
+
"from": "recharts"
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"name": "contentStyle",
|
|
102
|
+
"type": "CSSProperties",
|
|
103
|
+
"required": false,
|
|
104
|
+
"description": "CSS styles to be applied to the wrapper `div` element.",
|
|
105
|
+
"from": "recharts"
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"name": "cursor",
|
|
109
|
+
"type": "CursorDefinition",
|
|
110
|
+
"required": false,
|
|
111
|
+
"description": "If set false, no cursor will be drawn when tooltip is active.\nIf set a object, the option is the configuration of cursor.\nIf set a React element, the option is the custom react element of drawing cursor.",
|
|
112
|
+
"from": "recharts"
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"name": "defaultIndex",
|
|
116
|
+
"type": "number | TooltipIndex",
|
|
117
|
+
"required": false,
|
|
118
|
+
"from": "recharts"
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"name": "filterNull",
|
|
122
|
+
"type": "boolean",
|
|
123
|
+
"required": false,
|
|
124
|
+
"description": "When an item of the payload has value null or undefined, this item won't be displayed.",
|
|
125
|
+
"from": "recharts"
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"name": "formatter",
|
|
129
|
+
"type": "(Formatter<ValueType, NameType> & ((value: ValueType, name: NameType, item: TooltipPayloadEntry, index: number, payload: TooltipPayload) => ReactNode | [Reac…",
|
|
130
|
+
"required": false,
|
|
131
|
+
"description": "Function to customize the value in the tooltip.\nIf you return an array, the first entry will be the formatted \"value\", and the second entry will be the formatted \"name\"",
|
|
132
|
+
"from": "recharts"
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"name": "includeHidden",
|
|
136
|
+
"type": "boolean",
|
|
137
|
+
"required": false,
|
|
138
|
+
"description": "If true, the tooltip will display information about hidden series.\nDefaults to false.\nInteracting with the hide property of Area, Bar, Line, Scatter.",
|
|
139
|
+
"from": "recharts"
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"name": "isAnimationActive",
|
|
143
|
+
"type": "boolean | \"auto\"",
|
|
144
|
+
"required": false,
|
|
145
|
+
"description": "If set false, animation of tooltip will be disabled.\nIf set \"auto\", the animation will be disabled in SSR and will respect the user's prefers-reduced-motion system preference for accessibility.",
|
|
146
|
+
"from": "recharts"
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"name": "itemSorter",
|
|
150
|
+
"type": "(TooltipItemSorter<ValueType, NameType> & TooltipItemSorter)",
|
|
151
|
+
"required": false,
|
|
152
|
+
"description": "Sorts tooltip items.\nDefaults to 'name' which means it sorts alphabetically by graphical item `name` property.",
|
|
153
|
+
"from": "recharts"
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"name": "itemStyle",
|
|
157
|
+
"type": "CSSProperties",
|
|
158
|
+
"required": false,
|
|
159
|
+
"description": "Style of individual items inside the tooltip, a `<li>` element.\nThese show the data label (name, or dataKey) and value.\n\nIf a chart has multiple graphical items then the Tooltip renders multiple item\nand each of them gets this itemStyle applied.",
|
|
160
|
+
"from": "recharts"
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"name": "labelClassName",
|
|
164
|
+
"type": "string",
|
|
165
|
+
"required": false,
|
|
166
|
+
"from": "recharts"
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
"name": "labelFormatter",
|
|
170
|
+
"type": "(((label: ReactNode, payload: readonly Payload<ValueType, NameType>[]) => ReactNode) & ((label: ReactNode, payload: TooltipPayload) => ReactNode))",
|
|
171
|
+
"required": false,
|
|
172
|
+
"description": "The formatter function of label in tooltip.",
|
|
173
|
+
"from": "recharts"
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
"name": "labelStyle",
|
|
177
|
+
"type": "CSSProperties",
|
|
178
|
+
"required": false,
|
|
179
|
+
"description": "\"Label\" is the tooltip title.\nRenders once on the top of tooltip and shows categorical axis value.\n\nEven if there are multiple graphical items in the chart, only one label gets rendered.\n\nNote that \"Label\" in tooltip is the header, which is different from {@link Legend }\nwhere \"labelStyle\" are the individual items.",
|
|
180
|
+
"from": "recharts"
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
"name": "offset",
|
|
184
|
+
"type": "number | Coordinate",
|
|
185
|
+
"required": false,
|
|
186
|
+
"description": "The offset size between the position of tooltip and the mouse cursor position.\nWhen a number is provided, the same offset is applied to both x and y axes.\n\nWhen a Coordinate object is provided, you can specify different offsets for each axis (x and y as numbers)",
|
|
187
|
+
"from": "recharts"
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
"name": "payloadUniqBy",
|
|
191
|
+
"type": "UniqueOption<TooltipPayloadEntry>",
|
|
192
|
+
"required": false,
|
|
193
|
+
"from": "recharts"
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
"name": "portal",
|
|
197
|
+
"type": "HTMLElement | null",
|
|
198
|
+
"required": false,
|
|
199
|
+
"description": "If portal is defined, then Tooltip will use this element as a target\nfor rendering using React Portal: https://react.dev/reference/react-dom/createPortal\n\nIf this is undefined then Tooltip renders inside the recharts-wrapper element.",
|
|
200
|
+
"from": "recharts"
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
"name": "position",
|
|
204
|
+
"type": "Partial<Coordinate>",
|
|
205
|
+
"required": false,
|
|
206
|
+
"description": "If this field is set, the tooltip will be displayed at the specified position\nregardless of the mouse position.\n\nYou can set a single field (x or y) and let the other field be calculated automatically based\non the mouse position.",
|
|
207
|
+
"from": "recharts"
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
"name": "reverseDirection",
|
|
211
|
+
"type": "AllowInDimension",
|
|
212
|
+
"required": false,
|
|
213
|
+
"from": "recharts"
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
"name": "separator",
|
|
217
|
+
"type": "string",
|
|
218
|
+
"required": false,
|
|
219
|
+
"description": "The separator between name and value.",
|
|
220
|
+
"from": "recharts"
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
"name": "shared",
|
|
224
|
+
"type": "boolean",
|
|
225
|
+
"required": false,
|
|
226
|
+
"description": "Defines whether the tooltip is reacting to the current data point,\nor to all data points at the current axis coordinate.\n\n- `true`: tooltip will appear on top of all bars on an axis tick.\n- `false`: tooltip will appear on individual bars.\n\nDifferent chart types allow different modes, and have different defaults.",
|
|
227
|
+
"from": "recharts"
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
"name": "trigger",
|
|
231
|
+
"type": "TooltipTrigger",
|
|
232
|
+
"required": false,
|
|
233
|
+
"description": "If `hover` then the Tooltip shows on mouse enter and hides on mouse leave.\n\nIf `click` then the Tooltip shows after clicking and stays active.",
|
|
234
|
+
"from": "recharts"
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
"name": "useTranslate3d",
|
|
238
|
+
"type": "boolean",
|
|
239
|
+
"required": false,
|
|
240
|
+
"from": "recharts"
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
"name": "wrapperClassName",
|
|
244
|
+
"type": "string",
|
|
245
|
+
"required": false,
|
|
246
|
+
"from": "recharts"
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
"name": "wrapperStyle",
|
|
250
|
+
"type": "CSSProperties",
|
|
251
|
+
"required": false,
|
|
252
|
+
"description": "CSS styles to be applied to the wrapper `div` element.",
|
|
253
|
+
"from": "recharts"
|
|
254
|
+
}
|
|
255
|
+
]
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
"name": "ChartTooltipContent",
|
|
259
|
+
"props": [
|
|
260
|
+
{
|
|
261
|
+
"name": "hideIndicator",
|
|
262
|
+
"type": "boolean",
|
|
263
|
+
"required": false,
|
|
264
|
+
"default": "false",
|
|
265
|
+
"description": "Hide the color indicator in each row.",
|
|
266
|
+
"from": "arkcn"
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
"name": "hideLabel",
|
|
270
|
+
"type": "boolean",
|
|
271
|
+
"required": false,
|
|
272
|
+
"default": "false",
|
|
273
|
+
"description": "Hide the tooltip label.",
|
|
274
|
+
"from": "arkcn"
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
"name": "indicator",
|
|
278
|
+
"type": "\"line\" | \"dot\" | \"dashed\"",
|
|
279
|
+
"required": false,
|
|
280
|
+
"default": "\"dot\"",
|
|
281
|
+
"description": "Indicator style: `dot`, `line`, or `dashed`.",
|
|
282
|
+
"from": "arkcn"
|
|
283
|
+
},
|
|
284
|
+
{
|
|
285
|
+
"name": "labelKey",
|
|
286
|
+
"type": "string",
|
|
287
|
+
"required": false,
|
|
288
|
+
"description": "Data key used for the tooltip label.",
|
|
289
|
+
"from": "arkcn"
|
|
290
|
+
},
|
|
291
|
+
{
|
|
292
|
+
"name": "nameKey",
|
|
293
|
+
"type": "string",
|
|
294
|
+
"required": false,
|
|
295
|
+
"description": "Data key used for the series name.",
|
|
296
|
+
"from": "arkcn"
|
|
297
|
+
},
|
|
298
|
+
{
|
|
299
|
+
"name": "active",
|
|
300
|
+
"type": "boolean",
|
|
301
|
+
"required": false,
|
|
302
|
+
"description": "If true, then Tooltip is always displayed, once an activeIndex is set by mouse over, or programmatically.\nIf false, then Tooltip is never displayed.\nIf undefined, Recharts will control when the Tooltip displays. This includes mouse and keyboard controls.",
|
|
303
|
+
"from": "recharts"
|
|
304
|
+
},
|
|
305
|
+
{
|
|
306
|
+
"name": "allowEscapeViewBox",
|
|
307
|
+
"type": "AllowInDimension",
|
|
308
|
+
"required": false,
|
|
309
|
+
"description": "This option allows the tooltip to extend beyond the viewBox of the chart itself.",
|
|
310
|
+
"from": "recharts"
|
|
311
|
+
},
|
|
312
|
+
{
|
|
313
|
+
"name": "animationDuration",
|
|
314
|
+
"type": "number",
|
|
315
|
+
"required": false,
|
|
316
|
+
"description": "Specifies the duration of animation, the unit of this option is ms.",
|
|
317
|
+
"from": "recharts"
|
|
318
|
+
},
|
|
319
|
+
{
|
|
320
|
+
"name": "animationEasing",
|
|
321
|
+
"type": "EasingInput",
|
|
322
|
+
"required": false,
|
|
323
|
+
"description": "The type of easing function.",
|
|
324
|
+
"from": "recharts"
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
"name": "axisId",
|
|
328
|
+
"type": "AxisId",
|
|
329
|
+
"required": false,
|
|
330
|
+
"description": "Tooltip always attaches itself to the \"Tooltip\" axis. Which axis is it? Depends on the layout:\n- horizontal layout -> X axis\n- vertical layout -> Y axis\n- radial layout -> radial axis\n- centric layout -> angle axis\n\nTooltip will use the default axis for the layout, unless you specify an axisId.",
|
|
331
|
+
"from": "recharts"
|
|
332
|
+
},
|
|
333
|
+
{
|
|
334
|
+
"name": "children",
|
|
335
|
+
"type": "ReactNode",
|
|
336
|
+
"required": false,
|
|
337
|
+
"description": "Content rendered inside the part.",
|
|
338
|
+
"from": "@types/react"
|
|
339
|
+
},
|
|
340
|
+
{
|
|
341
|
+
"name": "className",
|
|
342
|
+
"type": "string",
|
|
343
|
+
"required": false,
|
|
344
|
+
"description": "Extra classes merged into the part's own classes with `cn`.",
|
|
345
|
+
"from": "@types/react"
|
|
346
|
+
},
|
|
347
|
+
{
|
|
348
|
+
"name": "content",
|
|
349
|
+
"type": "(ContentType<ValueType, NameType> & string)",
|
|
350
|
+
"required": false,
|
|
351
|
+
"description": "Renders the content of the tooltip.\n\nThis should return HTML elements, not SVG elements.\n\n- If not set, the {@link DefaultTooltipContent } component is used.\n- If set to a React element, this element will be cloned and extra props will be passed in.\n- If set to a function, the function will be called and should return HTML elements.",
|
|
352
|
+
"from": "recharts"
|
|
353
|
+
},
|
|
354
|
+
{
|
|
355
|
+
"name": "contentStyle",
|
|
356
|
+
"type": "CSSProperties",
|
|
357
|
+
"required": false,
|
|
358
|
+
"description": "CSS styles to be applied to the wrapper `div` element.",
|
|
359
|
+
"from": "recharts"
|
|
360
|
+
},
|
|
361
|
+
{
|
|
362
|
+
"name": "cursor",
|
|
363
|
+
"type": "CursorDefinition",
|
|
364
|
+
"required": false,
|
|
365
|
+
"description": "If set false, no cursor will be drawn when tooltip is active.\nIf set a object, the option is the configuration of cursor.\nIf set a React element, the option is the custom react element of drawing cursor.",
|
|
366
|
+
"from": "recharts"
|
|
367
|
+
},
|
|
368
|
+
{
|
|
369
|
+
"name": "defaultIndex",
|
|
370
|
+
"type": "number | TooltipIndex",
|
|
371
|
+
"required": false,
|
|
372
|
+
"from": "recharts"
|
|
373
|
+
},
|
|
374
|
+
{
|
|
375
|
+
"name": "filterNull",
|
|
376
|
+
"type": "boolean",
|
|
377
|
+
"required": false,
|
|
378
|
+
"description": "When an item of the payload has value null or undefined, this item won't be displayed.",
|
|
379
|
+
"from": "recharts"
|
|
380
|
+
},
|
|
381
|
+
{
|
|
382
|
+
"name": "formatter",
|
|
383
|
+
"type": "(Formatter<ValueType, NameType> & ((value: ValueType, name: NameType, item: TooltipPayloadEntry, index: number, payload: TooltipPayload) => ReactNode | [Reac…",
|
|
384
|
+
"required": false,
|
|
385
|
+
"description": "Function to customize the value in the tooltip.\nIf you return an array, the first entry will be the formatted \"value\", and the second entry will be the formatted \"name\"",
|
|
386
|
+
"from": "recharts"
|
|
387
|
+
},
|
|
388
|
+
{
|
|
389
|
+
"name": "includeHidden",
|
|
390
|
+
"type": "boolean",
|
|
391
|
+
"required": false,
|
|
392
|
+
"description": "If true, the tooltip will display information about hidden series.\nDefaults to false.\nInteracting with the hide property of Area, Bar, Line, Scatter.",
|
|
393
|
+
"from": "recharts"
|
|
394
|
+
},
|
|
395
|
+
{
|
|
396
|
+
"name": "isAnimationActive",
|
|
397
|
+
"type": "boolean | \"auto\"",
|
|
398
|
+
"required": false,
|
|
399
|
+
"description": "If set false, animation of tooltip will be disabled.\nIf set \"auto\", the animation will be disabled in SSR and will respect the user's prefers-reduced-motion system preference for accessibility.",
|
|
400
|
+
"from": "recharts"
|
|
401
|
+
},
|
|
402
|
+
{
|
|
403
|
+
"name": "itemSorter",
|
|
404
|
+
"type": "(TooltipItemSorter<ValueType, NameType> & (TooltipItemSorter & TooltipItemSorter<ValueType, TooltipNameType>))",
|
|
405
|
+
"required": false,
|
|
406
|
+
"description": "Sorts tooltip items.\nDefaults to 'name' which means it sorts alphabetically by graphical item `name` property.",
|
|
407
|
+
"from": "recharts"
|
|
408
|
+
},
|
|
409
|
+
{
|
|
410
|
+
"name": "itemStyle",
|
|
411
|
+
"type": "CSSProperties",
|
|
412
|
+
"required": false,
|
|
413
|
+
"description": "Style of individual items inside the tooltip, a `<li>` element.\nThese show the data label (name, or dataKey) and value.\n\nIf a chart has multiple graphical items then the Tooltip renders multiple item\nand each of them gets this itemStyle applied.",
|
|
414
|
+
"from": "recharts"
|
|
415
|
+
},
|
|
416
|
+
{
|
|
417
|
+
"name": "label",
|
|
418
|
+
"type": "ReactNode",
|
|
419
|
+
"required": false,
|
|
420
|
+
"description": "Accessible label.",
|
|
421
|
+
"from": "recharts"
|
|
422
|
+
},
|
|
423
|
+
{
|
|
424
|
+
"name": "labelClassName",
|
|
425
|
+
"type": "string",
|
|
426
|
+
"required": false,
|
|
427
|
+
"from": "recharts"
|
|
428
|
+
},
|
|
429
|
+
{
|
|
430
|
+
"name": "labelFormatter",
|
|
431
|
+
"type": "(((label: ReactNode, payload: readonly Payload<ValueType, NameType>[]) => ReactNode) & ((label: ReactNode, payload: TooltipPayload) => ReactNode) & ((label: …",
|
|
432
|
+
"required": false,
|
|
433
|
+
"description": "The formatter function of label in tooltip.",
|
|
434
|
+
"from": "recharts"
|
|
435
|
+
},
|
|
436
|
+
{
|
|
437
|
+
"name": "labelStyle",
|
|
438
|
+
"type": "CSSProperties",
|
|
439
|
+
"required": false,
|
|
440
|
+
"description": "\"Label\" is the tooltip title.\nRenders once on the top of tooltip and shows categorical axis value.\n\nEven if there are multiple graphical items in the chart, only one label gets rendered.\n\nNote that \"Label\" in tooltip is the header, which is different from {@link Legend }\nwhere \"labelStyle\" are the individual items.",
|
|
441
|
+
"from": "recharts"
|
|
442
|
+
},
|
|
443
|
+
{
|
|
444
|
+
"name": "offset",
|
|
445
|
+
"type": "number | Coordinate",
|
|
446
|
+
"required": false,
|
|
447
|
+
"description": "The offset size between the position of tooltip and the mouse cursor position.\nWhen a number is provided, the same offset is applied to both x and y axes.\n\nWhen a Coordinate object is provided, you can specify different offsets for each axis (x and y as numbers)",
|
|
448
|
+
"from": "recharts"
|
|
449
|
+
},
|
|
450
|
+
{
|
|
451
|
+
"name": "payload",
|
|
452
|
+
"type": "readonly Payload<ValueType, TooltipNameType>[]",
|
|
453
|
+
"required": false,
|
|
454
|
+
"from": "recharts"
|
|
455
|
+
},
|
|
456
|
+
{
|
|
457
|
+
"name": "payloadUniqBy",
|
|
458
|
+
"type": "UniqueOption<TooltipPayloadEntry>",
|
|
459
|
+
"required": false,
|
|
460
|
+
"from": "recharts"
|
|
461
|
+
},
|
|
462
|
+
{
|
|
463
|
+
"name": "portal",
|
|
464
|
+
"type": "HTMLElement | null",
|
|
465
|
+
"required": false,
|
|
466
|
+
"description": "If portal is defined, then Tooltip will use this element as a target\nfor rendering using React Portal: https://react.dev/reference/react-dom/createPortal\n\nIf this is undefined then Tooltip renders inside the recharts-wrapper element.",
|
|
467
|
+
"from": "recharts"
|
|
468
|
+
},
|
|
469
|
+
{
|
|
470
|
+
"name": "position",
|
|
471
|
+
"type": "Partial<Coordinate>",
|
|
472
|
+
"required": false,
|
|
473
|
+
"description": "If this field is set, the tooltip will be displayed at the specified position\nregardless of the mouse position.\n\nYou can set a single field (x or y) and let the other field be calculated automatically based\non the mouse position.",
|
|
474
|
+
"from": "recharts"
|
|
475
|
+
},
|
|
476
|
+
{
|
|
477
|
+
"name": "reverseDirection",
|
|
478
|
+
"type": "AllowInDimension",
|
|
479
|
+
"required": false,
|
|
480
|
+
"from": "recharts"
|
|
481
|
+
},
|
|
482
|
+
{
|
|
483
|
+
"name": "separator",
|
|
484
|
+
"type": "string",
|
|
485
|
+
"required": false,
|
|
486
|
+
"description": "The separator between name and value.",
|
|
487
|
+
"from": "recharts"
|
|
488
|
+
},
|
|
489
|
+
{
|
|
490
|
+
"name": "shared",
|
|
491
|
+
"type": "boolean",
|
|
492
|
+
"required": false,
|
|
493
|
+
"description": "Defines whether the tooltip is reacting to the current data point,\nor to all data points at the current axis coordinate.\n\n- `true`: tooltip will appear on top of all bars on an axis tick.\n- `false`: tooltip will appear on individual bars.\n\nDifferent chart types allow different modes, and have different defaults.",
|
|
494
|
+
"from": "recharts"
|
|
495
|
+
},
|
|
496
|
+
{
|
|
497
|
+
"name": "style",
|
|
498
|
+
"type": "CSSProperties",
|
|
499
|
+
"required": false,
|
|
500
|
+
"description": "Inline styles applied to the rendered element.",
|
|
501
|
+
"from": "@types/react"
|
|
502
|
+
},
|
|
503
|
+
{
|
|
504
|
+
"name": "trigger",
|
|
505
|
+
"type": "TooltipTrigger",
|
|
506
|
+
"required": false,
|
|
507
|
+
"description": "If `hover` then the Tooltip shows on mouse enter and hides on mouse leave.\n\nIf `click` then the Tooltip shows after clicking and stays active.",
|
|
508
|
+
"from": "recharts"
|
|
509
|
+
},
|
|
510
|
+
{
|
|
511
|
+
"name": "useTranslate3d",
|
|
512
|
+
"type": "boolean",
|
|
513
|
+
"required": false,
|
|
514
|
+
"from": "recharts"
|
|
515
|
+
},
|
|
516
|
+
{
|
|
517
|
+
"name": "wrapperClassName",
|
|
518
|
+
"type": "string",
|
|
519
|
+
"required": false,
|
|
520
|
+
"from": "recharts"
|
|
521
|
+
},
|
|
522
|
+
{
|
|
523
|
+
"name": "wrapperStyle",
|
|
524
|
+
"type": "CSSProperties",
|
|
525
|
+
"required": false,
|
|
526
|
+
"description": "CSS styles to be applied to the wrapper `div` element.",
|
|
527
|
+
"from": "recharts"
|
|
528
|
+
}
|
|
529
|
+
]
|
|
530
|
+
},
|
|
531
|
+
{
|
|
532
|
+
"name": "ChartLegend",
|
|
533
|
+
"props": [
|
|
534
|
+
{
|
|
535
|
+
"name": "align",
|
|
536
|
+
"type": "HorizontalAlignmentType",
|
|
537
|
+
"required": false,
|
|
538
|
+
"description": "Alignment along the side.",
|
|
539
|
+
"from": "recharts"
|
|
540
|
+
},
|
|
541
|
+
{
|
|
542
|
+
"name": "children",
|
|
543
|
+
"type": "ReactNode",
|
|
544
|
+
"required": false,
|
|
545
|
+
"description": "Content rendered inside the part.",
|
|
546
|
+
"from": "recharts"
|
|
547
|
+
},
|
|
548
|
+
{
|
|
549
|
+
"name": "content",
|
|
550
|
+
"type": "ContentType",
|
|
551
|
+
"required": false,
|
|
552
|
+
"description": "Renders the content of the legend.\n\nThis should return HTML elements, not SVG elements.\n\n- If not set, the {@link DefaultLegendContent } component is used.\n- If set to a React element, this element will be cloned and extra props will be passed in.\n- If set to a function, the function will be called and should return HTML elements.",
|
|
553
|
+
"from": "recharts"
|
|
554
|
+
},
|
|
555
|
+
{
|
|
556
|
+
"name": "dangerouslySetInnerHTML",
|
|
557
|
+
"type": "{ __html: string; }",
|
|
558
|
+
"required": false,
|
|
559
|
+
"from": "recharts"
|
|
560
|
+
},
|
|
561
|
+
{
|
|
562
|
+
"name": "formatter",
|
|
563
|
+
"type": "Formatter",
|
|
564
|
+
"required": false,
|
|
565
|
+
"description": "Function to customize how content is serialized before rendering.\n\nThis should return HTML elements, or strings.",
|
|
566
|
+
"from": "recharts"
|
|
567
|
+
},
|
|
568
|
+
{
|
|
569
|
+
"name": "height",
|
|
570
|
+
"type": "string | number",
|
|
571
|
+
"required": false,
|
|
572
|
+
"description": "Height of the legend.\nAccept CSS style string values like `100%` or `fit-content`, or number values like `400`.",
|
|
573
|
+
"from": "recharts"
|
|
574
|
+
},
|
|
575
|
+
{
|
|
576
|
+
"name": "iconSize",
|
|
577
|
+
"type": "number",
|
|
578
|
+
"required": false,
|
|
579
|
+
"description": "The size of icon in each legend item.",
|
|
580
|
+
"from": "recharts"
|
|
581
|
+
},
|
|
582
|
+
{
|
|
583
|
+
"name": "iconType",
|
|
584
|
+
"type": "LegendType",
|
|
585
|
+
"required": false,
|
|
586
|
+
"description": "The type of icon in each legend item.",
|
|
587
|
+
"from": "recharts"
|
|
588
|
+
},
|
|
589
|
+
{
|
|
590
|
+
"name": "inactiveColor",
|
|
591
|
+
"type": "string",
|
|
592
|
+
"required": false,
|
|
593
|
+
"description": "The color of the icon when the item is inactive.",
|
|
594
|
+
"from": "recharts"
|
|
595
|
+
},
|
|
596
|
+
{
|
|
597
|
+
"name": "itemSorter",
|
|
598
|
+
"type": "LegendItemSorter | null",
|
|
599
|
+
"required": false,
|
|
600
|
+
"description": "Sorts Legend items. Defaults to `value` which means it will sort alphabetically\nby the label.\n\nIf `null` is provided then the payload is not sorted. Be aware that without sort,\nthe order of items may change between renders!",
|
|
601
|
+
"from": "recharts"
|
|
602
|
+
},
|
|
603
|
+
{
|
|
604
|
+
"name": "labelStyle",
|
|
605
|
+
"type": "CSSProperties",
|
|
606
|
+
"required": false,
|
|
607
|
+
"description": "Style of individual items inside the Legend, a `<span>` element.\nThese show the data label (name, or dataKey) and value.\n\nIf a chart has multiple graphical items then the Legend renders multiple item\nand each of them gets this itemStyle applied.\n\nPie charts render multiple labels from a single data series.\n\nNote that this is different from {@link Tooltip }:\n- in Tooltip: \"labelStyle\" styles the title / header\n- in Tooltip: \"itemStyle\" styles the individual data points\n- in Legend: \"labelStyle\" styles the individual data points\n\nBeware of the naming inconsistency!",
|
|
608
|
+
"from": "recharts"
|
|
609
|
+
},
|
|
610
|
+
{
|
|
611
|
+
"name": "layout",
|
|
612
|
+
"type": "\"auto\" | CartesianLayout",
|
|
613
|
+
"required": false,
|
|
614
|
+
"description": "The layout of legend items inside the legend container.\n\nWhen `auto` then the layout is decided based on the `position` prop:\n- in `left`|`right` positions, the layout is vertical\n- otherwise horizontal\n- if position is undefined, also horizontal\n\n`auto` value is new since 3.10",
|
|
615
|
+
"from": "recharts"
|
|
616
|
+
},
|
|
617
|
+
{
|
|
618
|
+
"name": "offset",
|
|
619
|
+
"type": "number",
|
|
620
|
+
"required": false,
|
|
621
|
+
"description": "The offset to the specified `position`. Direction of the offset depends on the position.",
|
|
622
|
+
"from": "recharts"
|
|
623
|
+
},
|
|
624
|
+
{
|
|
625
|
+
"name": "onAbort",
|
|
626
|
+
"type": "AdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
627
|
+
"required": false,
|
|
628
|
+
"from": "recharts"
|
|
629
|
+
},
|
|
630
|
+
{
|
|
631
|
+
"name": "onAbortCapture",
|
|
632
|
+
"type": "AdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
633
|
+
"required": false,
|
|
634
|
+
"from": "recharts"
|
|
635
|
+
},
|
|
636
|
+
{
|
|
637
|
+
"name": "onAnimationEnd",
|
|
638
|
+
"type": "AdaptChildAnimationEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
639
|
+
"required": false,
|
|
640
|
+
"from": "recharts"
|
|
641
|
+
},
|
|
642
|
+
{
|
|
643
|
+
"name": "onAnimationEndCapture",
|
|
644
|
+
"type": "AdaptChildAnimationEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
645
|
+
"required": false,
|
|
646
|
+
"from": "recharts"
|
|
647
|
+
},
|
|
648
|
+
{
|
|
649
|
+
"name": "onAnimationIteration",
|
|
650
|
+
"type": "AdaptChildAnimationEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
651
|
+
"required": false,
|
|
652
|
+
"from": "recharts"
|
|
653
|
+
},
|
|
654
|
+
{
|
|
655
|
+
"name": "onAnimationIterationCapture",
|
|
656
|
+
"type": "AdaptChildAnimationEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
657
|
+
"required": false,
|
|
658
|
+
"from": "recharts"
|
|
659
|
+
},
|
|
660
|
+
{
|
|
661
|
+
"name": "onAnimationStart",
|
|
662
|
+
"type": "AdaptChildAnimationEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
663
|
+
"required": false,
|
|
664
|
+
"from": "recharts"
|
|
665
|
+
},
|
|
666
|
+
{
|
|
667
|
+
"name": "onAnimationStartCapture",
|
|
668
|
+
"type": "AdaptChildAnimationEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
669
|
+
"required": false,
|
|
670
|
+
"from": "recharts"
|
|
671
|
+
},
|
|
672
|
+
{
|
|
673
|
+
"name": "onAuxClick",
|
|
674
|
+
"type": "AdaptChildMouseEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
675
|
+
"required": false,
|
|
676
|
+
"from": "recharts"
|
|
677
|
+
},
|
|
678
|
+
{
|
|
679
|
+
"name": "onAuxClickCapture",
|
|
680
|
+
"type": "AdaptChildMouseEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
681
|
+
"required": false,
|
|
682
|
+
"from": "recharts"
|
|
683
|
+
},
|
|
684
|
+
{
|
|
685
|
+
"name": "onBBoxUpdate",
|
|
686
|
+
"type": "((box: ElementOffset | null) => void)",
|
|
687
|
+
"required": false,
|
|
688
|
+
"from": "recharts"
|
|
689
|
+
},
|
|
690
|
+
{
|
|
691
|
+
"name": "onBeforeInput",
|
|
692
|
+
"type": "AdaptChildFormEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
693
|
+
"required": false,
|
|
694
|
+
"from": "recharts"
|
|
695
|
+
},
|
|
696
|
+
{
|
|
697
|
+
"name": "onBeforeInputCapture",
|
|
698
|
+
"type": "AdaptChildFormEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
699
|
+
"required": false,
|
|
700
|
+
"from": "recharts"
|
|
701
|
+
},
|
|
702
|
+
{
|
|
703
|
+
"name": "onBlur",
|
|
704
|
+
"type": "AdaptChildFocusEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
705
|
+
"required": false,
|
|
706
|
+
"description": "Blur handler.",
|
|
707
|
+
"from": "recharts"
|
|
708
|
+
},
|
|
709
|
+
{
|
|
710
|
+
"name": "onBlurCapture",
|
|
711
|
+
"type": "AdaptChildFocusEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
712
|
+
"required": false,
|
|
713
|
+
"from": "recharts"
|
|
714
|
+
},
|
|
715
|
+
{
|
|
716
|
+
"name": "onCanPlay",
|
|
717
|
+
"type": "AdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
718
|
+
"required": false,
|
|
719
|
+
"from": "recharts"
|
|
720
|
+
},
|
|
721
|
+
{
|
|
722
|
+
"name": "onCanPlayCapture",
|
|
723
|
+
"type": "AdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
724
|
+
"required": false,
|
|
725
|
+
"from": "recharts"
|
|
726
|
+
},
|
|
727
|
+
{
|
|
728
|
+
"name": "onCanPlayThrough",
|
|
729
|
+
"type": "AdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
730
|
+
"required": false,
|
|
731
|
+
"from": "recharts"
|
|
732
|
+
},
|
|
733
|
+
{
|
|
734
|
+
"name": "onCanPlayThroughCapture",
|
|
735
|
+
"type": "AdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
736
|
+
"required": false,
|
|
737
|
+
"from": "recharts"
|
|
738
|
+
},
|
|
739
|
+
{
|
|
740
|
+
"name": "onChange",
|
|
741
|
+
"type": "AdaptChildFormEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
742
|
+
"required": false,
|
|
743
|
+
"description": "Change handler.",
|
|
744
|
+
"from": "recharts"
|
|
745
|
+
},
|
|
746
|
+
{
|
|
747
|
+
"name": "onChangeCapture",
|
|
748
|
+
"type": "AdaptChildFormEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
749
|
+
"required": false,
|
|
750
|
+
"from": "recharts"
|
|
751
|
+
},
|
|
752
|
+
{
|
|
753
|
+
"name": "onClick",
|
|
754
|
+
"type": "((data: LegendPayload, index: number, event: MouseEvent<HTMLElement, MouseEvent>) => void)",
|
|
755
|
+
"required": false,
|
|
756
|
+
"description": "The customized event handler of click on the items in this group",
|
|
757
|
+
"from": "recharts"
|
|
758
|
+
},
|
|
759
|
+
{
|
|
760
|
+
"name": "onClickCapture",
|
|
761
|
+
"type": "AdaptChildMouseEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
762
|
+
"required": false,
|
|
763
|
+
"from": "recharts"
|
|
764
|
+
},
|
|
765
|
+
{
|
|
766
|
+
"name": "onCompositionEnd",
|
|
767
|
+
"type": "AdaptChildCompositionEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
768
|
+
"required": false,
|
|
769
|
+
"from": "recharts"
|
|
770
|
+
},
|
|
771
|
+
{
|
|
772
|
+
"name": "onCompositionEndCapture",
|
|
773
|
+
"type": "AdaptChildCompositionEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
774
|
+
"required": false,
|
|
775
|
+
"from": "recharts"
|
|
776
|
+
},
|
|
777
|
+
{
|
|
778
|
+
"name": "onCompositionStart",
|
|
779
|
+
"type": "AdaptChildCompositionEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
780
|
+
"required": false,
|
|
781
|
+
"from": "recharts"
|
|
782
|
+
},
|
|
783
|
+
{
|
|
784
|
+
"name": "onCompositionStartCapture",
|
|
785
|
+
"type": "AdaptChildCompositionEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
786
|
+
"required": false,
|
|
787
|
+
"from": "recharts"
|
|
788
|
+
},
|
|
789
|
+
{
|
|
790
|
+
"name": "onCompositionUpdate",
|
|
791
|
+
"type": "AdaptChildCompositionEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
792
|
+
"required": false,
|
|
793
|
+
"from": "recharts"
|
|
794
|
+
},
|
|
795
|
+
{
|
|
796
|
+
"name": "onCompositionUpdateCapture",
|
|
797
|
+
"type": "AdaptChildCompositionEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
798
|
+
"required": false,
|
|
799
|
+
"from": "recharts"
|
|
800
|
+
},
|
|
801
|
+
{
|
|
802
|
+
"name": "onContextMenu",
|
|
803
|
+
"type": "AdaptChildMouseEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
804
|
+
"required": false,
|
|
805
|
+
"from": "recharts"
|
|
806
|
+
},
|
|
807
|
+
{
|
|
808
|
+
"name": "onContextMenuCapture",
|
|
809
|
+
"type": "AdaptChildMouseEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
810
|
+
"required": false,
|
|
811
|
+
"from": "recharts"
|
|
812
|
+
},
|
|
813
|
+
{
|
|
814
|
+
"name": "onCopy",
|
|
815
|
+
"type": "AdaptChildClipboardEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
816
|
+
"required": false,
|
|
817
|
+
"from": "recharts"
|
|
818
|
+
},
|
|
819
|
+
{
|
|
820
|
+
"name": "onCopyCapture",
|
|
821
|
+
"type": "AdaptChildClipboardEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
822
|
+
"required": false,
|
|
823
|
+
"from": "recharts"
|
|
824
|
+
},
|
|
825
|
+
{
|
|
826
|
+
"name": "onCut",
|
|
827
|
+
"type": "AdaptChildClipboardEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
828
|
+
"required": false,
|
|
829
|
+
"from": "recharts"
|
|
830
|
+
},
|
|
831
|
+
{
|
|
832
|
+
"name": "onCutCapture",
|
|
833
|
+
"type": "AdaptChildClipboardEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
834
|
+
"required": false,
|
|
835
|
+
"from": "recharts"
|
|
836
|
+
},
|
|
837
|
+
{
|
|
838
|
+
"name": "onDoubleClick",
|
|
839
|
+
"type": "AdaptChildMouseEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
840
|
+
"required": false,
|
|
841
|
+
"from": "recharts"
|
|
842
|
+
},
|
|
843
|
+
{
|
|
844
|
+
"name": "onDoubleClickCapture",
|
|
845
|
+
"type": "AdaptChildMouseEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
846
|
+
"required": false,
|
|
847
|
+
"from": "recharts"
|
|
848
|
+
},
|
|
849
|
+
{
|
|
850
|
+
"name": "onDrag",
|
|
851
|
+
"type": "AdaptChildDragEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
852
|
+
"required": false,
|
|
853
|
+
"from": "recharts"
|
|
854
|
+
},
|
|
855
|
+
{
|
|
856
|
+
"name": "onDragCapture",
|
|
857
|
+
"type": "AdaptChildDragEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
858
|
+
"required": false,
|
|
859
|
+
"from": "recharts"
|
|
860
|
+
},
|
|
861
|
+
{
|
|
862
|
+
"name": "onDragEnd",
|
|
863
|
+
"type": "AdaptChildDragEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
864
|
+
"required": false,
|
|
865
|
+
"from": "recharts"
|
|
866
|
+
},
|
|
867
|
+
{
|
|
868
|
+
"name": "onDragEndCapture",
|
|
869
|
+
"type": "AdaptChildDragEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
870
|
+
"required": false,
|
|
871
|
+
"from": "recharts"
|
|
872
|
+
},
|
|
873
|
+
{
|
|
874
|
+
"name": "onDragEnter",
|
|
875
|
+
"type": "AdaptChildDragEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
876
|
+
"required": false,
|
|
877
|
+
"from": "recharts"
|
|
878
|
+
},
|
|
879
|
+
{
|
|
880
|
+
"name": "onDragEnterCapture",
|
|
881
|
+
"type": "AdaptChildDragEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
882
|
+
"required": false,
|
|
883
|
+
"from": "recharts"
|
|
884
|
+
},
|
|
885
|
+
{
|
|
886
|
+
"name": "onDragExit",
|
|
887
|
+
"type": "AdaptChildDragEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
888
|
+
"required": false,
|
|
889
|
+
"from": "recharts"
|
|
890
|
+
},
|
|
891
|
+
{
|
|
892
|
+
"name": "onDragExitCapture",
|
|
893
|
+
"type": "AdaptChildDragEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
894
|
+
"required": false,
|
|
895
|
+
"from": "recharts"
|
|
896
|
+
},
|
|
897
|
+
{
|
|
898
|
+
"name": "onDragLeave",
|
|
899
|
+
"type": "AdaptChildDragEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
900
|
+
"required": false,
|
|
901
|
+
"from": "recharts"
|
|
902
|
+
},
|
|
903
|
+
{
|
|
904
|
+
"name": "onDragLeaveCapture",
|
|
905
|
+
"type": "AdaptChildDragEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
906
|
+
"required": false,
|
|
907
|
+
"from": "recharts"
|
|
908
|
+
},
|
|
909
|
+
{
|
|
910
|
+
"name": "onDragOver",
|
|
911
|
+
"type": "AdaptChildDragEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
912
|
+
"required": false,
|
|
913
|
+
"from": "recharts"
|
|
914
|
+
},
|
|
915
|
+
{
|
|
916
|
+
"name": "onDragOverCapture",
|
|
917
|
+
"type": "AdaptChildDragEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
918
|
+
"required": false,
|
|
919
|
+
"from": "recharts"
|
|
920
|
+
},
|
|
921
|
+
{
|
|
922
|
+
"name": "onDragStart",
|
|
923
|
+
"type": "AdaptChildDragEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
924
|
+
"required": false,
|
|
925
|
+
"from": "recharts"
|
|
926
|
+
},
|
|
927
|
+
{
|
|
928
|
+
"name": "onDragStartCapture",
|
|
929
|
+
"type": "AdaptChildDragEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
930
|
+
"required": false,
|
|
931
|
+
"from": "recharts"
|
|
932
|
+
},
|
|
933
|
+
{
|
|
934
|
+
"name": "onDrop",
|
|
935
|
+
"type": "AdaptChildDragEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
936
|
+
"required": false,
|
|
937
|
+
"from": "recharts"
|
|
938
|
+
},
|
|
939
|
+
{
|
|
940
|
+
"name": "onDropCapture",
|
|
941
|
+
"type": "AdaptChildDragEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
942
|
+
"required": false,
|
|
943
|
+
"from": "recharts"
|
|
944
|
+
},
|
|
945
|
+
{
|
|
946
|
+
"name": "onDurationChange",
|
|
947
|
+
"type": "AdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
948
|
+
"required": false,
|
|
949
|
+
"from": "recharts"
|
|
950
|
+
},
|
|
951
|
+
{
|
|
952
|
+
"name": "onDurationChangeCapture",
|
|
953
|
+
"type": "AdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
954
|
+
"required": false,
|
|
955
|
+
"from": "recharts"
|
|
956
|
+
},
|
|
957
|
+
{
|
|
958
|
+
"name": "onEmptied",
|
|
959
|
+
"type": "AdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
960
|
+
"required": false,
|
|
961
|
+
"from": "recharts"
|
|
962
|
+
},
|
|
963
|
+
{
|
|
964
|
+
"name": "onEmptiedCapture",
|
|
965
|
+
"type": "AdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
966
|
+
"required": false,
|
|
967
|
+
"from": "recharts"
|
|
968
|
+
},
|
|
969
|
+
{
|
|
970
|
+
"name": "onEncrypted",
|
|
971
|
+
"type": "AdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
972
|
+
"required": false,
|
|
973
|
+
"from": "recharts"
|
|
974
|
+
},
|
|
975
|
+
{
|
|
976
|
+
"name": "onEncryptedCapture",
|
|
977
|
+
"type": "AdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
978
|
+
"required": false,
|
|
979
|
+
"from": "recharts"
|
|
980
|
+
},
|
|
981
|
+
{
|
|
982
|
+
"name": "onEnded",
|
|
983
|
+
"type": "AdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
984
|
+
"required": false,
|
|
985
|
+
"from": "recharts"
|
|
986
|
+
},
|
|
987
|
+
{
|
|
988
|
+
"name": "onEndedCapture",
|
|
989
|
+
"type": "AdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
990
|
+
"required": false,
|
|
991
|
+
"from": "recharts"
|
|
992
|
+
},
|
|
993
|
+
{
|
|
994
|
+
"name": "onError",
|
|
995
|
+
"type": "AdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
996
|
+
"required": false,
|
|
997
|
+
"from": "recharts"
|
|
998
|
+
},
|
|
999
|
+
{
|
|
1000
|
+
"name": "onErrorCapture",
|
|
1001
|
+
"type": "AdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
1002
|
+
"required": false,
|
|
1003
|
+
"from": "recharts"
|
|
1004
|
+
},
|
|
1005
|
+
{
|
|
1006
|
+
"name": "onFocus",
|
|
1007
|
+
"type": "AdaptChildFocusEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
1008
|
+
"required": false,
|
|
1009
|
+
"description": "Focus handler.",
|
|
1010
|
+
"from": "recharts"
|
|
1011
|
+
},
|
|
1012
|
+
{
|
|
1013
|
+
"name": "onFocusCapture",
|
|
1014
|
+
"type": "AdaptChildFocusEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
1015
|
+
"required": false,
|
|
1016
|
+
"from": "recharts"
|
|
1017
|
+
},
|
|
1018
|
+
{
|
|
1019
|
+
"name": "onGotPointerCapture",
|
|
1020
|
+
"type": "AdaptChildPointerEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
1021
|
+
"required": false,
|
|
1022
|
+
"from": "recharts"
|
|
1023
|
+
},
|
|
1024
|
+
{
|
|
1025
|
+
"name": "onGotPointerCaptureCapture",
|
|
1026
|
+
"type": "AdaptChildPointerEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
1027
|
+
"required": false,
|
|
1028
|
+
"from": "recharts"
|
|
1029
|
+
},
|
|
1030
|
+
{
|
|
1031
|
+
"name": "onInput",
|
|
1032
|
+
"type": "AdaptChildFormEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
1033
|
+
"required": false,
|
|
1034
|
+
"from": "recharts"
|
|
1035
|
+
},
|
|
1036
|
+
{
|
|
1037
|
+
"name": "onInputCapture",
|
|
1038
|
+
"type": "AdaptChildFormEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
1039
|
+
"required": false,
|
|
1040
|
+
"from": "recharts"
|
|
1041
|
+
},
|
|
1042
|
+
{
|
|
1043
|
+
"name": "onInvalid",
|
|
1044
|
+
"type": "AdaptChildFormEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
1045
|
+
"required": false,
|
|
1046
|
+
"from": "recharts"
|
|
1047
|
+
},
|
|
1048
|
+
{
|
|
1049
|
+
"name": "onInvalidCapture",
|
|
1050
|
+
"type": "AdaptChildFormEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
1051
|
+
"required": false,
|
|
1052
|
+
"from": "recharts"
|
|
1053
|
+
},
|
|
1054
|
+
{
|
|
1055
|
+
"name": "onKeyDown",
|
|
1056
|
+
"type": "AdaptChildKeyboardEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
1057
|
+
"required": false,
|
|
1058
|
+
"description": "Key handler, called before the part's own key handling.",
|
|
1059
|
+
"from": "recharts"
|
|
1060
|
+
},
|
|
1061
|
+
{
|
|
1062
|
+
"name": "onKeyDownCapture",
|
|
1063
|
+
"type": "AdaptChildKeyboardEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
1064
|
+
"required": false,
|
|
1065
|
+
"from": "recharts"
|
|
1066
|
+
},
|
|
1067
|
+
{
|
|
1068
|
+
"name": "onKeyPress",
|
|
1069
|
+
"type": "AdaptChildKeyboardEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
1070
|
+
"required": false,
|
|
1071
|
+
"from": "recharts"
|
|
1072
|
+
},
|
|
1073
|
+
{
|
|
1074
|
+
"name": "onKeyPressCapture",
|
|
1075
|
+
"type": "AdaptChildKeyboardEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
1076
|
+
"required": false,
|
|
1077
|
+
"from": "recharts"
|
|
1078
|
+
},
|
|
1079
|
+
{
|
|
1080
|
+
"name": "onKeyUp",
|
|
1081
|
+
"type": "AdaptChildKeyboardEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
1082
|
+
"required": false,
|
|
1083
|
+
"from": "recharts"
|
|
1084
|
+
},
|
|
1085
|
+
{
|
|
1086
|
+
"name": "onKeyUpCapture",
|
|
1087
|
+
"type": "AdaptChildKeyboardEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
1088
|
+
"required": false,
|
|
1089
|
+
"from": "recharts"
|
|
1090
|
+
},
|
|
1091
|
+
{
|
|
1092
|
+
"name": "onLoad",
|
|
1093
|
+
"type": "AdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
1094
|
+
"required": false,
|
|
1095
|
+
"from": "recharts"
|
|
1096
|
+
},
|
|
1097
|
+
{
|
|
1098
|
+
"name": "onLoadCapture",
|
|
1099
|
+
"type": "AdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
1100
|
+
"required": false,
|
|
1101
|
+
"from": "recharts"
|
|
1102
|
+
},
|
|
1103
|
+
{
|
|
1104
|
+
"name": "onLoadedData",
|
|
1105
|
+
"type": "AdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
1106
|
+
"required": false,
|
|
1107
|
+
"from": "recharts"
|
|
1108
|
+
},
|
|
1109
|
+
{
|
|
1110
|
+
"name": "onLoadedDataCapture",
|
|
1111
|
+
"type": "AdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
1112
|
+
"required": false,
|
|
1113
|
+
"from": "recharts"
|
|
1114
|
+
},
|
|
1115
|
+
{
|
|
1116
|
+
"name": "onLoadedMetadata",
|
|
1117
|
+
"type": "AdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
1118
|
+
"required": false,
|
|
1119
|
+
"from": "recharts"
|
|
1120
|
+
},
|
|
1121
|
+
{
|
|
1122
|
+
"name": "onLoadedMetadataCapture",
|
|
1123
|
+
"type": "AdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
1124
|
+
"required": false,
|
|
1125
|
+
"from": "recharts"
|
|
1126
|
+
},
|
|
1127
|
+
{
|
|
1128
|
+
"name": "onLoadStart",
|
|
1129
|
+
"type": "AdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
1130
|
+
"required": false,
|
|
1131
|
+
"from": "recharts"
|
|
1132
|
+
},
|
|
1133
|
+
{
|
|
1134
|
+
"name": "onLoadStartCapture",
|
|
1135
|
+
"type": "AdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
1136
|
+
"required": false,
|
|
1137
|
+
"from": "recharts"
|
|
1138
|
+
},
|
|
1139
|
+
{
|
|
1140
|
+
"name": "onLostPointerCapture",
|
|
1141
|
+
"type": "AdaptChildPointerEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
1142
|
+
"required": false,
|
|
1143
|
+
"from": "recharts"
|
|
1144
|
+
},
|
|
1145
|
+
{
|
|
1146
|
+
"name": "onLostPointerCaptureCapture",
|
|
1147
|
+
"type": "AdaptChildPointerEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
1148
|
+
"required": false,
|
|
1149
|
+
"from": "recharts"
|
|
1150
|
+
},
|
|
1151
|
+
{
|
|
1152
|
+
"name": "onMouseDown",
|
|
1153
|
+
"type": "AdaptChildMouseEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
1154
|
+
"required": false,
|
|
1155
|
+
"from": "recharts"
|
|
1156
|
+
},
|
|
1157
|
+
{
|
|
1158
|
+
"name": "onMouseDownCapture",
|
|
1159
|
+
"type": "AdaptChildMouseEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
1160
|
+
"required": false,
|
|
1161
|
+
"from": "recharts"
|
|
1162
|
+
},
|
|
1163
|
+
{
|
|
1164
|
+
"name": "onMouseEnter",
|
|
1165
|
+
"type": "((data: LegendPayload, index: number, event: MouseEvent<HTMLElement, MouseEvent>) => void)",
|
|
1166
|
+
"required": false,
|
|
1167
|
+
"description": "The customized event handler of mouseenter on the items in this group",
|
|
1168
|
+
"from": "recharts"
|
|
1169
|
+
},
|
|
1170
|
+
{
|
|
1171
|
+
"name": "onMouseLeave",
|
|
1172
|
+
"type": "((data: LegendPayload, index: number, event: MouseEvent<HTMLElement, MouseEvent>) => void)",
|
|
1173
|
+
"required": false,
|
|
1174
|
+
"description": "The customized event handler of mouseleave on the items in this group",
|
|
1175
|
+
"from": "recharts"
|
|
1176
|
+
},
|
|
1177
|
+
{
|
|
1178
|
+
"name": "onMouseMove",
|
|
1179
|
+
"type": "AdaptChildMouseEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
1180
|
+
"required": false,
|
|
1181
|
+
"from": "recharts"
|
|
1182
|
+
},
|
|
1183
|
+
{
|
|
1184
|
+
"name": "onMouseMoveCapture",
|
|
1185
|
+
"type": "AdaptChildMouseEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
1186
|
+
"required": false,
|
|
1187
|
+
"from": "recharts"
|
|
1188
|
+
},
|
|
1189
|
+
{
|
|
1190
|
+
"name": "onMouseOut",
|
|
1191
|
+
"type": "AdaptChildMouseEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
1192
|
+
"required": false,
|
|
1193
|
+
"from": "recharts"
|
|
1194
|
+
},
|
|
1195
|
+
{
|
|
1196
|
+
"name": "onMouseOutCapture",
|
|
1197
|
+
"type": "AdaptChildMouseEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
1198
|
+
"required": false,
|
|
1199
|
+
"from": "recharts"
|
|
1200
|
+
},
|
|
1201
|
+
{
|
|
1202
|
+
"name": "onMouseOver",
|
|
1203
|
+
"type": "AdaptChildMouseEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
1204
|
+
"required": false,
|
|
1205
|
+
"from": "recharts"
|
|
1206
|
+
},
|
|
1207
|
+
{
|
|
1208
|
+
"name": "onMouseOverCapture",
|
|
1209
|
+
"type": "AdaptChildMouseEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
1210
|
+
"required": false,
|
|
1211
|
+
"from": "recharts"
|
|
1212
|
+
},
|
|
1213
|
+
{
|
|
1214
|
+
"name": "onMouseUp",
|
|
1215
|
+
"type": "AdaptChildMouseEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
1216
|
+
"required": false,
|
|
1217
|
+
"from": "recharts"
|
|
1218
|
+
},
|
|
1219
|
+
{
|
|
1220
|
+
"name": "onMouseUpCapture",
|
|
1221
|
+
"type": "AdaptChildMouseEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
1222
|
+
"required": false,
|
|
1223
|
+
"from": "recharts"
|
|
1224
|
+
},
|
|
1225
|
+
{
|
|
1226
|
+
"name": "onPaste",
|
|
1227
|
+
"type": "AdaptChildClipboardEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
1228
|
+
"required": false,
|
|
1229
|
+
"from": "recharts"
|
|
1230
|
+
},
|
|
1231
|
+
{
|
|
1232
|
+
"name": "onPasteCapture",
|
|
1233
|
+
"type": "AdaptChildClipboardEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
1234
|
+
"required": false,
|
|
1235
|
+
"from": "recharts"
|
|
1236
|
+
},
|
|
1237
|
+
{
|
|
1238
|
+
"name": "onPause",
|
|
1239
|
+
"type": "AdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
1240
|
+
"required": false,
|
|
1241
|
+
"from": "recharts"
|
|
1242
|
+
},
|
|
1243
|
+
{
|
|
1244
|
+
"name": "onPauseCapture",
|
|
1245
|
+
"type": "AdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
1246
|
+
"required": false,
|
|
1247
|
+
"from": "recharts"
|
|
1248
|
+
},
|
|
1249
|
+
{
|
|
1250
|
+
"name": "onPlay",
|
|
1251
|
+
"type": "AdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
1252
|
+
"required": false,
|
|
1253
|
+
"from": "recharts"
|
|
1254
|
+
},
|
|
1255
|
+
{
|
|
1256
|
+
"name": "onPlayCapture",
|
|
1257
|
+
"type": "AdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
1258
|
+
"required": false,
|
|
1259
|
+
"from": "recharts"
|
|
1260
|
+
},
|
|
1261
|
+
{
|
|
1262
|
+
"name": "onPlaying",
|
|
1263
|
+
"type": "AdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
1264
|
+
"required": false,
|
|
1265
|
+
"from": "recharts"
|
|
1266
|
+
},
|
|
1267
|
+
{
|
|
1268
|
+
"name": "onPlayingCapture",
|
|
1269
|
+
"type": "AdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
1270
|
+
"required": false,
|
|
1271
|
+
"from": "recharts"
|
|
1272
|
+
},
|
|
1273
|
+
{
|
|
1274
|
+
"name": "onPointerCancel",
|
|
1275
|
+
"type": "AdaptChildPointerEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
1276
|
+
"required": false,
|
|
1277
|
+
"from": "recharts"
|
|
1278
|
+
},
|
|
1279
|
+
{
|
|
1280
|
+
"name": "onPointerCancelCapture",
|
|
1281
|
+
"type": "AdaptChildPointerEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
1282
|
+
"required": false,
|
|
1283
|
+
"from": "recharts"
|
|
1284
|
+
},
|
|
1285
|
+
{
|
|
1286
|
+
"name": "onPointerDown",
|
|
1287
|
+
"type": "AdaptChildPointerEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
1288
|
+
"required": false,
|
|
1289
|
+
"from": "recharts"
|
|
1290
|
+
},
|
|
1291
|
+
{
|
|
1292
|
+
"name": "onPointerDownCapture",
|
|
1293
|
+
"type": "AdaptChildPointerEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
1294
|
+
"required": false,
|
|
1295
|
+
"from": "recharts"
|
|
1296
|
+
},
|
|
1297
|
+
{
|
|
1298
|
+
"name": "onPointerEnter",
|
|
1299
|
+
"type": "AdaptChildPointerEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
1300
|
+
"required": false,
|
|
1301
|
+
"from": "recharts"
|
|
1302
|
+
},
|
|
1303
|
+
{
|
|
1304
|
+
"name": "onPointerEnterCapture",
|
|
1305
|
+
"type": "AdaptChildPointerEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
1306
|
+
"required": false,
|
|
1307
|
+
"from": "recharts"
|
|
1308
|
+
},
|
|
1309
|
+
{
|
|
1310
|
+
"name": "onPointerLeave",
|
|
1311
|
+
"type": "AdaptChildPointerEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
1312
|
+
"required": false,
|
|
1313
|
+
"from": "recharts"
|
|
1314
|
+
},
|
|
1315
|
+
{
|
|
1316
|
+
"name": "onPointerLeaveCapture",
|
|
1317
|
+
"type": "AdaptChildPointerEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
1318
|
+
"required": false,
|
|
1319
|
+
"from": "recharts"
|
|
1320
|
+
},
|
|
1321
|
+
{
|
|
1322
|
+
"name": "onPointerMove",
|
|
1323
|
+
"type": "AdaptChildPointerEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
1324
|
+
"required": false,
|
|
1325
|
+
"from": "recharts"
|
|
1326
|
+
},
|
|
1327
|
+
{
|
|
1328
|
+
"name": "onPointerMoveCapture",
|
|
1329
|
+
"type": "AdaptChildPointerEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
1330
|
+
"required": false,
|
|
1331
|
+
"from": "recharts"
|
|
1332
|
+
},
|
|
1333
|
+
{
|
|
1334
|
+
"name": "onPointerOut",
|
|
1335
|
+
"type": "AdaptChildPointerEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
1336
|
+
"required": false,
|
|
1337
|
+
"from": "recharts"
|
|
1338
|
+
},
|
|
1339
|
+
{
|
|
1340
|
+
"name": "onPointerOutCapture",
|
|
1341
|
+
"type": "AdaptChildPointerEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
1342
|
+
"required": false,
|
|
1343
|
+
"from": "recharts"
|
|
1344
|
+
},
|
|
1345
|
+
{
|
|
1346
|
+
"name": "onPointerOver",
|
|
1347
|
+
"type": "AdaptChildPointerEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
1348
|
+
"required": false,
|
|
1349
|
+
"from": "recharts"
|
|
1350
|
+
},
|
|
1351
|
+
{
|
|
1352
|
+
"name": "onPointerOverCapture",
|
|
1353
|
+
"type": "AdaptChildPointerEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
1354
|
+
"required": false,
|
|
1355
|
+
"from": "recharts"
|
|
1356
|
+
},
|
|
1357
|
+
{
|
|
1358
|
+
"name": "onPointerUp",
|
|
1359
|
+
"type": "AdaptChildPointerEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
1360
|
+
"required": false,
|
|
1361
|
+
"from": "recharts"
|
|
1362
|
+
},
|
|
1363
|
+
{
|
|
1364
|
+
"name": "onPointerUpCapture",
|
|
1365
|
+
"type": "AdaptChildPointerEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
1366
|
+
"required": false,
|
|
1367
|
+
"from": "recharts"
|
|
1368
|
+
},
|
|
1369
|
+
{
|
|
1370
|
+
"name": "onProgress",
|
|
1371
|
+
"type": "AdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
1372
|
+
"required": false,
|
|
1373
|
+
"from": "recharts"
|
|
1374
|
+
},
|
|
1375
|
+
{
|
|
1376
|
+
"name": "onProgressCapture",
|
|
1377
|
+
"type": "AdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
1378
|
+
"required": false,
|
|
1379
|
+
"from": "recharts"
|
|
1380
|
+
},
|
|
1381
|
+
{
|
|
1382
|
+
"name": "onRateChange",
|
|
1383
|
+
"type": "AdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
1384
|
+
"required": false,
|
|
1385
|
+
"from": "recharts"
|
|
1386
|
+
},
|
|
1387
|
+
{
|
|
1388
|
+
"name": "onRateChangeCapture",
|
|
1389
|
+
"type": "AdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
1390
|
+
"required": false,
|
|
1391
|
+
"from": "recharts"
|
|
1392
|
+
},
|
|
1393
|
+
{
|
|
1394
|
+
"name": "onReset",
|
|
1395
|
+
"type": "AdaptChildFormEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
1396
|
+
"required": false,
|
|
1397
|
+
"from": "recharts"
|
|
1398
|
+
},
|
|
1399
|
+
{
|
|
1400
|
+
"name": "onResetCapture",
|
|
1401
|
+
"type": "AdaptChildFormEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
1402
|
+
"required": false,
|
|
1403
|
+
"from": "recharts"
|
|
1404
|
+
},
|
|
1405
|
+
{
|
|
1406
|
+
"name": "onScroll",
|
|
1407
|
+
"type": "AdaptChildUIEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
1408
|
+
"required": false,
|
|
1409
|
+
"from": "recharts"
|
|
1410
|
+
},
|
|
1411
|
+
{
|
|
1412
|
+
"name": "onScrollCapture",
|
|
1413
|
+
"type": "AdaptChildUIEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
1414
|
+
"required": false,
|
|
1415
|
+
"from": "recharts"
|
|
1416
|
+
},
|
|
1417
|
+
{
|
|
1418
|
+
"name": "onSeeked",
|
|
1419
|
+
"type": "AdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
1420
|
+
"required": false,
|
|
1421
|
+
"from": "recharts"
|
|
1422
|
+
},
|
|
1423
|
+
{
|
|
1424
|
+
"name": "onSeekedCapture",
|
|
1425
|
+
"type": "AdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
1426
|
+
"required": false,
|
|
1427
|
+
"from": "recharts"
|
|
1428
|
+
},
|
|
1429
|
+
{
|
|
1430
|
+
"name": "onSeeking",
|
|
1431
|
+
"type": "AdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
1432
|
+
"required": false,
|
|
1433
|
+
"from": "recharts"
|
|
1434
|
+
},
|
|
1435
|
+
{
|
|
1436
|
+
"name": "onSeekingCapture",
|
|
1437
|
+
"type": "AdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
1438
|
+
"required": false,
|
|
1439
|
+
"from": "recharts"
|
|
1440
|
+
},
|
|
1441
|
+
{
|
|
1442
|
+
"name": "onSelect",
|
|
1443
|
+
"type": "AdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
1444
|
+
"required": false,
|
|
1445
|
+
"description": "Called when an item is selected.",
|
|
1446
|
+
"from": "recharts"
|
|
1447
|
+
},
|
|
1448
|
+
{
|
|
1449
|
+
"name": "onSelectCapture",
|
|
1450
|
+
"type": "AdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
1451
|
+
"required": false,
|
|
1452
|
+
"from": "recharts"
|
|
1453
|
+
},
|
|
1454
|
+
{
|
|
1455
|
+
"name": "onStalled",
|
|
1456
|
+
"type": "AdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
1457
|
+
"required": false,
|
|
1458
|
+
"from": "recharts"
|
|
1459
|
+
},
|
|
1460
|
+
{
|
|
1461
|
+
"name": "onStalledCapture",
|
|
1462
|
+
"type": "AdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
1463
|
+
"required": false,
|
|
1464
|
+
"from": "recharts"
|
|
1465
|
+
},
|
|
1466
|
+
{
|
|
1467
|
+
"name": "onSubmit",
|
|
1468
|
+
"type": "AdaptChildFormEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
1469
|
+
"required": false,
|
|
1470
|
+
"from": "recharts"
|
|
1471
|
+
},
|
|
1472
|
+
{
|
|
1473
|
+
"name": "onSubmitCapture",
|
|
1474
|
+
"type": "AdaptChildFormEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
1475
|
+
"required": false,
|
|
1476
|
+
"from": "recharts"
|
|
1477
|
+
},
|
|
1478
|
+
{
|
|
1479
|
+
"name": "onSuspend",
|
|
1480
|
+
"type": "AdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
1481
|
+
"required": false,
|
|
1482
|
+
"from": "recharts"
|
|
1483
|
+
},
|
|
1484
|
+
{
|
|
1485
|
+
"name": "onSuspendCapture",
|
|
1486
|
+
"type": "AdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
1487
|
+
"required": false,
|
|
1488
|
+
"from": "recharts"
|
|
1489
|
+
},
|
|
1490
|
+
{
|
|
1491
|
+
"name": "onTimeUpdate",
|
|
1492
|
+
"type": "AdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
1493
|
+
"required": false,
|
|
1494
|
+
"from": "recharts"
|
|
1495
|
+
},
|
|
1496
|
+
{
|
|
1497
|
+
"name": "onTimeUpdateCapture",
|
|
1498
|
+
"type": "AdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
1499
|
+
"required": false,
|
|
1500
|
+
"from": "recharts"
|
|
1501
|
+
},
|
|
1502
|
+
{
|
|
1503
|
+
"name": "onTouchCancel",
|
|
1504
|
+
"type": "AdaptChildTouchEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
1505
|
+
"required": false,
|
|
1506
|
+
"from": "recharts"
|
|
1507
|
+
},
|
|
1508
|
+
{
|
|
1509
|
+
"name": "onTouchCancelCapture",
|
|
1510
|
+
"type": "AdaptChildTouchEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
1511
|
+
"required": false,
|
|
1512
|
+
"from": "recharts"
|
|
1513
|
+
},
|
|
1514
|
+
{
|
|
1515
|
+
"name": "onTouchEnd",
|
|
1516
|
+
"type": "AdaptChildTouchEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
1517
|
+
"required": false,
|
|
1518
|
+
"from": "recharts"
|
|
1519
|
+
},
|
|
1520
|
+
{
|
|
1521
|
+
"name": "onTouchEndCapture",
|
|
1522
|
+
"type": "AdaptChildTouchEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
1523
|
+
"required": false,
|
|
1524
|
+
"from": "recharts"
|
|
1525
|
+
},
|
|
1526
|
+
{
|
|
1527
|
+
"name": "onTouchMove",
|
|
1528
|
+
"type": "AdaptChildTouchEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
1529
|
+
"required": false,
|
|
1530
|
+
"from": "recharts"
|
|
1531
|
+
},
|
|
1532
|
+
{
|
|
1533
|
+
"name": "onTouchMoveCapture",
|
|
1534
|
+
"type": "AdaptChildTouchEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
1535
|
+
"required": false,
|
|
1536
|
+
"from": "recharts"
|
|
1537
|
+
},
|
|
1538
|
+
{
|
|
1539
|
+
"name": "onTouchStart",
|
|
1540
|
+
"type": "AdaptChildTouchEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
1541
|
+
"required": false,
|
|
1542
|
+
"from": "recharts"
|
|
1543
|
+
},
|
|
1544
|
+
{
|
|
1545
|
+
"name": "onTouchStartCapture",
|
|
1546
|
+
"type": "AdaptChildTouchEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
1547
|
+
"required": false,
|
|
1548
|
+
"from": "recharts"
|
|
1549
|
+
},
|
|
1550
|
+
{
|
|
1551
|
+
"name": "onTransitionEnd",
|
|
1552
|
+
"type": "AdaptChildTransitionEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
1553
|
+
"required": false,
|
|
1554
|
+
"from": "recharts"
|
|
1555
|
+
},
|
|
1556
|
+
{
|
|
1557
|
+
"name": "onTransitionEndCapture",
|
|
1558
|
+
"type": "AdaptChildTransitionEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
1559
|
+
"required": false,
|
|
1560
|
+
"from": "recharts"
|
|
1561
|
+
},
|
|
1562
|
+
{
|
|
1563
|
+
"name": "onVolumeChange",
|
|
1564
|
+
"type": "AdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
1565
|
+
"required": false,
|
|
1566
|
+
"from": "recharts"
|
|
1567
|
+
},
|
|
1568
|
+
{
|
|
1569
|
+
"name": "onVolumeChangeCapture",
|
|
1570
|
+
"type": "AdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
1571
|
+
"required": false,
|
|
1572
|
+
"from": "recharts"
|
|
1573
|
+
},
|
|
1574
|
+
{
|
|
1575
|
+
"name": "onWaiting",
|
|
1576
|
+
"type": "AdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
1577
|
+
"required": false,
|
|
1578
|
+
"from": "recharts"
|
|
1579
|
+
},
|
|
1580
|
+
{
|
|
1581
|
+
"name": "onWaitingCapture",
|
|
1582
|
+
"type": "AdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
1583
|
+
"required": false,
|
|
1584
|
+
"from": "recharts"
|
|
1585
|
+
},
|
|
1586
|
+
{
|
|
1587
|
+
"name": "onWheel",
|
|
1588
|
+
"type": "AdaptChildWheelEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
1589
|
+
"required": false,
|
|
1590
|
+
"from": "recharts"
|
|
1591
|
+
},
|
|
1592
|
+
{
|
|
1593
|
+
"name": "onWheelCapture",
|
|
1594
|
+
"type": "AdaptChildWheelEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
1595
|
+
"required": false,
|
|
1596
|
+
"from": "recharts"
|
|
1597
|
+
},
|
|
1598
|
+
{
|
|
1599
|
+
"name": "payloadUniqBy",
|
|
1600
|
+
"type": "UniqueOption<LegendPayload>",
|
|
1601
|
+
"required": false,
|
|
1602
|
+
"from": "recharts"
|
|
1603
|
+
},
|
|
1604
|
+
{
|
|
1605
|
+
"name": "portal",
|
|
1606
|
+
"type": "HTMLElement | null",
|
|
1607
|
+
"required": false,
|
|
1608
|
+
"description": "If portal is defined, then Legend will use this element as a target\nfor rendering using React Portal.\n\nIf this is undefined then Legend renders inside the recharts-wrapper element.",
|
|
1609
|
+
"from": "recharts"
|
|
1610
|
+
},
|
|
1611
|
+
{
|
|
1612
|
+
"name": "position",
|
|
1613
|
+
"type": "CartesianPosition",
|
|
1614
|
+
"required": false,
|
|
1615
|
+
"description": "The position of the legend relative to the chart.\nIf this is defined, it overrides `align` and `verticalAlign`.",
|
|
1616
|
+
"from": "recharts"
|
|
1617
|
+
},
|
|
1618
|
+
{
|
|
1619
|
+
"name": "verticalAlign",
|
|
1620
|
+
"type": "VerticalAlignmentType",
|
|
1621
|
+
"required": false,
|
|
1622
|
+
"from": "recharts"
|
|
1623
|
+
},
|
|
1624
|
+
{
|
|
1625
|
+
"name": "width",
|
|
1626
|
+
"type": "string | number",
|
|
1627
|
+
"required": false,
|
|
1628
|
+
"description": "Width of the legend.\nAccept CSS style string values like `100%` or `fit-content`, or number values like `400`.",
|
|
1629
|
+
"from": "recharts"
|
|
1630
|
+
},
|
|
1631
|
+
{
|
|
1632
|
+
"name": "wrapperStyle",
|
|
1633
|
+
"type": "CSSProperties",
|
|
1634
|
+
"required": false,
|
|
1635
|
+
"description": "CSS styles to be applied to the wrapper `div` element.",
|
|
1636
|
+
"from": "recharts"
|
|
1637
|
+
}
|
|
1638
|
+
]
|
|
1639
|
+
},
|
|
1640
|
+
{
|
|
1641
|
+
"name": "ChartLegendContent",
|
|
1642
|
+
"props": [
|
|
1643
|
+
{
|
|
1644
|
+
"name": "hideIcon",
|
|
1645
|
+
"type": "boolean",
|
|
1646
|
+
"required": false,
|
|
1647
|
+
"default": "false",
|
|
1648
|
+
"description": "Hide the series icon.",
|
|
1649
|
+
"from": "arkcn"
|
|
1650
|
+
},
|
|
1651
|
+
{
|
|
1652
|
+
"name": "nameKey",
|
|
1653
|
+
"type": "string",
|
|
1654
|
+
"required": false,
|
|
1655
|
+
"description": "Data key used for the series name.",
|
|
1656
|
+
"from": "arkcn"
|
|
1657
|
+
},
|
|
1658
|
+
{
|
|
1659
|
+
"name": "align",
|
|
1660
|
+
"type": "HorizontalAlignmentType",
|
|
1661
|
+
"required": false,
|
|
1662
|
+
"description": "Alignment along the side.",
|
|
1663
|
+
"from": "recharts"
|
|
1664
|
+
},
|
|
1665
|
+
{
|
|
1666
|
+
"name": "children",
|
|
1667
|
+
"type": "ReactNode",
|
|
1668
|
+
"required": false,
|
|
1669
|
+
"description": "Content rendered inside the part.",
|
|
1670
|
+
"from": "@types/react"
|
|
1671
|
+
},
|
|
1672
|
+
{
|
|
1673
|
+
"name": "className",
|
|
1674
|
+
"type": "string",
|
|
1675
|
+
"required": false,
|
|
1676
|
+
"description": "Extra classes merged into the part's own classes with `cn`.",
|
|
1677
|
+
"from": "@types/react"
|
|
1678
|
+
},
|
|
1679
|
+
{
|
|
1680
|
+
"name": "formatter",
|
|
1681
|
+
"type": "Formatter",
|
|
1682
|
+
"required": false,
|
|
1683
|
+
"description": "Function to customize how content is serialized before rendering.\n\nThis should return HTML elements, or strings.",
|
|
1684
|
+
"from": "recharts"
|
|
1685
|
+
},
|
|
1686
|
+
{
|
|
1687
|
+
"name": "iconSize",
|
|
1688
|
+
"type": "number",
|
|
1689
|
+
"required": false,
|
|
1690
|
+
"description": "The size of icon in each legend item.",
|
|
1691
|
+
"from": "recharts"
|
|
1692
|
+
},
|
|
1693
|
+
{
|
|
1694
|
+
"name": "iconType",
|
|
1695
|
+
"type": "LegendType",
|
|
1696
|
+
"required": false,
|
|
1697
|
+
"description": "The type of icon in each legend item.",
|
|
1698
|
+
"from": "recharts"
|
|
1699
|
+
},
|
|
1700
|
+
{
|
|
1701
|
+
"name": "inactiveColor",
|
|
1702
|
+
"type": "string",
|
|
1703
|
+
"required": false,
|
|
1704
|
+
"description": "The color of the icon when the item is inactive.",
|
|
1705
|
+
"from": "recharts"
|
|
1706
|
+
},
|
|
1707
|
+
{
|
|
1708
|
+
"name": "labelStyle",
|
|
1709
|
+
"type": "CSSProperties",
|
|
1710
|
+
"required": false,
|
|
1711
|
+
"description": "Style of individual items inside the Legend, a `<span>` element.\nThese show the data label (name, or dataKey) and value.\n\nIf a chart has multiple graphical items then the Legend renders multiple item\nand each of them gets this itemStyle applied.\n\nPie charts render multiple labels from a single data series.\n\nNote that this is different from {@link Tooltip }:\n- in Tooltip: \"labelStyle\" styles the title / header\n- in Tooltip: \"itemStyle\" styles the individual data points\n- in Legend: \"labelStyle\" styles the individual data points\n\nBeware of the naming inconsistency!",
|
|
1712
|
+
"from": "recharts"
|
|
1713
|
+
},
|
|
1714
|
+
{
|
|
1715
|
+
"name": "layout",
|
|
1716
|
+
"type": "CartesianLayout",
|
|
1717
|
+
"required": false,
|
|
1718
|
+
"description": "The layout of legend items inside the legend container.",
|
|
1719
|
+
"from": "recharts"
|
|
1720
|
+
},
|
|
1721
|
+
{
|
|
1722
|
+
"name": "onPointerEnterCapture",
|
|
1723
|
+
"type": "AdaptChildPointerEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
1724
|
+
"required": false,
|
|
1725
|
+
"from": "recharts"
|
|
1726
|
+
},
|
|
1727
|
+
{
|
|
1728
|
+
"name": "onPointerLeaveCapture",
|
|
1729
|
+
"type": "AdaptChildPointerEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>",
|
|
1730
|
+
"required": false,
|
|
1731
|
+
"from": "recharts"
|
|
1732
|
+
},
|
|
1733
|
+
{
|
|
1734
|
+
"name": "payload",
|
|
1735
|
+
"type": "readonly LegendPayload[]",
|
|
1736
|
+
"required": false,
|
|
1737
|
+
"description": "DefaultLegendContent.payload is omitted from Legend props.\nA custom payload can be passed here if desired, or it can be passed from the Legend \"content\" callback.",
|
|
1738
|
+
"from": "recharts"
|
|
1739
|
+
},
|
|
1740
|
+
{
|
|
1741
|
+
"name": "style",
|
|
1742
|
+
"type": "CSSProperties",
|
|
1743
|
+
"required": false,
|
|
1744
|
+
"description": "Inline styles applied to the rendered element.",
|
|
1745
|
+
"from": "@types/react"
|
|
1746
|
+
},
|
|
1747
|
+
{
|
|
1748
|
+
"name": "verticalAlign",
|
|
1749
|
+
"type": "VerticalAlignmentType",
|
|
1750
|
+
"required": false,
|
|
1751
|
+
"default": "\"bottom\"",
|
|
1752
|
+
"from": "recharts"
|
|
1753
|
+
}
|
|
1754
|
+
]
|
|
1755
|
+
},
|
|
1756
|
+
{
|
|
1757
|
+
"name": "ChartStyle",
|
|
1758
|
+
"props": [
|
|
1759
|
+
{
|
|
1760
|
+
"name": "config",
|
|
1761
|
+
"type": "ChartConfig",
|
|
1762
|
+
"required": true,
|
|
1763
|
+
"description": "Series config: label, icon, and color (or theme colors) per data key; exposed as `--color-<key>`.",
|
|
1764
|
+
"from": "arkcn"
|
|
1765
|
+
},
|
|
1766
|
+
{
|
|
1767
|
+
"name": "id",
|
|
1768
|
+
"type": "string",
|
|
1769
|
+
"required": true,
|
|
1770
|
+
"description": "Unique id for the generated style element.",
|
|
1771
|
+
"from": "arkcn"
|
|
1772
|
+
}
|
|
1773
|
+
]
|
|
1774
|
+
}
|
|
1775
|
+
],
|
|
13
1776
|
"dependencies": {
|
|
14
1777
|
"recharts": "^3.8.0"
|
|
15
1778
|
},
|
|
@@ -19,7 +1782,7 @@
|
|
|
19
1782
|
"files": [
|
|
20
1783
|
{
|
|
21
1784
|
"path": "components/ui/chart.tsx",
|
|
22
|
-
"content": "\"use client\"\n\nimport * as React from \"react\"\nimport { cn } from \"@/lib/utils\"\nimport * as RechartsPrimitive from \"recharts\"\nimport type { TooltipValueType } from \"recharts\"\n\n// Format: { THEME_NAME: CSS_SELECTOR }\nconst THEMES = { light: \"\", dark: \".dark\" } as const\n\nconst INITIAL_DIMENSION = { width: 320, height: 200 } as const\ntype TooltipNameType = number | string\n\nexport type ChartConfig = Record<\n string,\n {\n label?: React.ReactNode\n icon?: React.ComponentType\n } & ({ color?: string; theme?: never } | { color?: never; theme: Record<keyof typeof THEMES, string> })\n>\n\ntype ChartContextProps = {\n config: ChartConfig\n}\n\nconst ChartContext = React.createContext<ChartContextProps | null>(null)\n\nfunction useChart() {\n const context = React.useContext(ChartContext)\n\n if (!context) {\n throw new Error(\"useChart must be used within a <ChartContainer />\")\n }\n\n return context\n}\n\nfunction ChartContainer({\n id,\n className,\n children,\n config,\n initialDimension = INITIAL_DIMENSION,\n ...props\n}: React.ComponentProps<\"div\"> & {\n config: ChartConfig\n children: React.ComponentProps<typeof RechartsPrimitive.ResponsiveContainer>[\"children\"]\n initialDimension?: {\n width: number\n height: number\n }\n}) {\n const uniqueId = React.useId()\n const chartId = `chart-${id ?? uniqueId.replace(/:/g, \"\")}`\n\n return (\n <ChartContext.Provider value={{ config }}>\n <div\n data-slot=\"chart\"\n data-chart={chartId}\n className={cn(\n \"flex aspect-video justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-hidden [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-sector]:outline-hidden [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-hidden\",\n className\n )}\n {...props}\n >\n <ChartStyle id={chartId} config={config} />\n <RechartsPrimitive.ResponsiveContainer initialDimension={initialDimension}>\n {children}\n </RechartsPrimitive.ResponsiveContainer>\n </div>\n </ChartContext.Provider>\n )\n}\n\nconst ChartStyle = ({ id, config }: { id: string; config: ChartConfig }) => {\n const colorConfig = Object.entries(config).filter(([, config]) => config.theme ?? config.color)\n\n if (!colorConfig.length) {\n return null\n }\n\n return (\n <style\n dangerouslySetInnerHTML={{\n __html: Object.entries(THEMES)\n .map(\n ([theme, prefix]) => `\n${prefix} [data-chart=${id}] {\n${colorConfig\n .map(([key, itemConfig]) => {\n const color = itemConfig.theme?.[theme as keyof typeof itemConfig.theme] ?? itemConfig.color\n return color ? ` --color-${key}: ${color};` : null\n })\n .join(\"\\n\")}\n}\n`\n )\n .join(\"\\n\"),\n }}\n />\n )\n}\n\nconst ChartTooltip = RechartsPrimitive.Tooltip\n\nfunction ChartTooltipContent({\n active,\n payload,\n className,\n indicator = \"dot\",\n hideLabel = false,\n hideIndicator = false,\n label,\n labelFormatter,\n labelClassName,\n formatter,\n color,\n nameKey,\n labelKey,\n}: React.ComponentProps<typeof RechartsPrimitive.Tooltip> &\n React.ComponentProps<\"div\"> & {\n hideLabel?: boolean\n hideIndicator?: boolean\n indicator?: \"line\" | \"dot\" | \"dashed\"\n nameKey?: string\n labelKey?: string\n } & Omit<RechartsPrimitive.DefaultTooltipContentProps<TooltipValueType, TooltipNameType>, \"accessibilityLayer\">) {\n const { config } = useChart()\n\n const tooltipLabel = React.useMemo(() => {\n if (hideLabel || !payload?.length) {\n return null\n }\n\n const [item] = payload\n const key = `${labelKey ?? item?.dataKey ?? item?.name ?? \"value\"}`\n const itemConfig = getPayloadConfigFromPayload(config, item, key)\n const value = !labelKey && typeof label === \"string\" ? (config[label]?.label ?? label) : itemConfig?.label\n\n if (labelFormatter) {\n return <div className={cn(\"font-medium\", labelClassName)}>{labelFormatter(value, payload)}</div>\n }\n\n if (!value) {\n return null\n }\n\n return <div className={cn(\"font-medium\", labelClassName)}>{value}</div>\n }, [label, labelFormatter, payload, hideLabel, labelClassName, config, labelKey])\n\n if (!active || !payload?.length) {\n return null\n }\n\n const nestLabel = payload.length === 1 && indicator !== \"dot\"\n\n return (\n <div\n className={cn(\n \"grid min-w-32 items-start gap-1.5 rounded-lg border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl\",\n className\n )}\n >\n {!nestLabel ? tooltipLabel : null}\n <div className=\"grid gap-1.5\">\n {payload\n .filter((item) => item.type !== \"none\")\n .map((item, index) => {\n const key = `${nameKey ?? item.name ?? item.dataKey ?? \"value\"}`\n const itemConfig = getPayloadConfigFromPayload(config, item, key)\n const indicatorColor = color ?? item.payload?.fill ?? item.color\n\n return (\n <div\n key={index}\n className={cn(\n \"flex w-full flex-wrap items-stretch gap-2 [&>svg]:size-2.5 [&>svg]:text-muted-foreground\",\n indicator === \"dot\" && \"items-center\"\n )}\n >\n {formatter && item?.value !== undefined && item.name ? (\n formatter(item.value, item.name, item, index, item.payload)\n ) : (\n <>\n {itemConfig?.icon ? (\n <itemConfig.icon />\n ) : (\n !hideIndicator && (\n <div\n className={cn(\"shrink-0 rounded-xs border-border bg-(--color-bg)\", {\n \"size-2.5\": indicator === \"dot\",\n \"w-1\": indicator === \"line\",\n \"w-0 border-[1.5px] border-dashed bg-transparent\": indicator === \"dashed\",\n \"my-0.5\": nestLabel && indicator === \"dashed\",\n })}\n style={\n {\n \"--color-bg\": indicatorColor,\n \"--color-border\": indicatorColor,\n } as React.CSSProperties\n }\n />\n )\n )}\n <div\n className={cn(\n \"flex flex-1 justify-between leading-none\",\n nestLabel ? \"items-end\" : \"items-center\"\n )}\n >\n <div className=\"grid gap-1.5\">\n {nestLabel ? tooltipLabel : null}\n <span className=\"text-muted-foreground\">{itemConfig?.label ?? item.name}</span>\n </div>\n {item.value != null && (\n <span className=\"font-mono font-medium text-foreground tabular-nums\">\n {typeof item.value === \"number\" ? item.value.toLocaleString() : String(item.value)}\n </span>\n )}\n </div>\n </>\n )}\n </div>\n )\n })}\n </div>\n </div>\n )\n}\n\nconst ChartLegend = RechartsPrimitive.Legend\n\nfunction ChartLegendContent({\n className,\n hideIcon = false,\n payload,\n verticalAlign = \"bottom\",\n nameKey,\n}: React.ComponentProps<\"div\"> & {\n hideIcon?: boolean\n nameKey?: string\n} & RechartsPrimitive.DefaultLegendContentProps) {\n const { config } = useChart()\n\n if (!payload?.length) {\n return null\n }\n\n return (\n <div className={cn(\"flex items-center justify-center gap-4\", verticalAlign === \"top\" ? \"pb-3\" : \"pt-3\", className)}>\n {payload\n .filter((item) => item.type !== \"none\")\n .map((item, index) => {\n const key = `${nameKey ?? item.dataKey ?? \"value\"}`\n const itemConfig = getPayloadConfigFromPayload(config, item, key)\n\n return (\n <div key={index} className={cn(\"flex items-center gap-1.5 [&>svg]:size-3 [&>svg]:text-muted-foreground\")}>\n {itemConfig?.icon && !hideIcon ? (\n <itemConfig.icon />\n ) : (\n <div\n className=\"size-2 shrink-0 rounded-xs\"\n style={{\n backgroundColor: item.color,\n }}\n />\n )}\n {itemConfig?.label}\n </div>\n )\n })}\n </div>\n )\n}\n\nfunction getPayloadConfigFromPayload(config: ChartConfig, payload: unknown, key: string) {\n if (typeof payload !== \"object\" || payload === null) {\n return undefined\n }\n\n const payloadPayload =\n \"payload\" in payload && typeof payload.payload === \"object\" && payload.payload !== null\n ? payload.payload\n : undefined\n\n let configLabelKey: string = key\n\n if (key in payload && typeof payload[key as keyof typeof payload] === \"string\") {\n configLabelKey = payload[key as keyof typeof payload] as string\n } else if (\n payloadPayload &&\n key in payloadPayload &&\n typeof payloadPayload[key as keyof typeof payloadPayload] === \"string\"\n ) {\n configLabelKey = payloadPayload[key as keyof typeof payloadPayload] as string\n }\n\n return configLabelKey in config ? config[configLabelKey] : config[key]\n}\n\nexport { ChartContainer, ChartTooltip, ChartTooltipContent, ChartLegend, ChartLegendContent, ChartStyle }\n"
|
|
1785
|
+
"content": "\"use client\"\n\nimport * as React from \"react\"\nimport { cn } from \"@/lib/utils\"\nimport * as RechartsPrimitive from \"recharts\"\nimport type { TooltipValueType } from \"recharts\"\n\n// Format: { THEME_NAME: CSS_SELECTOR }\nconst THEMES = { light: \"\", dark: \".dark\" } as const\n\nconst INITIAL_DIMENSION = { width: 320, height: 200 } as const\ntype TooltipNameType = number | string\n\nexport type ChartConfig = Record<\n string,\n {\n label?: React.ReactNode\n icon?: React.ComponentType\n } & ({ color?: string; theme?: never } | { color?: never; theme: Record<keyof typeof THEMES, string> })\n>\n\ntype ChartContextProps = {\n /** Series config: label, icon, and color (or theme colors) per data key; exposed as `--color-<key>`. */\n config: ChartConfig\n}\n\nconst ChartContext = React.createContext<ChartContextProps | null>(null)\n\nfunction useChart() {\n const context = React.useContext(ChartContext)\n\n if (!context) {\n throw new Error(\"useChart must be used within a <ChartContainer />\")\n }\n\n return context\n}\n\nfunction ChartContainer({\n id,\n className,\n children,\n config,\n initialDimension = INITIAL_DIMENSION,\n ...props\n}: React.ComponentProps<\"div\"> & {\n /** Series config: label, icon, and color (or theme colors) per data key; exposed as `--color-<key>`. */\n config: ChartConfig\n children: React.ComponentProps<typeof RechartsPrimitive.ResponsiveContainer>[\"children\"]\n /** Width and height used before the container measures itself. */\n initialDimension?: {\n width: number\n height: number\n }\n}) {\n const uniqueId = React.useId()\n const chartId = `chart-${id ?? uniqueId.replace(/:/g, \"\")}`\n\n return (\n <ChartContext.Provider value={{ config }}>\n <div\n data-slot=\"chart\"\n data-chart={chartId}\n className={cn(\n \"flex aspect-video justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-hidden [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-sector]:outline-hidden [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-hidden\",\n className\n )}\n {...props}\n >\n <ChartStyle id={chartId} config={config} />\n <RechartsPrimitive.ResponsiveContainer initialDimension={initialDimension}>\n {children}\n </RechartsPrimitive.ResponsiveContainer>\n </div>\n </ChartContext.Provider>\n )\n}\n\nconst ChartStyle = ({ id, config }: { id: string; config: ChartConfig }) => {\n const colorConfig = Object.entries(config).filter(([, config]) => config.theme ?? config.color)\n\n if (!colorConfig.length) {\n return null\n }\n\n return (\n <style\n dangerouslySetInnerHTML={{\n __html: Object.entries(THEMES)\n .map(\n ([theme, prefix]) => `\n${prefix} [data-chart=${id}] {\n${colorConfig\n .map(([key, itemConfig]) => {\n const color = itemConfig.theme?.[theme as keyof typeof itemConfig.theme] ?? itemConfig.color\n return color ? ` --color-${key}: ${color};` : null\n })\n .join(\"\\n\")}\n}\n`\n )\n .join(\"\\n\"),\n }}\n />\n )\n}\n\nconst ChartTooltip = RechartsPrimitive.Tooltip\n\nfunction ChartTooltipContent({\n active,\n payload,\n className,\n indicator = \"dot\",\n hideLabel = false,\n hideIndicator = false,\n label,\n labelFormatter,\n labelClassName,\n formatter,\n color,\n nameKey,\n labelKey,\n}: React.ComponentProps<typeof RechartsPrimitive.Tooltip> &\n React.ComponentProps<\"div\"> & {\n /** Hide the tooltip label. */\n hideLabel?: boolean\n /** Hide the color indicator in each row. */\n hideIndicator?: boolean\n /** Indicator style: `dot`, `line`, or `dashed`. */\n indicator?: \"line\" | \"dot\" | \"dashed\"\n /** Data key used for the series name. */\n nameKey?: string\n /** Data key used for the tooltip label. */\n labelKey?: string\n } & Omit<RechartsPrimitive.DefaultTooltipContentProps<TooltipValueType, TooltipNameType>, \"accessibilityLayer\">) {\n const { config } = useChart()\n\n const tooltipLabel = React.useMemo(() => {\n if (hideLabel || !payload?.length) {\n return null\n }\n\n const [item] = payload\n const key = `${labelKey ?? item?.dataKey ?? item?.name ?? \"value\"}`\n const itemConfig = getPayloadConfigFromPayload(config, item, key)\n const value = !labelKey && typeof label === \"string\" ? (config[label]?.label ?? label) : itemConfig?.label\n\n if (labelFormatter) {\n return <div className={cn(\"font-medium\", labelClassName)}>{labelFormatter(value, payload)}</div>\n }\n\n if (!value) {\n return null\n }\n\n return <div className={cn(\"font-medium\", labelClassName)}>{value}</div>\n }, [label, labelFormatter, payload, hideLabel, labelClassName, config, labelKey])\n\n if (!active || !payload?.length) {\n return null\n }\n\n const nestLabel = payload.length === 1 && indicator !== \"dot\"\n\n return (\n <div\n className={cn(\n \"grid min-w-32 items-start gap-1.5 rounded-lg border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl\",\n className\n )}\n >\n {!nestLabel ? tooltipLabel : null}\n <div className=\"grid gap-1.5\">\n {payload\n .filter((item) => item.type !== \"none\")\n .map((item, index) => {\n const key = `${nameKey ?? item.name ?? item.dataKey ?? \"value\"}`\n const itemConfig = getPayloadConfigFromPayload(config, item, key)\n const indicatorColor = color ?? item.payload?.fill ?? item.color\n\n return (\n <div\n key={index}\n className={cn(\n \"flex w-full flex-wrap items-stretch gap-2 [&>svg]:size-2.5 [&>svg]:text-muted-foreground\",\n indicator === \"dot\" && \"items-center\"\n )}\n >\n {formatter && item?.value !== undefined && item.name ? (\n formatter(item.value, item.name, item, index, item.payload)\n ) : (\n <>\n {itemConfig?.icon ? (\n <itemConfig.icon />\n ) : (\n !hideIndicator && (\n <div\n className={cn(\"shrink-0 rounded-xs border-border bg-(--color-bg)\", {\n \"size-2.5\": indicator === \"dot\",\n \"w-1\": indicator === \"line\",\n \"w-0 border-[1.5px] border-dashed bg-transparent\": indicator === \"dashed\",\n \"my-0.5\": nestLabel && indicator === \"dashed\",\n })}\n style={\n {\n \"--color-bg\": indicatorColor,\n \"--color-border\": indicatorColor,\n } as React.CSSProperties\n }\n />\n )\n )}\n <div\n className={cn(\n \"flex flex-1 justify-between leading-none\",\n nestLabel ? \"items-end\" : \"items-center\"\n )}\n >\n <div className=\"grid gap-1.5\">\n {nestLabel ? tooltipLabel : null}\n <span className=\"text-muted-foreground\">{itemConfig?.label ?? item.name}</span>\n </div>\n {item.value != null && (\n <span className=\"font-mono font-medium text-foreground tabular-nums\">\n {typeof item.value === \"number\" ? item.value.toLocaleString() : String(item.value)}\n </span>\n )}\n </div>\n </>\n )}\n </div>\n )\n })}\n </div>\n </div>\n )\n}\n\nconst ChartLegend = RechartsPrimitive.Legend\n\nfunction ChartLegendContent({\n className,\n hideIcon = false,\n payload,\n verticalAlign = \"bottom\",\n nameKey,\n}: React.ComponentProps<\"div\"> & {\n /** Hide the series icon. */\n hideIcon?: boolean\n /** Data key used for the series name. */\n nameKey?: string\n} & RechartsPrimitive.DefaultLegendContentProps) {\n const { config } = useChart()\n\n if (!payload?.length) {\n return null\n }\n\n return (\n <div className={cn(\"flex items-center justify-center gap-4\", verticalAlign === \"top\" ? \"pb-3\" : \"pt-3\", className)}>\n {payload\n .filter((item) => item.type !== \"none\")\n .map((item, index) => {\n const key = `${nameKey ?? item.dataKey ?? \"value\"}`\n const itemConfig = getPayloadConfigFromPayload(config, item, key)\n\n return (\n <div key={index} className={cn(\"flex items-center gap-1.5 [&>svg]:size-3 [&>svg]:text-muted-foreground\")}>\n {itemConfig?.icon && !hideIcon ? (\n <itemConfig.icon />\n ) : (\n <div\n className=\"size-2 shrink-0 rounded-xs\"\n style={{\n backgroundColor: item.color,\n }}\n />\n )}\n {itemConfig?.label}\n </div>\n )\n })}\n </div>\n )\n}\n\nfunction getPayloadConfigFromPayload(config: ChartConfig, payload: unknown, key: string) {\n if (typeof payload !== \"object\" || payload === null) {\n return undefined\n }\n\n const payloadPayload =\n \"payload\" in payload && typeof payload.payload === \"object\" && payload.payload !== null\n ? payload.payload\n : undefined\n\n let configLabelKey: string = key\n\n if (key in payload && typeof payload[key as keyof typeof payload] === \"string\") {\n configLabelKey = payload[key as keyof typeof payload] as string\n } else if (\n payloadPayload &&\n key in payloadPayload &&\n typeof payloadPayload[key as keyof typeof payloadPayload] === \"string\"\n ) {\n configLabelKey = payloadPayload[key as keyof typeof payloadPayload] as string\n }\n\n return configLabelKey in config ? config[configLabelKey] : config[key]\n}\n\nexport { ChartContainer, ChartTooltip, ChartTooltipContent, ChartLegend, ChartLegendContent, ChartStyle }\n"
|
|
23
1786
|
}
|
|
24
1787
|
]
|
|
25
1788
|
}
|