File tree Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ const InnerSwarmPlot = <RawDatum,>({
3636 colors = defaultProps . colors as OrdinalColorScaleConfig < Omit < ComputedDatum < RawDatum > , 'color' > > ,
3737 colorBy = defaultProps . colorBy ,
3838 borderColor = defaultProps . borderColor as InheritedColorConfig < ComputedDatum < RawDatum > > ,
39+ borderWidth = defaultProps . borderWidth ,
3940 layout = defaultProps . layout ,
4041 spacing = defaultProps . spacing ,
4142 gap = defaultProps . gap ,
@@ -141,7 +142,7 @@ const InnerSwarmPlot = <RawDatum,>({
141142 < Circles < RawDatum >
142143 key = "circles"
143144 nodes = { nodes }
144- borderWidth = { 0 }
145+ borderWidth = { borderWidth }
145146 borderColor = { borderColor }
146147 isInteractive = { isInteractive }
147148 tooltip = { tooltip }
Original file line number Diff line number Diff line change @@ -137,5 +137,22 @@ describe('SwarmPlot', () => {
137137 expect ( onMouseMove ) . not . toHaveBeenCalled ( )
138138 expect ( onMouseLeave ) . not . toHaveBeenCalled ( )
139139 } )
140+
141+ it ( 'should support the borderWidth property' , ( ) => {
142+ const wrapper = mount (
143+ < SwarmPlot
144+ width = { 400 }
145+ height = { 400 }
146+ groupBy = "group"
147+ groups = { groups }
148+ data = { sampleData }
149+ borderWidth = { 4 }
150+ />
151+ )
152+
153+ expect ( wrapper . find ( 'circle' ) . at ( 0 ) . getDOMNode ( ) . getAttribute ( 'stroke-width' ) ) . toEqual (
154+ '4'
155+ )
156+ } )
140157 } )
141158} )
You can’t perform that action at this time.
0 commit comments