So, solution for this problem was this jsfiddle:
http://jsfiddle.net/shawnbot/BJLe6/ specifically, this code:
var chart = $("#chart"),
aspect = chart.width() / chart.height(),
container = chart.parent();
$(window).on("resize", function() {
var targetWidth = container.width();
chart.attr("width", targetWidth);
chart.attr("height", Math.round(targetWidth / aspect));
}).trigger("resize");
Thanks to everyone who helped!