analysisModule.controller('GlobalOverviewController', ['$scope','$filter', '$log', '$translate', '$http','SweetAlert', 'apiConfig', function ($scope,$filter, $log, $translate, $http,SweetAlert,apiConfig) { 'use strict'; function init() { $http.get('/tableau/globalOverview', apiConfig.createVat()) .success(function (res) { if (res && 0 === res.code) { var placeholderDiv = document.getElementById('vizContainer'); var url = res.data; var options = { onFirstInteractive: function() { // The viz is now ready and can be safely used. console.log("Run this code when the viz has finished loading."); } }; try{ new tableau.Viz(placeholderDiv, url, options); }catch (e) { } }else { SweetAlert.error($translate.instant('SystemError')); } }); } init(); (function initialize() { })(); } ]);