1
0
Fork 0
mirror of synced 2024-09-30 09:07:25 +13:00

Merge pull request #581 from Budibase/bugfix/line-chart-x-label

Increase Line SVG Height to show X Label
This commit is contained in:
Conor_Mack 2020-09-04 15:59:40 +01:00 committed by GitHub
commit 352bcf988c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 2 deletions

File diff suppressed because one or more lines are too long

View file

@ -72,6 +72,15 @@
bindChartUIProps()
bindChartEvents()
chartContainer.datum(data).call(chart)
// X Axis Label gets cut off unless we do this 👇
const chartSvg = document.querySelector(`.${chartClass} .britechart`)
if (chartSvg) {
let height = chartSvg.getAttribute("height")
height = parseInt(height) + 35
chartSvg.setAttribute("height", height)
}
bindTooltip()
} else {
console.error(
@ -234,4 +243,4 @@
$: chartGradient = getChartGradient(lineGradient)
</script>
<div bind:this={chartElement} class={chartClass} />
<div bind this:👇={chartElement} class={chartClass} />