@trackunit/react-chart-components 1.7.114 → 1.7.116

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.cjs.js CHANGED
@@ -41,7 +41,7 @@ function isECElementEvent(value) {
41
41
  /**
42
42
  * A React wrapper for ECharts that handles initialization, events, and cleanup.
43
43
  */
44
- const EChart = ({ option, style, className, onChartReady, onClick, onEvents, notMerge = false, renderer = "canvas", dataTestId, }) => {
44
+ const EChart = ({ option, style, className, onChartReady, onClick, onEvents, notMerge = false, renderer = "canvas", "data-testid": dataTestId, }) => {
45
45
  const containerRef = react.useRef(null);
46
46
  const internalChartRef = react.useRef(undefined);
47
47
  const isInitialRender = react.useRef(true);
@@ -180,13 +180,13 @@ const cvaEChart = cssClassVarianceUtilities.cvaMerge(["w-full", "h-full"]);
180
180
  * The Chart component is a wrapper component for ECharts.
181
181
  * Handles events and click functionality.
182
182
  */
183
- const Chart = ({ options, showLoading = false, className, style, onChartReady, onClick, onEvents, merge = true, loadingOption, timezoneLabel, renderer = "canvas", dataTestId, }) => {
183
+ const Chart = ({ options, showLoading = false, className, style, onChartReady, onClick, onEvents, merge = true, loadingOption, timezoneLabel, renderer = "canvas", "data-testid": dataTestId, }) => {
184
184
  const containerStyle = {
185
185
  height: style?.height ?? "300px",
186
186
  width: style?.width ?? "100%",
187
187
  ...style,
188
188
  };
189
- return (jsxRuntime.jsx("div", { className: "grid h-full w-full grid-cols-1 grid-rows-1 items-center gap-1", "data-testid": dataTestId, style: containerStyle, children: showLoading ? (jsxRuntime.jsxs("div", { className: "grid place-items-center overflow-y-auto", "data-testid": `${dataTestId}-loading`, children: [jsxRuntime.jsx(reactComponents.Spinner, { centering: "centered" }), loadingOption?.text ? (jsxRuntime.jsx(reactComponents.Text, { align: "center", subtle: true, children: loadingOption.text })) : null] })) : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(EChart, { className: className, dataTestId: `${dataTestId}-chart`, notMerge: !merge, onChartReady: onChartReady, onClick: onClick, onEvents: onEvents, option: options, renderer: renderer, style: style }), timezoneLabel] })) }));
189
+ return (jsxRuntime.jsx("div", { className: "grid h-full w-full grid-cols-1 grid-rows-1 items-center gap-1", "data-testid": dataTestId, style: containerStyle, children: showLoading ? (jsxRuntime.jsxs("div", { className: "grid place-items-center overflow-y-auto", "data-testid": `${dataTestId}-loading`, children: [jsxRuntime.jsx(reactComponents.Spinner, { centering: "centered" }), loadingOption?.text ? (jsxRuntime.jsx(reactComponents.Text, { align: "center", subtle: true, children: loadingOption.text })) : null] })) : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(EChart, { className: className, "data-testid": `${dataTestId}-chart`, notMerge: !merge, onChartReady: onChartReady, onClick: onClick, onEvents: onEvents, option: options, renderer: renderer, style: style }), timezoneLabel] })) }));
190
190
  };
191
191
 
192
192
  const cvaLegendItem = cssClassVarianceUtilities.cvaMerge([
@@ -236,7 +236,7 @@ const cvaLegendItemIndicator = cssClassVarianceUtilities.cvaMerge(["w-3", "mr-1"
236
236
  * @param {LegendItem} props - The props for the LegendItem component
237
237
  * @returns {ReactElement} LegendItem component
238
238
  */
239
- const LegendItem = ({ className, count, label, disabled, selected, onClick, color, dataTestId, onMouseEnter, onMouseLeave, unit, hideValue = false, }) => {
239
+ const LegendItem = ({ className, count, label, disabled, selected, onClick, color, "data-testid": dataTestId, onMouseEnter, onMouseLeave, unit, hideValue = false, }) => {
240
240
  const handleOnClick = onClick && !disabled ? () => onClick() : undefined;
241
241
  return (jsxRuntime.jsxs("div", { className: cvaLegendItem({ disabled, selected, isClickable: !disabled && Boolean(onClick), className }), "data-testid": dataTestId, onClick: handleOnClick, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, children: [jsxRuntime.jsx("div", { className: cvaLegendItemIndicator({ selected }), "data-testid": dataTestId ? `${dataTestId}-indicator` : null, style: { backgroundColor: color } }), jsxRuntime.jsxs("p", { className: "truncate text-xs", children: [label, "\u00A0"] }), hideValue ? null : (jsxRuntime.jsxs("p", { className: "text-xs", children: ["(", count || 0, ")", unit || ""] }))] }));
242
242
  };
@@ -300,7 +300,7 @@ const useLimitDataSet = (data, limit, autoSortData = true, othersName) => {
300
300
  * @param {DonutChartProps} props - The props for the Chart component
301
301
  * @returns {ReactElement} Chart component
302
302
  */
303
- const DonutChart = ({ data, size = "full", loading = false, onClick, className, dataTestId, maxDataPoints = 6, showOthers = true, unit, overrideTotal, autoSortData = true, hideLegendValues = false, othersName, }) => {
303
+ const DonutChart = ({ data, size = "full", loading = false, onClick, className, "data-testid": dataTestId, maxDataPoints = 6, showOthers = true, unit, overrideTotal, autoSortData = true, hideLegendValues = false, othersName, }) => {
304
304
  const containerRef = react.useRef(null);
305
305
  const chartRef = react.useRef(null);
306
306
  const totalValue = react.useMemo(() => overrideTotal ?? data?.map(item => item.value ?? 0).reduce((a, b) => a + b, 0) ?? 0, [data, overrideTotal]);
@@ -424,9 +424,9 @@ const DonutChart = ({ data, size = "full", loading = false, onClick, className,
424
424
  };
425
425
  }, [size, isHovering, unit, totalValue, showOthers, limitedData, limitedDataWithoutOthers, chartColor]);
426
426
  if (loading) {
427
- return jsxRuntime.jsx(reactComponents.Spinner, { centering: "centered", dataTestId: dataTestId ? `${dataTestId}-loading` : "donut-chart-loading" });
427
+ return jsxRuntime.jsx(reactComponents.Spinner, { centering: "centered", "data-testid": dataTestId ? `${dataTestId}-loading` : "donut-chart-loading" });
428
428
  }
429
- return (jsxRuntime.jsxs("div", { className: cvaChartRoot$1({ className }), "data-testid": dataTestId, ref: containerRef, children: [jsxRuntime.jsx("div", { className: cvaChartContainer(), children: jsxRuntime.jsx(Chart, { className: cvaChart({ size }), dataTestId: dataTestId ? `chart-${dataTestId}` : undefined, onChartReady: handleChartReady, onClick: handleChartClick, onEvents: handleChartEvents, options: chartOptions, style: { width: "100%", height: "100%" } }) }), size === "full" && (jsxRuntime.jsx("div", { className: cvaLegend(), "data-testid": "legend", children: limitedData.map((item, index) => (jsxRuntime.jsx(LegendItem, { className: "p-1.5 py-0.5", color: item.color ?? chartColor(index), count: item.value, dataTestId: `legend-${item.id}`, disabled: (item.value ?? 0) === 0, hideValue: hideLegendValues, label: item.name, onClick: onClick ? () => onClick(item) : undefined, onMouseEnter: () => handleLegendMouseEnter(item), onMouseLeave: handleLegendMouseLeave, selected: item.selected, unit: unit }, item.id))) }))] }));
429
+ return (jsxRuntime.jsxs("div", { className: cvaChartRoot$1({ className }), "data-testid": dataTestId, ref: containerRef, children: [jsxRuntime.jsx("div", { className: cvaChartContainer(), children: jsxRuntime.jsx(Chart, { className: cvaChart({ size }), "data-testid": dataTestId ? `chart-${dataTestId}` : undefined, onChartReady: handleChartReady, onClick: handleChartClick, onEvents: handleChartEvents, options: chartOptions, style: { width: "100%", height: "100%" } }) }), size === "full" && (jsxRuntime.jsx("div", { className: cvaLegend(), "data-testid": "legend", children: limitedData.map((item, index) => (jsxRuntime.jsx(LegendItem, { className: "p-1.5 py-0.5", color: item.color ?? chartColor(index), count: item.value, "data-testid": `legend-${item.id}`, disabled: (item.value ?? 0) === 0, hideValue: hideLegendValues, label: item.name, onClick: onClick ? () => onClick(item) : undefined, onMouseEnter: () => handleLegendMouseEnter(item), onMouseLeave: handleLegendMouseLeave, selected: item.selected, unit: unit }, item.id))) }))] }));
430
430
  };
431
431
  const cvaChartRoot$1 = cssClassVarianceUtilities.cvaMerge([
432
432
  "flex",
@@ -457,7 +457,7 @@ const cvaLegend = cssClassVarianceUtilities.cvaMerge(["flex", "overflow-auto", "
457
457
  * @param {BarChartProps} props - The props for the Chart component
458
458
  * @returns {ReactElement} Chart component
459
459
  */
460
- const BarChart = ({ series, loading = false, onClick, className, dataTestId, units, showDataZoom = false, }) => {
460
+ const BarChart = ({ series, loading = false, onClick, className, "data-testid": dataTestId, units, showDataZoom = false, }) => {
461
461
  const { formatDate } = reactDateAndTimeHooks.useDateAndTime();
462
462
  const { chartColor } = useChartColor();
463
463
  const seriesData = react.useMemo(() => {
@@ -474,7 +474,7 @@ const BarChart = ({ series, loading = false, onClick, className, dataTestId, uni
474
474
  }));
475
475
  }, [series, chartColor]);
476
476
  const isDateData = (data) => !!data && "date" in data;
477
- return (jsxRuntime.jsxs("div", { className: cvaChartRoot({ className }), "data-testid": dataTestId, children: [jsxRuntime.jsx("div", { className: "flex-0 flex flex-row gap-2 place-self-end pr-8", "data-testid": "legend", children: seriesData.map((item, index) => (jsxRuntime.jsx(LegendItem, { color: item.color || chartColor(index), dataTestId: `legend-${item.name}`, label: item.name }, item.name))) }), jsxRuntime.jsx("div", { className: "flex min-h-[260px] w-full flex-1", children: jsxRuntime.jsx(Chart, { dataTestId: "bar-chart", onClick: onClick
477
+ return (jsxRuntime.jsxs("div", { className: cvaChartRoot({ className }), "data-testid": dataTestId, children: [jsxRuntime.jsx("div", { className: "flex-0 flex flex-row gap-2 place-self-end pr-8", "data-testid": "legend", children: seriesData.map((item, index) => (jsxRuntime.jsx(LegendItem, { color: item.color || chartColor(index), "data-testid": `legend-${item.name}`, label: item.name }, item.name))) }), jsxRuntime.jsx("div", { className: "flex min-h-[260px] w-full flex-1", children: jsxRuntime.jsx(Chart, { "data-testid": "bar-chart", onClick: onClick
478
478
  ? (e) => {
479
479
  onClick(e);
480
480
  }
package/index.esm.js CHANGED
@@ -20,7 +20,7 @@ function isECElementEvent(value) {
20
20
  /**
21
21
  * A React wrapper for ECharts that handles initialization, events, and cleanup.
22
22
  */
23
- const EChart = ({ option, style, className, onChartReady, onClick, onEvents, notMerge = false, renderer = "canvas", dataTestId, }) => {
23
+ const EChart = ({ option, style, className, onChartReady, onClick, onEvents, notMerge = false, renderer = "canvas", "data-testid": dataTestId, }) => {
24
24
  const containerRef = useRef(null);
25
25
  const internalChartRef = useRef(undefined);
26
26
  const isInitialRender = useRef(true);
@@ -159,13 +159,13 @@ const cvaEChart = cvaMerge(["w-full", "h-full"]);
159
159
  * The Chart component is a wrapper component for ECharts.
160
160
  * Handles events and click functionality.
161
161
  */
162
- const Chart = ({ options, showLoading = false, className, style, onChartReady, onClick, onEvents, merge = true, loadingOption, timezoneLabel, renderer = "canvas", dataTestId, }) => {
162
+ const Chart = ({ options, showLoading = false, className, style, onChartReady, onClick, onEvents, merge = true, loadingOption, timezoneLabel, renderer = "canvas", "data-testid": dataTestId, }) => {
163
163
  const containerStyle = {
164
164
  height: style?.height ?? "300px",
165
165
  width: style?.width ?? "100%",
166
166
  ...style,
167
167
  };
168
- return (jsx("div", { className: "grid h-full w-full grid-cols-1 grid-rows-1 items-center gap-1", "data-testid": dataTestId, style: containerStyle, children: showLoading ? (jsxs("div", { className: "grid place-items-center overflow-y-auto", "data-testid": `${dataTestId}-loading`, children: [jsx(Spinner, { centering: "centered" }), loadingOption?.text ? (jsx(Text, { align: "center", subtle: true, children: loadingOption.text })) : null] })) : (jsxs(Fragment, { children: [jsx(EChart, { className: className, dataTestId: `${dataTestId}-chart`, notMerge: !merge, onChartReady: onChartReady, onClick: onClick, onEvents: onEvents, option: options, renderer: renderer, style: style }), timezoneLabel] })) }));
168
+ return (jsx("div", { className: "grid h-full w-full grid-cols-1 grid-rows-1 items-center gap-1", "data-testid": dataTestId, style: containerStyle, children: showLoading ? (jsxs("div", { className: "grid place-items-center overflow-y-auto", "data-testid": `${dataTestId}-loading`, children: [jsx(Spinner, { centering: "centered" }), loadingOption?.text ? (jsx(Text, { align: "center", subtle: true, children: loadingOption.text })) : null] })) : (jsxs(Fragment, { children: [jsx(EChart, { className: className, "data-testid": `${dataTestId}-chart`, notMerge: !merge, onChartReady: onChartReady, onClick: onClick, onEvents: onEvents, option: options, renderer: renderer, style: style }), timezoneLabel] })) }));
169
169
  };
170
170
 
171
171
  const cvaLegendItem = cvaMerge([
@@ -215,7 +215,7 @@ const cvaLegendItemIndicator = cvaMerge(["w-3", "mr-1", "h-3", "rounded-[50%]",
215
215
  * @param {LegendItem} props - The props for the LegendItem component
216
216
  * @returns {ReactElement} LegendItem component
217
217
  */
218
- const LegendItem = ({ className, count, label, disabled, selected, onClick, color, dataTestId, onMouseEnter, onMouseLeave, unit, hideValue = false, }) => {
218
+ const LegendItem = ({ className, count, label, disabled, selected, onClick, color, "data-testid": dataTestId, onMouseEnter, onMouseLeave, unit, hideValue = false, }) => {
219
219
  const handleOnClick = onClick && !disabled ? () => onClick() : undefined;
220
220
  return (jsxs("div", { className: cvaLegendItem({ disabled, selected, isClickable: !disabled && Boolean(onClick), className }), "data-testid": dataTestId, onClick: handleOnClick, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, children: [jsx("div", { className: cvaLegendItemIndicator({ selected }), "data-testid": dataTestId ? `${dataTestId}-indicator` : null, style: { backgroundColor: color } }), jsxs("p", { className: "truncate text-xs", children: [label, "\u00A0"] }), hideValue ? null : (jsxs("p", { className: "text-xs", children: ["(", count || 0, ")", unit || ""] }))] }));
221
221
  };
@@ -279,7 +279,7 @@ const useLimitDataSet = (data, limit, autoSortData = true, othersName) => {
279
279
  * @param {DonutChartProps} props - The props for the Chart component
280
280
  * @returns {ReactElement} Chart component
281
281
  */
282
- const DonutChart = ({ data, size = "full", loading = false, onClick, className, dataTestId, maxDataPoints = 6, showOthers = true, unit, overrideTotal, autoSortData = true, hideLegendValues = false, othersName, }) => {
282
+ const DonutChart = ({ data, size = "full", loading = false, onClick, className, "data-testid": dataTestId, maxDataPoints = 6, showOthers = true, unit, overrideTotal, autoSortData = true, hideLegendValues = false, othersName, }) => {
283
283
  const containerRef = useRef(null);
284
284
  const chartRef = useRef(null);
285
285
  const totalValue = useMemo(() => overrideTotal ?? data?.map(item => item.value ?? 0).reduce((a, b) => a + b, 0) ?? 0, [data, overrideTotal]);
@@ -403,9 +403,9 @@ const DonutChart = ({ data, size = "full", loading = false, onClick, className,
403
403
  };
404
404
  }, [size, isHovering, unit, totalValue, showOthers, limitedData, limitedDataWithoutOthers, chartColor]);
405
405
  if (loading) {
406
- return jsx(Spinner, { centering: "centered", dataTestId: dataTestId ? `${dataTestId}-loading` : "donut-chart-loading" });
406
+ return jsx(Spinner, { centering: "centered", "data-testid": dataTestId ? `${dataTestId}-loading` : "donut-chart-loading" });
407
407
  }
408
- return (jsxs("div", { className: cvaChartRoot$1({ className }), "data-testid": dataTestId, ref: containerRef, children: [jsx("div", { className: cvaChartContainer(), children: jsx(Chart, { className: cvaChart({ size }), dataTestId: dataTestId ? `chart-${dataTestId}` : undefined, onChartReady: handleChartReady, onClick: handleChartClick, onEvents: handleChartEvents, options: chartOptions, style: { width: "100%", height: "100%" } }) }), size === "full" && (jsx("div", { className: cvaLegend(), "data-testid": "legend", children: limitedData.map((item, index) => (jsx(LegendItem, { className: "p-1.5 py-0.5", color: item.color ?? chartColor(index), count: item.value, dataTestId: `legend-${item.id}`, disabled: (item.value ?? 0) === 0, hideValue: hideLegendValues, label: item.name, onClick: onClick ? () => onClick(item) : undefined, onMouseEnter: () => handleLegendMouseEnter(item), onMouseLeave: handleLegendMouseLeave, selected: item.selected, unit: unit }, item.id))) }))] }));
408
+ return (jsxs("div", { className: cvaChartRoot$1({ className }), "data-testid": dataTestId, ref: containerRef, children: [jsx("div", { className: cvaChartContainer(), children: jsx(Chart, { className: cvaChart({ size }), "data-testid": dataTestId ? `chart-${dataTestId}` : undefined, onChartReady: handleChartReady, onClick: handleChartClick, onEvents: handleChartEvents, options: chartOptions, style: { width: "100%", height: "100%" } }) }), size === "full" && (jsx("div", { className: cvaLegend(), "data-testid": "legend", children: limitedData.map((item, index) => (jsx(LegendItem, { className: "p-1.5 py-0.5", color: item.color ?? chartColor(index), count: item.value, "data-testid": `legend-${item.id}`, disabled: (item.value ?? 0) === 0, hideValue: hideLegendValues, label: item.name, onClick: onClick ? () => onClick(item) : undefined, onMouseEnter: () => handleLegendMouseEnter(item), onMouseLeave: handleLegendMouseLeave, selected: item.selected, unit: unit }, item.id))) }))] }));
409
409
  };
410
410
  const cvaChartRoot$1 = cvaMerge([
411
411
  "flex",
@@ -436,7 +436,7 @@ const cvaLegend = cvaMerge(["flex", "overflow-auto", "justify-start", "flex-col"
436
436
  * @param {BarChartProps} props - The props for the Chart component
437
437
  * @returns {ReactElement} Chart component
438
438
  */
439
- const BarChart = ({ series, loading = false, onClick, className, dataTestId, units, showDataZoom = false, }) => {
439
+ const BarChart = ({ series, loading = false, onClick, className, "data-testid": dataTestId, units, showDataZoom = false, }) => {
440
440
  const { formatDate } = useDateAndTime();
441
441
  const { chartColor } = useChartColor();
442
442
  const seriesData = useMemo(() => {
@@ -453,7 +453,7 @@ const BarChart = ({ series, loading = false, onClick, className, dataTestId, uni
453
453
  }));
454
454
  }, [series, chartColor]);
455
455
  const isDateData = (data) => !!data && "date" in data;
456
- return (jsxs("div", { className: cvaChartRoot({ className }), "data-testid": dataTestId, children: [jsx("div", { className: "flex-0 flex flex-row gap-2 place-self-end pr-8", "data-testid": "legend", children: seriesData.map((item, index) => (jsx(LegendItem, { color: item.color || chartColor(index), dataTestId: `legend-${item.name}`, label: item.name }, item.name))) }), jsx("div", { className: "flex min-h-[260px] w-full flex-1", children: jsx(Chart, { dataTestId: "bar-chart", onClick: onClick
456
+ return (jsxs("div", { className: cvaChartRoot({ className }), "data-testid": dataTestId, children: [jsx("div", { className: "flex-0 flex flex-row gap-2 place-self-end pr-8", "data-testid": "legend", children: seriesData.map((item, index) => (jsx(LegendItem, { color: item.color || chartColor(index), "data-testid": `legend-${item.name}`, label: item.name }, item.name))) }), jsx("div", { className: "flex min-h-[260px] w-full flex-1", children: jsx(Chart, { "data-testid": "bar-chart", onClick: onClick
457
457
  ? (e) => {
458
458
  onClick(e);
459
459
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/react-chart-components",
3
- "version": "1.7.114",
3
+ "version": "1.7.116",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "engines": {
@@ -9,12 +9,12 @@
9
9
  "dependencies": {
10
10
  "echarts": "5.6.0",
11
11
  "react": "19.0.0",
12
- "@trackunit/date-and-time-utils": "1.7.75",
13
- "@trackunit/react-date-and-time-hooks": "1.7.105",
14
- "@trackunit/ui-design-tokens": "1.7.75",
15
- "@trackunit/shared-utils": "1.9.75",
16
- "@trackunit/css-class-variance-utilities": "1.7.75",
17
- "@trackunit/react-components": "1.10.49"
12
+ "@trackunit/date-and-time-utils": "1.7.77",
13
+ "@trackunit/react-date-and-time-hooks": "1.7.107",
14
+ "@trackunit/ui-design-tokens": "1.7.77",
15
+ "@trackunit/shared-utils": "1.9.77",
16
+ "@trackunit/css-class-variance-utilities": "1.7.77",
17
+ "@trackunit/react-components": "1.10.51"
18
18
  },
19
19
  "module": "./index.esm.js",
20
20
  "main": "./index.cjs.js",
@@ -60,4 +60,4 @@ export interface BarChartProps<TProps extends object> extends CommonProps {
60
60
  * @param {BarChartProps} props - The props for the Chart component
61
61
  * @returns {ReactElement} Chart component
62
62
  */
63
- export declare const BarChart: <TProps extends object>({ series, loading, onClick, className, dataTestId, units, showDataZoom, }: BarChartProps<TProps>) => ReactElement;
63
+ export declare const BarChart: <TProps extends object>({ series, loading, onClick, className, "data-testid": dataTestId, units, showDataZoom, }: BarChartProps<TProps>) => ReactElement;
@@ -56,10 +56,10 @@ export type ChartProps = CommonProps & {
56
56
  /**
57
57
  * Value used to find element by `data-testid` attribute.
58
58
  */
59
- dataTestId?: string;
59
+ "data-testid"?: string;
60
60
  };
61
61
  /**
62
62
  * The Chart component is a wrapper component for ECharts.
63
63
  * Handles events and click functionality.
64
64
  */
65
- export declare const Chart: ({ options, showLoading, className, style, onChartReady, onClick, onEvents, merge, loadingOption, timezoneLabel, renderer, dataTestId, }: ChartProps) => ReactElement;
65
+ export declare const Chart: ({ options, showLoading, className, style, onChartReady, onClick, onEvents, merge, loadingOption, timezoneLabel, renderer, "data-testid": dataTestId, }: ChartProps) => ReactElement;
@@ -96,5 +96,5 @@ export interface DonutChartProps<TProps extends object> extends CommonProps {
96
96
  * @param {DonutChartProps} props - The props for the Chart component
97
97
  * @returns {ReactElement} Chart component
98
98
  */
99
- export declare const DonutChart: <TProps extends object>({ data, size, loading, onClick, className, dataTestId, maxDataPoints, showOthers, unit, overrideTotal, autoSortData, hideLegendValues, othersName, }: DonutChartProps<TProps>) => ReactElement;
99
+ export declare const DonutChart: <TProps extends object>({ data, size, loading, onClick, className, "data-testid": dataTestId, maxDataPoints, showOthers, unit, overrideTotal, autoSortData, hideLegendValues, othersName, }: DonutChartProps<TProps>) => ReactElement;
100
100
  export {};
@@ -47,4 +47,4 @@ export interface EChartProps extends CommonProps {
47
47
  /**
48
48
  * A React wrapper for ECharts that handles initialization, events, and cleanup.
49
49
  */
50
- export declare const EChart: ({ option, style, className, onChartReady, onClick, onEvents, notMerge, renderer, dataTestId, }: EChartProps) => ReactElement;
50
+ export declare const EChart: ({ option, style, className, onChartReady, onClick, onEvents, notMerge, renderer, "data-testid": dataTestId, }: EChartProps) => ReactElement;
@@ -8,7 +8,7 @@ export interface LegendItemProps {
8
8
  onMouseLeave?: () => void;
9
9
  color: string;
10
10
  className?: string;
11
- dataTestId?: string;
11
+ "data-testid"?: string;
12
12
  unit?: "%";
13
13
  hideValue?: boolean;
14
14
  }
@@ -18,4 +18,4 @@ export interface LegendItemProps {
18
18
  * @param {LegendItem} props - The props for the LegendItem component
19
19
  * @returns {ReactElement} LegendItem component
20
20
  */
21
- export declare const LegendItem: ({ className, count, label, disabled, selected, onClick, color, dataTestId, onMouseEnter, onMouseLeave, unit, hideValue, }: LegendItemProps) => import("react/jsx-runtime").JSX.Element;
21
+ export declare const LegendItem: ({ className, count, label, disabled, selected, onClick, color, "data-testid": dataTestId, onMouseEnter, onMouseLeave, unit, hideValue, }: LegendItemProps) => import("react/jsx-runtime").JSX.Element;