question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Chart Reflow Needed

See original GitHub issue

I’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:closed
  • Created 6 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
kevin192291commented, Feb 6, 2019

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.

3reactions
henriquezagocommented, Jul 30, 2018

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 it null.

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 the display 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”.

Read more comments on GitHub >

github_iconTop Results From Across the Web

chart.reflow | highcharts API Reference
When zooming on a series with less than 100 points, the chart redraw will be done with animation, but in case of more...
Read more >
HighCharts: How to use reflow to allow auto-resize after ...
You can do this by adding a new method to chart that will manually trigger the reflow like so: chart.reflowNow = function(){ this....
Read more >
Understanding Success Criterion 1.4.10: Reflow | WAI
It means four times the default width and four times the default height. Diagram showing the size of character needed by viewing distance...
Read more >
Highcharts - setSize / reflow bug
Shows a bug with the current version of Highcharts where the Chart.reflow method cannot be called after Chart.setSize. To replicate, toggle the container...
Read more >
Reflow Table Widget
The reflow responsive table mode is the simplest in terms of markup requirements because it only requires a table with a data-role="table" on...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found