Skip to content
Advertisement

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

Advertisement

Answer

var plot = echarts.init(yourDom);
plot.setOption({...});
window.onresize = function() {
  plot.resize();
};
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement