@automattic/charts 1.5.3 → 1.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/README.md +2 -2
  3. package/dist/index.cjs +8981 -9569
  4. package/dist/index.cjs.map +1 -1
  5. package/dist/index.css +318 -202
  6. package/dist/index.d.cts +1319 -1183
  7. package/dist/index.d.ts +1319 -1183
  8. package/dist/index.js +8561 -9570
  9. package/dist/index.js.map +1 -1
  10. package/dist/visx/group/index.cjs +8 -8
  11. package/dist/visx/group/index.d.cts +2 -3
  12. package/dist/visx/group/index.d.ts +2 -3
  13. package/dist/visx/group/index.js +1 -7
  14. package/dist/visx/legend/index.cjs +20 -10
  15. package/dist/visx/legend/index.d.cts +2 -1
  16. package/dist/visx/legend/index.d.ts +2 -1
  17. package/dist/visx/legend/index.js +2 -10
  18. package/dist/visx/text/index.cjs +20 -12
  19. package/dist/visx/text/index.d.cts +2 -1
  20. package/dist/visx/text/index.d.ts +2 -1
  21. package/dist/visx/text/index.js +2 -12
  22. package/package.json +32 -38
  23. package/src/charts/area-chart/types.ts +1 -1
  24. package/src/charts/bar-chart/bar-chart.tsx +1 -1
  25. package/src/charts/geo-chart/geo-chart.tsx +3 -1
  26. package/src/charts/leaderboard-chart/leaderboard-chart.module.scss +113 -1
  27. package/src/charts/leaderboard-chart/leaderboard-chart.tsx +37 -6
  28. package/src/charts/leaderboard-chart/test/leaderboard-chart.test.tsx +81 -0
  29. package/src/charts/line-chart/line-chart.tsx +1 -1
  30. package/src/charts/line-chart/private/line-chart-annotation-label-popover.tsx +18 -2
  31. package/src/charts/line-chart/private/line-chart-annotation.tsx +1 -1
  32. package/src/charts/line-chart/types.ts +1 -1
  33. package/src/charts/pie-semi-circle-chart/pie-semi-circle-chart.tsx +2 -2
  34. package/src/charts/private/chart-layout/chart-layout.tsx +1 -2
  35. package/src/charts/private/x-zoom.tsx +2 -2
  36. package/src/components/legend/hooks/use-chart-legend-items.ts +6 -2
  37. package/src/components/legend/legend.tsx +1 -2
  38. package/src/components/legend/utils/label-transform-factory.ts +1 -1
  39. package/src/components/tooltip/accessible-tooltip.tsx +2 -6
  40. package/src/index.ts +6 -5
  41. package/src/providers/chart-context/themes.ts +1 -1
  42. package/src/providers/chart-context/types.ts +7 -2
  43. package/src/types.ts +118 -11
  44. package/src/utils/get-styles.ts +1 -2
  45. package/src/visx/types.ts +30 -1
  46. package/dist/chunk-5WRI5ZAA.js +0 -31
  47. package/dist/chunk-5WRI5ZAA.js.map +0 -1
  48. package/dist/chunk-7OZEQ5HE.cjs +0 -9
  49. package/dist/chunk-7OZEQ5HE.cjs.map +0 -1
  50. package/dist/chunk-DZUJEN5N.cjs +0 -31
  51. package/dist/chunk-DZUJEN5N.cjs.map +0 -1
  52. package/dist/chunk-NFRB2POF.js +0 -9
  53. package/dist/chunk-NFRB2POF.js.map +0 -1
  54. package/dist/index.css.map +0 -1
  55. package/dist/visx/group/index.cjs.map +0 -1
  56. package/dist/visx/group/index.js.map +0 -1
  57. package/dist/visx/legend/index.cjs.map +0 -1
  58. package/dist/visx/legend/index.js.map +0 -1
  59. package/dist/visx/text/index.cjs.map +0 -1
  60. package/dist/visx/text/index.js.map +0 -1
  61. package/tsup.config.ts +0 -46
package/dist/index.d.ts CHANGED
@@ -1,43 +1,79 @@
1
- import * as react from 'react';
2
- import { CSSProperties, PointerEvent, ReactNode, ComponentProps, SVGProps, FC, ComponentType, PropsWithChildren } from 'react';
3
- import { LegendOrdinal } from '@visx/legend';
4
- import { CircleSubjectProps } from '@visx/annotation/lib/components/CircleSubject';
5
- import { ConnectorProps } from '@visx/annotation/lib/components/Connector';
6
- import { LabelProps } from '@visx/annotation/lib/components/Label';
7
- import { LineSubjectProps } from '@visx/annotation/lib/components/LineSubject';
8
- import { Orientation, AxisScale, TickFormatter, AxisRendererProps } from '@visx/axis';
9
- import { LegendShape } from '@visx/legend/lib/types';
10
- import { ScaleType, ScaleInput } from '@visx/scale';
11
- import { TextProps } from '@visx/text/lib/Text';
12
- import { LineStyles, EventHandlerParams, GridStyles, GlyphProps } from '@visx/xychart';
13
- export { EventHandlerParams, GridStyles, LineStyles } from '@visx/xychart';
14
- import { GapSize } from '@wordpress/theme';
15
- import { GoogleDataTableColumn, GoogleDataTableRow } from 'react-google-charts';
16
- export { GoogleDataTableColumn, GoogleDataTableColumnRoleType, GoogleDataTableRow } from 'react-google-charts';
17
- import { RenderTooltipParams, TooltipProps as TooltipProps$1 } from '@visx/xychart/lib/components/Tooltip';
18
- export { RenderTooltipParams } from '@visx/xychart/lib/components/Tooltip';
19
- import * as react_jsx_runtime from 'react/jsx-runtime';
20
- import { TextProps as TextProps$1 } from '@visx/text';
21
- import { PieArcDatum } from '@visx/shape/lib/shapes/Pie';
1
+ import { EventHandlerParams, EventHandlerParams as EventHandlerParams$1, GlyphProps, GridStyles, GridStyles as GridStyles$1, LineStyles, LineStyles as LineStyles$1, TooltipContextType } from "@visx/xychart";
2
+ import { CSSProperties, ComponentClass, ComponentProps, ComponentType, FC, MouseEvent, PointerEvent, PropsWithChildren, ReactElement, ReactNode, SVGProps } from "react";
3
+ import { TextProps } from "@visx/text";
4
+ import { PickD3Scale, ScaleInput, ScaleType } from "@visx/scale";
5
+ import { LegendOrdinal } from "@visx/legend";
6
+ import { CircleSubjectProps, ConnectorProps, LabelProps, LineSubjectProps } from "@visx/annotation";
7
+ import { TooltipProps as TooltipProps$1, UseTooltipPortalOptions } from "@visx/tooltip";
8
+ import { PieProvidedProps } from "@visx/shape";
9
+ import { AxisRendererProps, AxisScale, Orientation, TickFormatter } from "@visx/axis";
22
10
 
11
+ //#region src/types.d.ts
23
12
  type ValueOf<T> = T[keyof T];
24
13
  type Optional<T, K extends keyof T> = Pick<Partial<T>, K> & Omit<T, K>;
14
+ /**
15
+ * Mirrors the WordPress Design System gap token scale used by the WordPress UI Stack.
16
+ */
17
+ type GapSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl';
18
+ type LegendShapeLabel<Data, Output, ExtraAttributes = object> = {
19
+ datum: Data;
20
+ index: number;
21
+ text: string;
22
+ value?: Output;
23
+ } & ExtraAttributes;
24
+ type LegendShapeRenderProps<Data, Output> = {
25
+ width?: string | number;
26
+ height?: string | number;
27
+ label: LegendShapeLabel<Data, Output>;
28
+ item: Data;
29
+ itemIndex: number;
30
+ fill?: string;
31
+ size?: string | number;
32
+ style?: CSSProperties;
33
+ };
34
+ type LegendShape<Data, Output> = 'rect' | 'circle' | 'line' | FC<LegendShapeRenderProps<Data, Output>> | ComponentClass<LegendShapeRenderProps<Data, Output>>;
35
+ type GoogleDataTableColumnType = 'string' | 'number' | 'boolean' | 'date' | 'datetime' | 'timeofday';
36
+ declare enum GoogleDataTableColumnRoleType {
37
+ annotation = "annotation",
38
+ annotationText = "annotationText",
39
+ certainty = "certainty",
40
+ emphasis = "emphasis",
41
+ interval = "interval",
42
+ scope = "scope",
43
+ style = "style",
44
+ tooltip = "tooltip",
45
+ domain = "domain"
46
+ }
47
+ type GoogleDataTableColumn = {
48
+ type: GoogleDataTableColumnType;
49
+ label?: string;
50
+ role?: GoogleDataTableColumnRoleType;
51
+ pattern?: string;
52
+ p?: Record<string, unknown>;
53
+ id?: string;
54
+ } | string;
55
+ type GoogleDataTableCell = {
56
+ v?: unknown;
57
+ f?: string;
58
+ p?: Record<string, unknown>;
59
+ } | string | number | boolean | Date | null;
60
+ type GoogleDataTableRow = GoogleDataTableCell[];
25
61
  type ChartType = 'area' | 'bar' | 'conversion-funnel' | 'leaderboard' | 'line' | 'pie' | 'pie-semi-circle';
26
62
  type OrientationType = ValueOf<typeof Orientation>;
27
63
  type AnnotationStyles = {
28
- circleSubject?: Omit<CircleSubjectProps, 'x' | 'y'> & {
29
- fill?: string;
30
- };
31
- lineSubject?: Omit<LineSubjectProps, 'x' | 'y'>;
32
- connector?: Omit<ConnectorProps, 'x' | 'y' | 'dx' | 'dy'>;
33
- label?: Omit<LabelProps, 'title' | 'subtitle' | 'x' | 'y'> & {
34
- x?: number | 'start' | 'end';
35
- y?: number | 'start' | 'end';
36
- };
64
+ circleSubject?: Omit<CircleSubjectProps, 'x' | 'y'> & {
65
+ fill?: string;
66
+ };
67
+ lineSubject?: Omit<LineSubjectProps, 'x' | 'y'>;
68
+ connector?: Omit<ConnectorProps, 'x' | 'y' | 'dx' | 'dy'>;
69
+ label?: Omit<LabelProps, 'title' | 'subtitle' | 'x' | 'y'> & {
70
+ x?: number | 'start' | 'end';
71
+ y?: number | 'start' | 'end';
72
+ };
37
73
  };
38
74
  type DataPoint = {
39
- label: string;
40
- value: number;
75
+ label: string;
76
+ value: number;
41
77
  };
42
78
  /**
43
79
  * Data format for GeoChart - uses Google Charts native data format for maximum flexibility.
@@ -72,315 +108,298 @@ type DataPoint = {
72
108
  */
73
109
  type GeoData = [GoogleDataTableColumn[], ...GoogleDataTableRow[]];
74
110
  type DataPointDate = {
75
- date?: Date;
76
- /**
77
- * Supported Formats:
78
- * - YYYY-MM-DD (local)
79
- * - YYYY-MM-DD HH:mm:ss (local)
80
- * - YYYY-MM-DD HH:mm (local)
81
- * - YYYY-MM-DDTHH:mm:ss (local)
82
- * - YYYY-MM-DDTHH:mm:ss.SSS (local)
83
- * - YYYY-MM-DDTHH:mm (local)
84
- * - YYYY-MM-DDTHH:mm:ssZ (UTC → local)
85
- * - YYYY-MM-DDTHH:mm:ss±HH:mm (offset → local)
86
- */
87
- dateString?: string;
88
- value: number | null;
89
- label?: string;
111
+ date?: Date;
112
+ /**
113
+ * Supported Formats:
114
+ * - YYYY-MM-DD (local)
115
+ * - YYYY-MM-DD HH:mm:ss (local)
116
+ * - YYYY-MM-DD HH:mm (local)
117
+ * - YYYY-MM-DDTHH:mm:ss (local)
118
+ * - YYYY-MM-DDTHH:mm:ss.SSS (local)
119
+ * - YYYY-MM-DDTHH:mm (local)
120
+ * - YYYY-MM-DDTHH:mm:ssZ (UTC → local)
121
+ * - YYYY-MM-DDTHH:mm:ss±HH:mm (offset → local)
122
+ */
123
+ dateString?: string;
124
+ value: number | null;
125
+ label?: string;
90
126
  };
91
127
  type LeaderboardEntry = {
92
- /**
93
- * Unique internal key (e.g., 'key-direct')
94
- */
95
- id: string;
96
- /**
97
- * Human-readable name (e.g., 'Direct') or a JSX element (e.g., <h4>Direct</h4>)
98
- */
99
- label: string | JSX.Element;
100
- /**
101
- * Value of the entry
102
- */
103
- currentValue: number;
104
- /**
105
- * Value of the entry in the previous period
106
- */
107
- previousValue: number;
108
- /**
109
- * Width of current bar, as % of the current value
110
- */
111
- currentShare: number;
112
- /**
113
- * Width of previous bar, as % of the current value
114
- */
115
- previousShare: number;
116
- /**
117
- * Delta of the entry
118
- */
119
- delta: number;
120
- /**
121
- * Optional color for the entry's image/icon
122
- */
123
- imageColor?: string;
128
+ /**
129
+ * Unique internal key (e.g., 'key-direct')
130
+ */
131
+ id: string;
132
+ /**
133
+ * Human-readable name (e.g., 'Direct') or a JSX element (e.g., <h4>Direct</h4>)
134
+ */
135
+ label: string | ReactElement;
136
+ /**
137
+ * Value of the entry
138
+ */
139
+ currentValue: number;
140
+ /**
141
+ * Value of the entry in the previous period
142
+ */
143
+ previousValue: number;
144
+ /**
145
+ * Width of current bar, as % of the current value
146
+ */
147
+ currentShare: number;
148
+ /**
149
+ * Width of previous bar, as % of the current value
150
+ */
151
+ previousShare: number;
152
+ /**
153
+ * Delta of the entry
154
+ */
155
+ delta: number;
156
+ /**
157
+ * Optional color for the entry's image/icon
158
+ */
159
+ imageColor?: string;
160
+ /**
161
+ * Optional click handler. When provided, the entire row becomes an
162
+ * interactive `<button>`: clickable and keyboard-focusable (Enter/Space),
163
+ * with a chevron affordance revealed on hover/focus. The consumer
164
+ * decides what the action does (e.g. drill-down). Rows without onClick are
165
+ * inert and render unchanged.
166
+ *
167
+ * For links or other interactive affordances (external-link icons, info
168
+ * tooltips), put them in the `label` render prop instead of using onClick —
169
+ * a row is either a button (onClick) or carries interactive label content,
170
+ * never both, since interactive elements cannot be nested in HTML.
171
+ */
172
+ onClick?: (event: MouseEvent<HTMLButtonElement>) => void;
173
+ /**
174
+ * Optional accessible name for the interactive row's `<button>`. Only applies
175
+ * when `onClick` is set — without it the row renders as a Fragment with no
176
+ * element to receive `aria-label`. By default the button derives its name from
177
+ * its rendered content (label text plus the formatted value), which is the
178
+ * right outcome for plain-text labels. Set this when the `label` is JSX whose
179
+ * text content does not yield a clean name on its own — e.g. an image-only
180
+ * label — to give assistive tech a deterministic, human-readable name.
181
+ */
182
+ ariaLabel?: string;
124
183
  };
125
184
  type GradientStop = {
126
- offset: string;
127
- color?: string;
128
- opacity?: number;
185
+ offset: string;
186
+ color?: string;
187
+ opacity?: number;
129
188
  };
130
189
  type SeriesDataOptions = {
131
- gradient?: {
132
- from: string;
133
- to: string;
134
- fromOpacity?: number;
135
- toOpacity?: number;
136
- stops?: GradientStop[];
137
- };
138
- stroke?: string;
139
- seriesLineStyle?: LineStyles;
140
- legendShapeStyle?: CSSProperties;
141
- type?: 'comparison';
190
+ gradient?: {
191
+ from: string;
192
+ to: string;
193
+ fromOpacity?: number;
194
+ toOpacity?: number;
195
+ stops?: GradientStop[];
196
+ };
197
+ stroke?: string;
198
+ seriesLineStyle?: LineStyles$1;
199
+ legendShapeStyle?: CSSProperties;
200
+ type?: 'comparison';
142
201
  };
143
202
  type SeriesData = {
144
- group?: string;
145
- label: string;
146
- data: DataPointDate[] | DataPoint[];
147
- options?: SeriesDataOptions;
203
+ group?: string;
204
+ label: string;
205
+ data: DataPointDate[] | DataPoint[];
206
+ options?: SeriesDataOptions;
148
207
  };
149
208
  type MultipleDataPointsDate = {
150
- label: string;
151
- data: DataPointDate[];
209
+ label: string;
210
+ data: DataPointDate[];
152
211
  };
153
212
  /**
154
213
  * Input data point for percentage-based charts (pie, donut, semi-circle).
155
214
  * Provide values; percentages will be calculated automatically.
156
215
  */
157
216
  type DataPointPercentage = {
158
- /**
159
- * Label for the data point
160
- */
161
- label: string;
162
- /**
163
- * Numerical value used for slice sizing.
164
- * Percentages are calculated automatically from values.
165
- */
166
- value: number;
167
- /**
168
- * Formatted value for display (e.g., "30K" instead of 30000)
169
- */
170
- valueDisplay?: string;
171
- /**
172
- * Color code for the segment, by default colours are taken from the theme but this property can overrides it
173
- */
174
- color?: string;
175
- /**
176
- * Group for the data point, used to match color with groups on other charts
177
- */
178
- group?: string;
217
+ /**
218
+ * Label for the data point
219
+ */
220
+ label: string;
221
+ /**
222
+ * Numerical value used for slice sizing.
223
+ * Percentages are calculated automatically from values.
224
+ */
225
+ value: number;
226
+ /**
227
+ * Formatted value for display (e.g., "30K" instead of 30000)
228
+ */
229
+ valueDisplay?: string;
230
+ /**
231
+ * Color code for the segment, by default colours are taken from the theme but this property can overrides it
232
+ */
233
+ color?: string;
234
+ /**
235
+ * Group for the data point, used to match color with groups on other charts
236
+ */
237
+ group?: string;
179
238
  };
180
239
  /**
181
240
  * Internal type with calculated percentage.
182
241
  * Used internally after percentage calculation from values.
183
242
  */
184
243
  type DataPointPercentageCalculated = DataPointPercentage & {
185
- /**
186
- * Calculated percentage (0-100) based on value relative to total
187
- */
188
- percentage: number;
244
+ /**
245
+ * Calculated percentage (0-100) based on value relative to total
246
+ */
247
+ percentage: number;
189
248
  };
190
249
  /**
191
250
  * Base theme configuration for chart components with optional properties
192
251
  */
193
252
  type ChartTheme = {
194
- /** Background color for chart components */
195
- backgroundColor: string;
196
- /** Background color for labels */
197
- labelBackgroundColor?: string;
198
- /** Text color for labels */
199
- labelTextColor?: string;
200
- /** Array of colors used for data visualization */
201
- colors: string[];
202
- /** Optional CSS styles for grid lines */
203
- gridStyles?: GridStyles;
204
- /** Length of axis ticks in pixels */
205
- tickLength: number;
206
- /** Color of the grid lines */
207
- gridColor: string;
208
- /** Color of the grid lines in dark mode */
209
- gridColorDark: string;
210
- /** Styles for x-axis tick lines */
211
- xTickLineStyles?: LineStyles;
212
- /** Styles for x-axis line */
213
- xAxisLineStyles?: LineStyles;
214
- /** Styles for series lines */
215
- seriesLineStyles?: LineStyles[];
216
- /** Array of render functions for glyphs */
217
- glyphs?: Array<(<Datum extends object>(props: GlyphProps<Datum>) => ReactNode)>;
218
- /** Legend specific settings */
219
- legend?: {
220
- /** Styles for legend shapes */
221
- shapeStyles?: Record<string, unknown>[];
222
- /** Styles for legend labels */
223
- labelStyles?: CSSProperties;
224
- /** Styles for legend container */
225
- containerStyles?: CSSProperties;
226
- };
227
- /** Styles for small SVG text (eg. axis tick labels), passed through to the XYChart theme. */
228
- svgLabelSmall?: TextProps;
229
- /** Styles for large SVG text (eg. axis titles), passed through to the XYChart theme. */
230
- svgLabelBig?: TextProps;
231
- annotationStyles?: AnnotationStyles;
232
- /** GeoChart specific settings */
233
- geoChart?: {
234
- /** Default fill color for a geo chart feature (e.g. country) with no data */
235
- featureFillColor?: string;
236
- };
237
- /** LeaderboardChart specific settings */
238
- leaderboardChart?: {
239
- /** Gap between rows in the leaderboard grid */
240
- rowGap?: number;
241
- /** Gap between columns in the leaderboard grid */
242
- columnGap?: number;
243
- /** Spacing between label and progress bars */
244
- labelSpacing?: number;
245
- /** Primary color for current period bars */
246
- primaryColor?: string;
247
- /** Secondary color for comparison period bars */
248
- secondaryColor?: string;
249
- /** Delta colors: [negative, neutral, positive] */
250
- deltaColors?: [string, string, string];
251
- };
252
- /** ConversionFunnelChart specific settings */
253
- conversionFunnelChart?: {
254
- /** Primary color for funnel bars */
255
- primaryColor?: string;
256
- /** Background color for chart container */
257
- backgroundColor?: string;
258
- /** Color for positive change indicators */
259
- positiveChangeColor?: string;
260
- /** Color for negative change indicators */
261
- negativeChangeColor?: string;
262
- };
263
- lineChart?: {
264
- lineStyles?: Partial<Record<NonNullable<SeriesDataOptions['type']>, LineStyles>>;
265
- };
266
- /** Sparkline specific settings */
267
- sparkline?: {
268
- /** Margin around the sparkline chart */
269
- margin?: {
270
- top?: number;
271
- right?: number;
272
- bottom?: number;
273
- left?: number;
274
- };
275
- /** Stroke width for the sparkline line */
276
- strokeWidth?: number;
277
- };
253
+ /** Background color for chart components */backgroundColor: string; /** Background color for labels */
254
+ labelBackgroundColor?: string; /** Text color for labels */
255
+ labelTextColor?: string; /** Array of colors used for data visualization */
256
+ colors: string[]; /** Optional CSS styles for grid lines */
257
+ gridStyles?: GridStyles$1; /** Length of axis ticks in pixels */
258
+ tickLength: number; /** Color of the grid lines */
259
+ gridColor: string; /** Color of the grid lines in dark mode */
260
+ gridColorDark: string; /** Styles for x-axis tick lines */
261
+ xTickLineStyles?: LineStyles$1; /** Styles for x-axis line */
262
+ xAxisLineStyles?: LineStyles$1; /** Styles for series lines */
263
+ seriesLineStyles?: LineStyles$1[]; /** Array of render functions for glyphs */
264
+ glyphs?: Array<(<Datum extends object>(props: GlyphProps<Datum>) => ReactNode)>; /** Legend specific settings */
265
+ legend?: {
266
+ /** Styles for legend shapes */shapeStyles?: Record<string, unknown>[]; /** Styles for legend labels */
267
+ labelStyles?: CSSProperties; /** Styles for legend container */
268
+ containerStyles?: CSSProperties;
269
+ }; /** Styles for small SVG text (eg. axis tick labels), passed through to the XYChart theme. */
270
+ svgLabelSmall?: TextProps; /** Styles for large SVG text (eg. axis titles), passed through to the XYChart theme. */
271
+ svgLabelBig?: TextProps;
272
+ annotationStyles?: AnnotationStyles; /** GeoChart specific settings */
273
+ geoChart?: {
274
+ /** Default fill color for a geo chart feature (e.g. country) with no data */featureFillColor?: string;
275
+ }; /** LeaderboardChart specific settings */
276
+ leaderboardChart?: {
277
+ /** Gap between rows in the leaderboard grid */rowGap?: number; /** Gap between columns in the leaderboard grid */
278
+ columnGap?: number; /** Spacing between label and progress bars */
279
+ labelSpacing?: GapSize; /** Primary color for current period bars */
280
+ primaryColor?: string; /** Secondary color for comparison period bars */
281
+ secondaryColor?: string; /** Delta colors: [negative, neutral, positive] */
282
+ deltaColors?: [string, string, string];
283
+ }; /** ConversionFunnelChart specific settings */
284
+ conversionFunnelChart?: {
285
+ /** Primary color for funnel bars */primaryColor?: string; /** Background color for chart container */
286
+ backgroundColor?: string; /** Color for positive change indicators */
287
+ positiveChangeColor?: string; /** Color for negative change indicators */
288
+ negativeChangeColor?: string;
289
+ };
290
+ lineChart?: {
291
+ lineStyles?: Partial<Record<NonNullable<SeriesDataOptions['type']>, LineStyles$1>>;
292
+ }; /** Sparkline specific settings */
293
+ sparkline?: {
294
+ /** Margin around the sparkline chart */margin?: {
295
+ top?: number;
296
+ right?: number;
297
+ bottom?: number;
298
+ left?: number;
299
+ }; /** Stroke width for the sparkline line */
300
+ strokeWidth?: number;
301
+ };
278
302
  };
279
303
  /**
280
304
  * Theme configuration with all properties guaranteed to be defined.
281
305
  * Useful for merged themes where defaults are provided for all optional properties.
282
306
  */
283
307
  type CompleteChartTheme = Required<ChartTheme> & {
284
- leaderboardChart: Omit<Required<NonNullable<ChartTheme['leaderboardChart']>>, 'primaryColor' | 'secondaryColor'> & Pick<NonNullable<ChartTheme['leaderboardChart']>, 'primaryColor' | 'secondaryColor'>;
285
- conversionFunnelChart: Omit<Required<NonNullable<ChartTheme['conversionFunnelChart']>>, 'primaryColor'> & Pick<NonNullable<ChartTheme['conversionFunnelChart']>, 'primaryColor'>;
286
- lineChart: {
287
- lineStyles: Record<NonNullable<SeriesDataOptions['type']>, LineStyles>;
288
- };
289
- legend: Required<NonNullable<ChartTheme['legend']>>;
290
- sparkline: Required<NonNullable<ChartTheme['sparkline']>> & {
291
- margin: Required<NonNullable<ChartTheme['sparkline']>['margin']>;
292
- };
308
+ leaderboardChart: Omit<Required<NonNullable<ChartTheme['leaderboardChart']>>, 'primaryColor' | 'secondaryColor'> & Pick<NonNullable<ChartTheme['leaderboardChart']>, 'primaryColor' | 'secondaryColor'>;
309
+ conversionFunnelChart: Omit<Required<NonNullable<ChartTheme['conversionFunnelChart']>>, 'primaryColor'> & Pick<NonNullable<ChartTheme['conversionFunnelChart']>, 'primaryColor'>;
310
+ lineChart: {
311
+ lineStyles: Record<NonNullable<SeriesDataOptions['type']>, LineStyles$1>;
312
+ };
313
+ legend: Required<NonNullable<ChartTheme['legend']>>;
314
+ sparkline: Required<NonNullable<ChartTheme['sparkline']>> & {
315
+ margin: Required<NonNullable<ChartTheme['sparkline']>['margin']>;
316
+ };
293
317
  };
294
318
  type AxisOptions = {
295
- orientation?: OrientationType;
296
- numTicks?: number;
297
- /**
298
- * Explicit tick values for the axis. When set, takes precedence over `numTicks`
299
- * so callers can force a specific axis (e.g. integer-only steps on a sparse chart).
300
- */
301
- tickValues?: ScaleInput<AxisScale>[];
302
- axisClassName?: string;
303
- axisLineClassName?: string;
304
- labelClassName?: string;
305
- tickClassName?: string;
306
- tickFormat?: TickFormatter<ScaleInput<AxisScale>>;
307
- /**
308
- * Whether to display this axis. Defaults to true.
309
- */
310
- display?: boolean;
311
- /**
312
- * For more control over rendering or to add event handlers to datum, pass a function as children.
313
- */
314
- children?: (renderProps: AxisRendererProps<AxisScale>) => ReactNode;
315
- /**
316
- * Controls tick label overflow (bar charts only):
317
- *
318
- * - 'ellipsis': Truncate with ellipsis and fit to available space. Labels show full text
319
- * on hover via native tooltip. Note: A minimum width (20px) is enforced for readability.
320
- * On very dense charts (bandwidth < 20px), adjacent labels may overlap. To mitigate, use `numTicks`
321
- * to reduce labels or `tickFormat` to abbreviate text.
322
- * - undefined: No truncation; labels may overlap.
323
- *
324
- * Default: No truncation; labels may overlap.
325
- */
326
- labelOverflow?: 'ellipsis';
319
+ orientation?: OrientationType;
320
+ numTicks?: number;
321
+ /**
322
+ * Explicit tick values for the axis. When set, takes precedence over `numTicks`
323
+ * so callers can force a specific axis (e.g. integer-only steps on a sparse chart).
324
+ */
325
+ tickValues?: ScaleInput<AxisScale>[];
326
+ axisClassName?: string;
327
+ axisLineClassName?: string;
328
+ labelClassName?: string;
329
+ tickClassName?: string;
330
+ tickFormat?: TickFormatter<ScaleInput<AxisScale>>;
331
+ /**
332
+ * Whether to display this axis. Defaults to true.
333
+ */
334
+ display?: boolean;
335
+ /**
336
+ * For more control over rendering or to add event handlers to datum, pass a function as children.
337
+ */
338
+ children?: (renderProps: AxisRendererProps<AxisScale>) => ReactNode;
339
+ /**
340
+ * Controls tick label overflow (bar charts only):
341
+ *
342
+ * - 'ellipsis': Truncate with ellipsis and fit to available space. Labels show full text
343
+ * on hover via native tooltip. Note: A minimum width (20px) is enforced for readability.
344
+ * On very dense charts (bandwidth < 20px), adjacent labels may overlap. To mitigate, use `numTicks`
345
+ * to reduce labels or `tickFormat` to abbreviate text.
346
+ * - undefined: No truncation; labels may overlap.
347
+ *
348
+ * Default: No truncation; labels may overlap.
349
+ */
350
+ labelOverflow?: 'ellipsis';
327
351
  };
328
352
  type ScaleOptions = {
329
- type?: ScaleType;
330
- zero?: boolean;
331
- /**
332
- * Extends the scale's domain to nice round values. Pass `false` together with
333
- * an explicit `domain` to keep the tick values you set exactly.
334
- */
335
- nice?: boolean;
336
- domain?: [number, number] | [Date, Date];
337
- range?: [number, number];
338
- /**
339
- * For band scale, shortcut for setting `paddingInner` and `paddingOuter` to the same value.
340
- *
341
- * For point scale, the outer padding (spacing) at the ends of the range.
342
- * This is similar to band scale's `paddingOuter`.
343
- *
344
- */
345
- padding?: number;
346
- /**
347
- * The inner padding (spacing) within each band step of band scales, as a fraction of the step size. This value must lie in the range [0,1].
348
- *
349
- */
350
- paddingInner?: number;
351
- /**
352
- * The outer padding (spacing) at the ends of the range of band and point scales,
353
- * as a fraction of the step size. This value must lie in the range [0,1].
354
- *
355
- */
356
- paddingOuter?: number;
353
+ type?: ScaleType;
354
+ zero?: boolean;
355
+ /**
356
+ * Extends the scale's domain to nice round values. Pass `false` together with
357
+ * an explicit `domain` to keep the tick values you set exactly.
358
+ */
359
+ nice?: boolean;
360
+ domain?: [number, number] | [Date, Date];
361
+ range?: [number, number];
362
+ /**
363
+ * For band scale, shortcut for setting `paddingInner` and `paddingOuter` to the same value.
364
+ *
365
+ * For point scale, the outer padding (spacing) at the ends of the range.
366
+ * This is similar to band scale's `paddingOuter`.
367
+ *
368
+ */
369
+ padding?: number;
370
+ /**
371
+ * The inner padding (spacing) within each band step of band scales, as a fraction of the step size. This value must lie in the range [0,1].
372
+ *
373
+ */
374
+ paddingInner?: number;
375
+ /**
376
+ * The outer padding (spacing) at the ends of the range of band and point scales,
377
+ * as a fraction of the step size. This value must lie in the range [0,1].
378
+ *
379
+ */
380
+ paddingOuter?: number;
357
381
  };
358
382
  type LegendItemStyles = {
359
- /** Margin around each legend item. */
360
- margin?: CSSProperties['margin'];
361
- /** Flex direction for items within each legend entry. */
362
- flexDirection?: 'row' | 'row-reverse' | 'column' | 'column-reverse';
383
+ /** Margin around each legend item. */margin?: CSSProperties['margin']; /** Flex direction for items within each legend entry. */
384
+ flexDirection?: 'row' | 'row-reverse' | 'column' | 'column-reverse';
363
385
  };
364
386
  type LegendLabelStyles = Pick<CSSProperties, 'justifyContent' | 'flex' | 'margin'> & {
365
- /**
366
- * Maximum width for legend label text as a CSS value (e.g. '200px', '50%', '10rem').
367
- * When set, text overflow behavior is controlled by textOverflow.
368
- */
369
- maxWidth?: string;
370
- /**
371
- * Controls how text behaves when it exceeds maxWidth.
372
- * - 'ellipsis': Truncate with ellipsis (ideal for widgets/small devices)
373
- * - 'wrap': Wrap text to multiple lines (default, ideal for larger displays)
374
- */
375
- textOverflow?: 'ellipsis' | 'wrap';
387
+ /**
388
+ * Maximum width for legend label text as a CSS value (e.g. '200px', '50%', '10rem').
389
+ * When set, text overflow behavior is controlled by textOverflow.
390
+ */
391
+ maxWidth?: string;
392
+ /**
393
+ * Controls how text behaves when it exceeds maxWidth.
394
+ * - 'ellipsis': Truncate with ellipsis (ideal for widgets/small devices)
395
+ * - 'wrap': Wrap text to multiple lines (default, ideal for larger displays)
396
+ */
397
+ textOverflow?: 'ellipsis' | 'wrap';
376
398
  };
377
399
  type LegendShapeStyles = {
378
- /** Width of the legend shape in pixels. */
379
- width?: number;
380
- /** Height of the legend shape in pixels. */
381
- height?: number;
382
- /** Margin around the legend shape. */
383
- margin?: CSSProperties['margin'];
400
+ /** Width of the legend shape in pixels. */width?: number; /** Height of the legend shape in pixels. */
401
+ height?: number; /** Margin around the legend shape. */
402
+ margin?: CSSProperties['margin'];
384
403
  };
385
404
  /** Position of the legend relative to chart content. */
386
405
  type LegendPosition = 'top' | 'bottom';
@@ -389,229 +408,227 @@ type LegendPosition = 'top' | 'bottom';
389
408
  * Consolidates all legend styling and layout props into a single structured object.
390
409
  */
391
410
  type ChartLegendConfig<T = DataPoint | DataPointDate | LeaderboardEntry> = {
392
- /**
393
- * Layout direction of legend items.
394
- */
395
- orientation?: 'horizontal' | 'vertical';
396
- /**
397
- * Position of the legend relative to the chart.
398
- * TODO: Add 'left' | 'right' positioning support in future implementation
399
- */
400
- position?: LegendPosition;
401
- /**
402
- * Alignment of the legend within its position.
403
- */
404
- alignment?: 'start' | 'center' | 'end';
405
- /**
406
- * Shape of the legend marker icon.
407
- */
408
- shape?: LegendShape<T, number>;
409
- /**
410
- * Enable interactive legend items that can toggle series visibility.
411
- * Supported for all chart types that render series.
412
- * Requires chartId and GlobalChartsProvider.
413
- * For pie charts, percentages are recalculated so visible segments total 100%.
414
- */
415
- interactive?: boolean;
416
- /**
417
- * Additional CSS class name for individual legend items.
418
- */
419
- itemClassName?: string;
420
- /**
421
- * CSS styles for each legend item (margin, flexDirection).
422
- */
423
- itemStyles?: LegendItemStyles;
424
- /**
425
- * CSS styles for legend labels (maxWidth, textOverflow, justifyContent, flex, margin).
426
- */
427
- labelStyles?: LegendLabelStyles;
428
- /**
429
- * Styles for legend shapes (width, height, margin).
430
- */
431
- shapeStyles?: LegendShapeStyles;
411
+ /**
412
+ * Layout direction of legend items.
413
+ */
414
+ orientation?: 'horizontal' | 'vertical';
415
+ /**
416
+ * Position of the legend relative to the chart.
417
+ * TODO: Add 'left' | 'right' positioning support in future implementation
418
+ */
419
+ position?: LegendPosition;
420
+ /**
421
+ * Alignment of the legend within its position.
422
+ */
423
+ alignment?: 'start' | 'center' | 'end';
424
+ /**
425
+ * Shape of the legend marker icon.
426
+ */
427
+ shape?: LegendShape<T, number>;
428
+ /**
429
+ * Enable interactive legend items that can toggle series visibility.
430
+ * Supported for all chart types that render series.
431
+ * Requires chartId and GlobalChartsProvider.
432
+ * For pie charts, percentages are recalculated so visible segments total 100%.
433
+ */
434
+ interactive?: boolean;
435
+ /**
436
+ * Additional CSS class name for individual legend items.
437
+ */
438
+ itemClassName?: string;
439
+ /**
440
+ * CSS styles for each legend item (margin, flexDirection).
441
+ */
442
+ itemStyles?: LegendItemStyles;
443
+ /**
444
+ * CSS styles for legend labels (maxWidth, textOverflow, justifyContent, flex, margin).
445
+ */
446
+ labelStyles?: LegendLabelStyles;
447
+ /**
448
+ * Styles for legend shapes (width, height, margin).
449
+ */
450
+ shapeStyles?: LegendShapeStyles;
432
451
  };
433
452
  /**
434
453
  * Base properties shared across all chart components
435
454
  */
436
455
  type BaseChartProps<T = DataPoint | DataPointDate | LeaderboardEntry> = {
437
- /**
438
- * Array of data points to display in the chart
439
- */
440
- data: T extends DataPoint | DataPointDate | LeaderboardEntry ? T[] : T;
441
- /**
442
- * Optional unique identifier for the chart (auto-generated if not provided)
443
- */
444
- chartId?: string;
445
- /**
446
- * Additional CSS class name for the chart container
447
- */
448
- className?: string;
449
- /**
450
- * Width of the chart container in pixels. When omitted, the chart fills its parent's width.
451
- */
452
- width?: number;
453
- /**
454
- * Height of the chart container in pixels. When omitted, the chart fills its parent's height.
455
- */
456
- height?: number;
457
- /**
458
- * Maximum diameter of the pie in pixels (pie and donut charts only).
459
- * The pie will shrink if the container is smaller than this value.
460
- * When omitted, the pie fills the available space.
461
- */
462
- size?: number;
463
- /**
464
- * Chart margins
465
- */
466
- margin?: {
467
- top?: number;
468
- right?: number;
469
- bottom?: number;
470
- left?: number;
471
- };
472
- /**
473
- * Callback function for pointer down event
474
- */
475
- onPointerDown?: (event: EventHandlerParams<DataPoint | DataPointDate>) => void;
476
- /**
477
- * Callback function for pointer up event
478
- */
479
- onPointerUp?: (event: EventHandlerParams<DataPoint | DataPointDate>) => void;
480
- /**
481
- * Callback function for pointer move event
482
- */
483
- onPointerMove?: (event: EventHandlerParams<DataPoint | DataPointDate>) => void;
484
- /**
485
- * Callback function for pointer out event
486
- */
487
- onPointerOut?: (event: PointerEvent<Element>) => void;
488
- /**
489
- * Whether to show tooltips on hover. False by default.
490
- */
491
- withTooltips?: boolean;
492
- /**
493
- * Whether to show legend
494
- */
495
- showLegend?: boolean;
496
- /**
497
- * Legend configuration object for controlling legend appearance and behavior.
498
- * Includes orientation, position, alignment, shape, styling, and interactivity options.
499
- */
500
- legend?: ChartLegendConfig<T>;
501
- /**
502
- * Grid visibility. x is default when orientation is vertical. y is default when orientation is horizontal.
503
- */
504
- gridVisibility?: 'x' | 'y' | 'xy' | 'none';
505
- /**
506
- * Whether to show chart animation on initial render or not
507
- */
508
- animation?: boolean;
509
- /**
510
- * Gap between chart elements (SVG, legend, children).
511
- * Uses WordPress design system tokens.
512
- * @default 'md'
513
- */
514
- gap?: GapSize;
515
- /**
516
- * More options for the chart.
517
- */
518
- options?: {
519
- yScale?: ScaleOptions;
520
- xScale?: ScaleOptions;
521
- axis?: {
522
- x?: AxisOptions;
523
- y?: AxisOptions;
524
- };
456
+ /**
457
+ * Array of data points to display in the chart
458
+ */
459
+ data: T extends DataPoint | DataPointDate | LeaderboardEntry ? T[] : T;
460
+ /**
461
+ * Optional unique identifier for the chart (auto-generated if not provided)
462
+ */
463
+ chartId?: string;
464
+ /**
465
+ * Additional CSS class name for the chart container
466
+ */
467
+ className?: string;
468
+ /**
469
+ * Width of the chart container in pixels. When omitted, the chart fills its parent's width.
470
+ */
471
+ width?: number;
472
+ /**
473
+ * Height of the chart container in pixels. When omitted, the chart fills its parent's height.
474
+ */
475
+ height?: number;
476
+ /**
477
+ * Maximum diameter of the pie in pixels (pie and donut charts only).
478
+ * The pie will shrink if the container is smaller than this value.
479
+ * When omitted, the pie fills the available space.
480
+ */
481
+ size?: number;
482
+ /**
483
+ * Chart margins
484
+ */
485
+ margin?: {
486
+ top?: number;
487
+ right?: number;
488
+ bottom?: number;
489
+ left?: number;
490
+ };
491
+ /**
492
+ * Callback function for pointer down event
493
+ */
494
+ onPointerDown?: (event: EventHandlerParams$1<DataPoint | DataPointDate>) => void;
495
+ /**
496
+ * Callback function for pointer up event
497
+ */
498
+ onPointerUp?: (event: EventHandlerParams$1<DataPoint | DataPointDate>) => void;
499
+ /**
500
+ * Callback function for pointer move event
501
+ */
502
+ onPointerMove?: (event: EventHandlerParams$1<DataPoint | DataPointDate>) => void;
503
+ /**
504
+ * Callback function for pointer out event
505
+ */
506
+ onPointerOut?: (event: PointerEvent<Element>) => void;
507
+ /**
508
+ * Whether to show tooltips on hover. False by default.
509
+ */
510
+ withTooltips?: boolean;
511
+ /**
512
+ * Whether to show legend
513
+ */
514
+ showLegend?: boolean;
515
+ /**
516
+ * Legend configuration object for controlling legend appearance and behavior.
517
+ * Includes orientation, position, alignment, shape, styling, and interactivity options.
518
+ */
519
+ legend?: ChartLegendConfig<T>;
520
+ /**
521
+ * Grid visibility. x is default when orientation is vertical. y is default when orientation is horizontal.
522
+ */
523
+ gridVisibility?: 'x' | 'y' | 'xy' | 'none';
524
+ /**
525
+ * Whether to show chart animation on initial render or not
526
+ */
527
+ animation?: boolean;
528
+ /**
529
+ * Gap between chart elements (SVG, legend, children).
530
+ * Uses WordPress design system tokens.
531
+ * @default 'md'
532
+ */
533
+ gap?: GapSize;
534
+ /**
535
+ * More options for the chart.
536
+ */
537
+ options?: {
538
+ yScale?: ScaleOptions;
539
+ xScale?: ScaleOptions;
540
+ axis?: {
541
+ x?: AxisOptions;
542
+ y?: AxisOptions;
525
543
  };
544
+ };
526
545
  };
527
546
  /**
528
547
  * Properties for grid components
529
548
  */
530
549
  type GridProps = {
531
- /**
532
- * Width of the grid in pixels
533
- */
534
- width: number;
535
- /**
536
- * Height of the grid in pixels
537
- */
538
- height: number;
539
- /**
540
- * Grid visibility. x is default.
541
- */
542
- gridVisibility?: 'x' | 'y' | 'xy' | 'none';
543
- /**
544
- * X-axis scale for the grid
545
- * TODO: Fix any type after resolving visx scale type issues
546
- */
547
- xScale: any;
548
- /**
549
- * Y-axis scale for the grid
550
- * TODO: Fix any type after resolving visx scale type issues
551
- */
552
- yScale: any;
553
- /**
554
- * Top offset for the grid
555
- */
556
- top?: number;
550
+ /**
551
+ * Width of the grid in pixels
552
+ */
553
+ width: number;
554
+ /**
555
+ * Height of the grid in pixels
556
+ */
557
+ height: number;
558
+ /**
559
+ * Grid visibility. x is default.
560
+ */
561
+ gridVisibility?: 'x' | 'y' | 'xy' | 'none';
562
+ /**
563
+ * X-axis scale for the grid
564
+ * TODO: Fix any type after resolving visx scale type issues
565
+ */
566
+ xScale: any;
567
+ /**
568
+ * Y-axis scale for the grid
569
+ * TODO: Fix any type after resolving visx scale type issues
570
+ */
571
+ yScale: any;
572
+ /**
573
+ * Top offset for the grid
574
+ */
575
+ top?: number;
557
576
  };
558
-
577
+ //#endregion
578
+ //#region src/components/legend/types.d.ts
559
579
  type VisxLegendProps = Pick<ComponentProps<typeof LegendOrdinal>, 'className' | 'shape' | 'fill' | 'size' | 'labelFormat' | 'labelTransform'>;
560
580
  type BaseLegendProps = VisxLegendProps & {
561
- items: BaseLegendItem[];
562
- orientation?: 'horizontal' | 'vertical';
563
- position?: LegendPosition;
564
- alignment?: 'start' | 'center' | 'end';
565
- /** Additional CSS class name for legend items. */
566
- itemClassName?: string;
567
- /** CSS styles for each legend item (margin, flexDirection). */
568
- itemStyles?: LegendItemStyles;
569
- /** Additional CSS class name for legend labels. */
570
- labelClassName?: string;
571
- /** CSS styles for legend labels (justifyContent, flex, margin). */
572
- labelStyles?: LegendLabelStyles;
573
- /** Styles for legend shapes (width, height, margin). */
574
- shapeStyles?: LegendShapeStyles;
575
- /**
576
- * Function for rendering a custom legend layout.
577
- */
578
- render?: (items: BaseLegendItem[]) => ReactNode;
579
- /**
580
- * Enable interactive legend items that can toggle series visibility.
581
- * Requires GlobalChartsProvider and chartId to be set.
582
- */
583
- interactive?: boolean;
584
- /**
585
- * Chart ID for series visibility tracking when interactive mode is enabled.
586
- */
587
- chartId?: string;
581
+ items: BaseLegendItem[];
582
+ orientation?: 'horizontal' | 'vertical';
583
+ position?: LegendPosition;
584
+ alignment?: 'start' | 'center' | 'end'; /** Additional CSS class name for legend items. */
585
+ itemClassName?: string; /** CSS styles for each legend item (margin, flexDirection). */
586
+ itemStyles?: LegendItemStyles; /** Additional CSS class name for legend labels. */
587
+ labelClassName?: string; /** CSS styles for legend labels (justifyContent, flex, margin). */
588
+ labelStyles?: LegendLabelStyles; /** Styles for legend shapes (width, height, margin). */
589
+ shapeStyles?: LegendShapeStyles;
590
+ /**
591
+ * Function for rendering a custom legend layout.
592
+ */
593
+ render?: (items: BaseLegendItem[]) => ReactNode;
594
+ /**
595
+ * Enable interactive legend items that can toggle series visibility.
596
+ * Requires GlobalChartsProvider and chartId to be set.
597
+ */
598
+ interactive?: boolean;
599
+ /**
600
+ * Chart ID for series visibility tracking when interactive mode is enabled.
601
+ */
602
+ chartId?: string;
588
603
  };
589
604
  type LegendProps = Omit<BaseLegendProps, 'items'> & {
590
- items?: BaseLegendItem[];
591
- chartId?: string;
605
+ items?: BaseLegendItem[];
606
+ chartId?: string;
592
607
  };
593
608
  type BaseLegendItem = {
594
- label: string;
595
- value?: number | string;
596
- color: string;
597
- glyphSize?: number;
598
- renderGlyph?: <Datum extends object>(props: GlyphProps<Datum>) => ReactNode;
599
- shapeStyle?: CSSProperties & LineStyles;
609
+ label: string;
610
+ value?: number | string;
611
+ color: string;
612
+ glyphSize?: number;
613
+ renderGlyph?: <Datum extends object>(props: GlyphProps<Datum>) => ReactNode;
614
+ shapeStyle?: CSSProperties & LineStyles$1;
600
615
  };
601
-
602
- declare const Legend: react.ForwardRefExoticComponent<Omit<BaseLegendProps, "items"> & {
603
- items?: BaseLegendItem[];
604
- chartId?: string;
605
- } & react.RefAttributes<HTMLDivElement>>;
606
-
616
+ //#endregion
617
+ //#region src/components/legend/legend.d.ts
618
+ declare const Legend: import("react").ForwardRefExoticComponent<Omit<BaseLegendProps, "items"> & {
619
+ items?: BaseLegendItem[];
620
+ chartId?: string;
621
+ } & import("react").RefAttributes<HTMLDivElement>>;
622
+ //#endregion
623
+ //#region src/components/legend/hooks/use-chart-legend-items.d.ts
607
624
  type LegendValueDisplay = 'percentage' | 'value' | 'valueDisplay' | 'none';
608
625
  interface ChartLegendOptions {
609
- withGlyph?: boolean;
610
- glyphSize?: number;
611
- renderGlyph?: <Datum extends object>(props: GlyphProps<Datum>) => ReactNode;
612
- showValues?: boolean;
613
- legendValueDisplay?: LegendValueDisplay;
614
- legendShape?: LegendShape<SeriesData[], number>;
626
+ withGlyph?: boolean;
627
+ glyphSize?: number;
628
+ renderGlyph?: <Datum extends object>(props: GlyphProps<Datum>) => ReactNode;
629
+ showValues?: boolean;
630
+ legendValueDisplay?: LegendValueDisplay;
631
+ legendShape?: LegendShape<SeriesData[], number>;
615
632
  }
616
633
  /**
617
634
  * Hook to transform chart data into legend items
@@ -621,320 +638,360 @@ interface ChartLegendOptions {
621
638
  * @return Array of legend items ready for display
622
639
  */
623
640
  declare function useChartLegendItems<T extends SeriesData[] | DataPointDate[] | DataPointPercentageCalculated[]>(data: T, options?: ChartLegendOptions, legendShape?: LegendShape<SeriesData[], number>): BaseLegendItem[];
624
-
641
+ //#endregion
642
+ //#region src/charts/private/single-chart-context/single-chart-context.d.ts
625
643
  interface ChartInstanceRef {
626
- getScales: () => {
627
- xScale: unknown;
628
- yScale: unknown;
629
- } | null;
630
- getChartDimensions: () => {
631
- width: number;
632
- height: number;
633
- margin: {
634
- top?: number;
635
- right?: number;
636
- bottom?: number;
637
- left?: number;
638
- };
644
+ getScales: () => {
645
+ xScale: unknown;
646
+ yScale: unknown;
647
+ } | null;
648
+ getChartDimensions: () => {
649
+ width: number;
650
+ height: number;
651
+ margin: {
652
+ top?: number;
653
+ right?: number;
654
+ bottom?: number;
655
+ left?: number;
639
656
  };
657
+ };
640
658
  }
641
659
  type SingleChartRef = ChartInstanceRef;
642
-
660
+ //#endregion
661
+ //#region src/visx/types.d.ts
662
+ type RenderTooltipParams<Datum extends object> = TooltipContextType<Datum> & {
663
+ colorScale?: PickD3Scale<'ordinal', string, string>;
664
+ };
665
+ interface RenderTooltipGlyphProps<Datum extends object> extends GlyphProps<Datum> {
666
+ glyphStyle?: SVGProps<SVGCircleElement>;
667
+ isNearestDatum: boolean;
668
+ }
669
+ type XyChartTooltipProps<Datum extends object> = {
670
+ renderTooltip: (params: RenderTooltipParams<Datum>) => ReactNode;
671
+ renderGlyph?: (params: RenderTooltipGlyphProps<Datum>) => ReactNode;
672
+ snapTooltipToDatumX?: boolean;
673
+ snapTooltipToDatumY?: boolean;
674
+ showVerticalCrosshair?: boolean;
675
+ showHorizontalCrosshair?: boolean;
676
+ showDatumGlyph?: boolean;
677
+ showSeriesGlyphs?: boolean;
678
+ verticalCrosshairStyle?: SVGProps<SVGLineElement>;
679
+ horizontalCrosshairStyle?: SVGProps<SVGLineElement>;
680
+ glyphStyle?: SVGProps<SVGCircleElement>;
681
+ resizeObserverPolyfill?: UseTooltipPortalOptions['polyfill'];
682
+ } & Omit<TooltipProps$1, 'left' | 'top' | 'children'> & Pick<UseTooltipPortalOptions, 'debounce' | 'detectBounds' | 'scroll' | 'zIndex'>;
683
+ //#endregion
684
+ //#region src/charts/line-chart/types.d.ts
643
685
  type LineChartAnnotationProps = {
644
- datum: DataPointDate;
686
+ datum: DataPointDate;
687
+ title: string;
688
+ subtitle?: string;
689
+ subjectType?: 'circle' | 'line-vertical' | 'line-horizontal';
690
+ styles?: AnnotationStyles;
691
+ testId?: string;
692
+ renderLabel?: FC<{
693
+ title: string;
694
+ subtitle?: string;
695
+ }>;
696
+ renderLabelPopover?: FC<{
645
697
  title: string;
646
698
  subtitle?: string;
647
- subjectType?: 'circle' | 'line-vertical' | 'line-horizontal';
648
- styles?: AnnotationStyles;
649
- testId?: string;
650
- renderLabel?: FC<{
651
- title: string;
652
- subtitle?: string;
653
- }>;
654
- renderLabelPopover?: FC<{
655
- title: string;
656
- subtitle?: string;
657
- }>;
699
+ }>;
658
700
  };
659
701
  type CurveType = 'smooth' | 'linear' | 'monotone';
660
702
  type RenderLineGlyphProps<Datum extends object> = GlyphProps<Datum> & {
661
- glyphStyle?: SVGProps<SVGCircleElement>;
662
- position?: 'start' | 'end';
703
+ glyphStyle?: SVGProps<SVGCircleElement>;
704
+ position?: 'start' | 'end';
663
705
  };
664
706
  interface LineChartProps extends BaseChartProps<SeriesData[]> {
665
- withGradientFill: boolean;
666
- smoothing?: boolean;
667
- curveType?: CurveType;
668
- renderTooltip?: (params: RenderTooltipParams<DataPointDate>) => ReactNode;
669
- withStartGlyphs?: boolean;
670
- withEndGlyphs?: boolean;
671
- renderGlyph?: <Datum extends object>(props: GlyphProps<Datum>) => ReactNode;
672
- glyphStyle?: SVGProps<SVGCircleElement>;
673
- withLegendGlyph?: boolean;
674
- withTooltipCrosshairs?: {
675
- showVertical?: boolean;
676
- showHorizontal?: boolean;
677
- };
678
- /**
679
- * Enable drag-to-zoom on the X axis. The user drags horizontally to
680
- * select a range; the X axis rescales to that range. A small reset
681
- * button appears in the top-right of the chart while zoomed.
682
- */
683
- zoomable?: boolean;
684
- children?: ReactNode;
707
+ withGradientFill: boolean;
708
+ smoothing?: boolean;
709
+ curveType?: CurveType;
710
+ renderTooltip?: (params: RenderTooltipParams<DataPointDate>) => ReactNode;
711
+ withStartGlyphs?: boolean;
712
+ withEndGlyphs?: boolean;
713
+ renderGlyph?: <Datum extends object>(props: GlyphProps<Datum>) => ReactNode;
714
+ glyphStyle?: SVGProps<SVGCircleElement>;
715
+ withLegendGlyph?: boolean;
716
+ withTooltipCrosshairs?: {
717
+ showVertical?: boolean;
718
+ showHorizontal?: boolean;
719
+ };
720
+ /**
721
+ * Enable drag-to-zoom on the X axis. The user drags horizontally to
722
+ * select a range; the X axis rescales to that range. A small reset
723
+ * button appears in the top-right of the chart while zoomed.
724
+ */
725
+ zoomable?: boolean;
726
+ children?: ReactNode;
685
727
  }
686
728
  type TooltipDatum = {
687
- key: string;
688
- value: number;
729
+ key: string;
730
+ value: number;
689
731
  };
690
-
732
+ //#endregion
733
+ //#region src/charts/area-chart/types.d.ts
691
734
  interface AreaChartProps extends BaseChartProps<SeriesData[]> {
692
- /**
693
- * Whether series should be stacked on top of each other.
694
- * When false, series are rendered as overlapping filled areas.
695
- * @default true
696
- */
697
- stacked?: boolean;
698
- /**
699
- * Stack offset strategy when stacked is true. Mirrors d3-shape stack offsets.
700
- * - 'none' (default): values stack at their natural magnitude
701
- * - 'expand': values are normalized to the [0,1] range (percentage stacks)
702
- * - 'wiggle': used for streamgraphs
703
- * - 'silhouette': stack centered around zero
704
- */
705
- stackOffset?: 'none' | 'expand' | 'wiggle' | 'silhouette';
706
- /**
707
- * Smoothing using a Catmull-Rom curve. Ignored if `curveType` is set.
708
- */
709
- smoothing?: boolean;
710
- /**
711
- * Curve interpolation type. Takes precedence over `smoothing`.
712
- */
713
- curveType?: CurveType;
714
- /**
715
- * Custom tooltip renderer.
716
- */
717
- renderTooltip?: (params: RenderTooltipParams<DataPointDate>) => ReactNode;
718
- /**
719
- * Whether to show crosshair lines in the tooltip.
720
- */
721
- withTooltipCrosshairs?: {
722
- showVertical?: boolean;
723
- showHorizontal?: boolean;
724
- };
725
- /**
726
- * Fill opacity for the stacked areas. 0–1.
727
- * @default 0.85 when stacked, 0.4 when overlapping
728
- */
729
- fillOpacity?: number;
730
- /**
731
- * Whether to render a stroke (line) on top of each area.
732
- * @default false when stacked, true when overlapping
733
- */
734
- withStroke?: boolean;
735
- /**
736
- * Enable drag-to-zoom on the X axis. The user drags horizontally to
737
- * select a range; the X axis rescales to that range. A small reset
738
- * button appears in the top-right of the chart while zoomed.
739
- */
740
- zoomable?: boolean;
741
- /**
742
- * When using an interactive legend, controls whether the Y axis rescales
743
- * to fit only the visible series. Defaults to `true`, matching the
744
- * intuitive default for LineChart and BarChart. Set to `false` to pin
745
- * the Y axis to the full data extent so toggling legend items off does
746
- * not move the chart's baseline.
747
- * @default true
748
- */
749
- rescaleYOnLegendToggle?: boolean;
750
- children?: ReactNode;
735
+ /**
736
+ * Whether series should be stacked on top of each other.
737
+ * When false, series are rendered as overlapping filled areas.
738
+ * @default true
739
+ */
740
+ stacked?: boolean;
741
+ /**
742
+ * Stack offset strategy when stacked is true. Mirrors d3-shape stack offsets.
743
+ * - 'none' (default): values stack at their natural magnitude
744
+ * - 'expand': values are normalized to the [0,1] range (percentage stacks)
745
+ * - 'wiggle': used for streamgraphs
746
+ * - 'silhouette': stack centered around zero
747
+ */
748
+ stackOffset?: 'none' | 'expand' | 'wiggle' | 'silhouette';
749
+ /**
750
+ * Smoothing using a Catmull-Rom curve. Ignored if `curveType` is set.
751
+ */
752
+ smoothing?: boolean;
753
+ /**
754
+ * Curve interpolation type. Takes precedence over `smoothing`.
755
+ */
756
+ curveType?: CurveType;
757
+ /**
758
+ * Custom tooltip renderer.
759
+ */
760
+ renderTooltip?: (params: RenderTooltipParams<DataPointDate>) => ReactNode;
761
+ /**
762
+ * Whether to show crosshair lines in the tooltip.
763
+ */
764
+ withTooltipCrosshairs?: {
765
+ showVertical?: boolean;
766
+ showHorizontal?: boolean;
767
+ };
768
+ /**
769
+ * Fill opacity for the stacked areas. 0–1.
770
+ * @default 0.85 when stacked, 0.4 when overlapping
771
+ */
772
+ fillOpacity?: number;
773
+ /**
774
+ * Whether to render a stroke (line) on top of each area.
775
+ * @default false when stacked, true when overlapping
776
+ */
777
+ withStroke?: boolean;
778
+ /**
779
+ * Enable drag-to-zoom on the X axis. The user drags horizontally to
780
+ * select a range; the X axis rescales to that range. A small reset
781
+ * button appears in the top-right of the chart while zoomed.
782
+ */
783
+ zoomable?: boolean;
784
+ /**
785
+ * When using an interactive legend, controls whether the Y axis rescales
786
+ * to fit only the visible series. Defaults to `true`, matching the
787
+ * intuitive default for LineChart and BarChart. Set to `false` to pin
788
+ * the Y axis to the full data extent so toggling legend items off does
789
+ * not move the chart's baseline.
790
+ * @default true
791
+ */
792
+ rescaleYOnLegendToggle?: boolean;
793
+ children?: ReactNode;
751
794
  }
752
-
795
+ //#endregion
796
+ //#region src/charts/private/with-responsive/with-responsive.d.ts
753
797
  type ResponsiveConfig = {
754
- /**
755
- * The maximum width of the chart. Defaults to 1200.
756
- */
757
- maxWidth?: number;
758
- /**
759
- * The aspect ratio of the chart (height = width * aspectRatio).
760
- * When provided, height is calculated from width.
761
- * When omitted, the chart fills the parent container's height.
762
- */
763
- aspectRatio?: number;
764
- /**
765
- * Child render updates upon resize are delayed until debounceTime milliseconds after the last resize event is observed.
766
- */
767
- resizeDebounceTime?: number;
798
+ /**
799
+ * The maximum width of the chart. Defaults to 1200.
800
+ */
801
+ maxWidth?: number;
802
+ /**
803
+ * The aspect ratio of the chart (height = width * aspectRatio).
804
+ * When provided, height is calculated from width.
805
+ * When omitted, the chart fills the parent container's height.
806
+ */
807
+ aspectRatio?: number;
808
+ /**
809
+ * Child render updates upon resize are delayed until debounceTime milliseconds after the last resize event is observed.
810
+ */
811
+ resizeDebounceTime?: number;
768
812
  };
769
-
813
+ //#endregion
814
+ //#region src/charts/area-chart/area-chart.d.ts
770
815
  type AreaChartSubComponents = {
771
- Legend: typeof Legend;
816
+ Legend: typeof Legend;
772
817
  };
773
818
  type AreaChartBaseProps = Optional<AreaChartProps, 'width' | 'height' | 'size'>;
774
819
  type AreaChartComponent = React.ForwardRefExoticComponent<AreaChartBaseProps & React.RefAttributes<SingleChartRef>> & AreaChartSubComponents;
775
820
  type AreaChartResponsiveComponent = React.ForwardRefExoticComponent<AreaChartBaseProps & ResponsiveConfig & React.RefAttributes<SingleChartRef>> & AreaChartSubComponents;
776
821
  declare const AreaChart: AreaChartComponent;
777
822
  declare const AreaChartResponsive: AreaChartResponsiveComponent;
778
-
823
+ //#endregion
824
+ //#region src/charts/bar-chart/bar-chart.d.ts
779
825
  interface BarChartProps extends BaseChartProps<SeriesData[]> {
780
- renderTooltip?: (params: RenderTooltipParams<DataPointDate>) => ReactNode;
781
- orientation?: 'horizontal' | 'vertical';
782
- withPatterns?: boolean;
783
- showZeroValues?: boolean;
784
- children?: ReactNode;
826
+ renderTooltip?: (params: RenderTooltipParams<DataPointDate>) => ReactNode;
827
+ orientation?: 'horizontal' | 'vertical';
828
+ withPatterns?: boolean;
829
+ showZeroValues?: boolean;
830
+ children?: ReactNode;
785
831
  }
786
832
  type BarChartBaseProps = Optional<BarChartProps, 'width' | 'height' | 'size'>;
787
833
  interface BarChartSubComponents {
788
- Legend: ComponentType<React.ComponentProps<typeof Legend>>;
834
+ Legend: ComponentType<React.ComponentProps<typeof Legend>>;
789
835
  }
790
836
  type BarChartComponent = FC<BarChartBaseProps> & BarChartSubComponents;
791
837
  type BarChartResponsiveComponent = FC<BarChartBaseProps & ResponsiveConfig> & BarChartSubComponents;
792
838
  declare const BarChart: BarChartComponent;
793
839
  declare const BarChartResponsive: BarChartResponsiveComponent;
794
-
840
+ //#endregion
841
+ //#region src/charts/bar-list-chart/bar-list-chart.d.ts
795
842
  interface BarListChartProps extends Exclude<BarChartProps, 'orientation' | 'size' | 'gridVisibility'> {
796
- options?: {
797
- /**
798
- * Scale for the y axis. Exclude the type property.
799
- */
800
- yScale: Omit<ScaleOptions, 'type'>;
801
- /**
802
- * Scale for the x axis. Exclude the type property.
803
- */
804
- xScale: Omit<ScaleOptions, 'type'>;
805
- /**
806
- * Formatter for the label.
807
- */
808
- labelFormatter?: (value: string) => string;
809
- /**
810
- * Formatter for the value.
811
- */
812
- valueFormatter?: (value: number) => string;
813
- /**
814
- * y offset of the label and value. Default is based on the number of series, automatically computed.
815
- */
816
- yOffset?: number;
817
- /**
818
- * x position of the label.
819
- */
820
- labelPosition?: number;
821
- /**
822
- * x position of the value.
823
- */
824
- valuePosition?: number;
825
- /**
826
- * Custom render function for the label.
827
- */
828
- labelComponent?: ComponentType<RenderLabelProps>;
829
- /**
830
- * Custom render function for the value.
831
- */
832
- valueComponent?: ComponentType<RenderValueProps>;
833
- };
834
- }
835
- interface RenderLabelProps {
836
- textProps: TextProps$1;
837
- x: number;
838
- y: number;
839
- label: string;
840
- formatter: (value: string) => string;
841
- }
842
- interface RenderValueProps {
843
- textProps: TextProps$1;
844
- x: number;
845
- y: number;
846
- value: number;
843
+ options?: {
844
+ /**
845
+ * Scale for the y axis. Exclude the type property.
846
+ */
847
+ yScale: Omit<ScaleOptions, 'type'>;
848
+ /**
849
+ * Scale for the x axis. Exclude the type property.
850
+ */
851
+ xScale: Omit<ScaleOptions, 'type'>;
847
852
  /**
848
- * Original data
853
+ * Formatter for the label.
849
854
  */
850
- data: SeriesData[];
855
+ labelFormatter?: (value: string) => string;
851
856
  /**
852
- * Index of the data point
857
+ * Formatter for the value.
853
858
  */
854
- index: number;
855
- formatter: (value: number) => string;
859
+ valueFormatter?: (value: number) => string;
860
+ /**
861
+ * y offset of the label and value. Default is based on the number of series, automatically computed.
862
+ */
863
+ yOffset?: number;
864
+ /**
865
+ * x position of the label.
866
+ */
867
+ labelPosition?: number;
868
+ /**
869
+ * x position of the value.
870
+ */
871
+ valuePosition?: number;
872
+ /**
873
+ * Custom render function for the label.
874
+ */
875
+ labelComponent?: ComponentType<RenderLabelProps>;
876
+ /**
877
+ * Custom render function for the value.
878
+ */
879
+ valueComponent?: ComponentType<RenderValueProps>;
880
+ };
881
+ }
882
+ interface RenderLabelProps {
883
+ textProps: TextProps;
884
+ x: number;
885
+ y: number;
886
+ label: string;
887
+ formatter: (value: string) => string;
888
+ }
889
+ interface RenderValueProps {
890
+ textProps: TextProps;
891
+ x: number;
892
+ y: number;
893
+ value: number;
894
+ /**
895
+ * Original data
896
+ */
897
+ data: SeriesData[];
898
+ /**
899
+ * Index of the data point
900
+ */
901
+ index: number;
902
+ formatter: (value: number) => string;
856
903
  }
857
904
  declare const BarListChart: FC<BarListChartProps>;
858
- declare const BarListChartResponsive: ({ resizeDebounceTime, maxWidth, aspectRatio, size, width, height, ...chartProps }: Omit<BarListChartProps, "width" | "height" | "size"> & {
859
- width?: number;
860
- height?: number;
861
- size?: number;
862
- } & ResponsiveConfig) => react_jsx_runtime.JSX.Element;
863
-
905
+ declare const BarListChartResponsive: ({
906
+ resizeDebounceTime,
907
+ maxWidth,
908
+ aspectRatio,
909
+ size,
910
+ width,
911
+ height,
912
+ ...chartProps
913
+ }: Omit<BarListChartProps, "width" | "height" | "size"> & {
914
+ width?: number;
915
+ height?: number;
916
+ size?: number;
917
+ } & ResponsiveConfig) => import("react/jsx-runtime").JSX.Element;
918
+ //#endregion
919
+ //#region src/charts/conversion-funnel-chart/types.d.ts
864
920
  /**
865
921
  * Represents a single step in the conversion funnel
866
922
  */
867
923
  interface FunnelStep {
868
- /** Step identifier */
869
- id: string;
870
- /** Display label for the step */
871
- label: string;
872
- /** Conversion rate as percentage (0-100) */
873
- rate: number;
874
- /** Absolute count (optional, for tooltip/details) */
875
- count?: number;
924
+ /** Step identifier */
925
+ id: string;
926
+ /** Display label for the step */
927
+ label: string;
928
+ /** Conversion rate as percentage (0-100) */
929
+ rate: number;
930
+ /** Absolute count (optional, for tooltip/details) */
931
+ count?: number;
876
932
  }
877
933
  /**
878
934
  * Render prop for customizing step labels
879
935
  */
880
936
  interface StepLabelRenderProps {
881
- step: FunnelStep;
882
- index: number;
883
- className?: string;
937
+ step: FunnelStep;
938
+ index: number;
939
+ className?: string;
884
940
  }
885
941
  /**
886
942
  * Render prop for customizing step rates
887
943
  */
888
944
  interface StepRateRenderProps {
889
- step: FunnelStep;
890
- index: number;
891
- className?: string;
945
+ step: FunnelStep;
946
+ index: number;
947
+ className?: string;
892
948
  }
893
949
  /**
894
950
  * Render prop for customizing the entire main metric section
895
951
  */
896
952
  interface MainMetricRenderProps {
897
- mainRate: number;
898
- changeIndicator?: string;
899
- className?: string;
900
- changeColor?: string;
953
+ mainRate: number;
954
+ changeIndicator?: string;
955
+ className?: string;
956
+ changeColor?: string;
901
957
  }
902
958
  /**
903
959
  * Render prop for customizing tooltip content
904
960
  */
905
961
  interface TooltipRenderProps {
906
- step: FunnelStep;
907
- index: number;
908
- top: number;
909
- left: number;
910
- className?: string;
962
+ step: FunnelStep;
963
+ index: number;
964
+ top: number;
965
+ left: number;
966
+ className?: string;
911
967
  }
912
968
  /**
913
969
  * Props for the ConversionFunnelChart component
914
970
  */
915
971
  interface ConversionFunnelChartProps extends Pick<BaseChartProps, 'className' | 'chartId' | 'animation'> {
916
- /** Main conversion rate to highlight */
917
- mainRate: number;
918
- /** Change indicator (e.g., +2%, -1.5%) */
919
- changeIndicator?: string;
920
- /** Array of funnel steps */
921
- steps: FunnelStep[];
922
- /** Whether the chart is in loading state */
923
- loading?: boolean;
924
- /** Height of the chart container. Accepts a number (pixels) or CSS string (e.g., "400px", "100%"). Falls back to style.height if set, otherwise defaults to "100%". */
925
- height?: string | number;
926
- /** Custom styling */
927
- style?: React.CSSProperties;
928
- /** Custom render function for step labels */
929
- renderStepLabel?: (props: StepLabelRenderProps) => React.ReactNode;
930
- /** Custom render function for step rates */
931
- renderStepRate?: (props: StepRateRenderProps) => React.ReactNode;
932
- /** Custom render function for the entire main metric section */
933
- renderMainMetric?: (props: MainMetricRenderProps) => React.ReactNode;
934
- /** Custom render function for tooltip content */
935
- renderTooltip?: (props: TooltipRenderProps) => React.ReactNode;
972
+ /** Main conversion rate to highlight */
973
+ mainRate: number;
974
+ /** Change indicator (e.g., +2%, -1.5%) */
975
+ changeIndicator?: string;
976
+ /** Array of funnel steps */
977
+ steps: FunnelStep[];
978
+ /** Whether the chart is in loading state */
979
+ loading?: boolean;
980
+ /** Height of the chart container. Accepts a number (pixels) or CSS string (e.g., "400px", "100%"). Falls back to style.height if set, otherwise defaults to "100%". */
981
+ height?: string | number;
982
+ /** Custom styling */
983
+ style?: React.CSSProperties;
984
+ /** Custom render function for step labels */
985
+ renderStepLabel?: (props: StepLabelRenderProps) => React.ReactNode;
986
+ /** Custom render function for step rates */
987
+ renderStepRate?: (props: StepRateRenderProps) => React.ReactNode;
988
+ /** Custom render function for the entire main metric section */
989
+ renderMainMetric?: (props: MainMetricRenderProps) => React.ReactNode;
990
+ /** Custom render function for tooltip content */
991
+ renderTooltip?: (props: TooltipRenderProps) => React.ReactNode;
936
992
  }
937
-
993
+ //#endregion
994
+ //#region src/charts/conversion-funnel-chart/conversion-funnel-chart.d.ts
938
995
  /**
939
996
  * ConversionFunnelChart component with provider wrapper
940
997
  *
@@ -942,7 +999,8 @@ interface ConversionFunnelChartProps extends Pick<BaseChartProps, 'className' |
942
999
  * @return JSX element representing the conversion funnel chart
943
1000
  */
944
1001
  declare const ConversionFunnelChartWithProvider: FC<ConversionFunnelChartProps>;
945
-
1002
+ //#endregion
1003
+ //#region src/charts/geo-chart/types.d.ts
946
1004
  /**
947
1005
  * Region to display on the map.
948
1006
  * Use 'world' for global view or any ISO 3166-1 alpha-2 country code
@@ -957,113 +1015,133 @@ type GeoRegion = 'world' | (string & {});
957
1015
  */
958
1016
  type GeoResolution = 'countries' | 'provinces' | 'metros';
959
1017
  interface GeoChartProps extends Pick<BaseChartProps, 'className' | 'chartId' | 'width' | 'height'> {
960
- /**
961
- * Data in Google Charts native format for maximum flexibility.
962
- * First row contains column headers, subsequent rows contain data.
963
- *
964
- * Country identifiers can be either full country names or ISO 3166-1 alpha-2 codes
965
- * (e.g., 'United States' or 'US').
966
- */
967
- data: GeoData;
968
- /**
969
- * Region to display. Use 'world' for global view, 'US' for United States,
970
- * or any ISO 3166-1 alpha-2 country code.
971
- * @default 'world'
972
- */
973
- region?: GeoRegion;
974
- /**
975
- * Resolution level for the map.
976
- * - 'countries': Country-level (default for 'world')
977
- * - 'provinces': State/province level (use with specific region like 'US')
978
- * - 'metros': Metropolitan areas (US only)
979
- * @default 'countries'
980
- */
981
- resolution?: GeoResolution;
982
- /**
983
- * Optional render function for the loading placeholder.
984
- * Called while Google Charts is loading.
985
- */
986
- renderPlaceholder?: () => React.ReactNode;
1018
+ /**
1019
+ * Data in Google Charts native format for maximum flexibility.
1020
+ * First row contains column headers, subsequent rows contain data.
1021
+ *
1022
+ * Country identifiers can be either full country names or ISO 3166-1 alpha-2 codes
1023
+ * (e.g., 'United States' or 'US').
1024
+ */
1025
+ data: GeoData;
1026
+ /**
1027
+ * Region to display. Use 'world' for global view, 'US' for United States,
1028
+ * or any ISO 3166-1 alpha-2 country code.
1029
+ * @default 'world'
1030
+ */
1031
+ region?: GeoRegion;
1032
+ /**
1033
+ * Resolution level for the map.
1034
+ * - 'countries': Country-level (default for 'world')
1035
+ * - 'provinces': State/province level (use with specific region like 'US')
1036
+ * - 'metros': Metropolitan areas (US only)
1037
+ * @default 'countries'
1038
+ */
1039
+ resolution?: GeoResolution;
1040
+ /**
1041
+ * Optional render function for the loading placeholder.
1042
+ * Called while Google Charts is loading.
1043
+ */
1044
+ renderPlaceholder?: () => React.ReactNode;
987
1045
  }
988
-
1046
+ //#endregion
1047
+ //#region src/charts/geo-chart/geo-chart.d.ts
989
1048
  declare const GeoChartWithProvider: FC<GeoChartProps>;
990
- declare const GeoChartResponsive: ({ resizeDebounceTime, maxWidth, aspectRatio, size, width, height, ...chartProps }: Omit<GeoChartProps, "width" | "height" | "size"> & {
991
- width?: number;
992
- height?: number;
993
- size?: number;
994
- } & ResponsiveConfig) => react_jsx_runtime.JSX.Element;
995
-
1049
+ declare const GeoChartResponsive: ({
1050
+ resizeDebounceTime,
1051
+ maxWidth,
1052
+ aspectRatio,
1053
+ size,
1054
+ width,
1055
+ height,
1056
+ ...chartProps
1057
+ }: Omit<GeoChartProps, "width" | "height" | "size"> & {
1058
+ width?: number;
1059
+ height?: number;
1060
+ size?: number;
1061
+ } & ResponsiveConfig) => import("react/jsx-runtime").JSX.Element;
1062
+ //#endregion
1063
+ //#region src/charts/leaderboard-chart/types.d.ts
996
1064
  interface LeaderboardChartProps extends Pick<BaseChartProps<LeaderboardEntry>, 'className' | 'data' | 'showLegend' | 'legend' | 'chartId' | 'width' | 'height' | 'size' | 'gap' | 'animation'> {
997
- /**
998
- * Whether to show comparison data
999
- */
1000
- withComparison?: boolean;
1001
- /**
1002
- * Whether to overlay the label on top of bar
1003
- */
1004
- withOverlayLabel?: boolean;
1005
- /**
1006
- * Primary color for current period bars
1007
- */
1008
- primaryColor?: string;
1009
- /**
1010
- * Secondary color for comparison period bars
1011
- */
1012
- secondaryColor?: string;
1013
- /**
1014
- * Formatter for values
1015
- */
1016
- valueFormatter?: (value: number) => string;
1017
- /**
1018
- * Formatter for delta values
1019
- */
1020
- deltaFormatter?: (value: number) => string;
1021
- /**
1022
- * Whether the chart is in loading state
1023
- */
1024
- loading?: boolean;
1025
- /**
1026
- * Custom styling for the chart container
1027
- */
1028
- style?: React.CSSProperties & {
1029
- '--a8c--charts--leaderboard--bar--border-radius'?: string;
1030
- };
1031
- /**
1032
- * Custom labels for legend items
1033
- */
1034
- legendLabels?: {
1035
- /**
1036
- * Label for primary period data
1037
- */
1038
- primary?: string;
1039
- /**
1040
- * Label for comparison period data (only used when withComparison is true)
1041
- */
1042
- comparison?: string;
1043
- };
1044
- /**
1045
- * Child components for composition API
1046
- */
1047
- children?: ReactNode;
1065
+ /**
1066
+ * Whether to show comparison data
1067
+ */
1068
+ withComparison?: boolean;
1069
+ /**
1070
+ * Whether to overlay the label on top of bar
1071
+ */
1072
+ withOverlayLabel?: boolean;
1073
+ /**
1074
+ * Primary color for current period bars
1075
+ */
1076
+ primaryColor?: string;
1077
+ /**
1078
+ * Secondary color for comparison period bars
1079
+ */
1080
+ secondaryColor?: string;
1081
+ /**
1082
+ * Formatter for values
1083
+ */
1084
+ valueFormatter?: (value: number) => string;
1085
+ /**
1086
+ * Formatter for delta values
1087
+ */
1088
+ deltaFormatter?: (value: number) => string;
1089
+ /**
1090
+ * Whether the chart is in loading state
1091
+ */
1092
+ loading?: boolean;
1093
+ /**
1094
+ * Custom styling for the chart container
1095
+ */
1096
+ style?: React.CSSProperties & {
1097
+ '--a8c--charts--leaderboard--bar--border-radius'?: string;
1098
+ };
1099
+ /**
1100
+ * Custom labels for legend items
1101
+ */
1102
+ legendLabels?: {
1103
+ /**
1104
+ * Label for primary period data
1105
+ */
1106
+ primary?: string;
1107
+ /**
1108
+ * Label for comparison period data (only used when withComparison is true)
1109
+ */
1110
+ comparison?: string;
1111
+ };
1112
+ /**
1113
+ * Child components for composition API
1114
+ */
1115
+ children?: ReactNode;
1048
1116
  }
1049
-
1117
+ //#endregion
1118
+ //#region src/charts/leaderboard-chart/leaderboard-chart.d.ts
1050
1119
  declare const LeaderboardChart: FC<LeaderboardChartProps> & {
1051
- Legend: react.ForwardRefExoticComponent<Omit<BaseLegendProps, "items"> & {
1052
- items?: BaseLegendItem[];
1053
- chartId?: string;
1054
- } & react.RefAttributes<HTMLDivElement>>;
1120
+ Legend: import("react").ForwardRefExoticComponent<Omit<BaseLegendProps, "items"> & {
1121
+ items?: BaseLegendItem[];
1122
+ chartId?: string;
1123
+ } & import("react").RefAttributes<HTMLDivElement>>;
1055
1124
  };
1056
- declare const LeaderboardChartResponsive: (({ resizeDebounceTime, maxWidth, aspectRatio, size, width, height, ...chartProps }: Omit<LeaderboardChartProps, "width" | "height" | "size"> & {
1057
- width?: number;
1058
- height?: number;
1059
- size?: number;
1060
- } & ResponsiveConfig) => react_jsx_runtime.JSX.Element) & {
1061
- Legend: react.ForwardRefExoticComponent<Omit<BaseLegendProps, "items"> & {
1062
- items?: BaseLegendItem[];
1063
- chartId?: string;
1064
- } & react.RefAttributes<HTMLDivElement>>;
1125
+ declare const LeaderboardChartResponsive: (({
1126
+ resizeDebounceTime,
1127
+ maxWidth,
1128
+ aspectRatio,
1129
+ size,
1130
+ width,
1131
+ height,
1132
+ ...chartProps
1133
+ }: Omit<LeaderboardChartProps, "width" | "height" | "size"> & {
1134
+ width?: number;
1135
+ height?: number;
1136
+ size?: number;
1137
+ } & ResponsiveConfig) => import("react/jsx-runtime").JSX.Element) & {
1138
+ Legend: import("react").ForwardRefExoticComponent<Omit<BaseLegendProps, "items"> & {
1139
+ items?: BaseLegendItem[];
1140
+ chartId?: string;
1141
+ } & import("react").RefAttributes<HTMLDivElement>>;
1065
1142
  };
1066
-
1143
+ //#endregion
1144
+ //#region src/utils/date-parsing.d.ts
1067
1145
  /**
1068
1146
  * @file Date parsing utilities using date-fns for local timezone handling
1069
1147
  *
@@ -1121,15 +1199,16 @@ declare const LeaderboardChartResponsive: (({ resizeDebounceTime, maxWidth, aspe
1121
1199
  * @return {Date} A Date object representing the parsed date in local timezone, or an invalid Date if parsing fails
1122
1200
  */
1123
1201
  declare const parseAsLocalDate: (dateString: string) => Date;
1124
-
1202
+ //#endregion
1203
+ //#region src/utils/format-metric-value.d.ts
1125
1204
  /**
1126
1205
  * Types for formatMetricValue
1127
1206
  */
1128
1207
  type MetricValueType = 'number' | 'average' | 'currency';
1129
1208
  type FormatMetricValueOptions = {
1130
- decimals?: number;
1131
- useMultipliers?: boolean;
1132
- signDisplay?: Intl.NumberFormatOptions['signDisplay'];
1209
+ decimals?: number;
1210
+ useMultipliers?: boolean;
1211
+ signDisplay?: Intl.NumberFormatOptions['signDisplay'];
1133
1212
  };
1134
1213
  /**
1135
1214
  * Format a numeric metric value based on type, precision and scale.
@@ -1143,8 +1222,13 @@ type FormatMetricValueOptions = {
1143
1222
  * @param options.signDisplay - Controls when to display the sign (auto, always, never, exceptZero)
1144
1223
  * @return Formatted string
1145
1224
  */
1146
- declare const formatMetricValue: (value: string | number, type?: MetricValueType, { decimals, useMultipliers, signDisplay }?: FormatMetricValueOptions) => string;
1147
-
1225
+ declare const formatMetricValue: (value: string | number, type?: MetricValueType, {
1226
+ decimals,
1227
+ useMultipliers,
1228
+ signDisplay
1229
+ }?: FormatMetricValueOptions) => string;
1230
+ //#endregion
1231
+ //#region src/utils/format-percentage.d.ts
1148
1232
  /**
1149
1233
  * Format a percentage value with smart decimal handling.
1150
1234
  * Uses `@automattic/number-formatters` for consistent formatting.
@@ -1154,7 +1238,8 @@ declare const formatMetricValue: (value: string | number, type?: MetricValueType
1154
1238
  * @return Formatted percentage string (e.g., "30%", "30.1%", "30.25%")
1155
1239
  */
1156
1240
  declare const formatPercentage: (value: number) => string;
1157
-
1241
+ //#endregion
1242
+ //#region src/utils/merge-themes.d.ts
1158
1243
  /**
1159
1244
  * Merges chart themes with proper precedence.
1160
1245
  * The second theme (override) takes precedence over the first theme (base).
@@ -1165,7 +1250,8 @@ declare const formatPercentage: (value: number) => string;
1165
1250
  */
1166
1251
  declare function mergeThemes(baseTheme: CompleteChartTheme, overrideTheme: Partial<ChartTheme>): CompleteChartTheme;
1167
1252
  declare function mergeThemes(baseTheme: ChartTheme, overrideTheme: Partial<ChartTheme>): ChartTheme;
1168
-
1253
+ //#endregion
1254
+ //#region src/utils/color-utils.d.ts
1169
1255
  /**
1170
1256
  * Check if a value is a valid 6-digit hex color
1171
1257
  * @param hex - The value to check
@@ -1230,7 +1316,8 @@ declare const normalizeColorToHex: (color: string, element?: HTMLElement | null,
1230
1316
  * @throws {Error} if hex string is malformed
1231
1317
  */
1232
1318
  declare const lightenHexColor: (hex: string, blend: number) => string;
1233
-
1319
+ //#endregion
1320
+ //#region src/charts/leaderboard-chart/hooks/use-leaderboard-legend-items.d.ts
1234
1321
  /**
1235
1322
  * Hook to create legend items from leaderboard data
1236
1323
  * @param root0 - Configuration object
@@ -1244,43 +1331,54 @@ declare const lightenHexColor: (hex: string, blend: number) => string;
1244
1331
  * @param root0.legendLabels.comparison - Label for comparison period data
1245
1332
  * @return Array of legend items for the leaderboard chart
1246
1333
  */
1247
- declare function useLeaderboardLegendItems({ data, primaryColor, secondaryColor, withComparison, withOverlayLabel, legendLabels, }: {
1248
- data: LeaderboardEntry[];
1249
- primaryColor?: string;
1250
- secondaryColor?: string;
1251
- withComparison: boolean;
1252
- withOverlayLabel: boolean;
1253
- legendLabels?: {
1254
- primary?: string;
1255
- comparison?: string;
1256
- };
1334
+ declare function useLeaderboardLegendItems({
1335
+ data,
1336
+ primaryColor,
1337
+ secondaryColor,
1338
+ withComparison,
1339
+ withOverlayLabel,
1340
+ legendLabels
1341
+ }: {
1342
+ data: LeaderboardEntry[];
1343
+ primaryColor?: string;
1344
+ secondaryColor?: string;
1345
+ withComparison: boolean;
1346
+ withOverlayLabel: boolean;
1347
+ legendLabels?: {
1348
+ primary?: string;
1349
+ comparison?: string;
1350
+ };
1257
1351
  }): BaseLegendItem[];
1258
-
1352
+ //#endregion
1353
+ //#region src/charts/line-chart/private/line-chart-annotations-overlay.d.ts
1259
1354
  interface LineChartAnnotationsProps {
1260
- children?: ReactNode;
1355
+ children?: ReactNode;
1261
1356
  }
1262
1357
  declare const LineChartAnnotationsOverlay: FC<LineChartAnnotationsProps>;
1263
-
1358
+ //#endregion
1359
+ //#region src/charts/line-chart/private/line-chart-annotation.d.ts
1264
1360
  declare const LineChartAnnotation: FC<LineChartAnnotationProps>;
1265
-
1361
+ //#endregion
1362
+ //#region src/charts/line-chart/line-chart.d.ts
1266
1363
  type LineChartAnnotationComponents = {
1267
- AnnotationsOverlay: typeof LineChartAnnotationsOverlay;
1268
- Annotation: typeof LineChartAnnotation;
1269
- Legend: typeof Legend;
1364
+ AnnotationsOverlay: typeof LineChartAnnotationsOverlay;
1365
+ Annotation: typeof LineChartAnnotation;
1366
+ Legend: typeof Legend;
1270
1367
  };
1271
1368
  type LineChartBaseProps = Optional<LineChartProps, 'width' | 'height' | 'size'>;
1272
1369
  type LineChartComponent = React.ForwardRefExoticComponent<LineChartBaseProps & React.RefAttributes<SingleChartRef>> & LineChartAnnotationComponents;
1273
1370
  type LineChartResponsiveComponent = React.ForwardRefExoticComponent<LineChartBaseProps & ResponsiveConfig & React.RefAttributes<SingleChartRef>> & LineChartAnnotationComponents;
1274
1371
  declare const LineChart: LineChartComponent;
1275
1372
  declare const LineChartResponsive: LineChartResponsiveComponent;
1276
-
1373
+ //#endregion
1374
+ //#region src/charts/private/chart-composition/types.d.ts
1277
1375
  /**
1278
1376
  * Base interface for chart subcomponents in the composition API
1279
1377
  */
1280
1378
  interface BaseChartSubComponents {
1281
- Legend: ComponentType<React.ComponentProps<typeof Legend>>;
1282
- SVG: FC<PropsWithChildren>;
1283
- HTML: FC<PropsWithChildren>;
1379
+ Legend: ComponentType<React.ComponentProps<typeof Legend>>;
1380
+ SVG: FC<PropsWithChildren>;
1381
+ HTML: FC<PropsWithChildren>;
1284
1382
  }
1285
1383
  /**
1286
1384
  * Type helper for creating chart components with composition API
@@ -1288,231 +1386,235 @@ interface BaseChartSubComponents {
1288
1386
  * @template TSubComponents - Additional subcomponents beyond the base ones
1289
1387
  */
1290
1388
  type ChartComponentWithComposition<TProps, TSubComponents extends BaseChartSubComponents = BaseChartSubComponents> = FC<TProps> & TSubComponents;
1291
-
1389
+ //#endregion
1390
+ //#region src/charts/pie-chart/pie-chart.d.ts
1292
1391
  /**
1293
1392
  * Parameters passed to the renderTooltip function for pie charts.
1294
1393
  */
1295
1394
  type PieChartRenderTooltipParams = {
1296
- /**
1297
- * The data point being hovered, including label, value, and calculated percentage.
1298
- */
1299
- tooltipData: DataPointPercentageCalculated;
1395
+ /**
1396
+ * The data point being hovered, including label, value, and calculated percentage.
1397
+ */
1398
+ tooltipData: DataPointPercentageCalculated;
1300
1399
  };
1301
1400
  interface PieChartProps extends BaseChartProps<DataPointPercentage[]> {
1302
- /**
1303
- * Inner radius in pixels. If > 0, creates a donut chart. Defaults to 0.
1304
- */
1305
- innerRadius?: number;
1306
- /**
1307
- * Add padding to the chart
1308
- */
1309
- padding?: number;
1310
- /**
1311
- * Thickness of the pie chart.
1312
- * A value between 0 and 1, where 0 means no thickness
1313
- * and 1 means the maximum thickness.
1314
- */
1315
- thickness?: number;
1316
- /**
1317
- * Scale of the gap between groups in the pie chart
1318
- * A value between 0 and 1, where 0 means no gap.
1319
- */
1320
- gapScale?: number;
1321
- /**
1322
- * Scale of the corner radius for the pie chart segments.
1323
- * A value between 0 and 1, where 0 means no corner radius.
1324
- */
1325
- cornerScale?: number;
1326
- /**
1327
- * Whether to show labels on pie segments. Defaults to true.
1328
- */
1329
- showLabels?: boolean;
1330
- /**
1331
- * What type of value to display in the legend when showValues is true.
1332
- * - 'percentage': Shows percentage values (e.g., "23%") [default]
1333
- * - 'value': Shows raw numeric values (e.g., "30000")
1334
- * - 'valueDisplay': Shows formatted values (e.g., "30K")
1335
- * - 'none': Shows no values, only labels
1336
- */
1337
- legendValueDisplay?: LegendValueDisplay;
1338
- /**
1339
- * Use the children prop to render additional elements on the chart.
1340
- */
1341
- children?: ReactNode;
1342
- /**
1343
- * Horizontal offset for tooltip positioning in pixels (default: 0)
1344
- */
1345
- tooltipOffsetX?: number;
1346
- /**
1347
- * Vertical offset for tooltip positioning in pixels (default: -15)
1348
- */
1349
- tooltipOffsetY?: number;
1350
- /**
1351
- * Custom render function for tooltip content.
1352
- * When provided, replaces the default BaseTooltip with custom content.
1353
- */
1354
- renderTooltip?: (params: PieChartRenderTooltipParams) => ReactNode;
1401
+ /**
1402
+ * Inner radius in pixels. If > 0, creates a donut chart. Defaults to 0.
1403
+ */
1404
+ innerRadius?: number;
1405
+ /**
1406
+ * Add padding to the chart
1407
+ */
1408
+ padding?: number;
1409
+ /**
1410
+ * Thickness of the pie chart.
1411
+ * A value between 0 and 1, where 0 means no thickness
1412
+ * and 1 means the maximum thickness.
1413
+ */
1414
+ thickness?: number;
1415
+ /**
1416
+ * Scale of the gap between groups in the pie chart
1417
+ * A value between 0 and 1, where 0 means no gap.
1418
+ */
1419
+ gapScale?: number;
1420
+ /**
1421
+ * Scale of the corner radius for the pie chart segments.
1422
+ * A value between 0 and 1, where 0 means no corner radius.
1423
+ */
1424
+ cornerScale?: number;
1425
+ /**
1426
+ * Whether to show labels on pie segments. Defaults to true.
1427
+ */
1428
+ showLabels?: boolean;
1429
+ /**
1430
+ * What type of value to display in the legend when showValues is true.
1431
+ * - 'percentage': Shows percentage values (e.g., "23%") [default]
1432
+ * - 'value': Shows raw numeric values (e.g., "30000")
1433
+ * - 'valueDisplay': Shows formatted values (e.g., "30K")
1434
+ * - 'none': Shows no values, only labels
1435
+ */
1436
+ legendValueDisplay?: LegendValueDisplay;
1437
+ /**
1438
+ * Use the children prop to render additional elements on the chart.
1439
+ */
1440
+ children?: ReactNode;
1441
+ /**
1442
+ * Horizontal offset for tooltip positioning in pixels (default: 0)
1443
+ */
1444
+ tooltipOffsetX?: number;
1445
+ /**
1446
+ * Vertical offset for tooltip positioning in pixels (default: -15)
1447
+ */
1448
+ tooltipOffsetY?: number;
1449
+ /**
1450
+ * Custom render function for tooltip content.
1451
+ * When provided, replaces the default BaseTooltip with custom content.
1452
+ */
1453
+ renderTooltip?: (params: PieChartRenderTooltipParams) => ReactNode;
1355
1454
  }
1356
1455
  type PieChartBaseProps = Optional<PieChartProps, 'size'>;
1357
1456
  type PieChartComponent = ChartComponentWithComposition<PieChartBaseProps>;
1358
1457
  type PieChartResponsiveComponent = ChartComponentWithComposition<PieChartBaseProps & ResponsiveConfig>;
1359
1458
  declare const PieChart: PieChartComponent;
1360
1459
  declare const PieChartResponsive: PieChartResponsiveComponent;
1361
-
1460
+ //#endregion
1461
+ //#region src/charts/pie-semi-circle-chart/pie-semi-circle-chart.d.ts
1362
1462
  /**
1363
1463
  * Parameters passed to the renderTooltip function for semi-circle charts.
1364
1464
  */
1365
1465
  type PieSemiCircleChartRenderTooltipParams = {
1366
- /**
1367
- * The data point being hovered, including label, value, and calculated percentage.
1368
- */
1369
- tooltipData: DataPointPercentageCalculated;
1466
+ /**
1467
+ * The data point being hovered, including label, value, and calculated percentage.
1468
+ */
1469
+ tooltipData: DataPointPercentageCalculated;
1370
1470
  };
1371
1471
  interface PieSemiCircleChartProps extends BaseChartProps<DataPointPercentage[]> {
1372
- /**
1373
- * Explicit width of the chart container in pixels.
1374
- * When omitted, the chart fills its parent container's width.
1375
- * The chart always maintains a 2:1 width-to-height ratio, constrained by available space.
1376
- */
1377
- width?: number;
1378
- /**
1379
- * Thickness of the pie chart. A value between 0 and 1
1380
- */
1381
- thickness?: number;
1382
- /**
1383
- * Direction of chart rendering
1384
- * true for clockwise, false for counter-clockwise
1385
- */
1386
- clockwise?: boolean;
1387
- /**
1388
- * Label text to display above the chart
1389
- */
1390
- label?: string;
1391
- /**
1392
- * Note text to display below the label
1393
- */
1394
- note?: string;
1395
- /**
1396
- * Use the children prop to render additional elements on the chart.
1397
- */
1398
- children?: ReactNode;
1399
- /**
1400
- * What type of value to display in the legend when showValues is true.
1401
- * - 'percentage': Shows percentage values (e.g., "23%") [default]
1402
- * - 'value': Shows raw numeric values (e.g., "30000")
1403
- * - 'valueDisplay': Shows formatted values (e.g., "30K")
1404
- * - 'none': Shows no values, only labels
1405
- */
1406
- legendValueDisplay?: LegendValueDisplay;
1407
- /**
1408
- * Horizontal offset for tooltip positioning in pixels (default: 0)
1409
- */
1410
- tooltipOffsetX?: number;
1411
- /**
1412
- * Vertical offset for tooltip positioning in pixels (default: -15)
1413
- */
1414
- tooltipOffsetY?: number;
1415
- /**
1416
- * Custom render function for tooltip content.
1417
- * When provided, replaces the default BaseTooltip with custom content.
1418
- */
1419
- renderTooltip?: (params: PieSemiCircleChartRenderTooltipParams) => ReactNode;
1472
+ /**
1473
+ * Explicit width of the chart container in pixels.
1474
+ * When omitted, the chart fills its parent container's width.
1475
+ * The chart always maintains a 2:1 width-to-height ratio, constrained by available space.
1476
+ */
1477
+ width?: number;
1478
+ /**
1479
+ * Thickness of the pie chart. A value between 0 and 1
1480
+ */
1481
+ thickness?: number;
1482
+ /**
1483
+ * Direction of chart rendering
1484
+ * true for clockwise, false for counter-clockwise
1485
+ */
1486
+ clockwise?: boolean;
1487
+ /**
1488
+ * Label text to display above the chart
1489
+ */
1490
+ label?: string;
1491
+ /**
1492
+ * Note text to display below the label
1493
+ */
1494
+ note?: string;
1495
+ /**
1496
+ * Use the children prop to render additional elements on the chart.
1497
+ */
1498
+ children?: ReactNode;
1499
+ /**
1500
+ * What type of value to display in the legend when showValues is true.
1501
+ * - 'percentage': Shows percentage values (e.g., "23%") [default]
1502
+ * - 'value': Shows raw numeric values (e.g., "30000")
1503
+ * - 'valueDisplay': Shows formatted values (e.g., "30K")
1504
+ * - 'none': Shows no values, only labels
1505
+ */
1506
+ legendValueDisplay?: LegendValueDisplay;
1507
+ /**
1508
+ * Horizontal offset for tooltip positioning in pixels (default: 0)
1509
+ */
1510
+ tooltipOffsetX?: number;
1511
+ /**
1512
+ * Vertical offset for tooltip positioning in pixels (default: -15)
1513
+ */
1514
+ tooltipOffsetY?: number;
1515
+ /**
1516
+ * Custom render function for tooltip content.
1517
+ * When provided, replaces the default BaseTooltip with custom content.
1518
+ */
1519
+ renderTooltip?: (params: PieSemiCircleChartRenderTooltipParams) => ReactNode;
1420
1520
  }
1421
1521
  type PieSemiCircleChartBaseProps = Optional<PieSemiCircleChartProps, 'width'>;
1422
1522
  type PieSemiCircleChartComponent = ChartComponentWithComposition<PieSemiCircleChartBaseProps>;
1423
1523
  type PieSemiCircleChartResponsiveComponent = ChartComponentWithComposition<PieSemiCircleChartBaseProps & ResponsiveConfig>;
1424
- type ArcData = PieArcDatum<DataPointPercentageCalculated>;
1524
+ type ArcData = PieProvidedProps<DataPointPercentageCalculated>['arcs'][number];
1425
1525
  declare const PieSemiCircleChart: PieSemiCircleChartComponent;
1426
1526
  declare const PieSemiCircleChartResponsive: PieSemiCircleChartResponsiveComponent;
1427
-
1527
+ //#endregion
1528
+ //#region src/charts/sparkline/types.d.ts
1428
1529
  type SparklineDataPoint = number;
1429
1530
  type GradientConfig = {
1430
- /**
1431
- * Start color for gradient (defaults to color prop)
1432
- */
1433
- from?: string;
1434
- /**
1435
- * End color for gradient (defaults to theme backgroundColor)
1436
- */
1437
- to?: string;
1438
- /**
1439
- * Start opacity (0-1)
1440
- * @default 0.5
1441
- */
1442
- fromOpacity?: number;
1443
- /**
1444
- * End opacity (0-1)
1445
- * @default 0.0
1446
- */
1447
- toOpacity?: number;
1531
+ /**
1532
+ * Start color for gradient (defaults to color prop)
1533
+ */
1534
+ from?: string;
1535
+ /**
1536
+ * End color for gradient (defaults to theme backgroundColor)
1537
+ */
1538
+ to?: string;
1539
+ /**
1540
+ * Start opacity (0-1)
1541
+ * @default 0.5
1542
+ */
1543
+ fromOpacity?: number;
1544
+ /**
1545
+ * End opacity (0-1)
1546
+ * @default 0.0
1547
+ */
1548
+ toOpacity?: number;
1448
1549
  };
1449
1550
  interface SparklineProps {
1450
- /**
1451
- * Array of numeric values to plot
1452
- * @example [10, 25, 15, 30, 22, 35]
1453
- */
1454
- data: SparklineDataPoint[];
1455
- /**
1456
- * Width of the sparkline in pixels
1457
- * @default 100
1458
- */
1459
- width?: number;
1460
- /**
1461
- * Height of the sparkline in pixels
1462
- * @default 40
1463
- */
1464
- height?: number;
1465
- /**
1466
- * Size (used by responsive variant, equivalent to width for square charts)
1467
- */
1468
- size?: number;
1469
- /**
1470
- * Color for the line stroke (hex or CSS color)
1471
- * @default Theme color (first color in theme.colors array)
1472
- */
1473
- color?: string;
1474
- /**
1475
- * Line stroke width in pixels
1476
- * @default 1
1477
- */
1478
- strokeWidth?: number;
1479
- /**
1480
- * Whether to render the gradient fill beneath the line
1481
- * @default true
1482
- */
1483
- withGradientFill?: boolean;
1484
- /**
1485
- * Gradient configuration for area fill
1486
- * If not provided, uses color prop with default opacity values
1487
- */
1488
- gradient?: GradientConfig;
1489
- /**
1490
- * Additional CSS class name
1491
- */
1492
- className?: string;
1493
- /**
1494
- * Chart ID for unique gradient/element identification
1495
- */
1496
- chartId?: string;
1497
- /**
1498
- * Margin around the chart
1499
- * @default { top: 2, right: 2, bottom: 2, left: 2 }
1500
- */
1501
- margin?: {
1502
- top?: number;
1503
- right?: number;
1504
- bottom?: number;
1505
- left?: number;
1506
- };
1507
- /**
1508
- * Enable entry animation on initial render
1509
- * Creates a rising effect where the line scales up from the bottom.
1510
- * Automatically respects user's prefers-reduced-motion system setting.
1511
- * @default false
1512
- */
1513
- animation?: boolean;
1551
+ /**
1552
+ * Array of numeric values to plot
1553
+ * @example [10, 25, 15, 30, 22, 35]
1554
+ */
1555
+ data: SparklineDataPoint[];
1556
+ /**
1557
+ * Width of the sparkline in pixels
1558
+ * @default 100
1559
+ */
1560
+ width?: number;
1561
+ /**
1562
+ * Height of the sparkline in pixels
1563
+ * @default 40
1564
+ */
1565
+ height?: number;
1566
+ /**
1567
+ * Size (used by responsive variant, equivalent to width for square charts)
1568
+ */
1569
+ size?: number;
1570
+ /**
1571
+ * Color for the line stroke (hex or CSS color)
1572
+ * @default Theme color (first color in theme.colors array)
1573
+ */
1574
+ color?: string;
1575
+ /**
1576
+ * Line stroke width in pixels
1577
+ * @default 1
1578
+ */
1579
+ strokeWidth?: number;
1580
+ /**
1581
+ * Whether to render the gradient fill beneath the line
1582
+ * @default true
1583
+ */
1584
+ withGradientFill?: boolean;
1585
+ /**
1586
+ * Gradient configuration for area fill
1587
+ * If not provided, uses color prop with default opacity values
1588
+ */
1589
+ gradient?: GradientConfig;
1590
+ /**
1591
+ * Additional CSS class name
1592
+ */
1593
+ className?: string;
1594
+ /**
1595
+ * Chart ID for unique gradient/element identification
1596
+ */
1597
+ chartId?: string;
1598
+ /**
1599
+ * Margin around the chart
1600
+ * @default { top: 2, right: 2, bottom: 2, left: 2 }
1601
+ */
1602
+ margin?: {
1603
+ top?: number;
1604
+ right?: number;
1605
+ bottom?: number;
1606
+ left?: number;
1607
+ };
1608
+ /**
1609
+ * Enable entry animation on initial render
1610
+ * Creates a rising effect where the line scales up from the bottom.
1611
+ * Automatically respects user's prefers-reduced-motion system setting.
1612
+ * @default false
1613
+ */
1614
+ animation?: boolean;
1514
1615
  }
1515
-
1616
+ //#endregion
1617
+ //#region src/charts/sparkline/sparkline.d.ts
1516
1618
  /**
1517
1619
  * Sparkline - A minimal line chart for inline data visualization.
1518
1620
  *
@@ -1523,86 +1625,107 @@ interface SparklineProps {
1523
1625
  * This component is built on top of LineChart with preconfigured settings
1524
1626
  * for minimal display (no axes, grid, tooltips, or legend).
1525
1627
  */
1526
- declare const SparklineUnresponsive: react.ForwardRefExoticComponent<SparklineProps & react.RefAttributes<HTMLDivElement>>;
1628
+ declare const SparklineUnresponsive: import("react").ForwardRefExoticComponent<SparklineProps & import("react").RefAttributes<HTMLDivElement>>;
1527
1629
  /**
1528
1630
  * Responsive Sparkline chart component
1529
1631
  */
1530
- declare const Sparkline: ({ resizeDebounceTime, maxWidth, aspectRatio, size, width, height, ...chartProps }: Omit<SparklineProps, "width" | "height" | "size"> & {
1531
- width?: number;
1532
- height?: number;
1533
- size?: number;
1534
- } & ResponsiveConfig) => react_jsx_runtime.JSX.Element;
1535
-
1632
+ declare const Sparkline: ({
1633
+ resizeDebounceTime,
1634
+ maxWidth,
1635
+ aspectRatio,
1636
+ size,
1637
+ width,
1638
+ height,
1639
+ ...chartProps
1640
+ }: Omit<SparklineProps, "width" | "height" | "size"> & {
1641
+ width?: number;
1642
+ height?: number;
1643
+ size?: number;
1644
+ } & ResponsiveConfig) => import("react/jsx-runtime").JSX.Element;
1645
+ //#endregion
1646
+ //#region src/components/tooltip/base-tooltip.d.ts
1536
1647
  type TooltipData = {
1537
- label: string;
1538
- value: number;
1539
- valueDisplay?: string;
1648
+ label: string;
1649
+ value: number;
1650
+ valueDisplay?: string;
1540
1651
  };
1541
1652
  type TooltipComponentProps = {
1542
- data: TooltipData;
1543
- className?: string;
1653
+ data: TooltipData;
1654
+ className?: string;
1544
1655
  };
1545
1656
  type TooltipCommonProps = {
1546
- top: number;
1547
- left: number;
1548
- style?: CSSProperties;
1549
- className?: string;
1550
- /**
1551
- * Whether to render the tooltip container div. When false, only renders the content.
1552
- * Useful when the tooltip is rendered inside a portal or custom container.
1553
- * @default true
1554
- */
1555
- renderContainer?: boolean;
1657
+ top: number;
1658
+ left: number;
1659
+ style?: CSSProperties;
1660
+ className?: string;
1661
+ /**
1662
+ * Whether to render the tooltip container div. When false, only renders the content.
1663
+ * Useful when the tooltip is rendered inside a portal or custom container.
1664
+ * @default true
1665
+ */
1666
+ renderContainer?: boolean;
1556
1667
  };
1557
1668
  type DefaultDataTooltip = {
1558
- data: TooltipData;
1559
- component?: ComponentType<TooltipComponentProps>;
1560
- children?: never;
1669
+ data: TooltipData;
1670
+ component?: ComponentType<TooltipComponentProps>;
1671
+ children?: never;
1561
1672
  };
1562
1673
  type CustomTooltip = {
1563
- children: ReactNode;
1564
- data?: never;
1565
- component?: never;
1674
+ children: ReactNode;
1675
+ data?: never;
1676
+ component?: never;
1566
1677
  };
1567
1678
  type BaseTooltipProps = TooltipCommonProps & (DefaultDataTooltip | CustomTooltip);
1568
- declare const BaseTooltip: ({ data, top, left, component: Component, children, className, style, renderContainer, }: BaseTooltipProps) => string | number | true | Iterable<ReactNode> | react_jsx_runtime.JSX.Element;
1569
-
1679
+ declare const BaseTooltip: ({
1680
+ data,
1681
+ top,
1682
+ left,
1683
+ component: Component,
1684
+ children,
1685
+ className,
1686
+ style,
1687
+ renderContainer
1688
+ }: BaseTooltipProps) => string | number | true | Iterable<ReactNode> | import("react/jsx-runtime").JSX.Element;
1689
+ //#endregion
1690
+ //#region src/components/tooltip/accessible-tooltip.d.ts
1570
1691
  type FlattenedTooltipData = {
1571
- datum: DataPointDate;
1572
- seriesLabel: string;
1573
- seriesIndex: number;
1574
- dataPointIndex: number;
1692
+ datum: DataPointDate;
1693
+ seriesLabel: string;
1694
+ seriesIndex: number;
1695
+ dataPointIndex: number;
1575
1696
  };
1576
- interface AccessibleTooltipProps extends Omit<TooltipProps$1<DataPointDate>, 'renderTooltip'> {
1577
- renderTooltip?: (params: RenderTooltipParams<DataPointDate>) => ReactNode;
1578
- selectedIndex?: number | undefined;
1579
- tooltipRef?: (element: HTMLDivElement | null) => void;
1580
- keyboardFocusedClassName?: string;
1581
- /**
1582
- * Flattened tooltip data prepared by parent component
1583
- * Each index corresponds to one tooltip to show
1584
- */
1585
- tooltipData?: FlattenedTooltipData[];
1586
- /**
1587
- * For line charts: series data to show all series at selected data point
1588
- * When provided, shows all series instead of individual tooltips
1589
- */
1590
- series?: SeriesData[];
1591
- /**
1592
- * Whether to combine tooltip information from multiple series into a single tooltip. This is useful for line charts.
1593
- * Or to show individual tooltips for each series. This is useful for bar charts.
1594
- */
1595
- mode?: 'individual' | 'group';
1697
+ interface AccessibleTooltipProps extends Omit<XyChartTooltipProps<DataPointDate>, 'renderTooltip'> {
1698
+ renderTooltip?: (params: RenderTooltipParams<DataPointDate>) => ReactNode;
1699
+ selectedIndex?: number | undefined;
1700
+ tooltipRef?: (element: HTMLDivElement | null) => void;
1701
+ keyboardFocusedClassName?: string;
1702
+ /**
1703
+ * Flattened tooltip data prepared by parent component
1704
+ * Each index corresponds to one tooltip to show
1705
+ */
1706
+ tooltipData?: FlattenedTooltipData[];
1707
+ /**
1708
+ * For line charts: series data to show all series at selected data point
1709
+ * When provided, shows all series instead of individual tooltips
1710
+ */
1711
+ series?: SeriesData[];
1712
+ /**
1713
+ * Whether to combine tooltip information from multiple series into a single tooltip. This is useful for line charts.
1714
+ * Or to show individual tooltips for each series. This is useful for bar charts.
1715
+ */
1716
+ mode?: 'individual' | 'group';
1596
1717
  }
1597
1718
  declare const AccessibleTooltip: React.FC<AccessibleTooltipProps>;
1598
-
1719
+ //#endregion
1720
+ //#region src/components/tooltip/types.d.ts
1599
1721
  type TooltipProps = {
1600
- data: {
1601
- label: string;
1602
- value: number;
1603
- };
1722
+ data: {
1723
+ label: string;
1724
+ value: number;
1725
+ };
1604
1726
  };
1605
-
1727
+ //#endregion
1728
+ //#region src/components/trend-indicator/types.d.ts
1606
1729
  /**
1607
1730
  * The direction of the trend
1608
1731
  */
@@ -1611,29 +1734,30 @@ type TrendDirection = 'up' | 'down' | 'neutral';
1611
1734
  * Props for the TrendIndicator component
1612
1735
  */
1613
1736
  type TrendIndicatorProps = {
1614
- /**
1615
- * The direction of the trend (up, down, or neutral)
1616
- */
1617
- direction: TrendDirection;
1618
- /**
1619
- * The value to display (e.g., "14%", "+$500", "2.5k")
1620
- */
1621
- value: string | number;
1622
- /**
1623
- * Additional CSS class name
1624
- */
1625
- className?: string;
1626
- /**
1627
- * Inline styles
1628
- */
1629
- style?: CSSProperties;
1630
- /**
1631
- * Whether to show the directional icon
1632
- * @default true
1633
- */
1634
- showIcon?: boolean;
1737
+ /**
1738
+ * The direction of the trend (up, down, or neutral)
1739
+ */
1740
+ direction: TrendDirection;
1741
+ /**
1742
+ * The value to display (e.g., "14%", "+$500", "2.5k")
1743
+ */
1744
+ value: string | number;
1745
+ /**
1746
+ * Additional CSS class name
1747
+ */
1748
+ className?: string;
1749
+ /**
1750
+ * Inline styles
1751
+ */
1752
+ style?: CSSProperties;
1753
+ /**
1754
+ * Whether to show the directional icon
1755
+ * @default true
1756
+ */
1757
+ showIcon?: boolean;
1635
1758
  };
1636
-
1759
+ //#endregion
1760
+ //#region src/components/trend-indicator/trend-indicator.d.ts
1637
1761
  /**
1638
1762
  * TrendIndicator displays a directional trend with a value.
1639
1763
  * Used to show percentage changes or growth metrics.
@@ -1641,57 +1765,69 @@ type TrendIndicatorProps = {
1641
1765
  * @param {TrendIndicatorProps} props - Component props
1642
1766
  * @return {JSX.Element} The rendered trend indicator
1643
1767
  */
1644
- declare function TrendIndicator({ direction, value, className, style, showIcon, }: TrendIndicatorProps): react_jsx_runtime.JSX.Element;
1645
-
1768
+ declare function TrendIndicator({
1769
+ direction,
1770
+ value,
1771
+ className,
1772
+ style,
1773
+ showIcon
1774
+ }: TrendIndicatorProps): import("react/jsx-runtime").JSX.Element;
1775
+ //#endregion
1776
+ //#region src/providers/chart-context/types.d.ts
1646
1777
  interface ChartRegistration {
1647
- legendItems: BaseLegendItem[];
1648
- chartType: ChartType;
1649
- metadata?: Record<string, unknown>;
1778
+ legendItems: BaseLegendItem[];
1779
+ chartType: ChartType;
1780
+ metadata?: Record<string, unknown>;
1650
1781
  }
1651
1782
  type GetElementStylesParams = {
1652
- index: number;
1653
- data?: SeriesData | DataPointPercentage;
1654
- overrideColor?: string;
1655
- legendShape?: LegendShape<SeriesData[], number>;
1783
+ index: number;
1784
+ data?: SeriesData | DataPointPercentage;
1785
+ overrideColor?: string;
1786
+ legendShape?: LegendShape<SeriesData[], number>;
1656
1787
  };
1657
1788
  type ElementStyles = {
1658
- color: string;
1659
- lineStyles: LineStyles;
1660
- glyph: <Datum extends object>(props: GlyphProps<Datum>) => ReactNode;
1661
- shapeStyles: CSSProperties & LineStyles;
1789
+ color: string;
1790
+ lineStyles: LineStyles$1;
1791
+ glyph: <Datum extends object>(props: GlyphProps<Datum>) => ReactNode;
1792
+ shapeStyles: CSSProperties & LineStyles$1;
1662
1793
  };
1663
1794
  interface GlobalChartsContextValue {
1664
- charts: Map<string, ChartRegistration>;
1665
- registerChart: (id: string, data: ChartRegistration) => void;
1666
- unregisterChart: (id: string) => void;
1667
- getChartData: (id: string) => ChartRegistration | undefined;
1668
- theme: CompleteChartTheme;
1669
- getElementStyles: (params: GetElementStylesParams) => ElementStyles;
1670
- toggleSeriesVisibility: (chartId: string, seriesLabel: string) => void;
1671
- isSeriesVisible: (chartId: string, seriesLabel: string) => boolean;
1672
- getHiddenSeries: (chartId: string) => Set<string>;
1673
- isColorPaletteResolved: boolean;
1795
+ charts: Map<string, ChartRegistration>;
1796
+ registerChart: (id: string, data: ChartRegistration) => void;
1797
+ unregisterChart: (id: string) => void;
1798
+ getChartData: (id: string) => ChartRegistration | undefined;
1799
+ theme: CompleteChartTheme;
1800
+ getElementStyles: (params: GetElementStylesParams) => ElementStyles;
1801
+ toggleSeriesVisibility: (chartId: string, seriesLabel: string) => void;
1802
+ isSeriesVisible: (chartId: string, seriesLabel: string) => boolean;
1803
+ getHiddenSeries: (chartId: string) => Set<string>;
1804
+ isColorPaletteResolved: boolean;
1674
1805
  }
1675
-
1676
- declare const GlobalChartsContext: react.Context<GlobalChartsContextValue>;
1806
+ //#endregion
1807
+ //#region src/providers/chart-context/global-charts-provider.d.ts
1808
+ declare const GlobalChartsContext: import("react").Context<GlobalChartsContextValue>;
1677
1809
  interface GlobalChartsProviderProps {
1678
- children: ReactNode;
1679
- theme?: Partial<ChartTheme>;
1810
+ children: ReactNode;
1811
+ theme?: Partial<ChartTheme>;
1680
1812
  }
1681
1813
  declare const GlobalChartsProvider: FC<GlobalChartsProviderProps>;
1682
-
1814
+ //#endregion
1815
+ //#region src/providers/chart-context/hooks/use-global-charts-context.d.ts
1683
1816
  declare const useGlobalChartsContext: () => GlobalChartsContextValue;
1684
-
1817
+ //#endregion
1818
+ //#region src/providers/chart-context/hooks/use-global-charts-theme.d.ts
1685
1819
  /**
1686
1820
  * Hook to get the global chart theme from GlobalChartsProvider
1687
1821
  *
1688
1822
  * @return The global chart theme
1689
1823
  */
1690
1824
  declare const useGlobalChartsTheme: () => CompleteChartTheme;
1691
-
1825
+ //#endregion
1826
+ //#region src/providers/chart-context/themes.d.ts
1692
1827
  /**
1693
1828
  * Default theme configuration
1694
1829
  */
1695
1830
  declare const defaultTheme: CompleteChartTheme;
1696
-
1697
- export { AccessibleTooltip, type AnnotationStyles, type ArcData, AreaChartResponsive as AreaChart, type AreaChartProps, AreaChart as AreaChartUnresponsive, type AxisOptions, BarChartResponsive as BarChart, type BarChartProps, BarChart as BarChartUnresponsive, BarListChartResponsive as BarListChart, type BarListChartProps, BarListChart as BarListChartUnresponsive, type BaseChartProps, type BaseLegendItem, type BaseLegendProps, BaseTooltip, type BaseTooltipProps, type ChartLegendConfig, type ChartLegendOptions, type ChartTheme, type CompleteChartTheme, ConversionFunnelChartWithProvider as ConversionFunnelChart, type ConversionFunnelChartProps, type CurveType, type DataPoint, type DataPointDate, type DataPointPercentage, type FunnelStep, GeoChartResponsive as GeoChart, type GeoChartProps, GeoChartWithProvider as GeoChartUnresponsive, type GeoData, type GeoRegion, type GeoResolution, GlobalChartsContext, GlobalChartsProvider, type GradientConfig, type GradientStop, type GridProps, LeaderboardChartResponsive as LeaderboardChart, type LeaderboardChartProps, LeaderboardChart as LeaderboardChartUnresponsive, type LeaderboardEntry, Legend, type LegendItemStyles, type LegendLabelStyles, type LegendPosition, type LegendProps, type LegendShapeStyles, type LegendValueDisplay, LineChartResponsive as LineChart, type LineChartAnnotationProps, type LineChartProps, LineChart as LineChartUnresponsive, type MainMetricRenderProps, type MetricValueType, type MultipleDataPointsDate, type Optional, type OrientationType, PieChartResponsive as PieChart, type PieChartProps, type PieChartRenderTooltipParams, PieChart as PieChartUnresponsive, PieSemiCircleChartResponsive as PieSemiCircleChart, type PieSemiCircleChartProps, type PieSemiCircleChartRenderTooltipParams, PieSemiCircleChart as PieSemiCircleChartUnresponsive, type RenderLabelProps, type RenderLineGlyphProps, type RenderValueProps, type ScaleOptions, type SeriesData, type SeriesDataOptions, Sparkline, type SparklineDataPoint, type SparklineProps, SparklineUnresponsive, type StepLabelRenderProps, type StepRateRenderProps, GlobalChartsProvider as ThemeProvider, type TooltipData, type TooltipDatum, type TooltipProps, type TooltipRenderProps, type TrendDirection, TrendIndicator, type TrendIndicatorProps, defaultTheme, formatMetricValue, formatPercentage, getColorDistance, hexToRgba, isValidHexColor, lightenHexColor, mergeThemes, normalizeColorToHex, parseAsLocalDate, parseHslString, parseRgbString, useChartLegendItems, useGlobalChartsContext, useGlobalChartsTheme, useLeaderboardLegendItems, validateHexColor };
1831
+ //#endregion
1832
+ export { AccessibleTooltip, type AnnotationStyles, type ArcData, AreaChartResponsive as AreaChart, type AreaChartProps, AreaChart as AreaChartUnresponsive, type AxisOptions, BarChartResponsive as BarChart, type BarChartProps, BarChart as BarChartUnresponsive, BarListChartResponsive as BarListChart, type BarListChartProps, BarListChart as BarListChartUnresponsive, type BaseChartProps, type BaseLegendItem, type BaseLegendProps, BaseTooltip, type BaseTooltipProps, type ChartLegendConfig, type ChartLegendOptions, type ChartTheme, type CompleteChartTheme, ConversionFunnelChartWithProvider as ConversionFunnelChart, type ConversionFunnelChartProps, type CurveType, type DataPoint, type DataPointDate, type DataPointPercentage, type EventHandlerParams, type FunnelStep, GeoChartResponsive as GeoChart, type GeoChartProps, GeoChartWithProvider as GeoChartUnresponsive, type GeoData, type GeoRegion, type GeoResolution, GlobalChartsContext, GlobalChartsProvider, GlobalChartsProvider as ThemeProvider, type GoogleDataTableColumn, type GoogleDataTableColumnRoleType, type GoogleDataTableRow, type GradientConfig, type GradientStop, type GridProps, type GridStyles, LeaderboardChartResponsive as LeaderboardChart, type LeaderboardChartProps, LeaderboardChart as LeaderboardChartUnresponsive, type LeaderboardEntry, Legend, type LegendItemStyles, type LegendLabelStyles, type LegendPosition, type LegendProps, type LegendShape, type LegendShapeLabel, type LegendShapeRenderProps, type LegendShapeStyles, type LegendValueDisplay, LineChartResponsive as LineChart, type LineChartAnnotationProps, type LineChartProps, LineChart as LineChartUnresponsive, type LineStyles, type MainMetricRenderProps, type MetricValueType, type MultipleDataPointsDate, type Optional, type OrientationType, PieChartResponsive as PieChart, type PieChartProps, type PieChartRenderTooltipParams, PieChart as PieChartUnresponsive, PieSemiCircleChartResponsive as PieSemiCircleChart, type PieSemiCircleChartProps, type PieSemiCircleChartRenderTooltipParams, PieSemiCircleChart as PieSemiCircleChartUnresponsive, type RenderLabelProps, type RenderLineGlyphProps, type RenderTooltipGlyphProps, type RenderTooltipParams, type RenderValueProps, type ScaleOptions, type SeriesData, type SeriesDataOptions, Sparkline, type SparklineDataPoint, type SparklineProps, SparklineUnresponsive, type StepLabelRenderProps, type StepRateRenderProps, type TooltipData, type TooltipDatum, type TooltipProps, type TooltipRenderProps, type TrendDirection, TrendIndicator, type TrendIndicatorProps, type XyChartTooltipProps, defaultTheme, formatMetricValue, formatPercentage, getColorDistance, hexToRgba, isValidHexColor, lightenHexColor, mergeThemes, normalizeColorToHex, parseAsLocalDate, parseHslString, parseRgbString, useChartLegendItems, useGlobalChartsContext, useGlobalChartsTheme, useLeaderboardLegendItems, validateHexColor };
1833
+ //# sourceMappingURL=index.d.ts.map