Skip to content

Commit

Permalink
browser difference fix for radialbars - fixes #1243
Browse files Browse the repository at this point in the history
  • Loading branch information
junedchhipa committed Jan 23, 2020
1 parent 2e4e409 commit 32b6d62
Showing 1 changed file with 0 additions and 26 deletions.
26 changes: 0 additions & 26 deletions src/modules/Core.js
Original file line number Diff line number Diff line change
Expand Up @@ -367,34 +367,8 @@ export default class Core {
new Legend(this.ctx).legendHelpers.getLegendBBox().clwh + 10
}

let radialEl = w.globals.dom.baseEl.querySelector(
'.apexcharts-radialbar .apexcharts-tracks'
)

let radialElDataLabels = w.globals.dom.baseEl.querySelector(
'.apexcharts-radialbar .apexcharts-datalabels-group'
)

let chartInnerDimensions = w.globals.radialSize * 2

if (radialEl) {
let elRadialRect = Utils.getBoundingClientRect(radialEl)
chartInnerDimensions = elRadialRect.bottom

if (radialElDataLabels) {
let elRadialDataLalelsRect = Utils.getBoundingClientRect(
radialElDataLabels
)

let maxHeight =
Math.max(elRadialRect.bottom, elRadialDataLalelsRect.bottom) -
elRadialRect.top +
elRadialDataLalelsRect.height

chartInnerDimensions = Math.max(w.globals.radialSize * 2, maxHeight)
}
}

const newHeight = chartInnerDimensions + gl.translateY + legendHeight + offY

if (gl.dom.elLegendForeign) {
Expand Down

0 comments on commit 32b6d62

Please sign in to comment.