{"version":3,"sources":["Commons/script/chartServices.js","Commons/script/circulationCharts.js","Commons/script/basicInfoCharts.js","Commons/script/reachCharts.js","Apps/Infographics/script/app.js"],"names":["define","$","renderDrillChart","chartName","data","settings","Highcharts","chart","type","title","text","xAxis","lineColor","tickLength","yAxis","min","gridLineColor","lineWidth","labels","enabled","credits","legend","plotOptions","series","borderWidth","dataLabels","format","tooltip","headerFormat","pointFormat","renderColumnChart","currentSettings","labelsFormat","labelsUseRotation","useLabelsRotation","labelsRotation","labelsCrop","labelsOverflow","labelsY","labelsX","xAxisType","xAxisTickAmount","yAxisType","yAxisTickAmount","yAxisMaxPadding","yAxisMinPadding","tickAmount","minorTickLength","autoRotation","style","color","cursor","fontSize","fontFamily","maxPadding","minPadding","subtitle","fontWeight","rotation","crop","overflow","y","x","renderStackedColumnChart","stackLabels","setOptions","lang","resetZoom","events","load","this","forEach","s","update","showInLegend","points","every","isNull","zoomType","reversed","column","stacking","theme","dataLabelsColor","renderBarChart","textOverflow","endOnTick","renderSplineChart","shared","months","shortMonths","weekdays","layout","align","verticalAlign","floating","backgroundColor","legendBackgroundColor","areaspline","fillOpacity","marker","renderPieChart","plotBackgroundColor","plotBorderWidth","plotShadow","pie","allowPointSelect","valueDecimals","valueSuffix","itemDistance","itemWidth","width","renderStackedChart","split","connectNulls","enableMouseTracking","area","getWeekChartCategories","weekLabels","categories","difference","i","j","len","previous","weekAndYear","weekCategory","weekIndex","length","year","week","index","label","push","thousandFormat","value","toString","replace","CanvasRenderer","element","options","cachedBackground","canvas","document","createElement","appendChild","ctx","getContext","height","size","translate","rotate","Math","PI","radius","Date","now","drawCircle","percent","max","isNegative","beginPath","arc","strokeStyle","stroke","reqAnimationFrame","window","requestAnimationFrame","webkitRequestAnimationFrame","mozRequestAnimationFrame","callback","setTimeout","drawBackground","trackColor","clear","clearRect","draw","getImageData","putImageData","lineCap","barColor","bind","animate","from","to","startTime","animation","process","duration","currentValue","easing","onStep","pieChart","userOptions","defaultOptions","t","b","c","d","renderer","hasOwnProperty","jQuery","isFunction","newValue","parseFloat","fn","each","call","chartServices","executeDigital","executePrintHistorical","executePrintSubscription","populateReachData","dataPoints","tickInterval","chartSettings","dataValue","date","highestValue","item","k","len1","mediaName","weekCategories","weekLabel","apply","_","map","period","getFullYear","startOnTick","tickmarkPlacement","formatter","find","_this","softMax","name","source","ajax","url","val","dataType","done","resp","trafficDataPoints","removeClass","useHTML","point","populateCirculationHistoricalData","actualMinYear","etidning","etidningValue","firstSeriesLabel","foundYear","isTsDist","m","maxYear","minYear","plus","plusValue","results","results1","upplaga","upplagaValue","years","l","res","populateCirculationPieChartData","ref","sum","reduce","total","executeAdvertisersChart","executeAgeChart","executeGenderChart","mediaId","cardId","chartId","calculateAdvertisersData","TSUrl","ApiUrl","expenseChartDataPoints","colorByPoint","advertiser","calculateGenderData","reachText","surveyName","parent","totalReach","female","html","round","male","femalePercentage","femaleReach","malePercentage","maleReach","reach","calculateAgeData","minorGridLineWidth","age","reverse","optionName","executePrint","uri","hideTertialsHighlight","createChart","highlightTertialsInTable","populateData","reachMonthDataPoints","reachTertialDataPoints","endDates","highlightEndDate","highlightStartDate","selectedPeriod","startDates","utcDate","filter","isSelected","plotBands","UTC","getMonth","getDate","click","event","tertial","attr","substr","indexOf","range","addClass","filteredYearDataPoints","tertialStartDate","reachYearDataPoints","h1","h2","require","circulationCharts","basicInfoCharts","reachCharts"],"mappings":"AAAA,CAAA,WACAA,OAAA,yBAAA,UACA,SAAAC,GAwNA,QAAAC,GAAAC,EAAAC,EAAAC,GACAC,WAAAC,MAAAJ,GACAI,OACAC,KAAA,OAGAC,OACAC,KAAA,MAGAC,OACAH,KAAA,WACAI,UAAA,cACAC,WAAA,GAEAC,OACAL,OACAC,KAAA,MAEAK,IAAA,EACAC,cAAA,cACAC,UAAA,EACAC,QACAC,SAAA,IAGAC,SACAD,SAAA,GAEAE,QACAF,SAAA,GAEAG,aACAC,QACAC,YAAA,EACAC,YACAN,SAAA,EACAO,OAAA,oBAKAC,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wG,WAAAxG,EAAAyG,WACA1G,GACA1J,EAAA8P,EACA/P,EAAAW,EAAA+D,MACAsG,OAAA,MAAArK,EAAAqK,OAAArK,EAAAqK,OAAA,UACAf,UAAAtJ,EAAAsJ,WAEAH,EAAApM,OAAAkG,GAAArH,KAAAiI,KAAAmF,EAEA/F,KAEA,MAAAkG,IAEAuF,EAAAF,EAAA3B,KAGApE,eAAAA,EACA8F,aAAAA,MAIAhG,KAAAzI,MAIA,WC9OA0Q,SAAA,SAAA,aAAA,4BAAA,0BAAA,uBAAA,SAAA/U,EAAAiO,EAAA+G,EAAAC,EAAAC,GACA,MAAAlV,GAAA,WACA,GAAAkR,EAMA,OALAA,GAAAlR,EAAA,YAAA+O,MACAkG,EAAAhE,mBAAA,GAAAC,EAAA,+BACA+D,EAAAjE,gBAAA,GAAAE,EAAA,2BAAA,sBACA+D,EAAAlE,wBAAA,GAAAG,EAAA,4BAAA,8BACA8D,EAAAhI,iBACAkI,EAAAlI,eAAA,uBAAA,oBAIAF,KAAAzI,MAIAtE,OAAA,+BAAA;AJhBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACvtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC5TA,AD6TA;AC5TA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,AChLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC9OA,AD+OA;AC9OA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"infographics.dist.js","sourcesContent":["(function () {\r\n define('commons/chartServices',[\"jquery\"],\n function ($) {\r\n\n var CanvasRenderer = function (element, options) {\r\n var cachedBackground;\n var canvas = document.createElement(\"canvas\");\n\n element.appendChild(canvas);\n\n var ctx = canvas.getContext(\"2d\");\n\n canvas.width = canvas.height = options.size;\n\n // move 0,0 coordinates to the center\n ctx.translate(options.size / 2, options.size / 2);\n\n // rotate canvas -90deg\n ctx.rotate((-1 / 2 + options.rotate / 180) * Math.PI);\n\n var radius = (options.size - options.lineWidth) / 2;\n\n Date.now = Date.now ||\n function () {\n\n //convert to milliseconds\n return +(new Date());\r\n };\n\n var drawCircle = function (color, lineWidth, percent) {\r\n percent = Math.min(Math.max(-1, percent || 0), 1);\n var isNegative = percent <= 0 ? true : false;\n\n ctx.beginPath();\n ctx.arc(0, 0, radius, 0, Math.PI * 2 * percent, isNegative);\n\n ctx.strokeStyle = color;\n ctx.lineWidth = lineWidth;\n\n ctx.stroke();\r\n };\n\n /**\n * Return function request animation frame method or timeout fallback\n */\n var reqAnimationFrame = (function () {\r\n return window.requestAnimationFrame ||\n window.webkitRequestAnimationFrame ||\n window.mozRequestAnimationFrame ||\n function (callback) {\r\n window.setTimeout(callback, 1000 / 60);\r\n };\r\n }());\n\n /**\n * Draw the background of the plugin track\n */\n var drawBackground = function () {\r\n if (options.trackColor) drawCircle(options.trackColor, options.lineWidth, 1);\r\n };\n\n /**\n * Clear the complete canvas\n */\n this.clear = function () {\r\n ctx.clearRect(options.size / -2, options.size / -2, options.size, options.size);\r\n };\n\n /**\n * Draw the complete chart\n * param percent Percent shown by the chart between -100 and 100\n */\n this.draw = function (percent) {\r\n if (!!options.trackColor) {\n // getImageData and putImageData are supported\n if (ctx.getImageData && ctx.putImageData) {\r\n if (!cachedBackground) {\r\n drawBackground();\n cachedBackground = ctx.getImageData(0, 0, options.size, options.size);\r\n } else {\r\n ctx.putImageData(cachedBackground, 0, 0);\r\n }\r\n } else {\r\n this.clear();\n drawBackground();\r\n }\r\n } else {\r\n this.clear();\r\n }\n\n ctx.lineCap = options.lineCap;\n\n // draw bar\n drawCircle(options.barColor, options.lineWidth, percent / 100);\r\n }.bind(this);\n\n this.animate = function (from, to) {\r\n var startTime = Date.now();\n\n var animation = function () {\r\n var process = Math.min(Date.now() - startTime, options.animate.duration);\n\n var currentValue = options.easing(this, process, from, to - from, options.animate.duration);\n\n this.draw(currentValue);\n\n //Show the number at the center of the circle\n options.onStep(from, to, currentValue);\n\n if (process < options.animate.duration) {\r\n reqAnimationFrame(animation);\r\n }\n }.bind(this);\n\n reqAnimationFrame(animation);\r\n }.bind(this);\r\n };\n\n var pieChart = function (element, userOptions) {\r\n var defaultOptions = {\r\n barColor: \"#ef1e25\",\n trackColor: \"#f9f9f9\",\n lineCap: \"round\",\n lineWidth: 3,\n size: 150,\n rotate: 0,\n percent: 0,\n animate: {\r\n duration: 1000,\n enabled: true\r\n },\n easing: function (x, t, b, c, d) { //copy from jQuery easing animate\n t = t / (d / 2);\n if (t < 1) {\r\n return c / 2 * t * t + b;\r\n }\n return -c / 2 * ((--t) * (t - 2) - 1) + b;\r\n },\n onStep: function (from, to, currentValue) {\r\n return;\r\n },\n renderer: CanvasRenderer //Maybe SVGRenderer more later\n };\n\n var options = {};\n var currentValue = 0;\n\n var init = function () {\r\n this.element = element;\n this.options = options;\n\n // merge user options into default options\n for (var i in defaultOptions) {\r\n if (defaultOptions.hasOwnProperty(i)) {\r\n options[i] = userOptions && typeof (userOptions[i]) !== \"undefined\"\n ? userOptions[i]\n : defaultOptions[i];\n if (typeof (options[i]) === \"function\") {\r\n options[i] = options[i].bind(this);\r\n }\r\n }\r\n }\n\n // check for jQuery easing, use jQuery easing first\n if (typeof (options.easing) === \"string\" &&\n typeof (jQuery) !== \"undefined\" &&\n jQuery.isFunction(jQuery.easing[options.easing])) {\r\n options.easing = jQuery.easing[options.easing];\r\n } else {\r\n options.easing = defaultOptions.easing;\r\n }\n\n // create renderer\n this.renderer = new options.renderer(element, options);\n\n // initial draw\n this.renderer.draw(currentValue);\n\n var newValue = parseFloat(options.percent);\n\n if (options.animate.enabled) {\r\n this.renderer.animate(currentValue, newValue);\r\n } else {\r\n this.renderer.draw(newValue);\r\n }\n\n currentValue = newValue;\r\n\n /*\n if (element.getAttribute && element.getAttribute('data-percent')) {\r\n var newValue = parseFloat(element.getAttribute('data-percent'));\n\n if (options.animate.enabled) {\r\n this.renderer.animate(currentValue, newValue);\r\n } else {\r\n this.renderer.draw(newValue);\r\n }\n\n currentValue = newValue;\r\n }\r\n */\r\n }.bind(this)();\r\n };\n\n $.fn.pieChart = function (options) {\n\n //Iterate all the dom to draw the pie-charts\n return this.each(function () {\r\n if (!$.data(this, \"pieChart\")) {\r\n var userOptions = options;\n //var userOptions = $.extend({}, options, $(this).data());\n $.data(this, \"pieChart\", new pieChart(this, userOptions));\r\n }\r\n });\r\n };\r\n\r\n // Highcharts should probably be required, but for now load it first in HTML\r\n\r\n function renderDrillChart(chartName, data, settings) {\r\n Highcharts.chart(chartName, {\r\n chart: {\r\n type: 'bar'\r\n\n },\n title: {\r\n text: null\r\n },\n\n xAxis: {\r\n type: 'category',\n lineColor: 'transparent',\n tickLength: 0\r\n },\n yAxis: {\r\n title: {\r\n text: null\r\n },\n min: 0,\n gridLineColor: 'transparent',\n lineWidth: 0,\n labels: {\r\n enabled: false,\r\n }\r\n },\n credits: {\r\n enabled: false\r\n },\n legend: {\r\n enabled: false\r\n },\n plotOptions: {\r\n series: {\r\n borderWidth: 0,\n dataLabels: {\r\n enabled: true,\n format: '{point.y:.1f}%'\r\n }\r\n }\r\n },\n\n tooltip: {\r\n headerFormat: '{series.name}
',\n pointFormat: '{point.name}: {point.y:.2f}% of total
'\r\n },\n\n series: data\r\n });\r\n }\n\r\n function renderColumnChart(chartName, data, settings) {\r\n var currentSettings = {\r\n labelsFormat: settings.labelsFormat || \"{point.y:,.0f}\",\r\n labelsUseRotation: settings.useLabelsRotation || false,\r\n labelsRotation: 0,\r\n labelsCrop: true,\r\n labelsOverflow: \"justify\",\r\n labelsY: 3,\r\n labelsX: 0,\r\n xAxisType: settings.xAxisType || \"category\",\r\n xAxisTickAmount : settings.xAxisTickAmount,\r\n yAxisType: settings.yAxisType || \"category\",\r\n yAxisTickAmount: settings.yAxisTickAmount,\r\n yAxisMaxPadding: settings.yAxisMaxPadding || 0.05,\r\n yAxisMinPadding: settings.yAxisMinPadding || 0.05\r\n }\r\n\r\n if (currentSettings.labelsUseRotation === true) {\r\n currentSettings.labelsRotation = 315;\r\n currentSettings.labelsCrop = false;\r\n currentSettings.labelsOverflow = \"none\";\r\n currentSettings.labelsY = -16;\r\n currentSettings.labelsX = 8;\r\n }\r\n\r\n var xAxis = settings.xAxis || {\r\n type: currentSettings.xAxisType,\r\n tickAmount: currentSettings.xAxisTickAmount,\r\n //lineColor: currentSettings.xAxisLineColor,\r\n minorTickLength: 0,\r\n tickLength: 0,\r\n labels: {\r\n autoRotation: true,\r\n style: { \"color\": \"#848484\", \"cursor\": \"default\", \"fontSize\": \"12px\", \"fontFamily\": \"'GrotesqueMTStd', Arial, sans-serif, Tahoma\" }\r\n }\r\n }\r\n\r\n var yAxis = settings.yAxis || {\r\n type: currentSettings.yAxisType,\r\n title: false,\r\n tickAmount: currentSettings.yAxisTickAmount,\r\n labels: {\r\n style: { \"color\": \"#989898\", \"cursor\": \"default\", \"fontSize\": \"12px\", \"fontFamily\": \"'GrotesqueMTStd', Arial, sans-serif, Tahoma\" }\r\n },\r\n maxPadding: currentSettings.yAxisMaxPadding,\r\n minPadding: currentSettings.yAxisMinPadding,\r\n //endOnTick: false\r\n }\r\n\r\n Highcharts.chart(chartName, {\r\n chart: {\r\n type: \"column\"\r\n },\r\n title: false,\r\n credits: {\r\n enabled: false\r\n },\r\n subtitle: false,\r\n legend: {\r\n enabled: false\r\n },\r\n plotOptions: {\r\n series: {\r\n borderWidth: 0,\r\n dataLabels: {\r\n enabled: true,\r\n format: currentSettings.labelsFormat,\r\n style: { \"color\": \"#231f20\", \"cursor\": \"default\", \"fontSize\": \"12px\", \"fontWeight\": \"normal\", \"fontFamily\": \"'GrotesqueMTStd', Arial, sans-serif, Tahoma\" },\r\n rotation: currentSettings.labelsRotation,\r\n crop: currentSettings.labelsCrop,\r\n overflow: currentSettings.labelsOverflow,\r\n y: currentSettings.labelsY,\r\n x: currentSettings.labelsX\r\n }\r\n }\r\n },\r\n xAxis: xAxis,\r\n yAxis: yAxis,\r\n tooltip: false,\r\n series: data\r\n });\r\n }\r\n\r\n function renderStackedColumnChart(chartName, data, settings) {\r\n var currentSettings = {\r\n labelsFormat: settings.labelsFormat || \"{point.y:,.0f}\",\r\n labelsUseRotation: settings.useLabelsRotation || false,\r\n labelsRotation: 0,\r\n labelsCrop: true,\r\n labelsOverflow: \"justify\",\r\n labelsY: 3,\r\n labelsX: 0,\r\n xAxisType: settings.xAxisType || \"category\",\r\n xAxisTickAmount: settings.xAxisTickAmount,\r\n yAxisType: settings.yAxisType || \"category\",\r\n yAxisTickAmount: settings.yAxisTickAmount,\r\n yAxisMaxPadding: settings.yAxisMaxPadding || 0.05,\r\n yAxisMinPadding: settings.yAxisMinPadding || 0.05\r\n }\r\n\r\n if (currentSettings.labelsUseRotation === true) {\r\n currentSettings.labelsRotation = 315;\r\n currentSettings.labelsCrop = false;\r\n currentSettings.labelsOverflow = \"none\";\r\n currentSettings.labelsY = -16;\r\n currentSettings.labelsX = 8;\r\n }\r\n\r\n var xAxis = settings.xAxis || {\r\n type: currentSettings.xAxisType,\r\n tickAmount: currentSettings.xAxisTickAmount,\r\n minorTickLength: 0,\r\n tickLength: 0,\r\n labels: { \r\n autoRotation: true,\r\n style: { \"color\": \"#848484\", \"cursor\": \"default\", \"fontSize\": \"12px\", \"fontFamily\": \"'GrotesqueMTStd', Arial, sans-serif, Tahoma\" }\r\n } \r\n }\r\n\r\n var yAxis = settings.yAxis || {\r\n type: currentSettings.yAxisType,\r\n title: false,\r\n tickAmount: currentSettings.yAxisTickAmount,\r\n labels: {\r\n style: { \"color\": \"#989898\", \"cursor\": \"default\", \"fontSize\": \"12px\", \"fontFamily\": \"'GrotesqueMTStd', Arial, sans-serif, Tahoma\" }\r\n },\r\n maxPadding: currentSettings.yAxisMaxPadding,\r\n minPadding: currentSettings.yAxisMinPadding,\r\n stackLabels: {\r\n labelsCrop: currentSettings.labelsCrop,\r\n labelsOverflow: currentSettings.labelsOverflow,\r\n x: currentSettings.labelsX,\r\n y: currentSettings.labelsY,\r\n rotation: currentSettings.labelsRotation,\r\n enabled: true,\r\n style: { \"color\": \"#231f20\", \"cursor\": \"default\", \"fontSize\": \"12px\", \"fontWeight\": \"normal\", \"fontFamily\": \"'GrotesqueMTStd', Arial, sans-serif, Tahoma\" }\r\n }\r\n }\r\n\r\n Highcharts.setOptions({\r\n lang: {\r\n resetZoom: \"Återställ\"\r\n }\r\n });\r\n\r\n Highcharts.chart(chartName, {\r\n chart: {\r\n type: \"column\",\r\n events: {\r\n load: function () {\r\n this.series.forEach(function (s) {\r\n s.update({\r\n showInLegend: !s.points.every(function(x) { return x.isNull == true })\r\n });\r\n });\r\n }\r\n },\r\n zoomType: 'xy'\r\n }, \r\n title: false,\r\n credits: {\r\n enabled: false\r\n },\r\n subtitle: false,\r\n legend: {\r\n enabled: true,\r\n reversed: true\r\n },\r\n plotOptions: {\r\n column: {\r\n stacking: 'normal',\r\n dataLabels: {\r\n enabled: true,\r\n color: (Highcharts.theme && Highcharts.theme.dataLabelsColor) || 'white'\r\n }\r\n },\r\n series: {\r\n borderWidth: 0,\r\n dataLabels: {\r\n enabled: false,\r\n format: currentSettings.labelsFormat,\r\n style: { \"color\": \"#231f20\", \"cursor\": \"default\", \"fontSize\": \"12px\", \"fontWeight\": \"normal\", \"fontFamily\": \"'GrotesqueMTStd', Arial, sans-serif, Tahoma\" },\r\n rotation: 0,\r\n crop: currentSettings.labelsCrop,\r\n overflow: currentSettings.labelsOverflow,\r\n y: currentSettings.labelsY,\r\n x: currentSettings.labelsX\r\n } \r\n }\r\n },\r\n xAxis: xAxis,\r\n yAxis: yAxis,\r\n tooltip: {\r\n enabled: true\r\n },\r\n series: data\r\n });\r\n }\r\n\r\n function renderBarChart(chartName, data, settings) {\r\n var currentSettings = {\r\n labelsFormat: settings.labelsFormat || \"{point.y:,.0f}\",\r\n labelsUseRotation: settings.useLabelsRotation || false,\r\n labelsRotation: 0,\r\n labelsCrop: false,\r\n labelsOverflow: \"none\",\r\n labelsY: 0,\r\n labelsX: 0,\r\n xAxisType: settings.xAxisType || \"category\",\r\n xAxisTickAmount: settings.xAxisTickAmount,\r\n yAxisType: settings.yAxisType || \"category\",\r\n yAxisTickAmount: settings.yAxisTickAmount,\r\n yAxisMaxPadding: settings.yAxisMaxPadding || 0.05,\r\n yAxisMinPadding: settings.yAxisMinPadding || 0.05\r\n }\r\n \r\n var xAxis = {\r\n type: currentSettings.xAxisType,\r\n labels: {\r\n autoRotation: true,\r\n style: { \"color\": \"#231f20\", \"cursor\": \"default\", \"fontSize\": \"12px\", \"fontFamily\": \"'GrotesqueMTStd', Arial, sans-serif, Tahoma\" }\r\n }\r\n }\r\n\r\n var yAxis = {\r\n //type: currentSettings.yAxisType,\r\n title: false,\r\n tickAmount: 6,\r\n labels: {\r\n style: {\r\n \"color\": \"#989898\",\r\n \"cursor\": \"default\",\r\n \"fontSize\": \"12px\",\r\n \"fontFamily\": \"'GrotesqueMTStd', Arial, sans-serif, Tahoma\",\r\n \"textOverflow\": \"none\"\r\n },\r\n overflow: false\r\n },\r\n maxPadding: 0.17,\r\n endOnTick: false\r\n }\r\n\r\n Highcharts.chart(chartName, {\r\n chart: {\r\n type: \"bar\"\r\n },\r\n title: false,\r\n credits: {\r\n enabled: false\r\n },\r\n subtitle: false,\r\n legend: {\r\n enabled: true\r\n },\r\n plotOptions: {\r\n series: {\r\n borderWidth: 0,\r\n dataLabels: {\r\n enabled: true,\r\n format: currentSettings.labelsFormat,\r\n style: { \"color\": \"#231f20\", \"cursor\": \"default\", \"fontSize\": \"12px\", \"fontWeight\": \"normal\", \"fontFamily\": \"'GrotesqueMTStd', Arial, sans-serif, Tahoma\" },\r\n rotation: currentSettings.labelsRotation,\r\n crop: currentSettings.labelsCrop,\r\n overflow: currentSettings.labelsOverflow,\r\n y: currentSettings.labelsY,\r\n x: currentSettings.labelsX\r\n }\r\n }\r\n },\r\n xAxis: xAxis,\r\n yAxis: yAxis,\r\n tooltip: false,\r\n series: data\r\n });\r\n }\r\n\r\n function renderSplineChart(chartName, data, settings) {\r\n var currentSettings = {\r\n tooltip: settings.tooltip || { shared: true },\r\n xAxis: settings.xAxis,\r\n yAxis: settings.yAxis\r\n }\r\n\r\n Highcharts.setOptions({\r\n lang: {\r\n months: [\"Januari\", \"Februari\", \"Mars\", \"April\", \"Maj\", \"Juni\", \"Juli\", \"Augusti\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n shortMonths: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Maj\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"],\r\n weekdays: [\"Måndag\", \"Tisdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lördag\", \"Söndag\"]\r\n }\r\n });\r\n\r\n Highcharts.chart(chartName, {\r\n chart: {\r\n type: \"areaspline\"\r\n },\n title: {\r\n text: \"\"\r\n },\n credits: {\r\n enabled: false\r\n },\n legend: {\r\n enabled: false,\r\n layout: \"vertical\",\n align: \"left\",\n verticalAlign: \"top\",\n x: 150,\n y: 100,\n floating: true,\n borderWidth: 1,\n backgroundColor: (Highcharts.theme && Highcharts.theme.legendBackgroundColor) || \"#FFFFFF\"\r\n },\n xAxis: currentSettings.xAxis,\n yAxis: currentSettings.yAxis,\r\n tooltip: currentSettings.tooltip,\n plotOptions: {\r\n areaspline: {\r\n fillOpacity: 0.5,\r\n marker: {\r\n enabled: true\r\n }\r\n }\r\n },\n series: data\r\n });\r\n }\r\n\r\n function renderPieChart(chartName, data, settings) {\r\n var currentSettings = {\r\n labelsFormat: settings.labelsFormat || \"{y}\"\r\n }\r\n\r\n Highcharts.chart(chartName, {\r\n chart: {\r\n plotBackgroundColor: null,\n plotBorderWidth: null,\n plotShadow: false,\n type: \"pie\"\r\n },\n title: {\r\n text: \"\"\r\n },\n credits: {\r\n enabled: false\r\n },\n plotOptions: {\r\n pie: {\r\n allowPointSelect: true,\n cursor: \"pointer\",\n dataLabels: {\r\n enabled: false\r\n },\n showInLegend: true\r\n }\r\n },\n tooltip: {\r\n valueDecimals: 1,\r\n valueSuffix: \"%\"\r\n },\n legend: {\r\n //enabled: true,\r\n //margin: 200,\r\n //padding: 100,\r\n itemDistance: 10,\r\n itemWidth: 200,\r\n width: 420,\r\n x: 60\r\n },\n series: data\r\n });\r\n }\r\n\r\n function renderStackedChart(chartName, data, settings) {\r\n Highcharts.chart(chartName, {\r\n chart: {\r\n type: \"area\"\r\n },\n title: {\r\n text: \"\"\r\n },\n credits: {\r\n enabled: false\r\n },\n xAxis: settings.xAxis,\n yAxis: settings.yAxis,\n tooltip: {\r\n split: false\n },\n plotOptions: {\r\n series: {\r\n marker: {\r\n enabled: true\r\n },\r\n connectNulls: false\r\n },\r\n enableMouseTracking: false,\r\n area: {\r\n connectNulls: false,\r\n stacking: \"normal\",\n lineColor: \"#666666\",\n lineWidth: 1,\n marker: {\r\n lineWidth: 1,\n lineColor: \"#666666\"\r\n }\r\n }\r\n },\n series: data\r\n });\r\n }\n\r\n function getWeekChartCategories(weekLabels) {\r\n var categories, difference, i, j, len, previous, weekAndYear, weekCategory, weekIndex;\n categories = [];\n weekIndex = 0;\n difference = 0;\n i = 0;\n for (i = j = 0, len = weekLabels.length; j < len; i = ++j) {\r\n weekAndYear = weekLabels[i];\n if (weekLabels[i - 1] != null) {\r\n previous = weekLabels[i - 1];\n if (previous.year < weekAndYear.year) {\r\n difference = (previous.week + weekAndYear.week) - previous.week;\r\n } else {\r\n difference = weekAndYear.week - previous.week;\r\n }\r\n }\n weekIndex = weekIndex + difference;\n weekCategory = {};\n weekCategory.index = weekIndex;\n weekCategory.week = weekAndYear.week;\n weekCategory.year = weekAndYear.year;\n weekCategory.label = weekAndYear.label;\n categories.push(weekCategory);\r\n }\n return categories;\r\n };\r\n\r\n function thousandFormat(value) {\r\n return value.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, \" \");\r\n }\r\n\r\n return {\r\n renderDrillChart: renderDrillChart,\r\n renderColumnChart: renderColumnChart,\r\n renderSplineChart: renderSplineChart,\r\n renderPieChart: renderPieChart,\r\n renderStackedChart: renderStackedChart,\r\n renderBarChart: renderBarChart,\r\n getWeekChartCategories: getWeekChartCategories,\r\n thousandFormat: thousandFormat,\r\n renderStackedColumnChart: renderStackedColumnChart\r\n }\r\n });\r\n\r\n}).call(this);\n\n\n","(function() {\n define('commons/circulationCharts',[\"jquery\", \"commons/chartServices\"], function($, chartServices) {\n var executeDigital, executePrintHistorical, executePrintSubscription;\n executeDigital = function() {\n var populateReachData;\n populateReachData = function(dataPoints, tickInterval, min) {\n var chartSettings, d, dataValue, date, highestValue, i, item, j, k, len, len1, mediaName, weekCategories, weekLabel, weekLabels;\n mediaName = dataPoints[0].mediaName;\n highestValue = Math.max.apply(null, _.map(dataPoints, \"value\"));\n\n /* \n Prepare array containing year, week, label\n Function getWeekChartCategories() returns an array containing data categories and labels for the x-axis\n This must be done to handle missing data in the datapoints properly\n */\n weekLabels = [];\n for (j = 0, len = dataPoints.length; j < len; j++) {\n d = dataPoints[j];\n weekLabel = {};\n date = new Date(d.period);\n weekLabel.year = date.getFullYear();\n weekLabel.week = d.week;\n weekLabel.label = d.weekLabel;\n weekLabels.push(weekLabel);\n }\n weekCategories = chartServices.getWeekChartCategories(weekLabels);\n chartSettings = {\n xAxis: {\n categories: [],\n type: \"datetime\",\n tickInterval: tickInterval,\n min: min,\n startOnTick: true,\n tickmarkPlacement: \"on\",\n labels: {\n formatter: function() {\n var week;\n week = weekCategories.find((function(_this) {\n return function(x) {\n return x.index === _this.value;\n };\n })(this));\n if (week != null) {\n return week.label;\n }\n }\n }\n },\n yAxis: {\n title: \"\",\n text: \"\",\n tickAmount: 3,\n max: highestValue,\n softMax: highestValue\n }\n };\n item = {\n chartSettings: chartSettings,\n series: [\n {\n name: mediaName,\n data: []\n }\n ]\n };\n for (i = k = 0, len1 = dataPoints.length; k < len1; i = ++k) {\n d = dataPoints[i];\n dataValue = {\n x: weekCategories[i].index,\n y: d.value,\n source: d.source,\n mediaName: d.mediaName\n };\n item.series[0].data.push(dataValue);\n i++;\n }\n return item;\n };\n if ($(\"#ReachDataUri\").length > 0) {\n $.ajax({\n url: $(\"#ReachDataUri\").val(),\n dataType: \"jsonp\"\n }).done((function(_this) {\n return function(resp) {\n var data;\n if (!((resp != null) && resp.trafficDataPoints.length)) {\n return;\n }\n $(\"#traffic_reach_chart\").removeClass(\"hide\");\n data = populateReachData(resp.trafficDataPoints, 5, 0);\n data.chartSettings.tooltip = {\n shared: true,\n useHTML: true,\n formatter: function() {\n return \"
\" + this.points[0].point.mediaName + \" |
Unika \" + this.points[0].point.y + \" |
\" + this.points[0].point.source + \" |
\";\n }\n };\n return chartServices.renderSplineChart(\"uniques-chart\", data.series, data.chartSettings);\n };\n })(this));\n }\n if ($(\"#VisitsDataUri\").length > 0) {\n $.ajax({\n url: $(\"#VisitsDataUri\").val(),\n dataType: \"jsonp\"\n }).done((function(_this) {\n return function(resp) {\n var data;\n if (!((resp != null) && resp.dataPoints.length)) {\n return;\n }\n $(\"#traffic_visits_chart\").removeClass(\"hide\");\n $(\"#infogr_visits_chart\").removeClass(\"hide\");\n data = populateReachData(resp.dataPoints, 5, 0);\n data.chartSettings.tooltip = {\n shared: true,\n useHTML: true,\n formatter: function() {\n return \" \" + this.points[0].point.mediaName + \" |
Besök \" + this.points[0].point.y + \" |
\" + this.points[0].point.source + \" |
\";\n }\n };\n return chartServices.renderSplineChart(\"visits-chart\", data.series, data.chartSettings);\n };\n })(this));\n }\n if ($(\"#PageViewsDataUri\").length > 0) {\n return $.ajax({\n url: $(\"#PageViewsDataUri\").val(),\n dataType: \"jsonp\"\n }).done((function(_this) {\n return function(resp) {\n var data;\n if (!((resp != null) && resp.dataPoints.length)) {\n return;\n }\n $(\"#traffic_pageviews_chart\").removeClass(\"hide\");\n $(\"#infogr_pageviews_chart\").removeClass(\"hide\");\n data = populateReachData(resp.dataPoints, 5, 0);\n data.chartSettings.tooltip = {\n shared: true,\n useHTML: true,\n formatter: function() {\n return \" \" + this.points[0].point.mediaName + \" |
Sidvisningar \" + this.points[0].point.y + \" |
\" + this.points[0].point.source + \" |
\";\n }\n };\n return chartServices.renderSplineChart(\"pageviews-chart\", data.series, data.chartSettings);\n };\n })(this));\n }\n };\n executePrintHistorical = function() {\n var populateCirculationHistoricalData;\n populateCirculationHistoricalData = function(x) {\n var actualMinYear, etidning, etidningValue, firstSeriesLabel, foundYear, isTsDist, j, k, l, len, len1, m, maxYear, minYear, plus, plusValue, results, results1, series, upplaga, upplagaValue, value, year, years;\n isTsDist = $(\"#IsTsDist\").val();\n firstSeriesLabel = \"Varav printupplaga\";\n if (isTsDist) {\n firstSeriesLabel = \"Varav printdistribution\";\n }\n series = [\n {\n name: \"Varav digital upplaga\",\n data: [],\n color: \"#ec068d\"\n }, {\n name: \"Varav digitala plusabonnemang\",\n data: [],\n color: \"#f7a35c\"\n }, {\n name: firstSeriesLabel,\n data: [],\n color: \"#7cb5ec\"\n }\n ];\n maxYear = Math.max.apply(Math, x.dataPoints.map(function(y) {\n return y.year;\n }));\n minYear = Math.min.apply(Math, x.dataPoints.map(function(y) {\n return y.year;\n }));\n actualMinYear = maxYear - 4;\n years = (function() {\n results = [];\n for (var j = actualMinYear; actualMinYear <= maxYear ? j <= maxYear : j >= maxYear; actualMinYear <= maxYear ? j++ : j--){ results.push(j); }\n return results;\n }).apply(this);\n for (k = 0, len = years.length; k < len; k++) {\n year = years[k];\n foundYear = x.dataPoints.find(function(y) {\n return y.year === year;\n });\n if (!foundYear) {\n actualMinYear--;\n }\n }\n if (minYear > actualMinYear) {\n actualMinYear = minYear;\n }\n years = (function() {\n results1 = [];\n for (var l = actualMinYear; actualMinYear <= maxYear ? l <= maxYear : l >= maxYear; actualMinYear <= maxYear ? l++ : l--){ results1.push(l); }\n return results1;\n }).apply(this);\n for (m = 0, len1 = years.length; m < len1; m++) {\n year = years[m];\n upplaga = x.dataPoints.find(function(y) {\n return y.year === year && y.type === \"-\";\n });\n plus = x.dataPoints.find(function(y) {\n return y.year === year && y.type === \"P\";\n });\n etidning = x.dataPoints.find(function(y) {\n return y.year === year && y.type === \"D\";\n });\n upplagaValue = upplaga != null ? upplaga.value : null;\n plusValue = plus != null ? plus.value : null;\n etidningValue = etidning != null ? etidning.value : null;\n if ((upplagaValue != null) && (plusValue != null)) {\n upplagaValue = upplagaValue - plusValue;\n }\n if ((upplagaValue != null) && (etidningValue != null)) {\n upplagaValue = upplagaValue - etidningValue;\n }\n if (upplaga) {\n value = {\n name: year,\n y: upplagaValue\n };\n series[2].data.push(value);\n value = {\n name: year,\n y: plusValue\n };\n series[1].data.push(value);\n value = {\n name: year,\n y: etidningValue\n };\n series[0].data.push(value);\n }\n }\n return series;\n };\n return $.ajax({\n url: $(\"#CirculationColumnChart\").val(),\n dataType: \"jsonp\"\n }).done((function(_this) {\n return function(res) {\n var chartSettings, data;\n if (!((res != null) && res.dataPoints.length)) {\n return;\n }\n $(\"#circulation_historical_chart\").removeClass(\"hide\");\n $(\"#infogr_circulation_historical_chart\").removeClass(\"hide\");\n data = populateCirculationHistoricalData(res);\n chartSettings = {\n yAxisType: \"{y}\",\n yAxisTickAmount: 5,\n useLabelsRotation: true,\n yAxisMaxPadding: 0.1\n };\n return chartServices.renderStackedColumnChart(\"print-circulation-barchart\", data, chartSettings);\n };\n })(this));\n };\n executePrintSubscription = function() {\n var populateCirculationPieChartData;\n populateCirculationPieChartData = function(x) {\n var d, data, j, len, ref, series, sum, value;\n sum = x.dataPoints.reduce((function(total, y) {\n return total + y.value;\n }), 0);\n data = [];\n series = {\n data: []\n };\n ref = x.dataPoints;\n for (j = 0, len = ref.length; j < len; j++) {\n d = ref[j];\n value = {\n name: d.type,\n y: (d.value / sum) * 100\n };\n series.data.push(value);\n }\n data.push(series);\n return data;\n };\n return $.ajax({\n url: $(\"#CirculationPieChart\").val(),\n dataType: \"jsonp\"\n }).done((function(_this) {\n return function(res) {\n var chartSettings, data;\n if (!((res != null) && res.dataPoints.length)) {\n return;\n }\n data = populateCirculationPieChartData(res);\n chartSettings = {\n labelsFormat: \"{point.y:.1f}%\"\n };\n $(\"#abonnemang\").removeClass(\"hide\");\n return chartServices.renderPieChart(\"print-circulation-piechart\", data, chartSettings);\n };\n })(this));\n };\n return {\n executeDigital: executeDigital,\n executePrintHistorical: executePrintHistorical,\n executePrintSubscription: executePrintSubscription\n };\n });\n\n}).call(this);\n\n//# sourceMappingURL=circulationCharts.js.map\n;\n","(function() {\n define('commons/basicInfoCharts',[\"jquery\", \"commons/chartServices\"], function($, chartServices) {\n var executeAdvertisersChart, executeAgeChart, executeGenderChart;\n executeAdvertisersChart = function(mediaId, cardId, chartId) {\n var calculateAdvertisersData;\n $.ajax({\n url: TSUrl.ApiUrl + \"/Api/Charts/ExpenseBarChartData?mediaId=\" + mediaId,\n dataType: \"jsonp\"\n }).done(function(res) {\n var chartSettings, x;\n if (!((res != null) && res.expenseChartDataPoints.length)) {\n return;\n }\n $(cardId).removeClass(\"hide\");\n x = calculateAdvertisersData(res);\n chartSettings = {\n labelsFormat: \"{point.y:,.0f}\",\n labels: {\n style: {\n fontSize: \"12px\"\n }\n }\n };\n return chartServices.renderBarChart(chartId, x, chartSettings);\n });\n return calculateAdvertisersData = function(x) {\n var d, data, i, item, len, ref, value;\n data = [];\n item = {\n name: \"Annonsvolym brutto (SEK)\",\n colorByPoint: false,\n color: \"#7CB5EC\",\n data: []\n };\n ref = x.expenseChartDataPoints;\n for (i = 0, len = ref.length; i < len; i++) {\n d = ref[i];\n value = {\n name: d.advertiser,\n y: d.value\n };\n item.data.push(value);\n }\n data.push(item);\n return data;\n };\n };\n executeGenderChart = function(mediaId, cardId) {\n var calculateGenderData;\n $.ajax({\n url: TSUrl.ApiUrl + \"/Api/Charts/GenderBarChartData?MediaId=\" + mediaId,\n dataType: \"jsonp\"\n }).done(function(res) {\n var reachText, x;\n if (!((res != null) && res.dataPoints.length)) {\n return;\n }\n $(cardId).removeClass(\"hide\");\n x = calculateGenderData(res);\n if (res.dataPoints[0].surveyName != null) {\n $(\".reach-period\").text(res.dataPoints[0].surveyName);\n $(\".reach-period\").parent().removeClass(\"hide\");\n }\n if (x.totalReach != null) {\n reachText = chartServices.thousandFormat(x.totalReach) + \" - \";\n $(\".media-total-reach\").removeClass(\"hide\").text(reachText);\n }\n $(\"#female-pie\").pieChart({\n barColor: \"#ECBB64\",\n trackColor: \"#f4f5f9\",\n lineCap: \"square\",\n lineWidth: 5,\n rotate: 180,\n percent: x.female,\n onStep: function(from, to, percent) {\n return $(this.element).find(\".pie-value\").html(Math.round(percent) + \"%\");\n }\n });\n return $('#male-pie').pieChart({\n barColor: '#806C83',\n trackColor: '#f4f5f9',\n lineCap: 'square',\n lineWidth: 5,\n rotate: 180,\n percent: x.male,\n onStep: function(from, to, percent) {\n return $(this.element).find(\".pie-value\").html(Math.round(percent) + \"%\");\n }\n });\n });\n return calculateGenderData = function(x) {\n var femalePercentage, femaleReach, malePercentage, maleReach, sum;\n maleReach = x.dataPoints[0].reach;\n femaleReach = x.dataPoints[1].reach;\n sum = maleReach + femaleReach;\n malePercentage = (maleReach / sum) * 100;\n femalePercentage = (femaleReach / sum) * 100;\n return {\n male: malePercentage,\n female: femalePercentage,\n totalReach: x.dataPoints[0].totalReach\n };\n };\n };\n executeAgeChart = function(mediaId, cardId, chartId) {\n var calculateAgeData;\n $.ajax({\n url: TSUrl.ApiUrl + \"/Api/Charts/QuestionBarChartData?MediaId=\" + mediaId + \"&QuestionType=Age\",\n dataType: \"jsonp\"\n }).done(function(res) {\n var chartSettings, x;\n if (!((res != null) && res.dataPoints.length)) {\n return;\n }\n if ($(cardId).length <= 0) {\n return;\n }\n $(cardId).removeClass(\"hide\");\n x = calculateAgeData(res);\n if (res.dataPoints[0].surveyName != null) {\n $(\".reach-period\").text(res.dataPoints[0].surveyName);\n $(\".reach-period\").parent().removeClass(\"hide\");\n }\n chartSettings = {\n labelsFormat: \"{point.y:.0f}%\",\n yAxis: {\n title: false,\n gridLineColor: 'transparent',\n lineWidth: 0,\n minorGridLineWidth: 0,\n lineColor: 'transparent',\n labels: {\n enabled: false\n },\n minorTickLength: 0,\n tickLength: 0\n }\n };\n return chartServices.renderColumnChart(chartId, x, chartSettings);\n });\n return calculateAgeData = function(x) {\n var d, data, i, item, len, ref, sum, value;\n sum = x.dataPoints.reduce((function(total, age) {\n return total + age.reach;\n }), 0);\n data = [];\n item = {\n name: \"Alder\",\n colorByPoint: false,\n color: \"#7CB5EC\",\n data: []\n };\n ref = x.dataPoints.reverse();\n for (i = 0, len = ref.length; i < len; i++) {\n d = ref[i];\n value = {\n name: d.optionName,\n y: (d.reach / sum) * 100\n };\n item.data.push(value);\n }\n data.push(item);\n return data;\n };\n };\n return {\n executeAdvertisersChart: executeAdvertisersChart,\n executeGenderChart: executeGenderChart,\n executeAgeChart: executeAgeChart\n };\n });\n\n}).call(this);\n\n//# sourceMappingURL=basicInfoCharts.js.map\n;\n","(function() {\n define('commons/reachCharts',[\"jquery\", \"commons/chartServices\"], function($, chartServices) {\n var executeDigital, executePrint;\n executeDigital = function(uri, chartId, hideTertialsHighlight) {\n var createChart, highlightTertialsInTable;\n createChart = function(uri, chartId) {\n var populateData;\n $.ajax({\n url: $(uri).val(),\n dataType: \"jsonp\"\n }).done((function(_this) {\n return function(resp) {\n var data, dataPoints;\n dataPoints = [];\n dataPoints.push(resp.reachMonthDataPoints);\n dataPoints.push(resp.reachTertialDataPoints);\n data = populateData(dataPoints, 100, 0);\n data.chartSettings.tooltip = {\n shared: true,\n useHTML: true,\n headerFormat: \"\",\n pointFormat: \"\"\n };\n return chartServices.renderSplineChart(chartId, data.series, data.chartSettings);\n };\n })(this));\n return populateData = function(series, tickInterval, min) {\n var chartSettings, data, dataValue, date, endDates, highestValue, highlightEndDate, highlightStartDate, i, item, j, k, len, len1, s, selectedPeriod, startDates, utcDate;\n highestValue = Math.max.apply(null, _.map(series[0], \"value\"));\n selectedPeriod = _.filter(series[1], function(data) {\n return data.isSelected;\n });\n startDates = [];\n _.forEach(_.map(selectedPeriod, \"surveyPeriodFrom\"), (function(_this) {\n return function(date) {\n return startDates.push(new Date(date));\n };\n })(this));\n endDates = [];\n _.forEach(_.map(selectedPeriod, \"surveyPeriodTo\"), (function(_this) {\n return function(date) {\n return endDates.push(new Date(date));\n };\n })(this));\n if (hideTertialsHighlight === void 0 && selectedPeriod.length > 0) {\n highlightStartDate = Math.min.apply(null, startDates);\n highlightEndDate = Math.max.apply(null, endDates);\n $(\".card-nav\").removeClass(\"hide\");\n } else if (hideTertialsHighlight === true || selectedPeriod.length === 0) {\n highlightStartDate = null;\n highlightEndDate = null;\n }\n chartSettings = {\n xAxis: {\n tickmarkPlacement: \"on\",\n type: \"datetime\",\n plotBands: [\n {\n from: highlightStartDate,\n to: highlightEndDate,\n color: \"rgba(68, 170, 213, .2)\"\n }\n ]\n },\n yAxis: {\n title: '',\n text: '',\n tickAmount: 3,\n max: highestValue,\n softMax: highestValue\n }\n };\n item = {\n chartSettings: chartSettings,\n series: [\n {\n name: \"R�ckvidd\",\n data: []\n }, {\n type: \"spline\",\n name: \"Tertial\",\n data: []\n }\n ]\n };\n i = 0;\n for (j = 0, len = series.length; j < len; j++) {\n data = series[j];\n for (k = 0, len1 = data.length; k < len1; k++) {\n s = data[k];\n date = new Date(s.date);\n utcDate = Date.UTC(date.getFullYear(), date.getMonth(), date.getDate());\n dataValue = {\n x: utcDate,\n y: s.value,\n source: s.source != null ? s.source : \"Tertial\",\n mediaName: s.mediaName\n };\n item.series[i].data.push(dataValue);\n }\n i++;\n }\n return item;\n };\n };\n $(\".chg-chart\").click(function(event) {\n var t, tertial;\n tertial = $(this).attr(\"href\");\n t = tertial.replace(\"#\", \"\");\n $(uri).val($(uri).val().substr(0, $(uri).val().indexOf(\"selectedPeriod=\")) + \"selectedPeriod=\" + t);\n highlightTertialsInTable(tertial, this);\n return createChart(uri, chartId);\n });\n highlightTertialsInTable = function(tertial, element) {\n $(\".data\").removeClass(\"active\");\n $(\".data\").each(function() {\n var range;\n range = $(this).data(\"range\");\n if (tertial === range) {\n $(this).addClass(\"active\");\n }\n if (tertial === \"#H\") {\n if (range === \"#H1\" || range === \"#T2\" || range === \"#T3\") {\n return $(this).addClass(\"active\");\n }\n }\n });\n if (element != null) {\n $(\".card-nav li\").removeClass(\"active\");\n return $(element).parent(\"li\").addClass(\"active\");\n }\n };\n createChart(uri, chartId);\n return highlightTertialsInTable(\"#T1\");\n };\n executePrint = function(uri, chartId) {\n var createChart, populateData;\n createChart = function(uri, chartId) {\n return $.ajax({\n url: $(uri).val(),\n dataType: \"jsonp\"\n }).done((function(_this) {\n return function(resp) {\n var data, dataPoints, filteredYearDataPoints, tertialStartDate;\n dataPoints = [];\n if (resp.reachTertialDataPoints === null || resp.reachTertialDataPoints.length === 0) {\n dataPoints.push([]);\n dataPoints.push(resp.reachYearDataPoints);\n } else {\n dataPoints.push(resp.reachTertialDataPoints);\n tertialStartDate = _.min(_.map(resp.reachTertialDataPoints, function(x) {\n return new Date(x.date);\n }));\n filteredYearDataPoints = _.filter(resp.reachYearDataPoints, function(x) {\n return (new Date(x.date)).getFullYear() >= tertialStartDate.getFullYear();\n });\n dataPoints.push(filteredYearDataPoints);\n }\n data = populateData(dataPoints, 100, 0);\n data.chartSettings.tooltip = {\n shared: false,\n useHTML: true,\n headerFormat: \"\",\n pointFormat: \"\"\n };\n return chartServices.renderSplineChart(chartId, data.series, data.chartSettings);\n };\n })(this));\n };\n populateData = function(series, tickInterval, min) {\n var chartSettings, data, dataValue, date, h1, h2, highestValue, i, item, j, k, len, len1, s, utcDate;\n h1 = Math.max.apply(null, _.map(series[0], \"value\"));\n h2 = Math.max.apply(null, _.map(series[1], \"value\"));\n if (h2 > h1) {\n highestValue = h2;\n } else {\n highestValue = h1;\n }\n chartSettings = {\n xAxis: {\n type: \"datetime\"\n },\n yAxis: {\n title: \"\",\n text: \"\",\n tickAmount: 3,\n max: highestValue,\n softMax: highestValue\n }\n };\n item = {\n chartSettings: chartSettings,\n series: [\n {\n name: \"R�ckvidd\",\n data: [],\n point: {\n events: {\n click: function() {}\n }\n }\n }, {\n type: \"spline\",\n name: \"Hel�r\",\n data: []\n }\n ]\n };\n i = 0;\n for (j = 0, len = series.length; j < len; j++) {\n data = series[j];\n for (k = 0, len1 = data.length; k < len1; k++) {\n s = data[k];\n date = new Date(s.date);\n utcDate = Date.UTC(date.getFullYear(), date.getMonth(), date.getDate());\n dataValue = {\n x: utcDate,\n y: s.value,\n source: s.source != null ? s.source : \"Tertial\",\n mediaName: s.mediaName\n };\n item.series[i].data.push(dataValue);\n }\n i++;\n }\n return item;\n };\n return createChart(uri, chartId);\n };\n return {\n executeDigital: executeDigital,\n executePrint: executePrint\n };\n });\n\n}).call(this);\n\n//# sourceMappingURL=reachCharts.js.map\n;\n","(function() {\n require([\"jquery\", \"underscore\", \"commons/circulationCharts\", \"commons/basicInfoCharts\", \"commons/reachCharts\"], function($, _, circulationCharts, basicInfoCharts, reachCharts) {\n return $(function() {\n var mediaId;\n mediaId = $('#MediaId').val();\n basicInfoCharts.executeGenderChart(\"\" + mediaId, \"#infogrdigital_gender_chart\");\n basicInfoCharts.executeAgeChart(\"\" + mediaId, \"#infogrdigital_age_chart\", \"basicinfo-agechart\");\n basicInfoCharts.executeAdvertisersChart(\"\" + mediaId, \"#basics-advertisers-chart\", \"advertisers-top10-barchart\");\n circulationCharts.executeDigital();\n return reachCharts.executeDigital(\"#DigitalReachDataUri\", \"reach-chart\");\n });\n });\n\n}).call(this);\n\n//# sourceMappingURL=app.js.map\n;\ndefine(\"Apps/Infographics/script/app\", function(){});\n\n"]}