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aAAaX,KAAKV,MAAO,GAAK,GAAK,EAC5FW,EAA2B,WACvB,MAAO,MAAQD,KAAKE,OAAOC,KAAO,YAC9BH,KAAKI,EAAI,KAAO3C,WAAWkD,aAAaX,KAAKK,EAAG,GAAK,GAC7D,GAGJ5C,WAAW6C,WAAW,CAAExC,OAAQA,IAEzB,IAAIL,WAAWmD,MAAM,CACxBC,MAAO,CACHC,SAAUlC,EACVmC,KAAM,UAEV1C,MAAO,CAAEwB,UAAMrB,GACfwC,MAAO,CACH3C,MAAOuB,EACPqB,WAAYlC,EACZmC,OAAQ,CACJC,UAAW,GACXC,MAAO,QACPC,MAAO,CACHC,SAAU,OACVC,WAAY,yBAIxBC,MAAO,CACHC,IAAK,EACLC,kBAAmB,IACnBrD,MAAO,CAAEwB,KAAM,MACfqB,OAAQ,CACJS,UAAW5B,IAGnB6B,OAAQ,CAAEC,SAAS,GACnBC,QAAS,CACLH,UAAW1B,GAEf8B,YAAa,CACTC,OAAQ,CACJC,aAAc,GACdC,YAAa,IAGrBC,cAAe,CACXC,YAAahE,GAEjB8B,OAAQ,CAAC,CAAEC,KAAMpC,EAAU+B,UAAWuC,KAAMrD,IAC5CsD,QAAS,CAAET,SAAS,IAlEiC,CAoE7D,C","sources":["webpack://vaneckweb/../Static/us/js/src/lazy-bundles/load-highcharts-bundle.js","webpack://vaneckweb/../Static/us/js/src/fund-pages/react-histogram-chart.js"],"sourcesContent":["const getHighchartsBundle = async () => {\r\n //Dynamically inject highcharts\r\n if (typeof window.Highcharts != \"object\") {\r\n console.log(\"Highcharts not loaded, loading now.\");\r\n window.Highcharts = await import(\"highcharts\");\r\n }\r\n};\r\n\r\nexport default getHighchartsBundle;\r\n","import getHighchartsBundle from \"../lazy-bundles/load-highcharts-bundle\";\r\n\r\nwindow.initHistogramChart = async function (target, colors, chartData) {\r\n await getHighchartsBundle();\r\n const val = $(target).closest(\".maturity-chart-container\");\r\n\r\n var descriptionData = \"\";\r\n\r\n const title = chartData.title;\r\n const ticker = chartData.ticker;\r\n\r\n if (title && !chartData.isEuTicker) {\r\n var titleName = title;\r\n\r\n titleName = \"Bar Chart illustrating the average maturity\"; //why??\r\n descriptionData = titleName;\r\n if (ticker) {\r\n var tickerName = ticker;\r\n if (tickerName !== \"\" && tickerName !== \" \" && tickerName !== undefined) {\r\n tickerName = \" of the \" + tickerName + \" portfolio.\";\r\n descriptionData = titleName + tickerName;\r\n }\r\n }\r\n }\r\n\r\n var i = $(\".maturity_breakdown_chart\").index(target);\r\n var uniqueName = \"line_chart\" + i;\r\n const chartContainer = \"chart_container\" + i;\r\n $(val).attr(\"id\", uniqueName);\r\n\r\n $(val).find(\".maturity_breakdown_chart\").attr(\"id\", chartContainer);\r\n\r\n var masDataX = [];\r\n var masData = [];\r\n chartData.holdings.forEach(function (holding){\r\n masDataX.push(holding.Label);\r\n var value = holding.Weight.replace(',', '.');\r\n var flo = parseFloat(value);\r\n if (flo >= 0.0) {\r\n masData.push(flo);\r\n }\r\n });\r\n\r\n if (masDataX.length === 0 || masData.length === 0) return;\r\n\r\n var xAxisTitle = {\r\n text: chartData.yearsText\r\n };\r\n var yAxisFormatterFunction = function () { return this.value + \"%\"; };\r\n var toolTipFormatterFunction = function () {\r\n return '<b>' + this.series.name + '</b><br/>' +\r\n this.x + ': ' + this.y + '%';\r\n };\r\n\r\n if (chartData.isEuTicker) {\r\n Highcharts.setOptions({\r\n lang: { decimalPoint: chartData.percentDecimalSeparator }\r\n });\r\n\r\n xAxisTitle.text = chartData.labelText;\r\n yAxisFormatterFunction = function () { return Highcharts.numberFormat(this.value, 1) + \"%\"; };\r\n toolTipFormatterFunction = function () {\r\n return '<b>' + this.series.name + '</b><br/>' +\r\n this.x + ': ' + Highcharts.numberFormat(this.y, 1) + '%';\r\n };\r\n }\r\n\r\n Highcharts.setOptions({ colors: colors })\r\n\r\n return new Highcharts.Chart({\r\n chart: {\r\n renderTo: chartContainer,\r\n type: 'column',\r\n },\r\n title: { text: undefined },\r\n xAxis: {\r\n title: xAxisTitle,\r\n categories: masDataX,\r\n labels: {\r\n rotation: -40,\r\n align: 'right',\r\n style: {\r\n fontSize: '12px',\r\n fontFamily: 'Verdana, sans-serif'\r\n }\r\n }\r\n },\r\n yAxis: {\r\n min: 0,\r\n tickPixelInterval: 100,\r\n title: { text: null },\r\n labels: {\r\n formatter: yAxisFormatterFunction\r\n }\r\n },\r\n legend: { enabled: false },\r\n tooltip: {\r\n formatter: toolTipFormatterFunction\r\n },\r\n plotOptions: {\r\n column: {\r\n pointPadding: 0.2,\r\n borderWidth: 0\r\n }\r\n },\r\n accessibility: {\r\n description: descriptionData\r\n },\r\n series: [{ name: chartData.yearsText, data: masData }],\r\n credits: { enabled: false }\r\n });\r\n};"],"names":["async","window","Highcharts","console","log","initHistogramChart","target","colors","chartData","getHighchartsBundle","val","$","closest","descriptionData","title","ticker","isEuTicker","undefined","i","index","uniqueName","chartContainer","attr","find","masDataX","masData","holdings","forEach","holding","push","Label","value","Weight","replace","flo","parseFloat","length","xAxisTitle","text","yearsText","yAxisFormatterFunction","this","toolTipFormatterFunction","series","name","x","y","setOptions","lang","decimalPoint","percentDecimalSeparator","labelText","numberFormat","Chart","chart","renderTo","type","xAxis","categories","labels","rotation","align","style","fontSize","fontFamily","yAxis","min","tickPixelInterval","formatter","legend","enabled","tooltip","plotOptions","column","pointPadding","borderWidth","accessibility","description","data","credits"],"sourceRoot":""}