diff --git a/packages/swarmplot/src/SwarmPlot.tsx b/packages/swarmplot/src/SwarmPlot.tsx index 003439e051..0694551333 100644 --- a/packages/swarmplot/src/SwarmPlot.tsx +++ b/packages/swarmplot/src/SwarmPlot.tsx @@ -36,6 +36,7 @@ const InnerSwarmPlot = ({ colors = defaultProps.colors as OrdinalColorScaleConfig, 'color'>>, colorBy = defaultProps.colorBy, borderColor = defaultProps.borderColor as InheritedColorConfig>, + borderWidth = defaultProps.borderWidth, layout = defaultProps.layout, spacing = defaultProps.spacing, gap = defaultProps.gap, @@ -141,7 +142,7 @@ const InnerSwarmPlot = ({ key="circles" nodes={nodes} - borderWidth={0} + borderWidth={borderWidth} borderColor={borderColor} isInteractive={isInteractive} tooltip={tooltip} diff --git a/packages/swarmplot/tests/Swarmplot.test.tsx b/packages/swarmplot/tests/Swarmplot.test.tsx index 0275a09f0a..5293a40c74 100644 --- a/packages/swarmplot/tests/Swarmplot.test.tsx +++ b/packages/swarmplot/tests/Swarmplot.test.tsx @@ -137,5 +137,22 @@ describe('SwarmPlot', () => { expect(onMouseMove).not.toHaveBeenCalled() expect(onMouseLeave).not.toHaveBeenCalled() }) + + it('should support the borderWidth property', () => { + const wrapper = mount( + + ) + + expect(wrapper.find('circle').at(0).getDOMNode().getAttribute('stroke-width')).toEqual( + '4' + ) + }) }) })