{"version":3,"sources":["Commons/script/chartServices.js","Commons/script/basicInfoCharts.js","Commons/script/reachCharts.js","Apps/Basic/script/appcommon.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","executeAdvertisersChart","executeAgeChart","executeGenderChart","mediaId","cardId","chartId","calculateAdvertisersData","ajax","url","TSUrl","ApiUrl","dataType","done","res","chartSettings","expenseChartDataPoints","removeClass","item","ref","name","colorByPoint","advertiser","calculateGenderData","reachText","dataPoints","surveyName","parent","totalReach","female","find","html","round","male","femalePercentage","femaleReach","malePercentage","maleReach","sum","reach","calculateAgeData","minorGridLineWidth","reduce","total","age","reverse","optionName","executeDigital","executePrint","uri","hideTertialsHighlight","createChart","highlightTertialsInTable","populateData","val","_this","resp","reachMonthDataPoints","reachTertialDataPoints","useHTML","tickInterval","dataValue","date","endDates","highestValue","highlightEndDate","highlightStartDate","k","len1","selectedPeriod","startDates","utcDate","apply","_","map","filter","isSelected","tickmarkPlacement","plotBands","softMax","UTC","getFullYear","getMonth","getDate","source","mediaName","click","event","tertial","attr","substr","indexOf","range","addClass","filteredYearDataPoints","tertialStartDate","reachYearDataPoints","h1","h2","point","require","basicInfoCharts","reachCharts","isPackage","isTotalDigital"],"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,SACAC,aAAA,wDACAC,YAAA,8FAGAN,OAAAnB,IAIA,QAAA0B,GAAA3B,EAAAC,EAAAC,GACA,GAAA0B,IACAC,aAAA3B,EAAA2B,cAAA,iBACAC,kBAAA5B,EAAA6B,oBAAA,EACAC,eAAA,EACAC,YAAA,EACAC,eAAA,UACAC,QAAA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ApG,CAKA,OAJAnN,GAAA,cACAmN,EAAAnN,EAAA,YAAAqQ,MACAkD,EAAAvT,EAAA,mBAAAqQ,MACAiD,EAAAtT,EAAA,cAAAqQ,MACA,UAAAkD,GACAH,EAAAlG,mBAAA,GAAAC,EAAA,2BACAiG,EAAAnG,gBAAA,GAAAE,EAAA,0BAAA,sBACAkG,EAAAvD,eAAA,gBAAA,eAAA,KAEAsD,EAAAlG,mBAAA,GAAAC,EAAA,2BACAiG,EAAAnG,gBAAA,GAAAE,EAAA,0BAAA,sBACAiG,EAAAlG,mBAAA,GAAAC,EAAA,iBACAiG,EAAAnG,gBAAA,GAAAE,EAAA,aAAA,0BAIAL,KAAAzI,MAIAtE,OAAA,8BAAA;AHtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACttBA,ADutBA;ACttBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA","file":"basiccommon.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/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: \"

{point.y}

{point.source}
\"\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: \"

{point.y}

{point.source}
\"\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/basicInfoCharts\", \"commons/reachCharts\", \"bootstrap-collapse\"], function($, _, basicInfoCharts, reachCharts) {\n var isPackage, isTotalDigital, mediaId;\n $(function() {});\n mediaId = $('#MediaId').val();\n isTotalDigital = $('#IsTotalDigital').val();\n isPackage = $('#IsPackage').val();\n if (isTotalDigital !== \"False\") {\n basicInfoCharts.executeGenderChart(\"\" + mediaId, \"#basics_agegender_chart\");\n basicInfoCharts.executeAgeChart(\"\" + mediaId, \"#basics_agegender_chart\", \"basicinfo-agechart\");\n return reachCharts.executeDigital(\"#ReachDataUri\", \"reach-chart\", true);\n } else {\n basicInfoCharts.executeGenderChart(\"\" + mediaId, \"#basics_agegender_chart\");\n basicInfoCharts.executeAgeChart(\"\" + mediaId, \"#basics_agegender_chart\", \"basicinfo-agechart\");\n basicInfoCharts.executeGenderChart(\"\" + mediaId, \"#gender_chart\");\n return basicInfoCharts.executeAgeChart(\"\" + mediaId, \"#age_chart\", \"basicinfo-agechart\");\n }\n });\n\n}).call(this);\n\n//# sourceMappingURL=appcommon.js.map\n;\ndefine(\"Apps/Basic/script/appcommon\", function(){});\n\n"]}