diff --git a/packages/react-charts/src/components/ChartScatter/ChartScatter.tsx b/packages/react-charts/src/components/ChartScatter/ChartScatter.tsx index e49de5d0f9c..68cea3ac019 100644 --- a/packages/react-charts/src/components/ChartScatter/ChartScatter.tsx +++ b/packages/react-charts/src/components/ChartScatter/ChartScatter.tsx @@ -446,7 +446,6 @@ export const ChartScatter: React.FunctionComponent = ({ // destructure last theme = getTheme(themeColor), - size = ({ active }) => (active ? ChartScatterStyles.activeSize : ChartScatterStyles.size), ...rest }: ChartScatterProps) => { // Clone so users can override container props @@ -455,8 +454,14 @@ export const ChartScatter: React.FunctionComponent = ({ ...containerComponent.props }); + // bubbleProperty is only considered if the size prop is undefined, therefore set + // default size function only if bubbleProperty is not set. + if (typeof rest.size === "undefined" && typeof rest.bubbleProperty === "undefined") { + rest.size = ({ active }) => (active ? ChartScatterStyles.activeSize : ChartScatterStyles.size); + } + // Note: containerComponent is required for theme - return ; + return ; }; ChartScatter.displayName = 'ChartScatter';