(window.webpackJsonp=window.webpackJsonp||[]).push([[210],{198:function(e,t,n){"use strict";n.r(t);var r=n(403);angular.module("graphdb.framework.resources.directives",[]).directive("chart",["$rootScope",function(e){return{restrict:"AE",scope:{chart:"="},link:function(t,n){let c;const a=e.$on("$translateChangeSuccess",()=>{t.chart.translateLabels(),c.setOption(t.chart.chartOptions)});function s(){c.setOption(t.chart.chartOptions),t.chart.updateRange(t.chart.dataHolder),c.hideLoading()}function o(e){t.chart.setSelectedSeries(e.selected)}function i(){c.resize()}t.$watch("chart",(function(){c=r.a(n[0],null,{renderer:"svg"}),c.setOption(t.chart.chartOptions),c.showLoading(),c.on("legendselectchanged",o),t.chart.registerRefreshHandler(s),window.addEventListener("resize",i)})),t.$on("$destroy",(function(){c.on("legendselectchanged"),c.dispose(),t.chart.unregisterRefreshHandler(s),a(),window.removeEventListener("resize",i)}))}}}])}}]);