ngx-charts
ngx-charts copied to clipboard
bugfix: Fix legend height is not included in the height calculation
What kind of change does this PR introduce? (check one with "x")
- [x] Bugfix
- [ ] Feature
- [ ] Code style update (formatting, local variables)
- [ ] Refactoring (no functional changes, no api changes)
- [ ] Build related changes
- [ ] CI related changes
- [ ] Other... Please describe:
What is the current behavior? (You can also link to an open issue here) When a chart is placed inside a parent div with fixed height and set legendPosition="below", view=null (fit container). The legend is placed outside of the parent div.
An example can be found here
What is the new behavior? The legend is now placed within the parent div.
closes https://github.com/swimlane/ngx-charts/issues/1424 closes https://github.com/swimlane/ngx-charts/issues/1248
Bar chart:
Pie chart:
Bubble chart:

Does this PR introduce a breaking change? (check one with "x")
- [ ] Yes
- [x] No
If this PR contains a breaking change, please describe the impact and migration path for existing applications: ...
Other information:
some small style changes when placed below: give some space on the left and right side of the legend.
make the legend scrollable when the legend is placed below but doesn't have enough space to show.

Will this PR be merged anytime? @marjan-georgiev @peterblazejewicz @seandgrimes @botmonster
Please @marjan-georgiev @peterblazejewicz @seandgrimes @botmonster