Add a wrapper to catch chart rendering before chartkick is loaded
This commit is contained in:
parent
d8852c7dc5
commit
5df7a729e7
3 changed files with 44 additions and 1 deletions
|
@ -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');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue