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.

@vx/responsive withParentSize height issue

See original GitHub issue

Fairly new to React, (first time writing an issue on github) but am really like vx so far. I am having issues with responsive height for my graph. I have set up parentHeight and parentWidth the exact same way as outlined from examples. When running my program, the width of my graph is perfectly responsive to the size of the browser screen. However, I am getting some really weird numbers for parentHeight which constantly increases even when the height of the browser screen stays the same.

Any ideas of the problem? Source.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
gkuntharacommented, Sep 8, 2017

Yes, @williaster’s solution worked for me! Thanks!

1reaction
hshoffcommented, Sep 6, 2017

Hi @gkunthara, thanks for checking out vx!

Looks like the chart’s height is being calculated based on parentWidth * aspectRatio https://github.com/gkunthara/Ethereum-Chart/blob/master/src/App.js#L82. This would mean your height would change even though the parentHeight has not changed. Could try changing height to be parentHeight * aspectRatio and tune the aspect ratio value to something you’re happy with.

Let me know if that doesn’t fix it, happy to take a closer look.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Vuetify v-list does not respect the height of its parent when ...
The problem is however is that it is forcing its parent column to increase in size when the number of <v-list-item> elements is...
Read more >
Make virtual list to use all parent height · Issue #51
The problem is that Remain must be set, yet a very common use case involves using the parent's height because of responsive layouts....
Read more >
line-height - CSS: Cascading Style Sheets - MDN Web Docs
The line-height CSS property sets the height of a line box. It's commonly used to set the distance between lines of text.
Read more >
Size - CSS width and height
In responsive web design, width and height properties are sized based on the content inside, but can be more specifically defined using pixels...
Read more >
Sizing · Bootstrap v5.0
Easily make an element as wide or as tall with our width and height utilities. On this page. Relative to the parent; Relative...
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