Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add direction and starting point props #38

Closed
jopek opened this issue Nov 29, 2017 · 2 comments
Closed

add direction and starting point props #38

jopek opened this issue Nov 29, 2017 · 2 comments

Comments

@jopek
Copy link

jopek commented Nov 29, 2017

Hello,

is it possible to add a counterClockWise boolean prop and a prop for starting point.
I would love the circle go around like so: right (0%), up (25%), left (50%), bottom (75%), right (100%).

Perhaps, this is controllable from css ?

@kevinsqi
Copy link
Owner

kevinsqi commented Dec 18, 2017

Hey Jopek! Thanks for the suggestion.

Just released v0.6.0 that adds a counterClockwise prop, so you can do:

<CircularProgressbar percentage={40} counterClockwise />

The starting point change (i.e. rotation) can be done with CSS! Check out the "rotated" example in this codesandbox: https://codesandbox.io/s/vymm4oln6y

All you need is this CSS:

.CircularProgressbar-path {
  transform: rotate(90deg);
  transform-origin: center center;
}

Hopefully this addresses your needs!

@jopek
Copy link
Author

jopek commented Dec 18, 2017

Brilliant! This is exactly what I meant and need. Thank you very much for this!

💓

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants