I love cubism.js and we use it everyday
I'm defining custom size charts for each device to make use of the full screen size (phone vs desktop) which I really hate
I know from other stack overflow questions that you can do the following to resize the chart whenever resize the window:
chart = $('#chart');
$(window).on('resize', function() {
var targetWidth = chart.parent().width();
chart.attr('width', targetWidth);
// can we change cubism's context size too?
});
but I also know that this is not possible for cubism because of how we initially set the size in the context:
context = cubism.context().step(60 * 1000).size(780);
This is how it would look which is expected:
Any suggestions on whether I should look somewhere else in the code? or if I should just deal with the custom sizes?