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.

Not set VIEW attribute doesn't fit container and render chart with height and width = 0

See original GitHub issue

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

github_iconTop GitHub Comments

2reactions
Hypercubedcommented, Aug 6, 2018

Please reopen if this is still an issue.

0reactions
mareknovotnycommented, Feb 24, 2017

we upgraded from 3.0.2

Read more comments on GitHub >

github_iconTop 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 >

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