File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -522,7 +522,7 @@ export default class Core {
522522 ! w . config . legend . floating
523523 ) {
524524 legendHeight =
525- new Legend ( this . ctx ) . legendHelpers . getLegendBBox ( ) . clwh + 10
525+ new Legend ( this . ctx ) . legendHelpers . getLegendDimensions ( ) . clwh + 10
526526 }
527527
528528 let el = w . globals . dom . baseEl . querySelector (
Original file line number Diff line number Diff line change @@ -77,14 +77,12 @@ export default class Helpers {
7777 return stylesheet
7878 }
7979
80- getLegendBBox ( ) {
80+ getLegendDimensions ( ) {
8181 const w = this . w
8282 let currLegendsWrap =
8383 w . globals . dom . baseEl . querySelector ( '.apexcharts-legend' )
84- let currLegendsWrapRect = currLegendsWrap . getBoundingClientRect ( )
85-
86- let currLegendsWrapWidth = currLegendsWrapRect . width
87- let currLegendsWrapHeight = currLegendsWrapRect . height
84+ let currLegendsWrapWidth = currLegendsWrap . offsetWidth
85+ let currLegendsWrapHeight = currLegendsWrap . offsetHeight
8886
8987 return {
9088 clwh : currLegendsWrapHeight ,
Original file line number Diff line number Diff line change @@ -374,7 +374,7 @@ class Legend {
374374
375375 elLegendWrap . style . right = 0
376376
377- let lRect = this . legendHelpers . getLegendBBox ( )
377+ let lRect = this . legendHelpers . getLegendDimensions ( )
378378
379379 let dimensions = new Dimensions ( this . ctx )
380380 let titleRect = dimensions . dimHelpers . getTitleSubtitleCoords ( 'title' )
@@ -401,7 +401,7 @@ class Legend {
401401 legendAlignVertical ( ) {
402402 let w = this . w
403403
404- let lRect = this . legendHelpers . getLegendBBox ( )
404+ let lRect = this . legendHelpers . getLegendDimensions ( )
405405
406406 let offsetY = 20
407407 let offsetX = 0
You can’t perform that action at this time.
0 commit comments