Giter VIP home page Giter VIP logo

Comments (4)

palerdot avatar palerdot commented on May 29, 2024

Please share a reproducible sandbox stating what is the current behaviour and expected behaviour. The code snippet you shared is the generated one (not the source) and it is not clear what you are trying to achieve.

from react-d3-speedometer.

anirudha001 avatar anirudha001 commented on May 29, 2024

Hi Arun,
Please check this Reproducible sandbox
And magic happens, Speedometer disappears.
Please let my know is there any way to apply style to ReactSpeedometer SVG.
There are 2 ways to apply width and height to Speedometer SVG:

  1. Using
  2. Using style as <svg style={{width:"200px", height="200px"}} />
    Currently your library uses 1st method which is not recommended. Because global svg inline width and heigh if any, overrides the ReactSpeedometer SVG size.

Check global styles.css file in Reproducible sandbox :
svg {
width: 25px;
height: 25px;
}

from react-d3-speedometer.

palerdot avatar palerdot commented on May 29, 2024

@anirudha001 Thanks for the context ... I will look into this and update more on this in this issue ...

from react-d3-speedometer.

palerdot avatar palerdot commented on May 29, 2024

This issue is fixed in v0.7.3 ... There is an additional prop dimensionUnit which defaults to px for width/height ... Possible values - "em" , "ex" , "px" , "in" , "cm" , "mm" , "pt" , "pc" ... Reference - https://codesandbox.io/s/loving-grass-kbx7f

from react-d3-speedometer.

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.