{visibleDatasetArray.map((item, index) => {
diff --git a/packages/charts/src/components/PieChart/PieChart.stories.tsx b/packages/charts/src/components/PieChart/PieChart.stories.tsx
index a41f3e02393..eb420d0f32b 100644
--- a/packages/charts/src/components/PieChart/PieChart.stories.tsx
+++ b/packages/charts/src/components/PieChart/PieChart.stories.tsx
@@ -5,7 +5,7 @@ import React from 'react';
import { simpleDataSet } from '../../resources/DemoProps';
export default {
- title: 'Charts - Unstable / PieChart',
+ title: 'Charts / PieChart',
component: PieChart
};
diff --git a/packages/charts/src/components/PieChart/PieChart.tsx b/packages/charts/src/components/PieChart/PieChart.tsx
index 5430ea7350e..2bce5a5df24 100644
--- a/packages/charts/src/components/PieChart/PieChart.tsx
+++ b/packages/charts/src/components/PieChart/PieChart.tsx
@@ -57,7 +57,6 @@ export interface PieChartProps extends RechartBaseProps
{
/**
* import { PieChart } from '@ui5/webcomponents-react-charts/lib/next/PieChart';
- * **This component is under active development. The API is not stable yet and might change without further notice.**
*/
const PieChart: FC = forwardRef((props: PieChartProps, ref: Ref) => {
const {
@@ -81,6 +80,7 @@ const PieChart: FC = forwardRef((props: PieChartProps, ref: Ref = forwardRef((props: PieChartProps, ref: Ref
) =
legendRef
} = props as PieChartPropTypes & InternalProps;
+ useEffect(() => {
+ deprecationNotice(
+ 'PieChart',
+ "This component is deprecated and will be removed with v0.10.0. Please use '@ui5/webcomponents-react-charts/lib/next/PieChart' instead."
+ );
+ }, []);
+
const theme = getTheme();
const data = useChartData(labels, datasets, colors, theme, true);
@@ -76,6 +84,8 @@ const PieChartComponent = forwardRef((props: PieChartPropTypes, ref: Ref) =
PieChartComponent.LoadingPlaceholder = PieChartPlaceholder;
/**
* import { PieChart } from '@ui5/webcomponents-react-charts/lib/PieChart';
+ *
+ * This component is deprecated and will be removed with v0.10.0. Please use [this component](https://sap.github.io/ui5-webcomponents-react/?path=/docs/charts-piechart) instead.
*/
const PieChart: FC = withChartContainer(PieChartComponent);
diff --git a/packages/charts/src/components/RadarChart/RadarChart.tsx b/packages/charts/src/components/RadarChart/RadarChart.tsx
index 67f99cfee25..1535b168e52 100644
--- a/packages/charts/src/components/RadarChart/RadarChart.tsx
+++ b/packages/charts/src/components/RadarChart/RadarChart.tsx
@@ -67,7 +67,6 @@ const measureDefaults = {
/**
* import { RadarChart } from '@ui5/webcomponents-react-charts/lib/next/RadarChart';
- * **This component is under active development. The API is not stable yet and might change without further notice.**
*/
const RadarChart: FC = forwardRef((props: RadarChartProps, ref: Ref) => {
const {
@@ -89,6 +88,7 @@ const RadarChart: FC = forwardRef((props: RadarChartProps, ref:
legendHorizontalAlign: 'center',
dataLabel: true,
polarGridType: 'circle',
+ resizeDebounce: 250,
...props.chartConfig
};
}, [props.chartConfig]);
@@ -140,6 +140,7 @@ const RadarChart: FC = forwardRef((props: RadarChartProps, ref:
className={className}
tooltip={tooltip}
slot={slot}
+ resizeDebounce={chartConfig.resizeDebounce}
>
{
+ deprecationNotice(
+ 'RadarChart',
+ "This component is deprecated and will be removed with v0.10.0. Please use '@ui5/webcomponents-react-charts/lib/next/RadarChart' instead."
+ );
+ }, []);
+
const theme = getTheme();
const data = useChartData(labels, datasets, colors, theme);
@@ -69,6 +77,8 @@ const RadarChartComponent = forwardRef((props: RadarChartPropTypes, ref: Refimport { RadarChart } from '@ui5/webcomponents-react-charts/lib/RadarChart';
+ *
+ * This component is deprecated and will be removed with v0.10.0. Please use [this component](https://sap.github.io/ui5-webcomponents-react/?path=/docs/charts-radarchart) instead.
*/
const RadarChart: FC = withChartContainer(RadarChartComponent);
diff --git a/packages/charts/src/components/RadialChart/RadialChart.stories.tsx b/packages/charts/src/components/RadialChart/RadialChart.stories.tsx
index 0f6b9afb797..3dcc550a79d 100644
--- a/packages/charts/src/components/RadialChart/RadialChart.stories.tsx
+++ b/packages/charts/src/components/RadialChart/RadialChart.stories.tsx
@@ -4,7 +4,7 @@ import { RadialChart } from '@ui5/webcomponents-react-charts/lib/next/RadialChar
import React from 'react';
export default {
- title: 'Charts - Unstable / RadialChart',
+ title: 'Charts / RadialChart',
component: RadialChart
};
diff --git a/packages/charts/src/components/RadialChart/RadialChart.tsx b/packages/charts/src/components/RadialChart/RadialChart.tsx
index 5f155327839..83a7bbeb39e 100644
--- a/packages/charts/src/components/RadialChart/RadialChart.tsx
+++ b/packages/charts/src/components/RadialChart/RadialChart.tsx
@@ -20,7 +20,6 @@ const radialBarLabelStyle = { fontSize: ThemingParameters.sapFontHeader3Size, fi
/**
* import { RadialChart } from '@ui5/webcomponents-react-charts/lib/next/RadialChart';
- * **This component is under active development. The API is not stable yet and might change without further notice.**
*/
const RadialChart: FC = forwardRef((props: RadialChartProps, ref: Ref) => {
const { maxValue = 100, value, displayValue, onDataPointClick, color, style, className, tooltip, slot } = props;
@@ -55,6 +54,7 @@ const RadialChart: FC = forwardRef((props: RadialChartProps, r
className={className}
tooltip={tooltip}
slot={slot}
+ resizeDebounce={250}
>
import { RadialChart } from '@ui5/webcomponents-react-charts/lib/RadialChart';
+ *
+ * This component is deprecated and will be removed with v0.10.0. Please use [this component](https://sap.github.io/ui5-webcomponents-react/?path=/docs/charts-radialchart) instead.
*/
const RadialChart: FC = forwardRef((props: RadialChartPropTypes, ref: Ref) => {
const { maxValue, value, displayValue, style, className, colors, options, width, height } = props;
+ useEffect(() => {
+ deprecationNotice(
+ 'RadialChart',
+ "This component is deprecated and will be removed with v0.10.0. Please use '@ui5/webcomponents-react-charts/lib/next/RadialChart' instead."
+ );
+ }, []);
+
const data = [value, maxValue - value];
const radialChartDefaultConfig = useMemo(() => {
return {
diff --git a/packages/charts/src/interfaces/RechartBaseProps.ts b/packages/charts/src/interfaces/RechartBaseProps.ts
index 35e216bccf3..fc93d84fbea 100644
--- a/packages/charts/src/interfaces/RechartBaseProps.ts
+++ b/packages/charts/src/interfaces/RechartBaseProps.ts
@@ -21,5 +21,7 @@ export interface RechartBaseProps extends CommonProps
legendPosition?: string;
legendHorizontalAlign?: string;
+
+ resizeDebounce?: number;
};
}
diff --git a/packages/charts/src/internal/ChartContainer.tsx b/packages/charts/src/internal/ChartContainer.tsx
index 58927ded7c3..52902b567df 100644
--- a/packages/charts/src/internal/ChartContainer.tsx
+++ b/packages/charts/src/internal/ChartContainer.tsx
@@ -2,14 +2,15 @@ import { createComponentStyles } from '@ui5/webcomponents-react-base/lib/createC
import { ThemingParameters } from '@ui5/webcomponents-react-base/lib/ThemingParameters';
import { CommonProps } from '@ui5/webcomponents-react/interfaces/CommonProps';
import { Loader } from '@ui5/webcomponents-react/lib/Loader';
-import React, { ComponentType, CSSProperties, FC, forwardRef, ReactNode, Ref, useMemo } from 'react';
+import React, { ComponentType, CSSProperties, FC, forwardRef, ReactElement, Ref, useMemo } from 'react';
import { ResponsiveContainer } from 'recharts';
export interface ContainerProps extends CommonProps {
- children: ReactNode;
+ children: ReactElement;
Placeholder?: ComponentType;
dataset: unknown[];
loading?: boolean;
+ resizeDebounce: number;
}
const loaderStyles: CSSProperties = {
@@ -32,7 +33,7 @@ const chartContainerStyles = {
const useStyles = createComponentStyles(chartContainerStyles, { name: 'ChartContainer' });
const ChartContainer: FC = forwardRef((props: ContainerProps, ref: Ref) => {
- const { Placeholder, loading = false, dataset, style, className, tooltip, slot, children } = props;
+ const { Placeholder, loading = false, dataset, style, className, tooltip, slot, children, resizeDebounce } = props;
useStyles();
const internalStyles: CSSProperties = useMemo(() => {
@@ -52,7 +53,7 @@ const ChartContainer: FC = forwardRef((props: ContainerProps, re
{dataset?.length > 0 ? (
<>
{loading && dataset.length > 0 && }
- {dataset.length > 0 && {children}}
+ {dataset.length > 0 && {children}}
>
) : (