Search code examples
javascriptgraphecharts

ECharts: How to use the resize event of the window?


Im trying the Echarts library for my graphs. I'd like to resize the plots when the window's resize trigger is fired but I can't find the way to do it.

Thanx for your help


Solution

  • var plot = echarts.init(yourDom);
    plot.setOption({...});
    window.onresize = function() {
      plot.resize();
    };