| @@ -1,10 +1,16 @@ | ||
| 1 | -(function( $ ) { | |
| 2 | - 'use strict'; | |
| 3 | - | |
| 4 | - $(document).ready(function () { | |
| 5 | - | |
| 6 | - $(document).find('.ays-chart-container').AysChartBuilder(); | |
| 7 | - | |
| 8 | - }); | |
| 9 | - | |
| 10 | -})( jQuery ); | |
| 1 | +(function( $ ) { | |
| 2 | + 'use strict'; | |
| 3 | + | |
| 4 | + $(document).ready(function () { | |
| 5 | + | |
| 6 | + if (typeof $.fn.ChartBuilderGoogleChartsMain === 'function') { | |
| 7 | + $(document).find('.ays-chart-container-google').ChartBuilderGoogleChartsMain(); | |
| 8 | + } | |
| 9 | + | |
| 10 | + if (typeof $.fn.ChartBuilderChartJsMain === 'function') { | |
| 11 | + $(document).find('.ays-chart-container-chartjs').ChartBuilderChartJsMain(); | |
| 12 | + } | |
| 13 | + | |
| 14 | + }); | |
| 15 | + | |
| 16 | +})( jQuery ); | |