Coder Social home page Coder Social logo

donuts's People

Contributors

mohitchattlani avatar nostalgiaz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

donuts's Issues

Potentially simplify structure, CSS and JS

I made a compact/adapted version at https://gist.github.com/arnehormann/5082064 which uses these tricks:

By using font-size for sizing, the size only has to be given once and we can use em for everything. The only downside is that it has to be the first property specified.
This way we can get rid of all special handling of .donut-big and .donut-small except for the very first occurence.

.donut-bow is not needed - we can get rid of it and use .donut:before instead. In it, I use clip: rect instead of rotation, this way I only need to specify one border-color - it's probably faster, too.
In javascript, you have to replace line 24 ($this.siblings().addClass(color);) by $this.parent().addClass(color); which also allows the addition of different sibling elements (think tooltips).

This is a little intrusive for a pull request (and I really just wanted to mess around with the codebase without the need for a build environment), but please feel free to incorporate any parts you like from my version.

Great demo, thanks for sharing it!

Two colors

I would love to have the "donut" have two colors. Basically, one color below the percentage and another above. Think a fuel gauge that shows the empty part red and the part with fuel as green.

I have no idea if this is even possible. :)

License?

Can you add a license? This looks awesome, but I can't use for my projects without knowing the license.

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.