{"version":3,"file":"investmentproductgraph.min.js","sources":["investmentproductgraph.js"],"sourcesContent":["// @ts-check\n/// \n/// \n/// \n/// \n\n// Initialize the graph\nvar investmentProductGraph;\n\n// If a comparison product is selected from the dropdown,\n// set it as the second series for the graph\n$(document.body).on(\"click\", \".comparison-dropdown-menu a\", function (event) {\n event.stopPropagation();\n var selectedComparison = $(event.currentTarget);\n\n // Close the Bootstrap dropdown (toggle it)\n selectedComparison.closest(\".comparison-select-container\")\n .find(\"#comparison-dropdown-label\")\n .text(selectedComparison.text())\n .end()\n .children(\".dropdown-toggle\")\n .dropdown(\"toggle\");\n\n // If there was a previous comparison, remove it first from the series array\n if (investmentProductGraph.series.length > 1) {\n investmentProductGraph.series[1].remove();\n }\n\n var comparisonIsin = selectedComparison.data(\"isin\");\n\n if (comparisonIsin !== \"none\") {\n var comparisonColor = selectedComparison.data(\"color\");\n var comparisonIsBenchmark = false;\n var comparisonIsinInPath = comparisonIsin;\n\n if (investmentProductLang === \"sv\") {\n comparisonIsBenchmark = selectedComparison.text().includes(\"index\");\n }\n else {\n comparisonIsBenchmark = selectedComparison.text().includes(\"indeksi\");\n }\n\n var pathToGetComparisonGraphData = \"/graphdata/\";\n\n if (comparisonIsBenchmark) {\n pathToGetComparisonGraphData = \"/benchmarkgraphdata/\";\n comparisonIsinInPath = investmentProductIsin;\n }\n\n // Fetch the data for the comparison graph and add it as the second series\n $.getJSON(\"/\" + investmentProductLang + \"/api/\" + investmentProductApiPath + pathToGetComparisonGraphData + comparisonIsinInPath, function (data) {\n investmentProductGraph.addSeries({\n name: data.name,\n data: data.data,\n color: comparisonColor,\n id: \"comparisonProductData\",\n type: \"area\",\n tooltip: {\n pointFormatter: function () {\n // Comparison graph should always be shown with two decimals, as we cannot\n // determine whether the values include earnings or not\n var dataValue = this.y.toFixed(2).replace('.', ',');\n var coloredDot = '\\u25CF ';\n\n return coloredDot + this.series.name + \": \" + dataValue + \"\";\n }\n },\n fillOpacity: 0\n });\n\n // Set compare mode to percent\n $(\".units\").removeClass(\"btn-primary\");\n $(\"#units-percent\").addClass(\"btn-primary\");\n investmentProductGraph.yAxis[0].setCompare(\"percent\");\n });\n }\n\n return false;\n});\n\nfunction zoomInvestmentProductGraph(period) {\n var now = new Date();\n var minDate = now;\n var min = minDate.getTime();\n var max = now.getTime();\n\n switch (period) {\n case \"1m\":\n // If the graph is empty for some reason, zoom all the way out first so we have data\n if (investmentProductGraph.series[0].points.length === 0) {\n investmentProductGraph.zoomOut();\n }\n\n // For one month scaling, show values all the way to the last value\n // in the main series and one month before that\n max = investmentProductGraph.xAxis[0].dataMax;\n minDate = new Date(max);\n minDate.setMonth(minDate.getMonth() - 1);\n min = minDate.getTime();\n break;\n case \"3m\":\n // If the graph is empty for some reason, zoom all the way out first so we have data\n if (investmentProductGraph.series[0].points.length === 0) {\n investmentProductGraph.zoomOut();\n }\n\n // For three months scaling, show values all the way to the last value\n // in the main series and three months before that\n max = investmentProductGraph.xAxis[0].dataMax;\n minDate = new Date(max);\n minDate.setMonth(minDate.getMonth() - 3);\n min = minDate.getTime();\n break;\n case \"6m\":\n // If the graph is empty for some reason, zoom all the way out first so we have data\n if (investmentProductGraph.series[0].points.length === 0) {\n investmentProductGraph.zoomOut();\n }\n\n // For six months scaling, show values all the way to the last value\n // in the main series and six months before that\n max = investmentProductGraph.xAxis[0].dataMax;\n minDate = new Date(max);\n minDate.setMonth(minDate.getMonth() - 6);\n min = minDate.getTime();\n break;\n case \"1y\":\n // If the graph is empty for some reason, zoom all the way out first so we have data\n if (investmentProductGraph.series[0].points.length === 0) {\n investmentProductGraph.zoomOut();\n }\n\n // For one year scaling, show values all the way to the last value\n // in the main series and one year before that\n max = investmentProductGraph.xAxis[0].dataMax;\n minDate = new Date(max);\n minDate.setFullYear(minDate.getFullYear() - 1);\n min = minDate.getTime();\n break;\n case \"3y\":\n // If the graph is empty for some reason, zoom all the way out first so we have data\n if (investmentProductGraph.series[0].points.length === 0) {\n investmentProductGraph.zoomOut();\n }\n\n // For three years scaling, show values all the way to the last value\n // in the main series and three years before that\n max = investmentProductGraph.xAxis[0].dataMax;\n minDate = new Date(max);\n minDate.setFullYear(minDate.getFullYear() - 3);\n min = minDate.getTime();\n break;\n case \"10y\":\n // If the graph is empty for some reason, zoom all the way out first so we have data\n if (investmentProductGraph.series[0].points.length === 0) {\n investmentProductGraph.zoomOut();\n }\n\n // For ten years scaling, show values all the way to the last value\n // in the main series and ten years before that\n max = investmentProductGraph.xAxis[0].dataMax;\n minDate = new Date(max);\n minDate.setFullYear(minDate.getFullYear() - 10);\n min = minDate.getTime();\n break;\n case \"max\":\n min = 0;\n }\n\n if (min <= 0) {\n investmentProductGraph.zoomOut();\n }\n else {\n investmentProductGraph.xAxis[0].setExtremes(min, max);\n\n // Set the graph to begin from the first visible data point after zooming;\n // check that the value is within the given scaling\n if (investmentProductGraph.series[0].points.length !== 0) {\n var firstValueShownOnGraph = investmentProductGraph.series[0].processedXData[0];\n var minValueToSet = firstValueShownOnGraph;\n\n var secondValueShownOnGraph = investmentProductGraph.series[0].processedXData[1];\n var secondValueShownAsDate = new Date(secondValueShownOnGraph);\n\n var differenceBetweenFirstShownValueAndMin = Math.abs(firstValueShownOnGraph - min);\n var differenceBetweenSecondShownValueAndMin = Math.abs(secondValueShownOnGraph - min);\n var sevenDaysInMilliseconds = 1000 * 60 * 60 * 24 * 7;\n\n if (secondValueShownAsDate.toDateString() === minDate.toDateString()\n || ((differenceBetweenFirstShownValueAndMin > sevenDaysInMilliseconds)\n && differenceBetweenSecondShownValueAndMin < differenceBetweenFirstShownValueAndMin)) {\n minValueToSet = secondValueShownOnGraph;\n }\n\n investmentProductGraph.xAxis[0].setExtremes(minValueToSet, max);\n }\n }\n};\n\n$(\"button.zoom\").on(\"click\", function () {\n $(\".zoom\").removeClass(\"btn-primary\");\n $(this).addClass(\"btn-primary\");\n var zoomPeriod = $(this).data(\"zoom\");\n\n zoomInvestmentProductGraph(zoomPeriod);\n});\n\n // Switch compare mode (none, percent) with buttons\n$(\"button.units\").on(\"click\", function () {\n $(\".units\").removeClass(\"btn-primary\");\n $(this).addClass(\"btn-primary\");\n\n var compare = $(this).data(\"compare\");\n\n // Current Highcharts version 11.0.1 has a bug with setting compare to none\n // if the chart has dataGrouping options defined,\n // so this doesn't work and we have to directly set the compare for each series\n //investmentProductGraph.yAxis[0].setCompare(compare);\n\n investmentProductGraph.series[0].update({\n compare: compare\n });\n\n if (investmentProductGraph.series.length > 1) {\n investmentProductGraph.series[1].update({\n compare: compare\n });\n }\n});\n\nvar getInvestmentProductGraphTranslations = function (lang) {\n if (lang === \"sv\") {\n return {\n months: [\"januari\", \"februari\", \"mars\", \"april\", \"maj\", \"juni\", \"juli\", \"augusti\", \"september\", \"oktober\", \"november\", \"december\"],\n shortMonths: [\"jan\", \"feb\", \"mars\", \"apr\", \"maj\", \"juni\", \"juli\", \"aug\", \"sept\", \"okt\", \"nov\", \"dec\"],\n weekdays: [\"söndag\", \"måndag\", \"tisdag\", \"onsdag\", \"torsdag\", \"fredag\", \"lördag\"],\n decimalPoint: \",\",\n thousandsSep: \".\",\n loading: \"Laddar...\",\n viewFullscreen: \"Visa i helskärm\",\n exitFullscreen: \"Avsluta helskärmsläge\",\n printChart: \"Skriv ut diagram\",\n downloadPNG: \"Ladda ner PNG-bild\",\n downloadJPEG: \"Ladda ner JPEG-bild\",\n downloadPDF: \"Ladda ner PDF-dokument\",\n downloadSVG: \"Ladda ner SVG-vektorbild\",\n downloadCSV: \"Ladda ner CSV\",\n downloadXLS: \"Ladda ner XLS\",\n viewData: \"Visa datatabell\",\n hideData: \"Dölj datatabell\",\n dateTime: \"Datum\"\n };\n }\n else {\n return {\n months: [\"tammikuu\", \"helmikuu\", \"maaliskuu\", \"huhtikuu\", \"toukokuu\", \"kes\\u00e4kuu\", \"hein\\u00e4kuu\", \"elokuu\", \"syyskuu\", \"lokakuu\", \"marraskuu\", \"joulukuu\"],\n shortMonths: [\"tam\", \"hel\", \"maa\", \"huh\", \"tou\", \"kes\", \"hei\", \"elo\", \"syy\", \"lok\", \"mar\", \"jou\"],\n weekdays: [\"sunnuntai\", \"maanantai\", \"tiistai\", \"keskiviikko\", \"torstai\", \"perjantai\", \"lauantai\"],\n decimalPoint: \",\",\n thousandsSep: \".\",\n loading: \"Ladataan...\",\n viewFullscreen: \"Katso koko näytöllä\",\n exitFullscreen: \"Poistu koko näytön tilasta\",\n printChart: \"Tulosta kaavio\",\n downloadPNG: \"Lataa PNG\",\n downloadJPEG: \"Lataa JPEG\",\n downloadPDF: \"Lataa PDF\",\n downloadSVG: \"Lataa SVG\",\n downloadCSV: \"Lataa CSV\",\n downloadXLS: \"Lataa XLS\",\n viewData: \"Näytä taulukko\",\n hideData: \"Piilota taulukko\",\n dateTime: \"Päivämäärä\"\n }\n }\n};\n\nvar getInvestmentProductGraphWeekStartingTranslations = function (lang) {\n if (lang === \"sv\") {\n return \"Veckan från %A %d.%m.%Y\";\n }\n else {\n return \"Viikko alkaen %A %d.%m.%Y\";\n }\n};\n\n//Checks for the page type\nvar isObligationPage = document.querySelector('.obligation-page') !== null;\n\n// Set Highcharts options\nHighcharts.setOptions({\n // First color is for the main series, others are for comparison series\n colors: [\"#008035\", \"#439fbb\", \"#ab89b7\", \"#fd9fbb\", \"#d06079\", \"#ff0066\", \"#eeaaee\",\n \"#55BF3B\", \"#DF5353\", \"#7798BF\", \"#aaeeee\"],\n chart: {\n backgroundColor: null,\n style: {\n fontFamily: \"S Bonus UX, sans-serif\"\n }\n },\n title: {\n text: null\n },\n legend: {\n enabled: false\n },\n xAxis: {\n // Set xAxis min range to one week (this is the minimum interval to which the data can be zoomed)\n minRange: 1000 * 60 * 60 * 24 * 7,\n type: \"datetime\",\n title: {\n text: getInvestmentProductGraphTranslations(investmentProductLang).dateTime,\n enabled: undefined\n },\n labels: {\n style: {\n color: \"#666666\",\n fontSize: \"11px\"\n }\n },\n lineWidth: 2,\n lineColor: \"#E6E6E6\",\n tickColor: \"#E6E6E6\"\n },\n yAxis: {\n labels: {\n style: {\n color: \"#666666\"\n },\n formatter: function () {\n var formattedValue = parseFloat(this.value.toFixed(2)).toString().replace('.', ',');\n // Show units on the y-axis based on selected compare mode (different settings for obligations)\n var compare = this.axis.series[0].userOptions.compare || \"none\";\n if (isObligationPage) {\n return formattedValue + { none: \" %\", value: \" %\", percent: \" %\" }[compare];\n }\n else {\n return formattedValue + { none: \" €\", value: \" €\", percent: \" %\" }[compare];\n } \n }\n },\n gridLineWidth: 1,\n gridLineColor: \"#E6E6E6\"\n },\n tooltip: {\n xDateFormat: \"%A %d.%m.%Y\",\n split: false,\n pointFormatter: function () {\n // The start date for showing four decimals is 16.1.2021, i.e. 1610755200000\n var startDateForFourDecimals = 1610755200000;\n var dataValue = this.y;\n\n if (investmentProductHasEarnings === 'True' || this.x < startDateForFourDecimals || isObligationPage) {\n dataValue = this.y.toFixed(2).replace('.', ',');\n }\n else {\n dataValue = this.y.toFixed(4).replace('.', ',');\n }\n\n var coloredDot = '\\u25CF ';\n\n return coloredDot + this.series.name + \": \" + dataValue + \"\";\n }\n },\n plotOptions: {\n series: {\n compareStart: true,\n shadow: true,\n lineWidth: 2,\n dataGrouping: {\n approximation: function (groupData) {\n return groupData[groupData.length - 1];\n },\n dateTimeLabelFormats: {\n day: [\"%A %d.%m.%Y\"],\n week: [getInvestmentProductGraphWeekStartingTranslations(investmentProductLang)],\n month: [\"%B %Y\"],\n year: [\"%Y\"]\n }\n }\n }\n },\n\n // Highstock specific\n rangeSelector: {\n enabled: false\n },\n scrollbar: {\n enabled: false\n },\n navigator: {\n enabled: false\n },\n credits: {\n enabled: false\n },\n exporting: {\n menuItemDefinitions: {\n viewFullscreen: {\n text: getInvestmentProductGraphTranslations(investmentProductLang).viewFullscreen\n },\n printChart: {\n text: getInvestmentProductGraphTranslations(investmentProductLang).printChart\n },\n downloadPNG: {\n text: getInvestmentProductGraphTranslations(investmentProductLang).downloadPNG\n },\n downloadJPEG: {\n text: getInvestmentProductGraphTranslations(investmentProductLang).downloadJPEG\n },\n downloadPDF: {\n text: getInvestmentProductGraphTranslations(investmentProductLang).downloadPDF\n },\n downloadSVG: {\n text: getInvestmentProductGraphTranslations(investmentProductLang).downloadSVG\n },\n downloadCSV: {\n text: getInvestmentProductGraphTranslations(investmentProductLang).downloadCSV\n },\n downloadXLS: {\n text: getInvestmentProductGraphTranslations(investmentProductLang).downloadXLS\n },\n viewData: {\n text: getInvestmentProductGraphTranslations(investmentProductLang).viewData\n },\n hideData: {\n text: getInvestmentProductGraphTranslations(investmentProductLang).hideData\n }\n }\n },\n\n lang: getInvestmentProductGraphTranslations(investmentProductLang)\n});\n\n$(function () {\n if (includeComparisons === \"True\") {\n // Colors for the comparisons\n var investmentProductColors = [\"#439fbb\", \"#ab89b7\", \"#fd9fbb\", \"#d06079\",\n \"#ff0066\", \"#eeaaee\", \"#55BF3B\", \"#DF5353\", \"#7798BF\", \"#aaeeee\",\n \"#7cb5ec\", \"#434348\", \"#90ed7d\", \"#f7a35c\", \"#8085e9\", \"#f15c80\",\n \"#e4d354\", \"#8085e8\", \"#8d4653\", \"#91e8e1\"];\n\n // Create comparison list dropdown for graph\n $.getJSON(\"/\" + investmentProductLang + \"/api/\" + investmentProductApiPath + \"/comparisondata/\" + investmentProductIsin, function (data) {\n data.forEach(function (item, index) {\n var color = investmentProductColors[index % investmentProductColors.length];\n var id = item.isin;\n var name = item.name;\n\n // Use idnotation as identifier if set\n if (typeof item.idnotation !== \"undefined\") {\n id = item.idnotation;\n }\n\n if (name === \"null\") {\n name = \"[unknown]\";\n }\n\n $(\"#comparison-dropdown-menu-list\").append(\n $(\"\", {\n \"class\": \"dropdown-item\",\n \"data-isin\": id,\n \"data-color\": color,\n \"href\": \"#\",\n html: name\n })\n );\n });\n });\n }\n \n // Draw the graph, with the selected investment product as the main series\n $.getJSON(\"/\" + investmentProductLang + \"/api/\" + investmentProductApiPath + \"/graphdata/\" + investmentProductIsin, function (data) {\n investmentProductGraph = Highcharts.stockChart(\"investment-product-graph-container\", {\n series: [{\n name: data.name,\n data: data.data,\n id: \"investmentProductData\",\n type: \"area\",\n threshold: null,\n fillOpacity: 0.1\n }]\n });\n\n // Funds with earnings are only shown the percent compare mode\n if (investmentProductHasEarnings === \"True\") {\n investmentProductGraph.yAxis[0].setCompare(\"percent\");\n }\n });\n});\n\n//# sourceMappingURL=investmentproductgraph.js.map\n"],"names":["investmentProductGraph","zoomInvestmentProductGraph","period","secondValueShownOnGraph","secondValueShownAsDate","differenceBetweenSecondShownValueAndMin","now","Date","minDate","min","getTime","max","series","points","length","zoomOut","xAxis","dataMax","setMonth","getMonth","setFullYear","getFullYear","setExtremes","minValueToSet","firstValueShownOnGraph","processedXData","differenceBetweenFirstShownValueAndMin","Math","abs","toDateString","$","document","body","on","event","stopPropagation","comparisonColor","pathToGetComparisonGraphData","selectedComparison","currentTarget","comparisonIsin","closest","find","text","end","children","dropdown","remove","data","comparisonIsinInPath","investmentProductLang","includes","investmentProductIsin","getJSON","investmentProductApiPath","addSeries","name","color","id","type","tooltip","pointFormatter","dataValue","this","y","toFixed","replace","fillOpacity","removeClass","addClass","yAxis","setCompare","compare","update","getInvestmentProductGraphTranslations","lang","months","shortMonths","weekdays","decimalPoint","thousandsSep","loading","viewFullscreen","exitFullscreen","printChart","downloadPNG","downloadJPEG","downloadPDF","downloadSVG","downloadCSV","downloadXLS","viewData","hideData","dateTime","getInvestmentProductGraphWeekStartingTranslations","isObligationPage","querySelector","Highcharts","setOptions","colors","chart","backgroundColor","style","fontFamily","title","legend","enabled","minRange","undefined","labels","fontSize","lineWidth","lineColor","tickColor","formatter","formattedValue","parseFloat","value","toString","axis","userOptions","none","percent","gridLineWidth","gridLineColor","xDateFormat","split","investmentProductHasEarnings","x","plotOptions","compareStart","shadow","dataGrouping","approximation","groupData","dateTimeLabelFormats","day","week","month","year","rangeSelector","scrollbar","navigator","credits","exporting","menuItemDefinitions","investmentProductColors","includeComparisons","forEach","item","index","isin","idnotation","append","class","data-isin","data-color","href","html","stockChart","threshold"],"mappings":"AAOA,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