diff --git a/packages/charts/src/components/RadialChart/RadialChart.tsx b/packages/charts/src/components/RadialChart/RadialChart.tsx index 5f5156d1c01..ccf8bc04dd0 100644 --- a/packages/charts/src/components/RadialChart/RadialChart.tsx +++ b/packages/charts/src/components/RadialChart/RadialChart.tsx @@ -6,6 +6,7 @@ import type { CSSProperties } from 'react'; import { forwardRef } from 'react'; import { PolarAngleAxis, RadialBar, RadialBarChart } from 'recharts'; import { useOnClickInternal } from '../../hooks/useOnClickInternal.js'; +import type { IChartBaseProps } from '../../interfaces/IChartBaseProps.js'; import { ChartContainer } from '../../internal/ChartContainer.js'; import { PieChartPlaceholder } from '../PieChart/Placeholder.js'; @@ -17,8 +18,9 @@ interface RadialChartConfig { [rest: string]: any; } -//todo expose `loading` -export interface RadialChartProps extends Omit { +export interface RadialChartProps + extends Omit, + Pick { /** * The actual value which defines how much the ring is filled. */ @@ -92,6 +94,8 @@ const defaultDisplayValueStyles = { */ const RadialChart = forwardRef((props, ref) => { const { + loading, + loadingDelay, maxValue = 100, value, displayValue, @@ -108,7 +112,7 @@ const RadialChart = forwardRef((props, ref) => } = props; const range = [0, maxValue]; - const dataset = [{ value }]; + const dataset = typeof value === 'number' ? [{ value }] : []; const onDataPointClickInternal = (payload, i, event) => { if (payload && onDataPointClick) { @@ -126,8 +130,8 @@ const RadialChart = forwardRef((props, ref) => return (