Chart resizes when it get's new data via setting results
See original GitHub issueI’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
I’m testing a line chart, but I would think this is also a problem with others. I’m not using a view
-option, thus the chart should redraw on window changes.
If I load the site everything is fine. When I then get new data and refresh the data inside results
height changes. It seems to want to endup somewhere around the 400px mark.
Here a example snippet from the html.
<div class="card-body m-2">
<ngx-charts-line-chart [results]="chartData" [xAxis]="true" [yAxis]="true"
[showYAxisLabel]="true" [yAxisLabel]="yAxisLabel">
</ngx-charts-line-chart>
</div>
Expected behavior
I would expect the component to not resize, or at least resize and still honor the window it is in.
Reproduction of the problem
Wasn’t able to get a plnkr going that also has this problem. 😦
What is the motivation / use case for changing the behavior? Well I don’t want ngx-charts to kill my layout 😃
Please tell us about your environment: Windows + NPM
-
ngx-charts version: 7.1.1
-
Angular version: 5.2.4
-
Browser: Tested current chrome and firefox bot have this.
-
Language: Tested with Typescript
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (4 by maintainers)
Top GitHub Comments
Does the card-body div have any padding? That can usually cause this.
well it has margin via bootstraps mt-2 and i’ve set
padding: 0px;
not sure if that qualifies asany