Giter Club home page Giter Club logo

Comments (17)

plouc avatar plouc commented on May 11, 2024

Can you provide the component's React code please?

from nivo.

plouc avatar plouc commented on May 11, 2024

And what's the size of the wrapping div in your browser inspector?

from nivo.

plouc avatar plouc commented on May 11, 2024

I don't see any data in your settings

from nivo.

plouc avatar plouc commented on May 11, 2024

Sorry, you're using the sample data, missed that :/

from nivo.

andeersg avatar andeersg commented on May 11, 2024

Yeah, sorry my implementation looks like this:

<ResponsivePie
          {...settings}
          data={testData} // Data from nivo.rocks site.
        />

It's placed inside a grid with this properties:

    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    grid-gap: 30px 30px;

and the div itself has a min height of 200px.

from nivo.

plouc avatar plouc commented on May 11, 2024

@andeersg what's the computed size of the div in whatever browser dev tools you use ?

from nivo.

plouc avatar plouc commented on May 11, 2024

The wrapper I mean

from nivo.

andeersg avatar andeersg commented on May 11, 2024

It has a computed size of width: 600px and height: 200px;

from nivo.

plouc avatar plouc commented on May 11, 2024

really weird then… quite hard to debug without having the proper code though

from nivo.

plouc avatar plouc commented on May 11, 2024

I mean something I can try to run

from nivo.

andeersg avatar andeersg commented on May 11, 2024

I can try to experiment with some different heights for the wrapper, if that does not work I will try to reproduce it somewhere you can look at it.

Really cool project btw!

from nivo.

plouc avatar plouc commented on May 11, 2024

Thank you

from nivo.

plouc avatar plouc commented on May 11, 2024

@andeersg, I think I've found the problem, see https://www.webpackbin.com/bins/-KtLnILuaFhwgfJnIkYC

from nivo.

plouc avatar plouc commented on May 11, 2024

You cannot use min-height as responsive components use available space to render, but min-height relies on content dimension, so…

from nivo.

plouc avatar plouc commented on May 11, 2024

If you want a fixed size component, you should use Pie, otherwise, you'll have to set an explicit height on the wrapper

from nivo.

plouc avatar plouc commented on May 11, 2024

Or perhaps find a way to get an usable height, using 100% height for all parents of the grid, because default align-items value is stretch, but need to have a parent with a defined height to be correctly used

from nivo.

plouc avatar plouc commented on May 11, 2024

I close this issue as it's more a CSS issue in the end.

from nivo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.