{"version":3,"sources":["kendo.dataviz.sparkline.js"],"names":["f","define","$","objectKey","object","key","parts","push","sort","join","hashKey","str","i","hash","length","charCodeAt","zeroSize","width","height","baseline","measureText","text","style","measureBox","TextMetrics","current","measure","LRUCache","DEFAULT_OPTIONS","defaultMeasureBox","window","kendo","util","Class","extend","init","size","this","_size","_length","_map","put","value","map","entry","_head","_tail","newer","older","get","baselineMarkerSize","document","createElement","cssText","options","_cache","box","styleKey","cacheKey","cachedResult","baselineMarker","_baselineMarker","cloneNode","textContent","appendChild","body","String","offsetWidth","offsetHeight","offsetTop","parentNode","removeChild","marker","deepExtend","jQuery","amd","a1","a2","a3","hide","children","idx","child","state","display","show","wrapNumber","dataviz","isNumber","constants","Chart","elementSize","TOP_OFFSET","SharedTooltip$1","DEAULT_BAR_WIDTH","DEAULT_BULLET_WIDTH","NO_CROSSHAIR","Sparkline","SharedTooltip","_slotAnchor","coords","slot","point","axis","plotArea","categoryAxis","vertical","align","horizontal","Point","x2","center","y","x","_defaultAnchor","BAR","BULLET","_setElementClass","element","addClass","_initElement","fn","call","_initialWidth","Math","floor","_resize","childNodes","_modelOptions","chartOptions","stage","_surfaceWrap","displayState","space","innerHTML","_autoWidth","transitions","chartArea","inline","surface","resize","_createPlotArea","skipSeries","_calculateWidth","currentChart","firstSeries","pointsCount","margin","getSpacing","charts","total","series","type","PIE","categories","isStacked","inArray","COLUMN","VERTICAL_BULLET","seriesOptions","max","pointWidth","left","right","_createSharedTooltip","_plotArea","normalizeOptions","userOptions","isArray","seriesDefaults","data","crosshair","visible","setDefaultOptions","axisDefaults","majorGridLines","valueAxis","narrowRange","area","line","bar","stack","padding","overlay","gradient","highlight","border","markers","tooltip","shared","legend","panes","clip","SparklineTooltip","ui","KendoSparkline","ChartInstanceObserver","ObservableArray","_createChart","themeOptions","_instance","observer","sender","_createTooltip","name","plugin","Tooltip","animation","duration","_hideElement","remove"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;CAwBC,SAAUA,EAAGC,QACV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AAQvC,OAAOmI,YAIhC3H,EAAQ0G,iBAAmBA,MAEf,kBAAVhM,SAAwBA,OAAO0E,IAAM1E,OAAS,SAAU2E,EAAIC,EAAIC,IACrEA,GAAMD,OAEV,SAAU7E,EAAGC,QACVA,OAAO,2BACH,oCACA,+BACDD,IACL,aAQkB,kBAAVC,SAAwBA,OAAO0E,IAAM1E,OAAS,SAAU2E,EAAIC,EAAIC,IACrEA,GAAMD","file":"kendo.dataviz.sparkline.min.js","sourcesContent":["/*!\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n*/\n(function (f, define) {\n define('util/text-metrics', ['kendo.core'], f);\n}(function () {\n (function ($) {\n window.kendo.util = window.kendo.util || {};\n var LRUCache = kendo.Class.extend({\n init: function (size) {\n this._size = size;\n this._length = 0;\n this._map = {};\n },\n put: function (key, value) {\n var map = this._map;\n var entry = {\n key: key,\n value: value\n };\n map[key] = entry;\n if (!this._head) {\n this._head = this._tail = entry;\n } else {\n this._tail.newer = entry;\n entry.older = this._tail;\n this._tail = entry;\n }\n if (this._length >= this._size) {\n map[this._head.key] = null;\n this._head = this._head.newer;\n this._head.older = null;\n } else {\n this._length++;\n }\n },\n get: function (key) {\n var entry = this._map[key];\n if (entry) {\n if (entry === this._head && entry !== this._tail) {\n this._head = entry.newer;\n this._head.older = null;\n }\n if (entry !== this._tail) {\n if (entry.older) {\n entry.older.newer = entry.newer;\n entry.newer.older = entry.older;\n }\n entry.older = this._tail;\n entry.newer = null;\n this._tail.newer = entry;\n this._tail = entry;\n }\n return entry.value;\n }\n }\n });\n function objectKey(object) {\n var parts = [];\n for (var key in object) {\n parts.push(key + object[key]);\n }\n return parts.sort().join('');\n }\n function hashKey(str) {\n var hash = 2166136261;\n for (var i = 0; i < str.length; ++i) {\n hash += (hash << 1) + (hash << 4) + (hash << 7) + (hash << 8) + (hash << 24);\n hash ^= str.charCodeAt(i);\n }\n return hash >>> 0;\n }\n function zeroSize() {\n return {\n width: 0,\n height: 0,\n baseline: 0\n };\n }\n var DEFAULT_OPTIONS = { baselineMarkerSize: 1 };\n var defaultMeasureBox;\n if (typeof document !== 'undefined') {\n defaultMeasureBox = document.createElement('div');\n defaultMeasureBox.style.cssText = 'position: absolute !important; top: -4000px !important; width: auto !important; height: auto !important;' + 'padding: 0 !important; margin: 0 !important; border: 0 !important;' + 'line-height: normal !important; visibility: hidden !important; white-space: nowrap!important;';\n }\n var TextMetrics = kendo.Class.extend({\n init: function (options) {\n this._cache = new LRUCache(1000);\n this.options = $.extend({}, DEFAULT_OPTIONS, options);\n },\n measure: function (text, style, box) {\n if (!text) {\n return zeroSize();\n }\n var styleKey = objectKey(style);\n var cacheKey = hashKey(text + styleKey);\n var cachedResult = this._cache.get(cacheKey);\n if (cachedResult) {\n return cachedResult;\n }\n var size = zeroSize();\n var measureBox = box || defaultMeasureBox;\n var baselineMarker = this._baselineMarker().cloneNode(false);\n for (var key in style) {\n var value = style[key];\n if (typeof value !== 'undefined') {\n measureBox.style[key] = value;\n }\n }\n measureBox.textContent = text;\n measureBox.appendChild(baselineMarker);\n document.body.appendChild(measureBox);\n if (String(text).length) {\n size.width = measureBox.offsetWidth - this.options.baselineMarkerSize;\n size.height = measureBox.offsetHeight;\n size.baseline = baselineMarker.offsetTop + this.options.baselineMarkerSize;\n }\n if (size.width > 0 && size.height > 0) {\n this._cache.put(cacheKey, size);\n }\n measureBox.parentNode.removeChild(measureBox);\n return size;\n },\n _baselineMarker: function () {\n var marker = document.createElement('div');\n marker.style.cssText = 'display: inline-block; vertical-align: baseline;width: ' + this.options.baselineMarkerSize + 'px; height: ' + this.options.baselineMarkerSize + 'px;overflow: hidden;';\n return marker;\n }\n });\n TextMetrics.current = new TextMetrics();\n function measureText(text, style, measureBox) {\n return TextMetrics.current.measure(text, style, measureBox);\n }\n kendo.deepExtend(kendo.util, {\n LRUCache: LRUCache,\n TextMetrics: TextMetrics,\n measureText: measureText,\n objectKey: objectKey,\n hashKey: hashKey\n });\n }(window.kendo.jQuery));\n}, typeof define == 'function' && define.amd ? define : function (a1, a2, a3) {\n (a3 || a2)();\n}));\n(function (f, define) {\n define('dataviz/sparkline/kendo-sparkline', ['kendo.dataviz.chart'], f);\n}(function () {\n (function () {\n window.kendo.dataviz = window.kendo.dataviz || {};\n var dataviz = kendo.dataviz;\n var constants = dataviz.constants;\n var Chart = dataviz.Chart;\n var elementSize = dataviz.elementSize;\n var deepExtend = dataviz.deepExtend;\n var TOP_OFFSET = -2;\n var SharedTooltip$1 = dataviz.SharedTooltip.extend({\n _slotAnchor: function (coords, slot) {\n var axis = this.plotArea.categoryAxis;\n var vertical = axis.options.vertical;\n var align = vertical ? {\n horizontal: 'left',\n vertical: 'center'\n } : {\n horizontal: 'center',\n vertical: 'bottom'\n };\n var point;\n if (vertical) {\n point = new dataviz.Point(this.plotArea.box.x2, slot.center().y);\n } else {\n point = new dataviz.Point(slot.center().x, TOP_OFFSET);\n }\n return {\n point: point,\n align: align\n };\n },\n _defaultAnchor: function (point, slot) {\n return this._slotAnchor({}, slot);\n }\n });\n var DEAULT_BAR_WIDTH = 150;\n var DEAULT_BULLET_WIDTH = 150;\n var NO_CROSSHAIR = [\n constants.BAR,\n constants.BULLET\n ];\n function hide(children) {\n var state = [];\n for (var idx = 0; idx < children.length; idx++) {\n var child = children[idx];\n state[idx] = child.style.display;\n child.style.display = 'none';\n }\n return state;\n }\n function show(children, state) {\n for (var idx = 0; idx < children.length; idx++) {\n children[idx].style.display = state[idx];\n }\n }\n function wrapNumber(value) {\n return dataviz.isNumber(value) ? [value] : value;\n }\n var Sparkline = Chart.extend({\n _setElementClass: function (element) {\n dataviz.addClass(element, 'k-sparkline');\n },\n _initElement: function (element) {\n Chart.fn._initElement.call(this, element);\n this._initialWidth = Math.floor(elementSize(element).width);\n },\n _resize: function () {\n var element = this.element;\n var state = hide(element.childNodes);\n this._initialWidth = Math.floor(elementSize(element).width);\n show(element.childNodes, state);\n Chart.fn._resize.call(this);\n },\n _modelOptions: function () {\n var chartOptions = this.options;\n var stage = this._surfaceWrap();\n var displayState = hide(stage.childNodes);\n var space = document.createElement('span');\n space.innerHTML = ' ';\n stage.appendChild(space);\n var options = deepExtend({\n width: this._autoWidth,\n height: elementSize(stage).height,\n transitions: chartOptions.transitions\n }, chartOptions.chartArea, {\n inline: true,\n align: false\n });\n elementSize(stage, {\n width: options.width,\n height: options.height\n });\n stage.removeChild(space);\n show(stage.childNodes, displayState);\n this.surface.resize();\n return options;\n },\n _surfaceWrap: function () {\n if (!this.stage) {\n var stage = this.stage = document.createElement('span');\n this.element.appendChild(stage);\n }\n return this.stage;\n },\n _createPlotArea: function (skipSeries) {\n var plotArea = Chart.fn._createPlotArea.call(this, skipSeries);\n this._autoWidth = this._initialWidth || this._calculateWidth(plotArea);\n return plotArea;\n },\n _calculateWidth: function (plotArea) {\n var options = this.options;\n var margin = dataviz.getSpacing(options.chartArea.margin);\n var charts = plotArea.charts;\n var stage = this._surfaceWrap();\n var total = 0;\n for (var i = 0; i < charts.length; i++) {\n var currentChart = charts[i];\n var firstSeries = (currentChart.options.series || [])[0];\n if (!firstSeries) {\n continue;\n }\n if (firstSeries.type === constants.BAR) {\n return DEAULT_BAR_WIDTH;\n }\n if (firstSeries.type === constants.BULLET) {\n return DEAULT_BULLET_WIDTH;\n }\n if (firstSeries.type === constants.PIE) {\n return elementSize(stage).height;\n }\n var categoryAxis = currentChart.categoryAxis;\n if (categoryAxis) {\n var pointsCount = categoryAxis.options.categories.length * (!currentChart.options.isStacked && dataviz.inArray(firstSeries.type, [\n constants.COLUMN,\n constants.VERTICAL_BULLET\n ]) ? currentChart.seriesOptions.length : 1);\n total = Math.max(total, pointsCount);\n }\n }\n var size = total * options.pointWidth;\n if (size > 0) {\n size += margin.left + margin.right;\n }\n return size;\n },\n _createSharedTooltip: function (options) {\n return new SharedTooltip$1(this._plotArea, options);\n }\n });\n Sparkline.normalizeOptions = function (userOptions) {\n var options = wrapNumber(userOptions);\n if (dataviz.isArray(options)) {\n options = { seriesDefaults: { data: options } };\n } else {\n options = deepExtend({}, options);\n }\n if (!options.series) {\n options.series = [{ data: wrapNumber(options.data) }];\n }\n deepExtend(options, { seriesDefaults: { type: options.type } });\n if (dataviz.inArray(options.series[0].type, NO_CROSSHAIR) || dataviz.inArray(options.seriesDefaults.type, NO_CROSSHAIR)) {\n options = deepExtend({}, { categoryAxis: { crosshair: { visible: false } } }, options);\n }\n return options;\n };\n dataviz.setDefaultOptions(Sparkline, {\n chartArea: { margin: 2 },\n axisDefaults: {\n visible: false,\n majorGridLines: { visible: false },\n valueAxis: { narrowRange: true }\n },\n seriesDefaults: {\n type: 'line',\n area: { line: { width: 0.5 } },\n bar: { stack: true },\n padding: 2,\n width: 0.5,\n overlay: { gradient: null },\n highlight: { visible: false },\n border: { width: 0 },\n markers: {\n size: 2,\n visible: false\n }\n },\n tooltip: {\n visible: true,\n shared: true\n },\n categoryAxis: {\n crosshair: {\n visible: true,\n tooltip: { visible: false }\n }\n },\n legend: { visible: false },\n transitions: false,\n pointWidth: 5,\n panes: [{ clip: false }]\n });\n kendo.deepExtend(kendo.dataviz, { Sparkline: Sparkline });\n }());\n}, typeof define == 'function' && define.amd ? define : function (a1, a2, a3) {\n (a3 || a2)();\n}));\n(function (f, define) {\n define('dataviz/sparkline/sparkline', ['dataviz/sparkline/kendo-sparkline'], f);\n}(function () {\n (function () {\n var dataviz = kendo.dataviz;\n var Chart = dataviz.ui.Chart;\n var KendoSparkline = dataviz.Sparkline;\n var ChartInstanceObserver = dataviz.ChartInstanceObserver;\n var Sparkline = Chart.extend({\n init: function (element, userOptions) {\n var options = userOptions;\n if (options instanceof kendo.data.ObservableArray) {\n options = { seriesDefaults: { data: options } };\n }\n Chart.fn.init.call(this, element, KendoSparkline.normalizeOptions(options));\n },\n _createChart: function (options, themeOptions) {\n this._instance = new KendoSparkline(this.element[0], options, themeOptions, {\n observer: new ChartInstanceObserver(this),\n sender: this\n });\n },\n _createTooltip: function () {\n return new SparklineTooltip(this.element, this.options.tooltip);\n },\n options: {\n name: 'Sparkline',\n chartArea: { margin: 2 },\n axisDefaults: {\n visible: false,\n majorGridLines: { visible: false },\n valueAxis: { narrowRange: true }\n },\n seriesDefaults: {\n type: 'line',\n area: { line: { width: 0.5 } },\n bar: { stack: true },\n padding: 2,\n width: 0.5,\n overlay: { gradient: null },\n highlight: { visible: false },\n border: { width: 0 },\n markers: {\n size: 2,\n visible: false\n }\n },\n tooltip: {\n visible: true,\n shared: true\n },\n categoryAxis: {\n crosshair: {\n visible: true,\n tooltip: { visible: false }\n }\n },\n legend: { visible: false },\n transitions: false,\n pointWidth: 5,\n panes: [{ clip: false }]\n }\n });\n dataviz.ui.plugin(Sparkline);\n var SparklineTooltip = dataviz.Tooltip.extend({\n options: { animation: { duration: 0 } },\n _hideElement: function () {\n if (this.element) {\n this.element.hide().remove();\n }\n }\n });\n dataviz.SparklineTooltip = SparklineTooltip;\n }());\n}, typeof define == 'function' && define.amd ? define : function (a1, a2, a3) {\n (a3 || a2)();\n}));\n(function (f, define) {\n define('kendo.dataviz.sparkline', [\n 'dataviz/sparkline/kendo-sparkline',\n 'dataviz/sparkline/sparkline'\n ], f);\n}(function () {\n var __meta__ = {\n id: 'dataviz.sparkline',\n name: 'Sparkline',\n category: 'dataviz',\n description: 'Sparkline widgets.',\n depends: ['dataviz.chart']\n };\n}, typeof define == 'function' && define.amd ? define : function (a1, a2, a3) {\n (a3 || a2)();\n}));"]}