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

Make Donut 100% width and height of container element #52

Open
ghost opened this issue Jan 12, 2015 · 4 comments
Open

Make Donut 100% width and height of container element #52

ghost opened this issue Jan 12, 2015 · 4 comments

Comments

@ghost
Copy link

ghost commented Jan 12, 2015

Maybe this is already possible, and I'm just struggling to figure it out. But it would be great if the donut charts could be set to be 100% width and height of the container element.

@ghost
Copy link
Author

ghost commented Jan 15, 2015

Also, is it possible to animate the donut from one value to another?

@benpickles
Copy link
Owner

Percentage dimensions used to be possible but it looks like this capability was removed with the switch to SVG. I will take a look into it.

Regarding animations, as much as this would be a brilliant feature I don't really think it fits into the remit of Peity at the moment.

@benpickles
Copy link
Owner

It looks like the functionality was removed but never released in an official version. I've reverted the change. Take a look and see how it behaves, it's not perfect due to the limitations of scaling the <svg> element but it might fit your needs. Also, it doesn't work that well with donuts - setting the inner radius isn't really compatible with percentage dimensions at the moment.

FYI you can call $('.my-peity-element').peity() on an existing Peity-ised element (note the lack of options) to refresh an existing chart.

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
@benpickles and others