Not set VIEW attribute doesn't fit container and render chart with height and width = 0
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 found the issue #170 which reported problem with rendering chart in hidden element/container The fix seems break the case when the view attribute is not set at all in html template. It effectively renders chart with 0 for height and width. The workaround is to set view always to a value of width and height.
Expected behavior a chart still fits the container in which is placed even without set view from html template element.
Reproduction of the problem it is reproducable on https://swimlane.gitbooks.io/ngx-charts/content/charts/bar-vertical.html when you remove line with view attribute
- ngx-charts version: 4.1.3
- Angular version: 2.4.5
Issue Analytics
- State:
- Created 7 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
Responsive Charts - Chart.js
When it comes to changing the chart size based on the window size, a major limitation is that the canvas render size (...
Read more >How to get a react component's size (height/width) before ...
I can't use jquery cause the whole page is set up with react components that haven't been rendered yet. meaning, the element is...
Read more >height - CSS: Cascading Style Sheets - MDN Web Docs
The height CSS property specifies the height of an element. By default, the property defines the height of the content area.
Read more >Resizing an SVG When the Window is Resized in d3.js - Chartio
The browser doesn't inherently associate a width or height with an SVG unless ... ratio defined in viewBox doesn't match the ratio in...
Read more >Attributes - Graphviz
Whether to use the specified width and height attributes to choose node size (rather than sizing to fit the node contents). fontcolor, Edges, ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Please reopen if this is still an issue.
we upgraded from 3.0.2