swimlane / ngx-charts

:bar_chart: Declarative Charting Framework for Angular
https://swimlane.github.io/ngx-charts/
MIT License
4.29k stars 1.15k forks source link

Legend is unvisible when setting legend position to 'below' and unset view-attribute #1040

Open tobigit opened 5 years ago

tobigit commented 5 years ago

I'm submitting a ... (check one with "x")

Current behavior When setting legend position to 'below' and the chart should fit to container (no 'view'-attribute), the legend isnt visible. The chart uses the whole container height and the legend is invisible below the chart. Does the height-calculation not take care of the legend height?

Expected behavior The height should be correctly calculated.

Reproduction of the problem set legendPosition to 'below' and set no 'view' attribute to fit the container

Please tell us about your environment: Angular 7

rutgervd commented 5 years ago

I'm also experiencing this, it is working correctly when the legend is at the 'right' position: it fits the parent container. But it's not fitting the parent container for 'below'

zellb commented 5 years ago

Im having issues with this as well

vyx-rohan-jyoti commented 5 years ago

Im experiencing a similar issue. It works in my dev build, but when i do a prod build using ng build --prod --aot, it gives the issue described above.

Below is a screenshot of the console errors i get when I hover over a section image

I hope the error log may be useful

gary-holland commented 5 years ago

Hi. I'm having similar problems with the chart continuously resizing when legend is set below. Here is a stackblitz for reference: https://ngx-chart-in-flex-c6sutq.stackblitz.io