-
Notifications
You must be signed in to change notification settings - Fork 501
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
Responsive? #56
Labels
Comments
+1 for responsive |
+1 responsive |
+1 for responsiveness, or a way to re-draw the chart in AngularJS |
+1 responsive |
+1 for responsive? im lost |
+1 for responsive |
+1 for responsive ... or percentage size. |
👍 |
1 similar comment
+1 |
I'm using this as workaround. Not an elegant solution maybe, but it works for me: var $chart = $('.amount-chart'),
size = parseFloat( $chart.outerWidth() ),
clearSet;
$chart.easyPieChart({
size: size,
animate: 2000
});
$(window).on('resize', function(){
size = parseFloat( $chart.outerWidth() );
$chart.css({
height: size
});
clearTimeout(clearSet);
clearSet = setTimeout(function(){
$chart.removeData('easyPieChart').find('canvas').remove();
$chart.easyPieChart({
size: size,
animate: 1
});
}, 100);
}); Here a jsfiddle example with setTimeout lines commented: https://jsfiddle.net/70vy5smy/2/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is the Chart Responsive?
I tried setting the width & height of the canvas element as well as it's div container to smaller sizes as resolutions decrease. It works fine in Chrome, but if I open it up on my iPhone the size doesn't change.
Any suggestions?
The text was updated successfully, but these errors were encountered: