c3js / c3

:bar_chart: A D3-based reusable chart library
http://c3js.org
MIT License
9.34k stars 1.39k forks source link

Regions don't get updated while you resize the browser window #2785

Open rayhooker opened 4 years ago

rayhooker commented 4 years ago

If you resize your browser window, the chart gets nicely rescaled, however regions remain in the same place. Can be noticed here: http://c3js.org/samples/region_timeseries.html

This was reported in issue #992 in 2015 but appears to have resurfaced. It was noticed in October of last year by another reporter who commented but did not create a new issue.

Note I did try executing resize(,..) but that does not cause the region to be redrawn

emb-sindgan commented 3 years ago

I am also facing same issue. Any turnaround available for now until this fixes from C3.

fxaeberhard commented 2 years ago

Having the same issue. A dirty fix is to add:

onresized() {
  chart.regions([]);
  chart.regions(regions);
},

But this makes the region flickr