File tree 2 files changed +19
-1
lines changed
2 files changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ const InnerSwarmPlot = <RawDatum,>({
36
36
colors = defaultProps . colors as OrdinalColorScaleConfig < Omit < ComputedDatum < RawDatum > , 'color' > > ,
37
37
colorBy = defaultProps . colorBy ,
38
38
borderColor = defaultProps . borderColor as InheritedColorConfig < ComputedDatum < RawDatum > > ,
39
+ borderWidth = defaultProps . borderWidth ,
39
40
layout = defaultProps . layout ,
40
41
spacing = defaultProps . spacing ,
41
42
gap = defaultProps . gap ,
@@ -141,7 +142,7 @@ const InnerSwarmPlot = <RawDatum,>({
141
142
< Circles < RawDatum >
142
143
key = "circles"
143
144
nodes = { nodes }
144
- borderWidth = { 0 }
145
+ borderWidth = { borderWidth }
145
146
borderColor = { borderColor }
146
147
isInteractive = { isInteractive }
147
148
tooltip = { tooltip }
Original file line number Diff line number Diff line change @@ -137,5 +137,22 @@ describe('SwarmPlot', () => {
137
137
expect ( onMouseMove ) . not . toHaveBeenCalled ( )
138
138
expect ( onMouseLeave ) . not . toHaveBeenCalled ( )
139
139
} )
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
+ } )
140
157
} )
141
158
} )
You can’t perform that action at this time.
0 commit comments