Created
February 27, 2014 21:32
-
-
Save fullstackto/9259992 to your computer and use it in GitHub Desktop.
Responsive canvas redrawing of Chart.js using jQuery
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var width = $('canvas').parent().width(); | |
$('canvas').attr("width",width); | |
new Chart(ctx).Line(data,options); | |
window.onresize = function(event){ | |
var width = $('canvas').parent().width(); | |
$('canvas').attr("width",width); | |
new Chart(ctx).Line(data,options); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment