Add a wrapper to catch chart rendering before chartkick is loaded

This commit is contained in:
Paul Chavard 2020-10-06 18:35:22 +02:00
parent d8852c7dc5
commit 5df7a729e7
3 changed files with 44 additions and 1 deletions

View file

@ -1,6 +1,6 @@
import Chartkick from 'chartkick';
import Highcharts from 'highcharts';
import { toggle, delegate } from '@utils';
import { toggle, delegate, fire } from '@utils';
export default function () {
return null;
@ -34,3 +34,4 @@ delegate('click', '[data-toggle-chart]', toggleChart);
Chartkick.use(Highcharts);
window.Chartkick = Chartkick;
fire(window, 'chartkick:ready');