This repository was archived by the owner on Sep 17, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +19
-17
lines changed Expand file tree Collapse file tree 1 file changed +19
-17
lines changed Original file line number Diff line number Diff line change @@ -132,23 +132,25 @@ export default class Axis extends Component {
132
132
let scaleBase = isNaN ( c ) ? i : c
133
133
let gxy = horizontal ? [ scale ( scaleBase ) , chartArea . y . min ] :[ chartArea . x . min , scale ( scaleBase ) ]
134
134
135
- let returnValue = < G key = { i } x = { gxy [ 0 ] } y = { gxy [ 1 ] } >
136
-
137
- { options . showTicks &&
138
- < Circle r = "2" cx = "0" cy = "0" stroke = "grey" fill = "grey" />
139
- }
140
-
141
- { options . showLabels &&
142
- < Text x = { xy [ 0 ] } y = { xy [ 1 ] }
143
- fontFamily = { textStyle . fontFamily }
144
- fontSize = { textStyle . fontSize }
145
- fontWeight = { textStyle . fontWeight }
146
- fontStyle = { textStyle . fontStyle }
147
- fill = { textStyle . fill }
148
- textAnchor = { textAnchor } >
149
- { label }
150
- </ Text > }
151
- </ G >
135
+ let returnValue
136
+ if ( label !== undefined && label !== null ) {
137
+ returnValue =
138
+ < G key = { i } x = { gxy [ 0 ] } y = { gxy [ 1 ] } >
139
+ { options . showTicks &&
140
+ < Circle r = "2" cx = "0" cy = "0" stroke = "grey" fill = "grey" />
141
+ }
142
+ { options . showLabels &&
143
+ < Text x = { xy [ 0 ] } y = { xy [ 1 ] }
144
+ fontFamily = { textStyle . fontFamily }
145
+ fontSize = { textStyle . fontSize }
146
+ fontWeight = { textStyle . fontWeight }
147
+ fontStyle = { textStyle . fontStyle }
148
+ fill = { textStyle . fill }
149
+ textAnchor = { textAnchor } >
150
+ { label }
151
+ </ Text > }
152
+ </ G >
153
+ }
152
154
153
155
return returnValue
154
156
} )
You can’t perform that action at this time.
0 commit comments