Browse Source

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

Increase Line SVG Height to show X Label
pull/4023/head
Conor_Mack 6 years ago
committed by GitHub
parent
commit
8db98365f9
  1. 2
      packages/standard-components/dist/index.js.map
  2. 11
      packages/standard-components/src/Chart/Line.svelte

2
packages/standard-components/dist/index.js.map

File diff suppressed because one or more lines are too long

11
packages/standard-components/src/Chart/Line.svelte

@ -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} />

Loading…
Cancel
Save