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

Area-Chart does not fit parent-Element or view-size #412

Open alexandermikuta opened 7 years ago

alexandermikuta commented 7 years ago

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

[x] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here

Current behavior

When I put an AreaChart into a container it seems like the Chart does not fill the container correctly (with and without use of view-attribute), but has less width and height than the container. This seems to be caused by a wrongly calculated width/height-attribute in .ngx-charts def clipPath rect-Element

See example: https://plnkr.co/edit/uiin5FU84ho9LGtvgFAO?p=preview

Expected behavior

Diagram fits container

Please tell us about your environment:

Ubuntu 17.04

kthomas182 commented 7 years ago

Same issue

quentingodart commented 7 years ago

Same here

marjan-georgiev commented 7 years ago

This is caused by the margins around the chart, which can not be overridden at the moment. We will look at exposing that property as an input.

wujood commented 6 years ago

Any progress? I need this!

niralmunjariya commented 5 years ago

Any updates? I need the same, thank you.

KingDarBoja commented 5 years ago

Just letting a comment as friendly remainder to provide a PR with @marjan-georgiev proposal.

Stay sharp for it!