{"version":3,"sources":["kendo.dataviz.treemap.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","undefined","getField","field","row","getter","defined","UNDEFINED","colorsByLength","min","max","rgbColor","minRGBtoDecimal","rgbToDecimal","maxRGBtoDecimal","isDarker","colorBrightness","colors","r","colorByIndex","g","b","buildColorFromRGB","index","color","minColor","math","abs","maxColor","step","currentStep","decimalToRgb","replace","colorToRGB","rgbToHex","number","result","round","toString","toUpperCase","colorLength","substring","rgb","parseInt","brightness","sqrt","power","pow","Math","proxy","isArray","outerHeight","_outerHeight","outerWidth","_outerWidth","Widget","ui","template","HierarchicalDataSource","data","dataviz","NS","CHANGE","DATA_BOUND","ITEM_CREATED","MAX_VALUE","Number","MOUSEOVER_NS","MOUSELEAVE_NS","TreeMap","element","destroy","empty","fn","call","wrapper","_initTheme","addClass","_setLayout","_originalOptions","_initDataSource","_attachEvents","notify","name","theme","autoBind","textField","valueField","colorField","events","that","themes","themeName","toLowerCase","themeOptions","treeMap","on","_mouseover","_mouseleave","_resizeHandler","resize","onResize","type","_layout","SliceAndDice","_view","SliceAndDiceView","Squarified","SquarifiedView","dataSource","_dataChangeHandler","_onDataChange","create","bind","fetch","setDataSource","unbind","e","item","root","htmlSize","node","items","_getByUid","uid","children","Query","_sortForGrouping","_wrapItem","compute","coord","_setColors","render","_cleanItems","createRoot","_root","_colorIdx","load","trigger","angular","elements","find","colorRange","leafNodes","colorIdx","dataItem","hasChildren","_contentSize","view","renderHeight","wrap","level","pop","concat","attr","getByUid","findByUid","target","hasClass","_removeActiveState","removeClass","off","unbindResize","getSize","dimensions","_resize","rootElement","css","_resizeItems","child","childElement","idx","titleSize","filter","setItemSize","setOptions","_setEvents","top","left","leaf","tree","layoutChildren","minimumSideValue","firstElement","tail","parentArea","totalArea","itemsArea","parseFloat","area","layoutHorizontal","slice","squarify","initElement","computeDim","newCoords","layoutLast","layoutRow","worstAspectRatio","dim","w","layoutV","layoutH","orientation","layoutVertical","layoutChange","areaSum","maxArea","minArea","rootCoord","newRootCoord","ans","_totalArea","total","offset","title","_clean","_getText","_createTitle","append","_compile","_createWrap","innerWidth","rootWrap","htmlElement","_createLeaf","_createTile","toggleClass","_tileColorBrightness","html","tile","_itemCoordinates","coordinates","_renderTemplate","titleTemplate","vertical","quotient","sliceAndDice","plugin"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;CAwBC,SAAUA,EAAGC,QACVA,OAAO,qBAAsB,cAAeD,IAC9C,YACG,SAAUE,GAmDP,QAASC,GAAUC,GAAnB,GAEaC,GADLC,IACJ,KAASD,IAAOD,GACZE,EAAMC,KAAKF,EAAMD,EAAOC,GAE5B,OAAOC,GAAME,OAAOC,KAAK,IAE7B,QAASC,GAAQC,GAAjB,GAEaC,GADLC,EAAO,UACX,KAASD,EAAI,EAAGA,EAAID,EAAIG,SAAUF,EAC9BC,IAASA,GAAQ,IAAMA,GAAQ,IAAMA,GAAQ,IAAMA,GAAQ,IAAMA,GAAQ,IACzEA,GAAQF,EAAII,WAAWH,EAE3B,OAAOC,KAAS,EAEpB,QAASG,KACL,OACIC,MAAO,EACPC,OAAQ,EACRC,SAAU,GAsDlB,QAASC,GAAYC,EAAMC,EAAOC,GAC9B,MAAOC,GAAYC,QAAQC,QAAQL,EAAMC,EAAOC,GA7HvD,GAEOI,GAuEAC,EACAC,EAKAL,CA9EJM,QAAOC,MAAMC,KAAOF,OAAOC,MAAMC,SAC7BL,EAAWI,MAAME,MAAMC,QACvB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AS,oBAAoBzL,SAErCkI,EAAQuD,SAAS,6BAA6B1L,SAI7DuR,aAAc,SAAUpG,GACpB,GAAIiG,EAMJ,OAJIA,GAAQnS,EADRkM,EAAKqH,SACK,sCAEA,gDAEPpB,EAAMI,OAAOvS,EAAE,eAAeiT,KAAK9Q,KAAKkQ,SAASnG,OA2FhE1D,GAAQJ,GAAGsL,OAAOzK,IACpBrH,OAAOC,MAAM2C,QACR5C,OAAOC,OACE,kBAAV9B,SAAwBA,OAAO0E,IAAM1E,OAAS,SAAU2E,EAAIC,EAAIC,IACrEA,GAAMD","file":"kendo.dataviz.treemap.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('kendo.dataviz.treemap', [\n 'kendo.data',\n 'kendo.userevents',\n 'kendo.dataviz.themes'\n ], f);\n}(function () {\n var __meta__ = {\n id: 'dataviz.treeMap',\n name: 'TreeMap',\n category: 'dataviz',\n description: 'The Kendo DataViz TreeMap',\n depends: [\n 'data',\n 'userevents',\n 'dataviz.themes'\n ]\n };\n (function ($, undefined) {\n var math = Math, proxy = $.proxy, isArray = $.isArray, kendo = window.kendo, outerHeight = kendo._outerHeight, outerWidth = kendo._outerWidth, Class = kendo.Class, Widget = kendo.ui.Widget, template = kendo.template, deepExtend = kendo.deepExtend, HierarchicalDataSource = kendo.data.HierarchicalDataSource, getter = kendo.getter, dataviz = kendo.dataviz;\n var NS = '.kendoTreeMap', CHANGE = 'change', DATA_BOUND = 'dataBound', ITEM_CREATED = 'itemCreated', MAX_VALUE = Number.MAX_VALUE, MOUSEOVER_NS = 'mouseover' + NS, MOUSELEAVE_NS = 'mouseleave' + NS, UNDEFINED = 'undefined';\n var TreeMap = Widget.extend({\n init: function (element, options) {\n kendo.destroy(element);\n $(element).empty();\n Widget.fn.init.call(this, element, options);\n this.wrapper = this.element;\n this._initTheme(this.options);\n this.element.addClass('k-widget k-treemap');\n this._setLayout();\n this._originalOptions = deepExtend({}, this.options);\n this._initDataSource();\n this._attachEvents();\n kendo.notify(this, dataviz.ui);\n },\n options: {\n name: 'TreeMap',\n theme: 'default',\n autoBind: true,\n textField: 'text',\n valueField: 'value',\n colorField: 'color'\n },\n events: [\n DATA_BOUND,\n ITEM_CREATED\n ],\n _initTheme: function (options) {\n var that = this, themes = dataviz.ui.themes || {}, themeName = ((options || {}).theme || '').toLowerCase(), themeOptions = (themes[themeName] || {}).treeMap;\n that.options = deepExtend({}, themeOptions, options);\n },\n _attachEvents: function () {\n this.element.on(MOUSEOVER_NS, proxy(this._mouseover, this)).on(MOUSELEAVE_NS, proxy(this._mouseleave, this));\n this._resizeHandler = proxy(this.resize, this, false);\n kendo.onResize(this._resizeHandler);\n },\n _setLayout: function () {\n if (this.options.type === 'horizontal') {\n this._layout = new SliceAndDice(false);\n this._view = new SliceAndDiceView(this, this.options);\n } else if (this.options.type === 'vertical') {\n this._layout = new SliceAndDice(true);\n this._view = new SliceAndDiceView(this, this.options);\n } else {\n this._layout = new Squarified();\n this._view = new SquarifiedView(this, this.options);\n }\n },\n _initDataSource: function () {\n var that = this, options = that.options, dataSource = options.dataSource;\n that._dataChangeHandler = proxy(that._onDataChange, that);\n that.dataSource = HierarchicalDataSource.create(dataSource).bind(CHANGE, that._dataChangeHandler);\n if (dataSource) {\n if (that.options.autoBind) {\n that.dataSource.fetch();\n }\n }\n },\n setDataSource: function (dataSource) {\n var that = this;\n that.dataSource.unbind(CHANGE, that._dataChangeHandler);\n that.dataSource = dataSource.bind(CHANGE, that._dataChangeHandler);\n if (dataSource) {\n if (that.options.autoBind) {\n that.dataSource.fetch();\n }\n }\n },\n _onDataChange: function (e) {\n var node = e.node;\n var items = e.items;\n var options = this.options;\n var item, i;\n if (!node) {\n this._cleanItems();\n this.element.empty();\n item = this._wrapItem(items[0]);\n this._layout.createRoot(item, outerWidth(this.element), outerHeight(this.element), this.options.type === 'vertical');\n this._view.createRoot(item);\n this._root = item;\n this._colorIdx = 0;\n } else {\n if (items.length) {\n var root = this._getByUid(node.uid);\n root.children = [];\n items = new kendo.data.Query(items)._sortForGrouping(options.valueField, 'desc');\n for (i = 0; i < items.length; i++) {\n item = items[i];\n root.children.push(this._wrapItem(item));\n }\n var htmlSize = this._view.htmlSize(root);\n this._layout.compute(root.children, root.coord, htmlSize);\n this._setColors(root.children);\n this._view.render(root);\n }\n }\n for (i = 0; i < items.length; i++) {\n items[i].load();\n }\n if (node) {\n this.trigger(DATA_BOUND, { node: node });\n }\n },\n _cleanItems: function () {\n var that = this;\n that.angular('cleanup', function () {\n return { elements: that.element.find('.k-leaf div,.k-treemap-title,.k-treemap-title-vertical') };\n });\n },\n _setColors: function (items) {\n var colors = this.options.colors;\n var colorIdx = this._colorIdx;\n var color = colors[colorIdx % colors.length];\n var colorRange, item;\n if (isArray(color)) {\n colorRange = colorsByLength(color[0], color[1], items.length);\n }\n var leafNodes = false;\n for (var i = 0; i < items.length; i++) {\n item = items[i];\n if (!defined(item.color)) {\n if (colorRange) {\n item.color = colorRange[i];\n } else {\n item.color = color;\n }\n }\n if (!item.dataItem.hasChildren) {\n leafNodes = true;\n }\n }\n if (leafNodes) {\n this._colorIdx++;\n }\n },\n _contentSize: function (root) {\n this.view.renderHeight(root);\n },\n _wrapItem: function (item) {\n var wrap = {};\n if (defined(this.options.valueField)) {\n wrap.value = getField(this.options.valueField, item);\n }\n if (defined(this.options.colorField)) {\n wrap.color = getField(this.options.colorField, item);\n }\n if (defined(this.options.textField)) {\n wrap.text = getField(this.options.textField, item);\n }\n wrap.level = item.level();\n wrap.dataItem = item;\n return wrap;\n },\n _getByUid: function (uid) {\n var items = [this._root];\n var item;\n while (items.length) {\n item = items.pop();\n if (item.dataItem.uid === uid) {\n return item;\n }\n if (item.children) {\n items = items.concat(item.children);\n }\n }\n },\n dataItem: function (node) {\n var uid = $(node).attr(kendo.attr('uid')), dataSource = this.dataSource;\n return dataSource && dataSource.getByUid(uid);\n },\n findByUid: function (uid) {\n return this.element.find('.k-treemap-tile[' + kendo.attr('uid') + '=\\'' + uid + '\\']');\n },\n _mouseover: function (e) {\n var target = $(e.target);\n if (target.hasClass('k-leaf')) {\n this._removeActiveState();\n target.removeClass('k-state-hover').addClass('k-state-hover');\n }\n },\n _removeActiveState: function () {\n this.element.find('.k-state-hover').removeClass('k-state-hover');\n },\n _mouseleave: function () {\n this._removeActiveState();\n },\n destroy: function () {\n Widget.fn.destroy.call(this);\n this.element.off(NS);\n if (this.dataSource) {\n this.dataSource.unbind(CHANGE, this._dataChangeHandler);\n }\n this._root = null;\n kendo.unbindResize(this._resizeHandler);\n kendo.destroy(this.element);\n },\n items: function () {\n return $();\n },\n getSize: function () {\n return kendo.dimensions(this.element);\n },\n _resize: function () {\n var root = this._root;\n if (root) {\n var element = this.element;\n var rootElement = element.children();\n root.coord.width = outerWidth(element);\n root.coord.height = outerHeight(element);\n rootElement.css({\n width: root.coord.width,\n height: root.coord.height\n });\n this._resizeItems(root, rootElement);\n }\n },\n _resizeItems: function (root, element) {\n if (root.children && root.children.length) {\n var elements = element.children('.k-treemap-wrap').children();\n var child, childElement;\n this._layout.compute(root.children, root.coord, { text: this._view.titleSize(root, element) });\n for (var idx = 0; idx < root.children.length; idx++) {\n child = root.children[idx];\n childElement = elements.filter('[' + kendo.attr('uid') + '=\\'' + child.dataItem.uid + '\\']');\n this._view.setItemSize(child, childElement);\n this._resizeItems(child, childElement);\n }\n }\n },\n setOptions: function (options) {\n var dataSource = options.dataSource;\n options.dataSource = undefined;\n this._originalOptions = deepExtend(this._originalOptions, options);\n this.options = deepExtend({}, this._originalOptions);\n this._setLayout();\n this._initTheme(this.options);\n Widget.fn._setEvents.call(this, options);\n if (dataSource) {\n this.setDataSource(HierarchicalDataSource.create(dataSource));\n }\n if (this.options.autoBind) {\n this.dataSource.fetch();\n }\n }\n });\n var Squarified = Class.extend({\n createRoot: function (root, width, height) {\n root.coord = {\n width: width,\n height: height,\n top: 0,\n left: 0\n };\n },\n leaf: function (tree) {\n return !tree.children;\n },\n layoutChildren: function (items, coord) {\n var parentArea = coord.width * coord.height;\n var totalArea = 0, itemsArea = [], i;\n for (i = 0; i < items.length; i++) {\n itemsArea[i] = parseFloat(items[i].value);\n totalArea += itemsArea[i];\n }\n for (i = 0; i < itemsArea.length; i++) {\n items[i].area = parentArea * itemsArea[i] / totalArea;\n }\n var minimumSideValue = this.layoutHorizontal() ? coord.height : coord.width;\n var firstElement = [items[0]];\n var tail = items.slice(1);\n this.squarify(tail, firstElement, minimumSideValue, coord);\n },\n squarify: function (tail, initElement, width, coord) {\n this.computeDim(tail, initElement, width, coord);\n },\n computeDim: function (tail, initElement, width, coord) {\n if (tail.length + initElement.length == 1) {\n var element = tail.length == 1 ? tail : initElement;\n this.layoutLast(element, width, coord);\n return;\n }\n if (tail.length >= 2 && initElement.length === 0) {\n initElement = [tail[0]];\n tail = tail.slice(1);\n }\n if (tail.length === 0) {\n if (initElement.length > 0) {\n this.layoutRow(initElement, width, coord);\n }\n return;\n }\n var firstElement = tail[0];\n if (this.worstAspectRatio(initElement, width) >= this.worstAspectRatio([firstElement].concat(initElement), width)) {\n this.computeDim(tail.slice(1), initElement.concat([firstElement]), width, coord);\n } else {\n var newCoords = this.layoutRow(initElement, width, coord);\n this.computeDim(tail, [], newCoords.dim, newCoords);\n }\n },\n layoutLast: function (items, w, coord) {\n items[0].coord = coord;\n },\n layoutRow: function (items, width, coord) {\n if (this.layoutHorizontal()) {\n return this.layoutV(items, width, coord);\n } else {\n return this.layoutH(items, width, coord);\n }\n },\n orientation: 'h',\n layoutVertical: function () {\n return this.orientation === 'v';\n },\n layoutHorizontal: function () {\n return this.orientation === 'h';\n },\n layoutChange: function () {\n this.orientation = this.layoutVertical() ? 'h' : 'v';\n },\n worstAspectRatio: function (items, width) {\n if (!items || items.length === 0) {\n return MAX_VALUE;\n }\n var areaSum = 0, maxArea = 0, minArea = MAX_VALUE;\n for (var i = 0; i < items.length; i++) {\n var area = items[i].area;\n areaSum += area;\n minArea = minArea < area ? minArea : area;\n maxArea = maxArea > area ? maxArea : area;\n }\n return math.max(width * width * maxArea / (areaSum * areaSum), areaSum * areaSum / (width * width * minArea));\n },\n compute: function (children, rootCoord, htmlSize) {\n if (!(rootCoord.width >= rootCoord.height && this.layoutHorizontal())) {\n this.layoutChange();\n }\n if (children && children.length > 0) {\n var newRootCoord = {\n width: rootCoord.width,\n height: rootCoord.height - htmlSize.text,\n top: 0,\n left: 0\n };\n this.layoutChildren(children, newRootCoord);\n }\n },\n layoutV: function (items, width, coord) {\n var totalArea = this._totalArea(items), top = 0;\n width = round(totalArea / width);\n for (var i = 0; i < items.length; i++) {\n var height = round(items[i].area / width);\n items[i].coord = {\n height: height,\n width: width,\n top: coord.top + top,\n left: coord.left\n };\n top += height;\n }\n var ans = {\n height: coord.height,\n width: coord.width - width,\n top: coord.top,\n left: coord.left + width\n };\n ans.dim = math.min(ans.width, ans.height);\n if (ans.dim != ans.height) {\n this.layoutChange();\n }\n return ans;\n },\n layoutH: function (items, width, coord) {\n var totalArea = this._totalArea(items);\n var height = round(totalArea / width), top = coord.top, left = 0;\n for (var i = 0; i < items.length; i++) {\n items[i].coord = {\n height: height,\n width: round(items[i].area / height),\n top: top,\n left: coord.left + left\n };\n left += items[i].coord.width;\n }\n var ans = {\n height: coord.height - height,\n width: coord.width,\n top: coord.top + height,\n left: coord.left\n };\n ans.dim = math.min(ans.width, ans.height);\n if (ans.dim != ans.width) {\n this.layoutChange();\n }\n return ans;\n },\n _totalArea: function (items) {\n var total = 0;\n for (var i = 0; i < items.length; i++) {\n total += items[i].area;\n }\n return total;\n }\n });\n var SquarifiedView = Class.extend({\n init: function (treeMap, options) {\n this.options = deepExtend({}, this.options, options);\n this.treeMap = treeMap;\n this.element = $(treeMap.element);\n this.offset = 0;\n },\n titleSize: function (item, element) {\n var text = element.children('.k-treemap-title');\n return text.height();\n },\n htmlSize: function (root) {\n var rootElement = this._getByUid(root.dataItem.uid);\n var htmlSize = { text: 0 };\n if (root.children) {\n this._clean(rootElement);\n var text = this._getText(root);\n if (text) {\n var title = this._createTitle(root);\n rootElement.append(title);\n this._compile(title, root.dataItem);\n htmlSize.text = title.height();\n }\n rootElement.append(this._createWrap());\n this.offset = (outerWidth(rootElement) - rootElement.innerWidth()) / 2;\n }\n return htmlSize;\n },\n _compile: function (element, dataItem) {\n this.treeMap.angular('compile', function () {\n return {\n elements: element,\n data: [{ dataItem: dataItem }]\n };\n });\n },\n _getByUid: function (uid) {\n return this.element.find('.k-treemap-tile[' + kendo.attr('uid') + '=\\'' + uid + '\\']');\n },\n render: function (root) {\n var rootElement = this._getByUid(root.dataItem.uid);\n var children = root.children;\n if (children) {\n var rootWrap = rootElement.find('.k-treemap-wrap');\n for (var i = 0; i < children.length; i++) {\n var leaf = children[i];\n var htmlElement = this._createLeaf(leaf);\n rootWrap.append(htmlElement);\n this._compile(htmlElement.children(), leaf.dataItem);\n this.treeMap.trigger(ITEM_CREATED, { element: htmlElement });\n }\n }\n },\n createRoot: function (root) {\n var htmlElement = this._createLeaf(root);\n this.element.append(htmlElement);\n this._compile(htmlElement.children(), root.dataItem);\n this.treeMap.trigger(ITEM_CREATED, { element: htmlElement });\n },\n _clean: function (root) {\n this.treeMap.angular('cleanup', function () {\n return { elements: root.children(':not(.k-treemap-wrap)') };\n });\n root.css('background-color', '');\n root.removeClass('k-leaf');\n root.removeClass('k-inverse');\n root.empty();\n },\n _createLeaf: function (item) {\n return this._createTile(item).css('background-color', item.color).addClass('k-leaf').toggleClass('k-inverse', this._tileColorBrightness(item) > 180).append($('
').html(this._getText(item)));\n },\n _createTile: function (item) {\n var tile = $('
');\n this.setItemSize(item, tile);\n if (defined(item.dataItem) && defined(item.dataItem.uid)) {\n tile.attr(kendo.attr('uid'), item.dataItem.uid);\n }\n return tile;\n },\n _itemCoordinates: function (item) {\n var coordinates = {\n width: item.coord.width,\n height: item.coord.height,\n left: item.coord.left,\n top: item.coord.top\n };\n if (coordinates.left && this.offset) {\n coordinates.width += this.offset * 2;\n } else {\n coordinates.width += this.offset;\n }\n if (coordinates.top) {\n coordinates.height += this.offset * 2;\n } else {\n coordinates.height += this.offset;\n }\n return coordinates;\n },\n setItemSize: function (item, element) {\n var coordinates = this._itemCoordinates(item);\n element.css({\n width: coordinates.width,\n height: coordinates.height,\n left: coordinates.left,\n top: coordinates.top\n });\n },\n _getText: function (item) {\n var text = item.text;\n if (this.options.template) {\n text = this._renderTemplate(item);\n }\n return text;\n },\n _renderTemplate: function (item) {\n var titleTemplate = template(this.options.template);\n return titleTemplate({\n dataItem: item.dataItem,\n text: item.text\n });\n },\n _createTitle: function (item) {\n return $('
').append($('
').html(this._getText(item)));\n },\n _createWrap: function () {\n return $('
');\n },\n _tileColorBrightness: function (item) {\n return colorBrightness(item.color);\n }\n });\n var SliceAndDice = Class.extend({\n createRoot: function (root, width, height, vertical) {\n root.coord = {\n width: width,\n height: height,\n top: 0,\n left: 0\n };\n root.vertical = vertical;\n },\n init: function (vertical) {\n this.vertical = vertical;\n this.quotient = vertical ? 1 : 0;\n },\n compute: function (children, rootCoord, htmlSize) {\n if (children.length > 0) {\n var width = rootCoord.width;\n var height = rootCoord.height;\n if (this.vertical) {\n height -= htmlSize.text;\n } else {\n width -= htmlSize.text;\n }\n var newRootCoord = {\n width: width,\n height: height,\n top: 0,\n left: 0\n };\n this.layoutChildren(children, newRootCoord);\n }\n },\n layoutChildren: function (items, coord) {\n var parentArea = coord.width * coord.height;\n var totalArea = 0;\n var itemsArea = [];\n var i;\n for (i = 0; i < items.length; i++) {\n var item = items[i];\n itemsArea[i] = parseFloat(items[i].value);\n totalArea += itemsArea[i];\n item.vertical = this.vertical;\n }\n for (i = 0; i < itemsArea.length; i++) {\n items[i].area = parentArea * itemsArea[i] / totalArea;\n }\n this.sliceAndDice(items, coord);\n },\n sliceAndDice: function (items, coord) {\n var totalArea = this._totalArea(items);\n if (items[0].level % 2 === this.quotient) {\n this.layoutHorizontal(items, coord, totalArea);\n } else {\n this.layoutVertical(items, coord, totalArea);\n }\n },\n layoutHorizontal: function (items, coord, totalArea) {\n var left = 0;\n for (var i = 0; i < items.length; i++) {\n var item = items[i];\n var width = item.area / (totalArea / coord.width);\n item.coord = {\n height: coord.height,\n width: width,\n top: coord.top,\n left: coord.left + left\n };\n left += width;\n }\n },\n layoutVertical: function (items, coord, totalArea) {\n var top = 0;\n for (var i = 0; i < items.length; i++) {\n var item = items[i];\n var height = item.area / (totalArea / coord.height);\n item.coord = {\n height: height,\n width: coord.width,\n top: coord.top + top,\n left: coord.left\n };\n top += height;\n }\n },\n _totalArea: function (items) {\n var total = 0;\n for (var i = 0; i < items.length; i++) {\n total += items[i].area;\n }\n return total;\n }\n });\n var SliceAndDiceView = SquarifiedView.extend({\n htmlSize: function (root) {\n var rootElement = this._getByUid(root.dataItem.uid);\n var htmlSize = {\n text: 0,\n offset: 0\n };\n if (root.children) {\n this._clean(rootElement);\n var text = this._getText(root);\n if (text) {\n var title = this._createTitle(root);\n rootElement.append(title);\n this._compile(title, root.dataItem);\n if (root.vertical) {\n htmlSize.text = title.height();\n } else {\n htmlSize.text = title.width();\n }\n }\n rootElement.append(this._createWrap());\n this.offset = (outerWidth(rootElement) - rootElement.innerWidth()) / 2;\n }\n return htmlSize;\n },\n titleSize: function (item, element) {\n var size;\n if (item.vertical) {\n size = element.children('.k-treemap-title').height();\n } else {\n size = element.children('.k-treemap-title-vertical').width();\n }\n return size;\n },\n _createTitle: function (item) {\n var title;\n if (item.vertical) {\n title = $('
');\n } else {\n title = $('
');\n }\n return title.append($('
').html(this._getText(item)));\n }\n });\n function getField(field, row) {\n if (row === null) {\n return row;\n }\n var get = getter(field, true);\n return get(row);\n }\n function defined(value) {\n return typeof value !== UNDEFINED;\n }\n function colorsByLength(min, max, length) {\n var minRGBtoDecimal = rgbToDecimal(min);\n var maxRGBtoDecimal = rgbToDecimal(max);\n var isDarker = colorBrightness(min) - colorBrightness(max) < 0;\n var colors = [];\n colors.push(min);\n for (var i = 0; i < length; i++) {\n var rgbColor = {\n r: colorByIndex(minRGBtoDecimal.r, maxRGBtoDecimal.r, i, length, isDarker),\n g: colorByIndex(minRGBtoDecimal.g, maxRGBtoDecimal.g, i, length, isDarker),\n b: colorByIndex(minRGBtoDecimal.b, maxRGBtoDecimal.b, i, length, isDarker)\n };\n colors.push(buildColorFromRGB(rgbColor));\n }\n colors.push(max);\n return colors;\n }\n function colorByIndex(min, max, index, length, isDarker) {\n var minColor = math.min(math.abs(min), math.abs(max));\n var maxColor = math.max(math.abs(min), math.abs(max));\n var step = (maxColor - minColor) / (length + 1);\n var currentStep = step * (index + 1);\n var color;\n if (isDarker) {\n color = minColor + currentStep;\n } else {\n color = maxColor - currentStep;\n }\n return color;\n }\n function buildColorFromRGB(color) {\n return '#' + decimalToRgb(color.r) + decimalToRgb(color.g) + decimalToRgb(color.b);\n }\n function rgbToDecimal(color) {\n color = color.replace('#', '');\n var rgbColor = colorToRGB(color);\n return {\n r: rgbToHex(rgbColor.r),\n g: rgbToHex(rgbColor.g),\n b: rgbToHex(rgbColor.b)\n };\n }\n function decimalToRgb(number) {\n var result = math.round(number).toString(16).toUpperCase();\n if (result.length === 1) {\n result = '0' + result;\n }\n return result;\n }\n function colorToRGB(color) {\n var colorLength = color.length;\n var rgbColor = {};\n if (colorLength === 3) {\n rgbColor.r = color[0];\n rgbColor.g = color[1];\n rgbColor.b = color[2];\n } else {\n rgbColor.r = color.substring(0, 2);\n rgbColor.g = color.substring(2, 4);\n rgbColor.b = color.substring(4, 6);\n }\n return rgbColor;\n }\n function rgbToHex(rgb) {\n return parseInt(rgb.toString(16), 16);\n }\n function colorBrightness(color) {\n var brightness = 0;\n if (color) {\n color = rgbToDecimal(color);\n brightness = math.sqrt(0.241 * color.r * color.r + 0.691 * color.g * color.g + 0.068 * color.b * color.b);\n }\n return brightness;\n }\n function round(value) {\n var power = math.pow(10, 4);\n return math.round(value * power) / power;\n }\n dataviz.ui.plugin(TreeMap);\n }(window.kendo.jQuery));\n return window.kendo;\n}, typeof define == 'function' && define.amd ? define : function (a1, a2, a3) {\n (a3 || a2)();\n}));"]}