@@ -268,13 +268,13 @@ const calculatePlotValues = (props) => {
268268
269269 const dy =
270270 orientation === "top" || orientation === "bottom"
271- ? signY * ( candleWidth / 2 ) + signY * ( labelStyle . padding || 0 )
271+ ? signY * ( candleWidth / 2 ) + signY * ( labelStyle ? .padding || 0 )
272272 : 0 ;
273273
274274 const dx =
275275 orientation === "top" || orientation === "bottom"
276276 ? 0
277- : signX * ( labelStyle . padding || 1 ) ;
277+ : signX * ( labelStyle ? .padding || 1 ) ;
278278
279279 return { yValue, xValue, dx, dy } ;
280280 }
@@ -283,13 +283,13 @@ const calculatePlotValues = (props) => {
283283
284284 const dy =
285285 orientation === "top" || orientation === "bottom"
286- ? signY * ( labelStyle . padding || 1 )
286+ ? signY * ( labelStyle ? .padding || 1 )
287287 : 0 ;
288288
289289 const dx =
290290 orientation === "top" || orientation === "bottom"
291291 ? 0
292- : signX * ( candleWidth / 2 ) + signX * ( labelStyle . padding || 0 ) ;
292+ : signX * ( candleWidth / 2 ) + signX * ( labelStyle ? .padding || 0 ) ;
293293
294294 return { yValue, xValue, dx, dy } ;
295295} ;
@@ -358,10 +358,10 @@ const getLabelProps = (props, text, style, type?: string) => {
358358 datum,
359359 data,
360360 orientation,
361- textAnchor : labelStyle . textAnchor || defaultTextAnchors [ orientation ] ,
361+ textAnchor : labelStyle ? .textAnchor || defaultTextAnchors [ orientation ] ,
362362 verticalAnchor :
363- labelStyle . verticalAnchor || defaultVerticalAnchors [ orientation ] ,
364- angle : labelStyle . angle ,
363+ labelStyle ? .verticalAnchor || defaultVerticalAnchors [ orientation ] ,
364+ angle : labelStyle ? .angle ,
365365 horizontal,
366366 } ;
367367
0 commit comments