go4webdev

Javascript

I cannot say I hate Javascript. But I avoid it as plague. Is there any way to avoid Javascript, I use them. This script has only one purpose. To redraw the chart if the page is resized.

Javascript for resizing chart
window.addEventListener('resize', function () {
    myChart1.resize();
    myChart1.setOption(option1); 
    myChart2.resize();
    myChart2.setOption(option2); 
    myChart3.resize();
    myChart3.setOption(option3); 
});