rails_charts icon indicating copy to clipboard operation
rails_charts copied to clipboard

Double init warning when running Turbo

Open cernyjakub opened this issue 1 year ago • 0 comments
trafficstars

https://github.com/railsjazz/rails_charts/blob/94c212cc87abb6d884e168a06effcee273666051/lib/rails_charts/base_chart.rb#L73

When running Turbo, both 'load' and 'turbo:load' events are fired on initial page load. This brings

[ECharts] There is a chart instance already initialized on the dom.

warning into the console. Maybe the event to use for init could be put into config, so we could use which one to use. under Turbo, using 'load' is not needed.

cernyjakub avatar Jan 29 '24 15:01 cernyjakub