1

The C3js charts listen to resize event. It is good to get the chart responsive automatically, but I encountered severe performance issue when trying to coorperate the charts with the Foundation reveal modal.

As said in the github issue Reveal modal triggers a resize event, the reveal modal triggers resize event whenever a modal opens.

C3js charts are re-rendered each time the resize event is triggered. And it seems no way to prevent re-rendering the chart after the resize event using the api or callbacks provided by C3js. Therefore all C3js charts in the same page are unnecessarily redrawn each time a modal opens, and harms browsing experience.

Before Foundation change the way they handle the reveal modal in v6, is there any easy way to workaround this performance issue?

The version used are C3-0.4.9 and foundation-5.5.1

Knut Holm
  • 3,988
  • 4
  • 32
  • 54
mevernom
  • 90
  • 6

0 Answers0