Chart Reflow Needed
See original GitHub issueI’m submitting a … (check one with “x”)
[ ] bug report => search github for a similar issue or PR before submitting
[x] feature request
[ ] support request => Please do not submit support request here
Current behavior The chart reflow option does not seem to be available.
Expected behavior To be able to get a handle for the chart so that reflow may be called.
Reproduction of the problem A frequent problem I have with Highcharts and Angular is that the first rendering does not use the full space available until/unless the browser is resized. The workaround for this is to do a reflow on the chart every half second or so for three seconds or so.
What is the motivation / use case for changing the behavior? The problem is in Highcharts, but they also provide the solution via reflow. I don’t believe it is accessible via ngx-charts.
Please tell us about your environment: Problem occurs on Mac OS X (dev/ng serve and Apache) and Linux (Apache).
-
ngx-charts version: x.x.x 7.0.1
-
Angular version: 2.x.x 5.1.3
-
Browser: [all]
-
Language: [Typescript 2.4.2]
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (2 by maintainers)
Top GitHub Comments
I am facing this issue as well, I used Angular Material’s schematics to create a sidebar with the content being a dashboard (call created from schematics) When the sidebar opens, the ngx-chart gets pushed out of the card.
I still think that this is relevant. I’m designing a page that is responsive and I need a responsive
width
and the[view]
worked awfully, it messes up the width ignoring the parent if I leave itnull
.My problem is that I have 6 charts on the page and initially only the 3 first ones are being shown, the rest is hidden with a
display: none
on their parents. When I change thedisplay
property, the charts have insane height and width, not following their parents reflow.From what I understood, initially the charts parent divs, got no height nor width because they’re not being rendered and when the browser reflow, rendering the
container
divs, the charts (child) are not being resized and not following the natural browser reflow.I can’t expect from the user to resize the window after he clicks on “show more charts”.