Ngx-charts: Area-Chart does not fit parent-Element or view-size

Created on 29 May 2017  路  6Comments  路  Source: swimlane/ngx-charts

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

  • ngx-charts version: 5.3.1

  • Angular version: 4.1.3

  • Browser:
    Tested with Firefox 53.0.2 & Chrome 58.0.3029.110 (64-bit)

  • Language: Target ES5

Enhancement Accept PRs Backlog Med

Most helpful comment

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.

All 6 comments

Same issue

Same here

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.

Any progress? I need this!

Any updates?
I need the same, thank you.

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

Stay sharp for it!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ianfdk picture ianfdk  路  3Comments

emeric0101 picture emeric0101  路  3Comments

faisalnet5 picture faisalnet5  路  3Comments

Jacquers picture Jacquers  路  3Comments

cfremgen picture cfremgen  路  3Comments