{"version":3,"sources":["kendo.dataviz.core.js"],"names":["f","define","defined","value","UNDEFINED","round","precision","power","pow","math","p","limitValue","min","max","rad","degrees","DEG_TO_RAD","deg","radians","isNumber","val","isNaN","valueOrDefault","defaultValue","sqr","objectKey","object","key","parts","push","sort","join","hashKey","str","i","hash","length","charCodeAt","hashObject","arrayLimits","arr","MAX_NUM","MIN_NUM","arrayMin","arrayMax","sparseArrayMin","sparseArrayLimits","sparseArrayMax","n","isFinite","undefined","last","array","append","first","second","apply","renderTemplate","text","kendo","template","useWithBlock","paramName","renderAttr","name","renderAllAttr","attrs","output","renderStyle","renderSize","size","renderPos","pos","result","toHyphens","split","isTransparent","color","arabicToRoman","literals","1","10","100","2","20","200","3","30","300","4","40","400","5","50","500","6","60","600","7","70","700","8","80","800","9","90","900","1000","values","roman","shift","romanToArabic","r","digits","prev","v","toLowerCase","x","l","c","d","m","charAt","memoize","cache","Object","create","id","arguments","this","ucs2decode","string","extra","counter","ucs2encode","map","String","fromCharCode","mergeSort","a","cmp","merge","b","ai","bi","slice","left","right","Math","floor","window","deepExtend","PI","Number","MAX_VALUE","now","Date","getTime","util","drawing","dataviz","amd","a1","a2","a3","$","zeroSize","width","height","baseline","measureText","style","measureBox","TextMetrics","current","measure","loadFonts","fonts","callback","promises","document","font","load","e","logToConsole","Promise","all","then","doc","Class","LRUCache","extend","init","_size","_length","_map","put","lru","entry","_head","_tail","newer","older","get","defaultMeasureBox","options","_cache","_initOptions","baselineMarkerSize","box","styleKey","cacheKey","cachedResult","baselineMarker","_baselineMarker","cloneNode","appendChild","body","offsetWidth","offsetHeight","offsetTop","parentNode","removeChild","jQuery","encodeBase64","input","chr1","chr2","chr3","enc1","enc2","enc3","enc4","encodeUTF8","KEY_STR","inArray","ObserversMixin","observers","_observers","addObserver","element","removeObserver","index","splice","trigger","methodName","event","observer","idx","_suspended","optionsChange","geometryChange","suspend","resume","_observerField","field","mixins","getSpacing","defaultSpacing","spacing","top","bottom","TOP","RIGHT","BOTTOM","LEFT","createAxisTick","tickOptions","tickX","tickY","position","tick","draw","Path","stroke","vertical","moveTo","lineTo","alignPathToPixel","createAxisGridLine","gridLine","lineStart","lineEnd","line","dashType","autoMajorUnit","scale","relativeValue","scaleMultiplier","diff","DEFAULT_PRECISION","abs","log","rotatePoint","y","cx","cy","angle","theta","Point2D","cos","sin","boxDiff","s","x1","y1","x2","y2","g","h","Box2D","grep","indexOf","ceil","step","remainderClose","divisor","ratio","remainder","threshold","interpolateValue","start","end","progress","COORD_PRECISION","numericComparer","autoFormat","format","match","FORMAT_REGEX","toString","clockwise","v1","v2","dateComparer","mwDelta","origEvent","originalEvent","delta","wheelDelta","detail","decodeEntities","_element","innerHTML","textContent","innerText","path","offset","support","vml","segments","anchor","translate","innerRadialStops","currentStop","stops","usedSpace","innerRadius","radius","currentStops","rectToBox","rect","origin","bottomRight","eventTargetElement","touch","initialTouch","target","limitCoordinate","COORDINATE_LIMIT","Ring","Sector","ShapeBuilder","ChartElement","RootElement","BoxElement","Text","FloatElement","TextBox","Title","AxisLabel","Axis","Note","ShapeElement","NumericAxis","LogarithmicAxis","ExportMixin","CurveProcessor","geom","geometry","noop","isPlainObject","trim","AXIS_LABEL_CLICK","BLACK","CENTER","CLIP","CIRCLE","CROSS","DEFAULT_FONT","DEFAULT_HEIGHT","DEFAULT_ICON_SIZE","DEFAULT_WIDTH","HEIGHT","INITIAL_ANIMATION_DURATION","INSIDE","LINEAR","MIN_VALUE","MIN_VALUE_RANGE","NONE","NOTE_CLICK","NOTE_HOVER","OUTSIDE","RADIAL","TRIANGLE","WIDTH","WHITE","X","Y","ZERO_THRESHOLD","point","fn","prototype","clone","equals","rotate","center","cosT","sinT","multiply","distanceTo","dx","dy","sqrt","onCircle","move","wrap","targetBox","wrapPoint","snapTo","axis","alignTo","targetCenter","shrink","dw","dh","expand","pad","padding","unpad","containsPoint","points","getHash","overlaps","rotation","r1","r2","r3","r4","toRect","Rect","hasSize","align","alignment","c1","c2","sizeFunc","startAngle","ring","ir","middle","newRadius","that","radianAngle","ax","ay","adjacentBox","distance","sector","midAndle","midPoint","hw","hh","sa","ca","endAngle","vector","startPoint","startVector","endPoint","endVector","dist","getBBox","angles","ea","allAngles","saIndex","eaIndex","concat","call","createRing","innerEnd","Point","arc","Arc","radiusX","radiusY","fromArc","close","pointAt","children","reflow","currentChild","destroy","animation","getRoot","parent","getChart","root","chart","translateChildren","childrenCount","renderVisual","visible","createVisual","addVisual","renderChildren","createAnimation","renderComplete","visual","chartElement","appendVisual","Group","zIndex","Animation","childVisual","noclip","clipRoot","stackRoot","stackVisual","sibling","here","visuals","insertAt","traverse","child","closest","matched","hasHighlight","highlight","createHighlight","toggleHighlight","show","highlightOptions","_highlight","customVisual","fill","opacity","highlightVisualArgs","sender","series","dataItem","category","stackValue","percentage","runningTotal","total","createGradientOverlay","gradientOptions","overlay","createGradient","closed","elements","gradients","background","border","margin","currentBox","createBackground","fromRect","drawingGradient","hashCode","gradient","Gradients","type","LinearGradient","RadialGradient","supportVML","vAlign","shrinkToFit","reflowPaddingBox","paddingBox","borderWidth","contentBox","item","hasSetSize","hasBox","visualStyle","boxElement","cursor","content","opt","topLeft","_initDirection","groupAxis","elementAxis","groupSizeField","elementSizeField","groupSpacing","elementSpacing","vSpacing","reflowChildren","elementStart","groupElementStart","group","groupElements","groupElementsCount","groupIdx","elementBox","elementSize","floatElement","groupOptions","groups","groupsCount","groupsStart","alignStart","groupsSize","groupStart","groupSize","maxGroupElementsSize","maxSize","groupElementsSize","ROWS_SPLIT_REGEX","textbox","_initContainer","rowIdx","rows","textOptions","container","visualBox","visualFn","_boxReflow","visualContext","clippedBBox","normalBox","rotatedBox","transform","rotationTransform","visualOptions","getDefaultVisual","boxCenter","title","buildTitle","defaultOptions","label","context","culture","click","widget","alignRotation","bbox","matrix","rotationMatrix","rotationOrigin","alignAxis","distanceAxis","axisAnchor","topRight","bottomLeft","distanceLeft","distanceRight","alignEnd","alignCenter","transformCopy","fromPoints","labels","majorTickSize","minorTickSize","minorTicks","minorTickType","majorTicks","majorTickType","_deferLabels","createLabels","createTitle","createNotes","mirror","skip","axisCrossingValue","majorGridLines","minorGridLines","reverse","justified","notes","_alignLines","labelsRange","labelsCount","range","labelOptions","autoRotateLabels","createAxisLabel","lineBox","axisX","axisY","lineWidth","titleOptions","visualSize","note","items","data","parseNoteValue","createPlotBands","createLine","gridLinesVisual","gridLines","_gridLines","createTicks","lineGroup","render","tickPositions","skipUnit","count","tickLineOptions","majorUnit","getMajorTickPositions","getMinorTickPositions","minorUnit","_lineGroup","getActualTickSize","tickSize","_backgroundPath","slotX","slotY","from","to","altAxis","plotBands","plotArea","_plotbandGroup","pane","axes","each","bandRect","getSlot","createGridLines","axisLineVisible","linePos","lineOptions","labelSize","sizeFn","titleSize","space","maxLabelSize","rootBox","boxSize","arrangeTitle","arrangeLabels","arrangeNotes","getLabelsTickPositions","labelTickIndex","labelBox","labelY","tickIx","labelPos","firstTickPosition","nextTickPosition","labelX","labelsBetweenTicks","labelOffset","slot","shouldRenderNote","hide","secondAxis","axisLabelText","tmpl","limit","limitRange","rangeSize","valueRange","seriesMin","seriesMax","icon","marker","noteTemplate","wrapperBox","linePoints","defaultVisual","args","eventArgs","preventDefault","hover","leave","_unsetActivePoint","pointData","getElement","halfWidth","Circle","MultiPath","createElement","initDefaults","startValue","userSetLimits","narrowRange","autoMin","autoAxisMin","autoMax","autoAxisMax","autoOptions","roundToMajorUnit","totalMin","totalMax","totalMajorUnit","narrow","axisMax","axisMin","getDivisions","stepValue","getTickPositions","unit","lineSize","skipStep","divisions","dir","startEdge","positions","p1","p2","valueAxis","slotBox","getValue","valueOffset","translateRange","scaleRange","pan","pointsRange","endValue","isValidRange","zoomRange","newRange","base","logMin","logMax","floorMax","ticks","traverseMajorTicksPositions","tickPosition","traverseMinorTicksPositions","_lineOptions","minorOptions","lineStep","_minorIntervalOptions","minorStep","_throwNegativeValuesError","Error","axisOptions","_autoMax","_autoMin","logMaxRemainder","acceptOptionsRange","acceptNewRange","nextValue","difference","glass","sharpBevel","roundedBevel","roundedGlass","sharpGlass","proto","skipLegacy","exportVisual","exportSVG","exportImage","exportPDF","svg","imageDataURL","Surface","_exportGroup","surface","image","canvas","css","display","appendTo","_rootElement","toDataURL","remove","WEIGHT","EXTREMUM_ALLOWED_DEVIATION","process","dataPoints","p0","controlPoints","initialControlPoint","lastControlPoint","tangent","cp0","cp1","removeDuplicates","Segment","pop","controlOut","firstControlPoint","secondControlPoint","invertAxis","lineFunction","calculateFunction","isLine","monotonic","sign","oldXField","xField","yField","restrict","switchOrientation","allowedDeviation","isMonotonicByField","restrictControlPoint","cp","p3","t1","t2","xValue","yValue","controlPoint"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;CAwBC,SAAUA,EAAGC,QACVA,OAAO,aAAc,cAAeD,IACtC,WA6WE,MA5WC,YAGG,QAASE,GAAQC,GACb,aAAcA,KAAUC,EAE5B,QAASC,GAAMF,EAAOG,GAClB,GAAIC,GAAQC,EAAIF,EAChB,OAAOG,GAAKJ,MAAMF,EAAQI,GAASA,EAEvC,QAASC,GAAIE,GACT,MAAIA,GACOD,EAAKD,IAAI,GAAIE,GAEb,EAGf,QAASC,GAAWR,EAAOS,EAAKC,GAC5B,MAAOJ,GAAKI,IAAIJ,EAAKG,IAAIT,EAAOU,GAAMD,GAE1C,QAASE,GAAIC,GACT,MAAOA,GAAUC,EAErB,QAASC,GAAIC,GACT,MAAOA,GAAUF,EAErB,QAASG,GAASC,GACd,MAAsB,gBAARA,KAAqBC,MAAMD,GAE7C,QAASE,GAAenB,EAAOoB,GAC3B,MAAOrB,GAAQC,GAASA,EAAQoB,EAEpC,QAASC,GAAIrB,GACT,MAAOA,GAAQA,EAEnB,QAASsB,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,EAA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AAc,QACjDvoB,GAAW5F,EAAMqG,SACbyO,iBAAkBA,GAClBrE,gBAAiBA,GACjBlC,kBAAmBA,GACnBgH,cAAeA,GACfF,eAAgBA,GAChBD,aAAcA,GACdK,2BAA4BA,GAC5BM,WAAYA,GACZC,WAAYA,GACZf,KAAMA,GACNf,KAAMA,EACND,UAAWA,EACXtE,MAAOA,EACPiE,WAAYA,EACZF,aAAcA,EACdc,eAAgBA,EAChBD,YAAaA,EACbT,aAAcA,EACdQ,gBAAiBA,EACjBH,KAAMA,EACNE,YAAaA,EACbrF,QAASA,GACTuE,KAAMA,EACNI,YAAaA,EACbH,OAAQA,EACRC,aAAcA,EACdW,aAAcA,EACdP,KAAMA,EACNE,QAASA,EACTC,MAAOA,EACPrG,iBAAkBA,EAClBgD,WAAYA,EACZzC,cAAeA,EACfiB,QAASA,EACTgC,aAAcA,EACdO,eAAgBA,EAChBuB,mBAAoBA,EACpB3G,WAAYA,EACZtB,QAASA,EACTqF,iBAAkBA,EAClBe,QAASA,EACTyB,UAAWA,EACXnE,YAAaA,EACbhS,MAAOA,EACPoT,KAAMA,EACNpK,MAAOA,KAEbC,OAAO3F,MAAMoK,QACRzE,OAAO3F,OACE,kBAAV1D,SAAwBA,OAAOgK,IAAMhK,OAAS,SAAUiK,EAAIC,EAAIC,IACrEA,GAAMD","file":"kendo.dataviz.core.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/main', ['kendo.core'], f);\n}(function () {\n (function () {\n var math = Math, kendo = window.kendo, deepExtend = kendo.deepExtend;\n var DEG_TO_RAD = math.PI / 180, MAX_NUM = Number.MAX_VALUE, MIN_NUM = -Number.MAX_VALUE, UNDEFINED = 'undefined';\n function defined(value) {\n return typeof value !== UNDEFINED;\n }\n function round(value, precision) {\n var power = pow(precision);\n return math.round(value * power) / power;\n }\n function pow(p) {\n if (p) {\n return math.pow(10, p);\n } else {\n return 1;\n }\n }\n function limitValue(value, min, max) {\n return math.max(math.min(value, max), min);\n }\n function rad(degrees) {\n return degrees * DEG_TO_RAD;\n }\n function deg(radians) {\n return radians / DEG_TO_RAD;\n }\n function isNumber(val) {\n return typeof val === 'number' && !isNaN(val);\n }\n function valueOrDefault(value, defaultValue) {\n return defined(value) ? value : defaultValue;\n }\n function sqr(value) {\n return value * value;\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 hashObject(object) {\n return hashKey(objectKey(object));\n }\n var now = Date.now;\n if (!now) {\n now = function () {\n return new Date().getTime();\n };\n }\n function arrayLimits(arr) {\n var length = arr.length, i, min = MAX_NUM, max = MIN_NUM;\n for (i = 0; i < length; i++) {\n max = math.max(max, arr[i]);\n min = math.min(min, arr[i]);\n }\n return {\n min: min,\n max: max\n };\n }\n function arrayMin(arr) {\n return arrayLimits(arr).min;\n }\n function arrayMax(arr) {\n return arrayLimits(arr).max;\n }\n function sparseArrayMin(arr) {\n return sparseArrayLimits(arr).min;\n }\n function sparseArrayMax(arr) {\n return sparseArrayLimits(arr).max;\n }\n function sparseArrayLimits(arr) {\n var min = MAX_NUM, max = MIN_NUM;\n for (var i = 0, length = arr.length; i < length; i++) {\n var n = arr[i];\n if (n !== null && isFinite(n)) {\n min = math.min(min, n);\n max = math.max(max, n);\n }\n }\n return {\n min: min === MAX_NUM ? undefined : min,\n max: max === MIN_NUM ? undefined : max\n };\n }\n function last(array) {\n if (array) {\n return array[array.length - 1];\n }\n }\n function append(first, second) {\n first.push.apply(first, second);\n return first;\n }\n function renderTemplate(text) {\n return kendo.template(text, {\n useWithBlock: false,\n paramName: 'd'\n });\n }\n function renderAttr(name, value) {\n return defined(value) && value !== null ? ' ' + name + '=\\'' + value + '\\' ' : '';\n }\n function renderAllAttr(attrs) {\n var output = '';\n for (var i = 0; i < attrs.length; i++) {\n output += renderAttr(attrs[i][0], attrs[i][1]);\n }\n return output;\n }\n function renderStyle(attrs) {\n var output = '';\n for (var i = 0; i < attrs.length; i++) {\n var value = attrs[i][1];\n if (defined(value)) {\n output += attrs[i][0] + ':' + value + ';';\n }\n }\n if (output !== '') {\n return output;\n }\n }\n function renderSize(size) {\n if (typeof size !== 'string') {\n size += 'px';\n }\n return size;\n }\n function renderPos(pos) {\n var result = [];\n if (pos) {\n var parts = kendo.toHyphens(pos).split('-');\n for (var i = 0; i < parts.length; i++) {\n result.push('k-pos-' + parts[i]);\n }\n }\n return result.join(' ');\n }\n function isTransparent(color) {\n return color === '' || color === null || color === 'none' || color === 'transparent' || !defined(color);\n }\n function arabicToRoman(n) {\n var literals = {\n 1: 'i',\n 10: 'x',\n 100: 'c',\n 2: 'ii',\n 20: 'xx',\n 200: 'cc',\n 3: 'iii',\n 30: 'xxx',\n 300: 'ccc',\n 4: 'iv',\n 40: 'xl',\n 400: 'cd',\n 5: 'v',\n 50: 'l',\n 500: 'd',\n 6: 'vi',\n 60: 'lx',\n 600: 'dc',\n 7: 'vii',\n 70: 'lxx',\n 700: 'dcc',\n 8: 'viii',\n 80: 'lxxx',\n 800: 'dccc',\n 9: 'ix',\n 90: 'xc',\n 900: 'cm',\n 1000: 'm'\n };\n var values = [\n 1000,\n 900,\n 800,\n 700,\n 600,\n 500,\n 400,\n 300,\n 200,\n 100,\n 90,\n 80,\n 70,\n 60,\n 50,\n 40,\n 30,\n 20,\n 10,\n 9,\n 8,\n 7,\n 6,\n 5,\n 4,\n 3,\n 2,\n 1\n ];\n var roman = '';\n while (n > 0) {\n if (n < values[0]) {\n values.shift();\n } else {\n roman += literals[values[0]];\n n -= values[0];\n }\n }\n return roman;\n }\n function romanToArabic(r) {\n r = r.toLowerCase();\n var digits = {\n i: 1,\n v: 5,\n x: 10,\n l: 50,\n c: 100,\n d: 500,\n m: 1000\n };\n var value = 0, prev = 0;\n for (var i = 0; i < r.length; ++i) {\n var v = digits[r.charAt(i)];\n if (!v) {\n return null;\n }\n value += v;\n if (v > prev) {\n value -= 2 * prev;\n }\n prev = v;\n }\n return value;\n }\n function memoize(f) {\n var cache = Object.create(null);\n return function () {\n var id = '';\n for (var i = arguments.length; --i >= 0;) {\n id += ':' + arguments[i];\n }\n return id in cache ? cache[id] : cache[id] = f.apply(this, arguments);\n };\n }\n function ucs2decode(string) {\n var output = [], counter = 0, length = string.length, value, extra;\n while (counter < length) {\n value = string.charCodeAt(counter++);\n if (value >= 55296 && value <= 56319 && counter < length) {\n extra = string.charCodeAt(counter++);\n if ((extra & 64512) == 56320) {\n output.push(((value & 1023) << 10) + (extra & 1023) + 65536);\n } else {\n output.push(value);\n counter--;\n }\n } else {\n output.push(value);\n }\n }\n return output;\n }\n function ucs2encode(array) {\n return array.map(function (value) {\n var output = '';\n if (value > 65535) {\n value -= 65536;\n output += String.fromCharCode(value >>> 10 & 1023 | 55296);\n value = 56320 | value & 1023;\n }\n output += String.fromCharCode(value);\n return output;\n }).join('');\n }\n function mergeSort(a, cmp) {\n if (a.length < 2) {\n return a.slice();\n }\n function merge(a, b) {\n var r = [], ai = 0, bi = 0, i = 0;\n while (ai < a.length && bi < b.length) {\n if (cmp(a[ai], b[bi]) <= 0) {\n r[i++] = a[ai++];\n } else {\n r[i++] = b[bi++];\n }\n }\n if (ai < a.length) {\n r.push.apply(r, a.slice(ai));\n }\n if (bi < b.length) {\n r.push.apply(r, b.slice(bi));\n }\n return r;\n }\n return function sort(a) {\n if (a.length <= 1) {\n return a;\n }\n var m = Math.floor(a.length / 2);\n var left = a.slice(0, m);\n var right = a.slice(m);\n left = sort(left);\n right = sort(right);\n return merge(left, right);\n }(a);\n }\n deepExtend(kendo, {\n util: {\n MAX_NUM: MAX_NUM,\n MIN_NUM: MIN_NUM,\n append: append,\n arrayLimits: arrayLimits,\n arrayMin: arrayMin,\n arrayMax: arrayMax,\n defined: defined,\n deg: deg,\n hashKey: hashKey,\n hashObject: hashObject,\n isNumber: isNumber,\n isTransparent: isTransparent,\n last: last,\n limitValue: limitValue,\n now: now,\n objectKey: objectKey,\n round: round,\n rad: rad,\n renderAttr: renderAttr,\n renderAllAttr: renderAllAttr,\n renderPos: renderPos,\n renderSize: renderSize,\n renderStyle: renderStyle,\n renderTemplate: renderTemplate,\n sparseArrayLimits: sparseArrayLimits,\n sparseArrayMin: sparseArrayMin,\n sparseArrayMax: sparseArrayMax,\n sqr: sqr,\n valueOrDefault: valueOrDefault,\n romanToArabic: romanToArabic,\n arabicToRoman: arabicToRoman,\n memoize: memoize,\n ucs2encode: ucs2encode,\n ucs2decode: ucs2decode,\n mergeSort: mergeSort\n }\n });\n kendo.drawing.util = kendo.util;\n kendo.dataviz.util = kendo.util;\n }());\n return window.kendo;\n}, typeof define == 'function' && define.amd ? define : function (a1, a2, a3) {\n (a3 || a2)();\n}));\n(function (f, define) {\n define('util/text-metrics', [\n 'kendo.core',\n 'util/main'\n ], f);\n}(function () {\n (function ($) {\n var doc = document, kendo = window.kendo, Class = kendo.Class, util = kendo.util, defined = util.defined;\n var LRUCache = 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 lru = this, map = lru._map, entry = {\n key: key,\n value: value\n };\n map[key] = entry;\n if (!lru._head) {\n lru._head = lru._tail = entry;\n } else {\n lru._tail.newer = entry;\n entry.older = lru._tail;\n lru._tail = entry;\n }\n if (lru._length >= lru._size) {\n map[lru._head.key] = null;\n lru._head = lru._head.newer;\n lru._head.older = null;\n } else {\n lru._length++;\n }\n },\n get: function (key) {\n var lru = this, entry = lru._map[key];\n if (entry) {\n if (entry === lru._head && entry !== lru._tail) {\n lru._head = entry.newer;\n lru._head.older = null;\n }\n if (entry !== lru._tail) {\n if (entry.older) {\n entry.older.newer = entry.newer;\n entry.newer.older = entry.older;\n }\n entry.older = lru._tail;\n entry.newer = null;\n lru._tail.newer = entry;\n lru._tail = entry;\n }\n return entry.value;\n }\n }\n });\n var defaultMeasureBox = $('
')[0];\n function zeroSize() {\n return {\n width: 0,\n height: 0,\n baseline: 0\n };\n }\n var TextMetrics = Class.extend({\n init: function (options) {\n this._cache = new LRUCache(1000);\n this._initOptions(options);\n },\n options: { baselineMarkerSize: 1 },\n measure: function (text, style, box) {\n if (!text) {\n return zeroSize();\n }\n var styleKey = util.objectKey(style), cacheKey = util.hashKey(text + styleKey), cachedResult = this._cache.get(cacheKey);\n if (cachedResult) {\n return cachedResult;\n }\n var size = zeroSize();\n var measureBox = box ? box : defaultMeasureBox;\n var baselineMarker = this._baselineMarker().cloneNode(false);\n for (var key in style) {\n var value = style[key];\n if (defined(value)) {\n measureBox.style[key] = value;\n }\n }\n $(measureBox).text(text);\n measureBox.appendChild(baselineMarker);\n doc.body.appendChild(measureBox);\n if ((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 return $('')[0];\n }\n });\n TextMetrics.current = new TextMetrics();\n function measureText(text, style, measureBox) {\n return TextMetrics.current.measure(text, style, measureBox);\n }\n function loadFonts(fonts, callback) {\n var promises = [];\n if (fonts.length > 0 && document.fonts) {\n try {\n promises = fonts.map(function (font) {\n return document.fonts.load(font);\n });\n } catch (e) {\n kendo.logToConsole(e);\n }\n Promise.all(promises).then(callback, callback);\n } else {\n callback();\n }\n }\n kendo.util.TextMetrics = TextMetrics;\n kendo.util.LRUCache = LRUCache;\n kendo.util.loadFonts = loadFonts;\n kendo.util.measureText = measureText;\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('util/base64', ['util/main'], f);\n}(function () {\n (function () {\n var kendo = window.kendo, deepExtend = kendo.deepExtend, fromCharCode = String.fromCharCode;\n var KEY_STR = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';\n function encodeBase64(input) {\n var output = '';\n var chr1, chr2, chr3, enc1, enc2, enc3, enc4;\n var i = 0;\n input = encodeUTF8(input);\n while (i < input.length) {\n chr1 = input.charCodeAt(i++);\n chr2 = input.charCodeAt(i++);\n chr3 = input.charCodeAt(i++);\n enc1 = chr1 >> 2;\n enc2 = (chr1 & 3) << 4 | chr2 >> 4;\n enc3 = (chr2 & 15) << 2 | chr3 >> 6;\n enc4 = chr3 & 63;\n if (isNaN(chr2)) {\n enc3 = enc4 = 64;\n } else if (isNaN(chr3)) {\n enc4 = 64;\n }\n output = output + KEY_STR.charAt(enc1) + KEY_STR.charAt(enc2) + KEY_STR.charAt(enc3) + KEY_STR.charAt(enc4);\n }\n return output;\n }\n function encodeUTF8(input) {\n var output = '';\n for (var i = 0; i < input.length; i++) {\n var c = input.charCodeAt(i);\n if (c < 128) {\n output += fromCharCode(c);\n } else if (c < 2048) {\n output += fromCharCode(192 | c >>> 6);\n output += fromCharCode(128 | c & 63);\n } else if (c < 65536) {\n output += fromCharCode(224 | c >>> 12);\n output += fromCharCode(128 | c >>> 6 & 63);\n output += fromCharCode(128 | c & 63);\n }\n }\n return output;\n }\n deepExtend(kendo.util, {\n encodeBase64: encodeBase64,\n encodeUTF8: encodeUTF8\n });\n }());\n return window.kendo;\n}, typeof define == 'function' && define.amd ? define : function (a1, a2, a3) {\n (a3 || a2)();\n}));\n(function (f, define) {\n define('mixins/observers', ['kendo.core'], f);\n}(function () {\n (function ($) {\n var math = Math, kendo = window.kendo, deepExtend = kendo.deepExtend, inArray = $.inArray;\n var ObserversMixin = {\n observers: function () {\n this._observers = this._observers || [];\n return this._observers;\n },\n addObserver: function (element) {\n if (!this._observers) {\n this._observers = [element];\n } else {\n this._observers.push(element);\n }\n return this;\n },\n removeObserver: function (element) {\n var observers = this.observers();\n var index = inArray(element, observers);\n if (index != -1) {\n observers.splice(index, 1);\n }\n return this;\n },\n trigger: function (methodName, event) {\n var observers = this._observers;\n var observer;\n var idx;\n if (observers && !this._suspended) {\n for (idx = 0; idx < observers.length; idx++) {\n observer = observers[idx];\n if (observer[methodName]) {\n observer[methodName](event);\n }\n }\n }\n return this;\n },\n optionsChange: function (e) {\n e = e || {};\n e.element = this;\n this.trigger('optionsChange', e);\n },\n geometryChange: function () {\n this.trigger('geometryChange', { element: this });\n },\n suspend: function () {\n this._suspended = (this._suspended || 0) + 1;\n return this;\n },\n resume: function () {\n this._suspended = math.max((this._suspended || 0) - 1, 0);\n return this;\n },\n _observerField: function (field, value) {\n if (this[field]) {\n this[field].removeObserver(this);\n }\n this[field] = value;\n value.addObserver(this);\n }\n };\n deepExtend(kendo, { mixins: { ObserversMixin: ObserversMixin } });\n }(window.kendo.jQuery));\n return window.kendo;\n}, typeof define == 'function' && define.amd ? define : function (a1, a2, a3) {\n (a3 || a2)();\n}));\n(function (f, define) {\n define('kendo.dataviz.core', [\n 'kendo.core',\n 'kendo.drawing'\n ], f);\n}(function () {\n var __meta__ = {\n id: 'dataviz.core',\n name: 'Core',\n description: 'The DataViz core functions',\n category: 'dataviz',\n depends: [\n 'core',\n 'drawing'\n ],\n hidden: true\n };\n (function ($, undefined) {\n var kendo = window.kendo, util = kendo.util, append = util.append, defined = util.defined, last = util.last, valueOrDefault = util.valueOrDefault, dataviz = kendo.dataviz, geom = dataviz.geometry, draw = dataviz.drawing, measureText = draw.util.measureText, Class = kendo.Class, template = kendo.template, noop = $.noop, indexOf = $.inArray, isPlainObject = $.isPlainObject, trim = $.trim, math = Math, deepExtend = kendo.deepExtend;\n var AXIS_LABEL_CLICK = 'axisLabelClick', BLACK = '#000', BOTTOM = 'bottom', CENTER = 'center', COORD_PRECISION = 3, CLIP = 'clip', CIRCLE = 'circle', CROSS = 'cross', DEFAULT_FONT = '12px sans-serif', DEFAULT_HEIGHT = 400, DEFAULT_ICON_SIZE = 7, DEFAULT_PRECISION = 10, DEFAULT_WIDTH = 600, DEG_TO_RAD = math.PI / 180, FORMAT_REGEX = /\\{\\d+:?/, HEIGHT = 'height', COORDINATE_LIMIT = kendo.support.vml ? 100000 : 300000, INITIAL_ANIMATION_DURATION = 600, INSIDE = 'inside', LEFT = 'left', LINEAR = 'linear', MAX_VALUE = Number.MAX_VALUE, MIN_VALUE = -Number.MAX_VALUE, MIN_VALUE_RANGE = Math.pow(10, -DEFAULT_PRECISION + 1), NONE = 'none', NOTE_CLICK = 'noteClick', NOTE_HOVER = 'noteHover', OUTSIDE = 'outside', RADIAL = 'radial', RIGHT = 'right', TOP = 'top', TRIANGLE = 'triangle', WIDTH = 'width', WHITE = '#fff', X = 'x', Y = 'y', ZERO_THRESHOLD = 0.2;\n function getSpacing(value, defaultSpacing) {\n var spacing = {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0\n };\n defaultSpacing = defaultSpacing || 0;\n if (typeof value === 'number') {\n spacing[TOP] = spacing[RIGHT] = spacing[BOTTOM] = spacing[LEFT] = value;\n } else {\n spacing[TOP] = value[TOP] || defaultSpacing;\n spacing[RIGHT] = value[RIGHT] || defaultSpacing;\n spacing[BOTTOM] = value[BOTTOM] || defaultSpacing;\n spacing[LEFT] = value[LEFT] || defaultSpacing;\n }\n return spacing;\n }\n var Point2D = function (x, y) {\n var point = this;\n if (!(point instanceof Point2D)) {\n return new Point2D(x, y);\n }\n point.x = x || 0;\n point.y = y || 0;\n };\n Point2D.fn = Point2D.prototype = {\n clone: function () {\n var point = this;\n return new Point2D(point.x, point.y);\n },\n equals: function (point) {\n return point && point.x === this.x && point.y === this.y;\n },\n rotate: function (center, degrees) {\n var point = this, theta = degrees * DEG_TO_RAD, cosT = math.cos(theta), sinT = math.sin(theta), cx = center.x, cy = center.y, x = point.x, y = point.y;\n point.x = round(cx + (x - cx) * cosT + (y - cy) * sinT, COORD_PRECISION);\n point.y = round(cy + (y - cy) * cosT - (x - cx) * sinT, COORD_PRECISION);\n return point;\n },\n multiply: function (a) {\n var point = this;\n point.x *= a;\n point.y *= a;\n return point;\n },\n distanceTo: function (point) {\n var dx = this.x - point.x, dy = this.y - point.y;\n return math.sqrt(dx * dx + dy * dy);\n }\n };\n Point2D.onCircle = function (c, a, r) {\n a *= DEG_TO_RAD;\n return new Point2D(c.x - r * math.cos(a), c.y - r * math.sin(a));\n };\n var Box2D = function (x1, y1, x2, y2) {\n var box = this;\n if (!(box instanceof Box2D)) {\n return new Box2D(x1, y1, x2, y2);\n }\n box.x1 = x1 || 0;\n box.x2 = x2 || 0;\n box.y1 = y1 || 0;\n box.y2 = y2 || 0;\n };\n Box2D.fn = Box2D.prototype = {\n width: function () {\n return this.x2 - this.x1;\n },\n height: function () {\n return this.y2 - this.y1;\n },\n translate: function (dx, dy) {\n var box = this;\n box.x1 += dx;\n box.x2 += dx;\n box.y1 += dy;\n box.y2 += dy;\n return box;\n },\n move: function (x, y) {\n var box = this, height = box.height(), width = box.width();\n if (defined(x)) {\n box.x1 = x;\n box.x2 = box.x1 + width;\n }\n if (defined(y)) {\n box.y1 = y;\n box.y2 = box.y1 + height;\n }\n return box;\n },\n wrap: function (targetBox) {\n var box = this;\n box.x1 = math.min(box.x1, targetBox.x1);\n box.y1 = math.min(box.y1, targetBox.y1);\n box.x2 = math.max(box.x2, targetBox.x2);\n box.y2 = math.max(box.y2, targetBox.y2);\n return box;\n },\n wrapPoint: function (point) {\n this.wrap(new Box2D(point.x, point.y, point.x, point.y));\n return this;\n },\n snapTo: function (targetBox, axis) {\n var box = this;\n if (axis == X || !axis) {\n box.x1 = targetBox.x1;\n box.x2 = targetBox.x2;\n }\n if (axis == Y || !axis) {\n box.y1 = targetBox.y1;\n box.y2 = targetBox.y2;\n }\n return box;\n },\n alignTo: function (targetBox, anchor) {\n var box = this, height = box.height(), width = box.width(), axis = anchor == TOP || anchor == BOTTOM ? Y : X, offset = axis == Y ? height : width;\n if (anchor === CENTER) {\n var targetCenter = targetBox.center();\n var center = box.center();\n box.x1 += targetCenter.x - center.x;\n box.y1 += targetCenter.y - center.y;\n } else if (anchor === TOP || anchor === LEFT) {\n box[axis + 1] = targetBox[axis + 1] - offset;\n } else {\n box[axis + 1] = targetBox[axis + 2];\n }\n box.x2 = box.x1 + width;\n box.y2 = box.y1 + height;\n return box;\n },\n shrink: function (dw, dh) {\n var box = this;\n box.x2 -= dw;\n box.y2 -= dh;\n return box;\n },\n expand: function (dw, dh) {\n this.shrink(-dw, -dh);\n return this;\n },\n pad: function (padding) {\n var box = this, spacing = getSpacing(padding);\n box.x1 -= spacing.left;\n box.x2 += spacing.right;\n box.y1 -= spacing.top;\n box.y2 += spacing.bottom;\n return box;\n },\n unpad: function (padding) {\n var box = this, spacing = getSpacing(padding);\n spacing.left = -spacing.left;\n spacing.top = -spacing.top;\n spacing.right = -spacing.right;\n spacing.bottom = -spacing.bottom;\n return box.pad(spacing);\n },\n clone: function () {\n var box = this;\n return new Box2D(box.x1, box.y1, box.x2, box.y2);\n },\n center: function () {\n var box = this;\n return new Point2D(box.x1 + box.width() / 2, box.y1 + box.height() / 2);\n },\n containsPoint: function (point) {\n var box = this;\n return point.x >= box.x1 && point.x <= box.x2 && point.y >= box.y1 && point.y <= box.y2;\n },\n points: function () {\n var box = this;\n return [\n new Point2D(box.x1, box.y1),\n new Point2D(box.x2, box.y1),\n new Point2D(box.x2, box.y2),\n new Point2D(box.x1, box.y2)\n ];\n },\n getHash: function () {\n var box = this;\n return [\n box.x1,\n box.y1,\n box.x2,\n box.y2\n ].join(',');\n },\n overlaps: function (box) {\n return !(box.y2 < this.y1 || this.y2 < box.y1 || box.x2 < this.x1 || this.x2 < box.x1);\n },\n rotate: function (rotation) {\n var box = this;\n var width = box.width();\n var height = box.height();\n var center = box.center();\n var cx = center.x;\n var cy = center.y;\n var r1 = rotatePoint(0, 0, cx, cy, rotation);\n var r2 = rotatePoint(width, 0, cx, cy, rotation);\n var r3 = rotatePoint(width, height, cx, cy, rotation);\n var r4 = rotatePoint(0, height, cx, cy, rotation);\n width = math.max(r1.x, r2.x, r3.x, r4.x) - math.min(r1.x, r2.x, r3.x, r4.x);\n height = math.max(r1.y, r2.y, r3.y, r4.y) - math.min(r1.y, r2.y, r3.y, r4.y);\n box.x2 = box.x1 + width;\n box.y2 = box.y1 + height;\n return box;\n },\n toRect: function () {\n return new geom.Rect([\n this.x1,\n this.y1\n ], [\n this.width(),\n this.height()\n ]);\n },\n hasSize: function () {\n return this.width() !== 0 && this.height() !== 0;\n },\n align: function (targetBox, axis, alignment) {\n var box = this, c1 = axis + 1, c2 = axis + 2, sizeFunc = axis === X ? WIDTH : HEIGHT, size = box[sizeFunc]();\n if (inArray(alignment, [\n LEFT,\n TOP\n ])) {\n box[c1] = targetBox[c1];\n box[c2] = box[c1] + size;\n } else if (inArray(alignment, [\n RIGHT,\n BOTTOM\n ])) {\n box[c2] = targetBox[c2];\n box[c1] = box[c2] - size;\n } else if (alignment == CENTER) {\n box[c1] = targetBox[c1] + (targetBox[sizeFunc]() - size) / 2;\n box[c2] = box[c1] + size;\n }\n }\n };\n var Ring = Class.extend({\n init: function (center, innerRadius, radius, startAngle, angle) {\n var ring = this;\n ring.c = center;\n ring.ir = innerRadius;\n ring.r = radius;\n ring.startAngle = startAngle;\n ring.angle = angle;\n },\n clone: function () {\n var r = this;\n return new Ring(r.c, r.ir, r.r, r.startAngle, r.angle);\n },\n middle: function () {\n return this.startAngle + this.angle / 2;\n },\n radius: function (newRadius, innerRadius) {\n var that = this;\n if (innerRadius) {\n that.ir = newRadius;\n } else {\n that.r = newRadius;\n }\n return that;\n },\n point: function (angle, innerRadius) {\n var ring = this, radianAngle = angle * DEG_TO_RAD, ax = math.cos(radianAngle), ay = math.sin(radianAngle), radius = innerRadius ? ring.ir : ring.r, x = round(ring.c.x - ax * radius, COORD_PRECISION), y = round(ring.c.y - ay * radius, COORD_PRECISION);\n return new Point2D(x, y);\n },\n adjacentBox: function (distance, width, height) {\n var sector = this.clone().expand(distance), midAndle = sector.middle(), midPoint = sector.point(midAndle), hw = width / 2, hh = height / 2, x = midPoint.x - hw, y = midPoint.y - hh, sa = math.sin(midAndle * DEG_TO_RAD), ca = math.cos(midAndle * DEG_TO_RAD);\n if (math.abs(sa) < 0.9) {\n x += hw * -ca / math.abs(ca);\n }\n if (math.abs(ca) < 0.9) {\n y += hh * -sa / math.abs(sa);\n }\n return new Box2D(x, y, x + width, y + height);\n },\n containsPoint: function (p) {\n var ring = this, c = ring.c, ir = ring.ir, r = ring.r, startAngle = ring.startAngle, endAngle = ring.startAngle + ring.angle, dx = p.x - c.x, dy = p.y - c.y, vector = new Point2D(dx, dy), startPoint = ring.point(startAngle), startVector = new Point2D(startPoint.x - c.x, startPoint.y - c.y), endPoint = ring.point(endAngle), endVector = new Point2D(endPoint.x - c.x, endPoint.y - c.y), dist = round(dx * dx + dy * dy, COORD_PRECISION);\n return (startVector.equals(vector) || clockwise(startVector, vector)) && !clockwise(endVector, vector) && dist >= ir * ir && dist <= r * r;\n },\n getBBox: function () {\n var ring = this, box = new Box2D(MAX_VALUE, MAX_VALUE, MIN_VALUE, MIN_VALUE), sa = round(ring.startAngle % 360), ea = round((sa + ring.angle) % 360), innerRadius = ring.ir, allAngles = [\n 0,\n 90,\n 180,\n 270,\n sa,\n ea\n ].sort(numericComparer), saIndex = indexOf(sa, allAngles), eaIndex = indexOf(ea, allAngles), angles, i, point;\n if (sa == ea) {\n angles = allAngles;\n } else {\n if (saIndex < eaIndex) {\n angles = allAngles.slice(saIndex, eaIndex + 1);\n } else {\n angles = [].concat(allAngles.slice(0, eaIndex + 1), allAngles.slice(saIndex, allAngles.length));\n }\n }\n for (i = 0; i < angles.length; i++) {\n point = ring.point(angles[i]);\n box.wrapPoint(point);\n box.wrapPoint(point, innerRadius);\n }\n if (!innerRadius) {\n box.wrapPoint(ring.c);\n }\n return box;\n },\n expand: function (value) {\n this.r += value;\n return this;\n }\n });\n var Sector = Ring.extend({\n init: function (center, radius, startAngle, angle) {\n Ring.fn.init.call(this, center, 0, radius, startAngle, angle);\n },\n expand: function (value) {\n return Ring.fn.expand.call(this, value);\n },\n clone: function () {\n var sector = this;\n return new Sector(sector.c, sector.r, sector.startAngle, sector.angle);\n },\n radius: function (newRadius) {\n return Ring.fn.radius.call(this, newRadius);\n },\n point: function (angle) {\n return Ring.fn.point.call(this, angle);\n }\n });\n var ShapeBuilder = function () {\n };\n ShapeBuilder.fn = ShapeBuilder.prototype = {\n createRing: function (sector, options) {\n var startAngle = sector.startAngle + 180;\n var endAngle = sector.angle + startAngle;\n var center = new geom.Point(sector.c.x, sector.c.y);\n var radius = math.max(sector.r, 0);\n var innerRadius = math.max(sector.ir, 0);\n var arc = new geom.Arc(center, {\n startAngle: startAngle,\n endAngle: endAngle,\n radiusX: radius,\n radiusY: radius\n });\n var path = draw.Path.fromArc(arc, options).close();\n if (innerRadius) {\n arc.radiusX = arc.radiusY = innerRadius;\n var innerEnd = arc.pointAt(endAngle);\n path.lineTo(innerEnd.x, innerEnd.y);\n path.arc(endAngle, startAngle, innerRadius, innerRadius, true);\n } else {\n path.lineTo(center.x, center.y);\n }\n return path;\n }\n };\n ShapeBuilder.current = new ShapeBuilder();\n var ChartElement = Class.extend({\n init: function (options) {\n var element = this;\n element.children = [];\n element.options = deepExtend({}, element.options, options);\n },\n reflow: function (targetBox) {\n var element = this, children = element.children, box, i, currentChild;\n for (i = 0; i < children.length; i++) {\n currentChild = children[i];\n currentChild.reflow(targetBox);\n box = box ? box.wrap(currentChild.box) : currentChild.box.clone();\n }\n element.box = box || targetBox;\n },\n destroy: function () {\n var element = this, children = element.children, i;\n if (this.animation) {\n this.animation.destroy();\n }\n for (i = 0; i < children.length; i++) {\n children[i].destroy();\n }\n },\n getRoot: function () {\n var parent = this.parent;\n return parent ? parent.getRoot() : null;\n },\n getChart: function () {\n var root = this.getRoot();\n if (root) {\n return root.chart;\n }\n },\n translateChildren: function (dx, dy) {\n var element = this, children = element.children, childrenCount = children.length, i;\n for (i = 0; i < childrenCount; i++) {\n children[i].box.translate(dx, dy);\n }\n },\n append: function () {\n append(this.children, arguments);\n for (var i = 0; i < arguments.length; i++) {\n arguments[i].parent = this;\n }\n },\n renderVisual: function () {\n if (this.options.visible === false) {\n return;\n }\n this.createVisual();\n this.addVisual();\n this.renderChildren();\n this.createAnimation();\n this.renderComplete();\n },\n addVisual: function () {\n if (this.visual) {\n this.visual.chartElement = this;\n if (this.parent) {\n this.parent.appendVisual(this.visual);\n }\n }\n },\n renderChildren: function () {\n var children = this.children;\n for (var i = 0; i < children.length; i++) {\n children[i].renderVisual();\n }\n },\n createVisual: function () {\n this.visual = new dataviz.drawing.Group({\n zIndex: this.options.zIndex,\n visible: valueOrDefault(this.options.visible, true)\n });\n },\n createAnimation: function () {\n if (this.visual) {\n this.animation = draw.Animation.create(this.visual, this.options.animation);\n }\n },\n appendVisual: function (childVisual) {\n if (!childVisual.chartElement) {\n childVisual.chartElement = this;\n }\n if (childVisual.options.noclip) {\n this.clipRoot().visual.append(childVisual);\n } else if (defined(childVisual.options.zIndex)) {\n this.stackRoot().stackVisual(childVisual);\n } else if (this.visual) {\n this.visual.append(childVisual);\n } else {\n this.parent.appendVisual(childVisual);\n }\n },\n clipRoot: function () {\n if (this.parent) {\n return this.parent.clipRoot();\n }\n return this;\n },\n stackRoot: function () {\n if (this.parent) {\n return this.parent.stackRoot();\n }\n return this;\n },\n stackVisual: function (childVisual) {\n var zIndex = childVisual.options.zIndex || 0;\n var visuals = this.visual.children;\n for (var pos = 0; pos < visuals.length; pos++) {\n var sibling = visuals[pos];\n var here = valueOrDefault(sibling.options.zIndex, 0);\n if (here > zIndex) {\n break;\n }\n }\n this.visual.insertAt(childVisual, pos);\n },\n traverse: function (callback) {\n var children = this.children;\n for (var i = 0; i < children.length; i++) {\n var child = children[i];\n callback(child);\n if (child.traverse) {\n child.traverse(callback);\n }\n }\n },\n closest: function (match) {\n var element = this;\n var matched = false;\n while (element && !matched) {\n matched = match(element);\n if (!matched) {\n element = element.parent;\n }\n }\n if (matched) {\n return element;\n }\n },\n renderComplete: $.noop,\n hasHighlight: function () {\n var options = (this.options || {}).highlight;\n return !(!this.createHighlight || options && options.visible === false);\n },\n toggleHighlight: function (show) {\n var that = this;\n var highlight = that._highlight;\n var options = (that.options || {}).highlight;\n var customVisual = (options || {}).visual;\n if (!highlight) {\n var highlightOptions = {\n fill: {\n color: WHITE,\n opacity: 0.2\n },\n stroke: {\n color: WHITE,\n width: 1,\n opacity: 0.2\n }\n };\n if (customVisual) {\n highlight = that._highlight = customVisual($.extend(that.highlightVisualArgs(), {\n createVisual: function () {\n return that.createHighlight(highlightOptions);\n },\n sender: that.getChart(),\n series: that.series,\n dataItem: that.dataItem,\n category: that.category,\n value: that.value,\n stackValue: that.stackValue,\n percentage: that.percentage,\n runningTotal: that.runningTotal,\n total: that.total\n }));\n if (!highlight) {\n return;\n }\n } else {\n highlight = that._highlight = that.createHighlight(highlightOptions);\n }\n highlight.options.zIndex = that.options.zIndex;\n that.appendVisual(highlight);\n }\n highlight.visible(show);\n },\n createGradientOverlay: function (element, options, gradientOptions) {\n var overlay = new draw.Path(deepExtend({\n stroke: { color: NONE },\n fill: this.createGradient(gradientOptions),\n closed: element.options.closed\n }, options));\n overlay.segments.elements(element.segments.elements());\n return overlay;\n },\n createGradient: function (options) {\n if (this.parent) {\n return this.parent.createGradient(options);\n }\n }\n });\n var RootElement = ChartElement.extend({\n init: function (options) {\n var root = this;\n root.gradients = {};\n ChartElement.fn.init.call(root, options);\n },\n options: {\n width: DEFAULT_WIDTH,\n height: DEFAULT_HEIGHT,\n background: WHITE,\n border: {\n color: BLACK,\n width: 0\n },\n margin: getSpacing(5),\n zIndex: -2\n },\n reflow: function () {\n var root = this, options = root.options, children = root.children, currentBox = new Box2D(0, 0, options.width, options.height);\n root.box = currentBox.unpad(options.margin);\n for (var i = 0; i < children.length; i++) {\n children[i].reflow(currentBox);\n currentBox = boxDiff(currentBox, children[i].box) || Box2D();\n }\n },\n createVisual: function () {\n this.visual = new draw.Group();\n this.createBackground();\n },\n createBackground: function () {\n var options = this.options;\n var border = options.border || {};\n var box = this.box.clone().pad(options.margin).unpad(border.width);\n var background = draw.Path.fromRect(box.toRect(), {\n stroke: {\n color: border.width ? border.color : '',\n width: border.width,\n dashType: border.dashType\n },\n fill: {\n color: options.background,\n opacity: options.opacity\n },\n zIndex: -10\n });\n this.visual.append(background);\n },\n getRoot: function () {\n return this;\n },\n createGradient: function (options) {\n var gradients = this.gradients;\n var hashCode = util.objectKey(options);\n var gradient = dataviz.Gradients[options.gradient];\n var drawingGradient;\n if (gradients[hashCode]) {\n drawingGradient = gradients[hashCode];\n } else {\n var gradientOptions = deepExtend({}, gradient, options);\n if (gradient.type == 'linear') {\n drawingGradient = new draw.LinearGradient(gradientOptions);\n } else {\n if (options.innerRadius) {\n gradientOptions.stops = innerRadialStops(gradientOptions);\n }\n drawingGradient = new draw.RadialGradient(gradientOptions);\n drawingGradient.supportVML = gradient.supportVML !== false;\n }\n gradients[hashCode] = drawingGradient;\n }\n return drawingGradient;\n }\n });\n var BoxElement = ChartElement.extend({\n options: {\n align: LEFT,\n vAlign: TOP,\n margin: {},\n padding: {},\n border: {\n color: BLACK,\n width: 0\n },\n background: '',\n shrinkToFit: false,\n width: 0,\n height: 0,\n visible: true\n },\n reflow: function (targetBox) {\n var element = this, box, contentBox, options = element.options, width = options.width, height = options.height, hasSetSize = width && height, shrinkToFit = options.shrinkToFit, margin = getSpacing(options.margin), padding = getSpacing(options.padding), borderWidth = options.border.width, children = element.children, i, item;\n function reflowPaddingBox() {\n element.align(targetBox, X, options.align);\n element.align(targetBox, Y, options.vAlign);\n element.paddingBox = box.clone().unpad(margin).unpad(borderWidth);\n }\n contentBox = targetBox.clone();\n if (hasSetSize) {\n contentBox.x2 = contentBox.x1 + width;\n contentBox.y2 = contentBox.y1 + height;\n }\n if (shrinkToFit) {\n contentBox.unpad(margin).unpad(borderWidth).unpad(padding);\n }\n ChartElement.fn.reflow.call(element, contentBox);\n if (hasSetSize) {\n box = element.box = Box2D(0, 0, width, height);\n } else {\n box = element.box;\n }\n if (shrinkToFit && hasSetSize) {\n reflowPaddingBox();\n contentBox = element.contentBox = element.paddingBox.clone().unpad(padding);\n } else {\n contentBox = element.contentBox = box.clone();\n box.pad(padding).pad(borderWidth).pad(margin);\n reflowPaddingBox();\n }\n element.translateChildren(box.x1 - contentBox.x1 + margin.left + borderWidth + padding.left, box.y1 - contentBox.y1 + margin.top + borderWidth + padding.top);\n for (i = 0; i < children.length; i++) {\n item = children[i];\n item.reflow(item.box);\n }\n },\n align: function (targetBox, axis, alignment) {\n this.box.align(targetBox, axis, alignment);\n },\n hasBox: function () {\n var options = this.options;\n return options.border.width || options.background;\n },\n createVisual: function () {\n ChartElement.fn.createVisual.call(this);\n var options = this.options;\n if (options.visible && this.hasBox()) {\n this.visual.append(draw.Path.fromRect(this.paddingBox.toRect(), this.visualStyle()));\n }\n },\n visualStyle: function () {\n var boxElement = this, options = boxElement.options, border = options.border || {};\n return {\n stroke: {\n width: border.width,\n color: border.color,\n opacity: valueOrDefault(border.opacity, options.opacity),\n dashType: border.dashType\n },\n fill: {\n color: options.background,\n opacity: options.opacity\n },\n cursor: options.cursor\n };\n }\n });\n var Text = ChartElement.extend({\n init: function (content, options) {\n var text = this;\n ChartElement.fn.init.call(text, options);\n text.content = content;\n text.reflow(Box2D());\n },\n options: {\n font: DEFAULT_FONT,\n color: BLACK,\n align: LEFT,\n vAlign: ''\n },\n reflow: function (targetBox) {\n var text = this, options = text.options, size;\n size = options.size = measureText(text.content, { font: options.font });\n text.baseline = size.baseline;\n text.box = Box2D(targetBox.x1, targetBox.y1, targetBox.x1 + size.width, targetBox.y1 + size.height);\n },\n createVisual: function () {\n var opt = this.options;\n this.visual = new draw.Text(this.content, this.box.toRect().topLeft(), {\n font: opt.font,\n fill: {\n color: opt.color,\n opacity: opt.opacity\n },\n cursor: opt.cursor\n });\n }\n });\n var FloatElement = ChartElement.extend({\n init: function (options) {\n ChartElement.fn.init.call(this, options);\n this._initDirection();\n },\n _initDirection: function () {\n var options = this.options;\n if (options.vertical) {\n this.groupAxis = X;\n this.elementAxis = Y;\n this.groupSizeField = WIDTH;\n this.elementSizeField = HEIGHT;\n this.groupSpacing = options.spacing;\n this.elementSpacing = options.vSpacing;\n } else {\n this.groupAxis = Y;\n this.elementAxis = X;\n this.groupSizeField = HEIGHT;\n this.elementSizeField = WIDTH;\n this.groupSpacing = options.vSpacing;\n this.elementSpacing = options.spacing;\n }\n },\n options: {\n vertical: true,\n wrap: true,\n vSpacing: 0,\n spacing: 0\n },\n reflow: function (targetBox) {\n this.box = targetBox.clone();\n this.reflowChildren();\n },\n reflowChildren: function () {\n var floatElement = this;\n var box = floatElement.box;\n var elementAxis = floatElement.elementAxis;\n var groupAxis = floatElement.groupAxis;\n var elementSizeField = floatElement.elementSizeField;\n var groupSizeField = floatElement.groupSizeField;\n var groupOptions = floatElement.groupOptions();\n var groups = groupOptions.groups;\n var groupsCount = groups.length;\n var groupsStart = box[groupAxis + 1] + floatElement.alignStart(groupOptions.groupsSize, box[groupSizeField]());\n var groupStart = groupsStart;\n var elementStart;\n var groupElementStart;\n var group;\n var groupElements;\n var groupElementsCount;\n var idx;\n var groupIdx;\n var element;\n var elementBox;\n var elementSize;\n if (groupsCount) {\n for (groupIdx = 0; groupIdx < groupsCount; groupIdx++) {\n group = groups[groupIdx];\n groupElements = group.groupElements;\n groupElementsCount = groupElements.length;\n elementStart = box[elementAxis + 1];\n for (idx = 0; idx < groupElementsCount; idx++) {\n element = groupElements[idx];\n elementSize = floatElement.elementSize(element);\n groupElementStart = groupStart + floatElement.alignStart(elementSize[groupSizeField], group.groupSize);\n elementBox = Box2D();\n elementBox[groupAxis + 1] = groupElementStart;\n elementBox[groupAxis + 2] = groupElementStart + elementSize[groupSizeField];\n elementBox[elementAxis + 1] = elementStart;\n elementBox[elementAxis + 2] = elementStart + elementSize[elementSizeField];\n element.reflow(elementBox);\n elementStart += elementSize[elementSizeField] + floatElement.elementSpacing;\n }\n groupStart += group.groupSize + floatElement.groupSpacing;\n }\n box[groupAxis + 1] = groupsStart;\n box[groupAxis + 2] = groupsStart + groupOptions.groupsSize;\n box[elementAxis + 2] = box[elementAxis + 1] + groupOptions.maxGroupElementsSize;\n }\n },\n alignStart: function (size, maxSize) {\n var start = 0;\n var align = this.options.align;\n if (align == RIGHT || align == BOTTOM) {\n start = maxSize - size;\n } else if (align == CENTER) {\n start = (maxSize - size) / 2;\n }\n return start;\n },\n groupOptions: function () {\n var floatElement = this;\n var box = floatElement.box;\n var children = floatElement.children;\n var childrenCount = children.length;\n var elementSizeField = this.elementSizeField;\n var groupSizeField = this.groupSizeField;\n var elementSpacing = this.elementSpacing;\n var groupSpacing = this.groupSpacing;\n var maxSize = round(box[elementSizeField]());\n var idx = 0;\n var groupSize = 0;\n var elementSize;\n var element;\n var groupElementsSize = 0;\n var groupsSize = 0;\n var groups = [];\n var groupElements = [];\n var maxGroupElementsSize = 0;\n for (idx = 0; idx < childrenCount; idx++) {\n element = children[idx];\n if (!element.box) {\n element.reflow(box);\n }\n elementSize = this.elementSize(element);\n if (floatElement.options.wrap && round(groupElementsSize + elementSpacing + elementSize[elementSizeField]) > maxSize) {\n groups.push({\n groupElements: groupElements,\n groupSize: groupSize,\n groupElementsSize: groupElementsSize\n });\n maxGroupElementsSize = math.max(maxGroupElementsSize, groupElementsSize);\n groupsSize += groupSpacing + groupSize;\n groupSize = 0;\n groupElementsSize = 0;\n groupElements = [];\n }\n groupSize = math.max(groupSize, elementSize[groupSizeField]);\n if (groupElementsSize > 0) {\n groupElementsSize += elementSpacing;\n }\n groupElementsSize += elementSize[elementSizeField];\n groupElements.push(element);\n }\n groups.push({\n groupElements: groupElements,\n groupSize: groupSize,\n groupElementsSize: groupElementsSize\n });\n maxGroupElementsSize = math.max(maxGroupElementsSize, groupElementsSize);\n groupsSize += groupSize;\n return {\n groups: groups,\n groupsSize: groupsSize,\n maxGroupElementsSize: maxGroupElementsSize\n };\n },\n elementSize: function (element) {\n return {\n width: element.box.width(),\n height: element.box.height()\n };\n },\n createVisual: noop\n });\n var TextBox = BoxElement.extend({\n ROWS_SPLIT_REGEX: /\\n|\\\\n/m,\n init: function (content, options) {\n var textbox = this;\n textbox.content = content;\n BoxElement.fn.init.call(textbox, options);\n textbox._initContainer();\n textbox.reflow(Box2D());\n },\n _initContainer: function () {\n var textbox = this;\n var options = textbox.options;\n var rows = (textbox.content + '').split(textbox.ROWS_SPLIT_REGEX);\n var floatElement = new FloatElement({\n vertical: true,\n align: options.align,\n wrap: false\n });\n var textOptions = deepExtend({}, options, {\n opacity: 1,\n animation: null\n });\n var text;\n var rowIdx;\n textbox.container = floatElement;\n textbox.append(floatElement);\n for (rowIdx = 0; rowIdx < rows.length; rowIdx++) {\n text = new Text(trim(rows[rowIdx]), textOptions);\n floatElement.append(text);\n }\n },\n reflow: function (targetBox) {\n var options = this.options;\n var visualFn = options.visual;\n this.container.options.align = options.align;\n if (visualFn && !this._boxReflow) {\n if (!targetBox.hasSize()) {\n this._boxReflow = true;\n this.reflow(targetBox);\n this._boxReflow = false;\n targetBox = this.box;\n }\n this.visual = visualFn(this.visualContext(targetBox));\n var visualBox = targetBox;\n if (this.visual) {\n visualBox = rectToBox(this.visual.clippedBBox() || new geom.Rect());\n this.visual.options.zIndex = options.zIndex;\n this.visual.options.noclip = options.noclip;\n }\n this.box = this.contentBox = this.paddingBox = visualBox;\n } else {\n BoxElement.fn.reflow.call(this, targetBox);\n if (options.rotation) {\n var margin = getSpacing(options.margin);\n var box = this.box.unpad(margin);\n this.targetBox = targetBox;\n this.normalBox = box.clone();\n box = this.rotate();\n box.translate(margin.left - margin.right, margin.top - margin.bottom);\n this.rotatedBox = box.clone();\n box.pad(margin);\n }\n }\n },\n createVisual: function () {\n var options = this.options;\n if (!options.visible) {\n return;\n }\n this.visual = new dataviz.drawing.Group({\n transform: this.rotationTransform(),\n zIndex: options.zIndex,\n noclip: options.noclip\n });\n if (this.hasBox()) {\n var box = draw.Path.fromRect(this.paddingBox.toRect(), this.visualStyle());\n this.visual.append(box);\n }\n },\n renderVisual: function () {\n if (this.options.visual) {\n this.addVisual();\n this.createAnimation();\n } else {\n BoxElement.fn.renderVisual.call(this);\n }\n },\n visualOptions: function () {\n var options = this.options;\n return {\n background: options.background,\n border: options.border,\n color: options.color,\n font: options.font,\n margin: options.margin,\n padding: options.padding,\n visible: options.visible\n };\n },\n visualContext: function (targetBox) {\n var textbox = this;\n return {\n text: textbox.content,\n rect: targetBox.toRect(),\n sender: this.getChart(),\n options: textbox.visualOptions(),\n createVisual: function () {\n textbox._boxReflow = true;\n textbox.reflow(targetBox);\n textbox._boxReflow = false;\n return textbox.getDefaultVisual();\n }\n };\n },\n getDefaultVisual: function () {\n this.createVisual();\n this.renderChildren();\n var visual = this.visual;\n delete this.visual;\n return visual;\n },\n rotate: function () {\n var options = this.options;\n this.box.rotate(options.rotation);\n this.align(this.targetBox, X, options.align);\n this.align(this.targetBox, Y, options.vAlign);\n return this.box;\n },\n rotationTransform: function () {\n var rotation = this.options.rotation;\n if (!rotation) {\n return null;\n }\n var center = this.normalBox.center();\n var cx = center.x;\n var cy = center.y;\n var boxCenter = this.rotatedBox.center();\n return geom.transform().translate(boxCenter.x - cx, boxCenter.y - cy).rotate(rotation, [\n cx,\n cy\n ]);\n }\n });\n var Title = ChartElement.extend({\n init: function (options) {\n var title = this;\n ChartElement.fn.init.call(title, options);\n options = title.options;\n title.append(new TextBox(options.text, deepExtend({}, options, { vAlign: options.position })));\n },\n options: {\n color: BLACK,\n position: TOP,\n align: CENTER,\n margin: getSpacing(5),\n padding: getSpacing(5)\n },\n reflow: function (targetBox) {\n var title = this;\n ChartElement.fn.reflow.call(title, targetBox);\n title.box.snapTo(targetBox, X);\n }\n });\n Title.buildTitle = function (options, parent, defaultOptions) {\n var title;\n if (typeof options === 'string') {\n options = { text: options };\n }\n options = deepExtend({ visible: true }, defaultOptions, options);\n if (options && options.visible && options.text) {\n title = new Title(options);\n parent.append(title);\n }\n return title;\n };\n var AxisLabel = TextBox.extend({\n init: function (value, text, index, dataItem, options) {\n var label = this;\n label.text = text;\n label.value = value;\n label.index = index;\n label.dataItem = dataItem;\n TextBox.fn.init.call(label, text, options);\n },\n visualContext: function (targetBox) {\n var context = TextBox.fn.visualContext.call(this, targetBox);\n context.value = this.value;\n context.dataItem = this.dataItem;\n context.format = this.options.format;\n context.culture = this.options.culture;\n return context;\n },\n click: function (widget, e) {\n var label = this;\n widget.trigger(AXIS_LABEL_CLICK, {\n element: eventTargetElement(e),\n value: label.value,\n text: label.text,\n index: label.index,\n dataItem: label.dataItem,\n axis: label.parent.options\n });\n },\n rotate: function () {\n if (this.options.alignRotation != CENTER) {\n var box = this.normalBox.toRect();\n var transform = this.rotationTransform();\n this.box = rectToBox(box.bbox(transform.matrix()));\n } else {\n TextBox.fn.rotate.call(this);\n }\n return this.box;\n },\n rotationTransform: function () {\n var options = this.options;\n var rotation = options.rotation;\n if (!rotation) {\n return null;\n }\n if (options.alignRotation == CENTER) {\n return TextBox.fn.rotationTransform.call(this);\n }\n var rotationMatrix = geom.transform().rotate(rotation).matrix();\n var box = this.normalBox.toRect();\n var rect = this.targetBox.toRect();\n var rotationOrigin = options.rotationOrigin || TOP;\n var alignAxis = rotationOrigin == TOP || rotationOrigin == BOTTOM ? X : Y;\n var distanceAxis = rotationOrigin == TOP || rotationOrigin == BOTTOM ? Y : X;\n var axisAnchor = rotationOrigin == TOP || rotationOrigin == LEFT ? rect.origin : rect.bottomRight();\n var topLeft = box.topLeft().transformCopy(rotationMatrix);\n var topRight = box.topRight().transformCopy(rotationMatrix);\n var bottomRight = box.bottomRight().transformCopy(rotationMatrix);\n var bottomLeft = box.bottomLeft().transformCopy(rotationMatrix);\n var rotatedBox = geom.Rect.fromPoints(topLeft, topRight, bottomRight, bottomLeft);\n var translate = {};\n translate[distanceAxis] = rect.origin[distanceAxis] - rotatedBox.origin[distanceAxis];\n var distanceLeft = math.abs(topLeft[distanceAxis] + translate[distanceAxis] - axisAnchor[distanceAxis]);\n var distanceRight = math.abs(topRight[distanceAxis] + translate[distanceAxis] - axisAnchor[distanceAxis]);\n var alignStart;\n var alignEnd;\n if (round(distanceLeft, DEFAULT_PRECISION) === round(distanceRight, DEFAULT_PRECISION)) {\n alignStart = topLeft;\n alignEnd = topRight;\n } else if (distanceRight < distanceLeft) {\n alignStart = topRight;\n alignEnd = bottomRight;\n } else {\n alignStart = topLeft;\n alignEnd = bottomLeft;\n }\n var alignCenter = alignStart[alignAxis] + (alignEnd[alignAxis] - alignStart[alignAxis]) / 2;\n translate[alignAxis] = rect.center()[alignAxis] - alignCenter;\n return geom.transform().translate(translate.x, translate.y).rotate(rotation);\n }\n });\n function createAxisTick(options, tickOptions) {\n var tickX = options.tickX, tickY = options.tickY, position = options.position;\n var tick = new draw.Path({\n stroke: {\n width: tickOptions.width,\n color: tickOptions.color\n }\n });\n if (options.vertical) {\n tick.moveTo(tickX, position).lineTo(tickX + tickOptions.size, position);\n } else {\n tick.moveTo(position, tickY).lineTo(position, tickY + tickOptions.size);\n }\n alignPathToPixel(tick);\n return tick;\n }\n function createAxisGridLine(options, gridLine) {\n var lineStart = options.lineStart, lineEnd = options.lineEnd, position = options.position;\n var line = new draw.Path({\n stroke: {\n width: gridLine.width,\n color: gridLine.color,\n dashType: gridLine.dashType\n }\n });\n if (options.vertical) {\n line.moveTo(lineStart, position).lineTo(lineEnd, position);\n } else {\n line.moveTo(position, lineStart).lineTo(position, lineEnd);\n }\n alignPathToPixel(line);\n return line;\n }\n var Axis = ChartElement.extend({\n init: function (options) {\n var axis = this;\n ChartElement.fn.init.call(axis, options);\n if (!axis.options.visible) {\n axis.options = deepExtend({}, axis.options, {\n labels: { visible: false },\n line: { visible: false },\n margin: 0,\n majorTickSize: 0,\n minorTickSize: 0\n });\n }\n axis.options.minorTicks = deepExtend({}, {\n color: axis.options.line.color,\n width: axis.options.line.width,\n visible: axis.options.minorTickType != NONE\n }, axis.options.minorTicks, {\n size: axis.options.minorTickSize,\n align: axis.options.minorTickType\n });\n axis.options.majorTicks = deepExtend({}, {\n color: axis.options.line.color,\n width: axis.options.line.width,\n visible: axis.options.majorTickType != NONE\n }, axis.options.majorTicks, {\n size: axis.options.majorTickSize,\n align: axis.options.majorTickType\n });\n if (!this.options._deferLabels) {\n axis.createLabels();\n }\n axis.createTitle();\n axis.createNotes();\n },\n options: {\n labels: {\n visible: true,\n rotation: 0,\n mirror: false,\n step: 1,\n skip: 0\n },\n line: {\n width: 1,\n color: BLACK,\n visible: true\n },\n title: {\n visible: true,\n position: CENTER\n },\n majorTicks: {\n align: OUTSIDE,\n size: 4,\n skip: 0,\n step: 1\n },\n minorTicks: {\n align: OUTSIDE,\n size: 3,\n skip: 0,\n step: 1\n },\n axisCrossingValue: 0,\n majorTickType: OUTSIDE,\n minorTickType: NONE,\n majorGridLines: {\n skip: 0,\n step: 1\n },\n minorGridLines: {\n visible: false,\n width: 1,\n color: BLACK,\n skip: 0,\n step: 1\n },\n margin: 5,\n visible: true,\n reverse: false,\n justified: true,\n notes: { label: { text: '' } },\n _alignLines: true,\n _deferLabels: false\n },\n labelsRange: function () {\n return {\n min: this.options.labels.skip,\n max: this.labelsCount()\n };\n },\n createLabels: function () {\n var axis = this, options = axis.options, align = options.vertical ? RIGHT : CENTER, labelOptions = deepExtend({}, options.labels, {\n align: align,\n zIndex: options.zIndex\n }), step = math.max(1, labelOptions.step);\n axis.children = $.grep(axis.children, function (child) {\n return !(child instanceof AxisLabel);\n });\n axis.labels = [];\n if (labelOptions.visible) {\n var range = axis.labelsRange(), rotation = labelOptions.rotation, label, i;\n if (isPlainObject(rotation)) {\n labelOptions.alignRotation = rotation.align;\n labelOptions.rotation = rotation.angle;\n }\n if (labelOptions.rotation == 'auto') {\n labelOptions.rotation = 0;\n options.autoRotateLabels = true;\n }\n for (i = range.min; i < range.max; i += step) {\n label = axis.createAxisLabel(i, labelOptions);\n if (label) {\n axis.append(label);\n axis.labels.push(label);\n }\n }\n }\n },\n lineBox: function () {\n var axis = this, options = axis.options, box = axis.box, vertical = options.vertical, mirror = options.labels.mirror, axisX = mirror ? box.x1 : box.x2, axisY = mirror ? box.y2 : box.y1, lineWidth = options.line.width || 0;\n return vertical ? Box2D(axisX, box.y1, axisX, box.y2 - lineWidth) : Box2D(box.x1, axisY, box.x2 - lineWidth, axisY);\n },\n createTitle: function () {\n var axis = this, options = axis.options, titleOptions = deepExtend({\n rotation: options.vertical ? -90 : 0,\n text: '',\n zIndex: 1,\n visualSize: true\n }, options.title), title;\n if (titleOptions.visible && titleOptions.text) {\n title = new TextBox(titleOptions.text, titleOptions);\n axis.append(title);\n axis.title = title;\n }\n },\n createNotes: function () {\n var axis = this, options = axis.options, notes = options.notes, items = notes.data || [], i, item, note;\n axis.notes = [];\n for (i = 0; i < items.length; i++) {\n item = deepExtend({}, notes, items[i]);\n item.value = axis.parseNoteValue(item.value);\n note = new Note(item.value, item.label.text, item, null, null, item);\n if (note.options.visible) {\n if (defined(note.options.position)) {\n if (options.vertical && !inArray(note.options.position, [\n LEFT,\n RIGHT\n ])) {\n note.options.position = options.reverse ? LEFT : RIGHT;\n } else if (!options.vertical && !inArray(note.options.position, [\n TOP,\n BOTTOM\n ])) {\n note.options.position = options.reverse ? BOTTOM : TOP;\n }\n } else {\n if (options.vertical) {\n note.options.position = options.reverse ? LEFT : RIGHT;\n } else {\n note.options.position = options.reverse ? BOTTOM : TOP;\n }\n }\n axis.append(note);\n axis.notes.push(note);\n }\n }\n },\n parseNoteValue: function (value) {\n return value;\n },\n renderVisual: function () {\n ChartElement.fn.renderVisual.call(this);\n this.createPlotBands();\n },\n createVisual: function () {\n ChartElement.fn.createVisual.call(this);\n this.createBackground();\n this.createLine();\n },\n gridLinesVisual: function () {\n var gridLines = this._gridLines;\n if (!gridLines) {\n gridLines = this._gridLines = new draw.Group({ zIndex: -2 });\n this.appendVisual(this._gridLines);\n }\n return gridLines;\n },\n createTicks: function (lineGroup) {\n var axis = this, options = axis.options, lineBox = axis.lineBox(), mirror = options.labels.mirror, majorUnit = options.majorTicks.visible ? options.majorUnit : 0, tickLineOptions = { vertical: options.vertical };\n function render(tickPositions, tickOptions, skipUnit) {\n var count = tickPositions.length;\n var step = math.max(1, tickOptions.step);\n if (tickOptions.visible) {\n for (var i = tickOptions.skip; i < count; i += step) {\n if (defined(skipUnit) && i % skipUnit === 0) {\n continue;\n }\n tickLineOptions.tickX = mirror ? lineBox.x2 : lineBox.x2 - tickOptions.size;\n tickLineOptions.tickY = mirror ? lineBox.y1 - tickOptions.size : lineBox.y1;\n tickLineOptions.position = tickPositions[i];\n lineGroup.append(createAxisTick(tickLineOptions, tickOptions));\n }\n }\n }\n render(axis.getMajorTickPositions(), options.majorTicks);\n render(axis.getMinorTickPositions(), options.minorTicks, majorUnit / options.minorUnit);\n },\n createLine: function () {\n var axis = this, options = axis.options, line = options.line, lineBox = axis.lineBox();\n if (line.width > 0 && line.visible) {\n var path = new draw.Path({\n stroke: {\n width: line.width,\n color: line.color,\n dashType: line.dashType\n }\n });\n path.moveTo(lineBox.x1, lineBox.y1).lineTo(lineBox.x2, lineBox.y2);\n if (options._alignLines) {\n alignPathToPixel(path);\n }\n var group = this._lineGroup = new draw.Group();\n group.append(path);\n this.visual.append(group);\n this.createTicks(group);\n }\n },\n getActualTickSize: function () {\n var axis = this, options = axis.options, tickSize = 0;\n if (options.majorTicks.visible && options.minorTicks.visible) {\n tickSize = math.max(options.majorTicks.size, options.minorTicks.size);\n } else if (options.majorTicks.visible) {\n tickSize = options.majorTicks.size;\n } else if (options.minorTicks.visible) {\n tickSize = options.minorTicks.size;\n }\n return tickSize;\n },\n createBackground: function () {\n var axis = this, options = axis.options, background = options.background, box = axis.box;\n if (background) {\n axis._backgroundPath = draw.Path.fromRect(box.toRect(), {\n fill: { color: background },\n stroke: null\n });\n this.visual.append(axis._backgroundPath);\n }\n },\n createPlotBands: function () {\n var axis = this, options = axis.options, plotBands = options.plotBands || [], vertical = options.vertical, plotArea = axis.plotArea, slotX, slotY, from, to;\n if (plotBands.length === 0) {\n return;\n }\n var group = this._plotbandGroup = new draw.Group({ zIndex: -1 });\n var altAxis = $.grep(axis.pane.axes, function (a) {\n return a.options.vertical !== axis.options.vertical;\n })[0];\n $.each(plotBands, function (i, item) {\n from = valueOrDefault(item.from, MIN_VALUE);\n to = valueOrDefault(item.to, MAX_VALUE);\n if (vertical) {\n slotX = (altAxis || plotArea.axisX).lineBox();\n slotY = axis.getSlot(item.from, item.to, true);\n } else {\n slotX = axis.getSlot(item.from, item.to, true);\n slotY = (altAxis || plotArea.axisY).lineBox();\n }\n if (slotX.width() !== 0 && slotY.height() !== 0) {\n var bandRect = new geom.Rect([\n slotX.x1,\n slotY.y1\n ], [\n slotX.width(),\n slotY.height()\n ]);\n var path = draw.Path.fromRect(bandRect, {\n fill: {\n color: item.color,\n opacity: item.opacity\n },\n stroke: null\n });\n group.append(path);\n }\n });\n axis.appendVisual(group);\n },\n createGridLines: function (altAxis) {\n var axis = this, options = axis.options, axisLineVisible = altAxis.options.line.visible, majorGridLines = options.majorGridLines, majorUnit = majorGridLines.visible ? options.majorUnit : 0, vertical = options.vertical, lineBox = altAxis.lineBox(), linePos = lineBox[vertical ? 'y1' : 'x1'], lineOptions = {\n lineStart: lineBox[vertical ? 'x1' : 'y1'],\n lineEnd: lineBox[vertical ? 'x2' : 'y2'],\n vertical: vertical\n }, pos, majorTicks = [];\n var container = this.gridLinesVisual();\n function render(tickPositions, gridLine, skipUnit) {\n var count = tickPositions.length;\n var step = math.max(1, gridLine.step);\n if (gridLine.visible) {\n for (var i = gridLine.skip; i < count; i += step) {\n pos = round(tickPositions[i]);\n if (!inArray(pos, majorTicks)) {\n if (i % skipUnit !== 0 && (!axisLineVisible || linePos !== pos)) {\n lineOptions.position = pos;\n container.append(createAxisGridLine(lineOptions, gridLine));\n majorTicks.push(pos);\n }\n }\n }\n }\n }\n render(axis.getMajorTickPositions(), options.majorGridLines);\n render(axis.getMinorTickPositions(), options.minorGridLines, majorUnit / options.minorUnit);\n return container.children;\n },\n reflow: function (box) {\n var axis = this, options = axis.options, vertical = options.vertical, labels = axis.labels, count = labels.length, title = axis.title, sizeFn = vertical ? WIDTH : HEIGHT, titleSize = title ? title.box[sizeFn]() : 0, space = axis.getActualTickSize() + options.margin + titleSize, maxLabelSize = 0, rootBox = (this.getRoot() || {}).box || box, boxSize = rootBox[sizeFn](), labelSize, i;\n for (i = 0; i < count; i++) {\n labelSize = labels[i].box[sizeFn]();\n if (labelSize + space <= boxSize) {\n maxLabelSize = math.max(maxLabelSize, labelSize);\n }\n }\n if (vertical) {\n axis.box = Box2D(box.x1, box.y1, box.x1 + maxLabelSize + space, box.y2);\n } else {\n axis.box = Box2D(box.x1, box.y1, box.x2, box.y1 + maxLabelSize + space);\n }\n axis.arrangeTitle();\n axis.arrangeLabels();\n axis.arrangeNotes();\n },\n getLabelsTickPositions: function () {\n return this.getMajorTickPositions();\n },\n labelTickIndex: function (label) {\n return label.index;\n },\n arrangeLabels: function () {\n var axis = this, options = axis.options, labels = axis.labels, labelsBetweenTicks = !options.justified, vertical = options.vertical, lineBox = axis.lineBox(), mirror = options.labels.mirror, tickPositions = axis.getLabelsTickPositions(), labelOffset = axis.getActualTickSize() + options.margin, labelBox, labelY, i;\n for (i = 0; i < labels.length; i++) {\n var label = labels[i], tickIx = axis.labelTickIndex(label), labelSize = vertical ? label.box.height() : label.box.width(), labelPos = tickPositions[tickIx] - labelSize / 2, firstTickPosition, nextTickPosition, middle, labelX;\n if (vertical) {\n if (labelsBetweenTicks) {\n firstTickPosition = tickPositions[tickIx];\n nextTickPosition = tickPositions[tickIx + 1];\n middle = firstTickPosition + (nextTickPosition - firstTickPosition) / 2;\n labelPos = middle - labelSize / 2;\n }\n labelX = lineBox.x2;\n if (mirror) {\n labelX += labelOffset;\n label.options.rotationOrigin = LEFT;\n } else {\n labelX -= labelOffset + label.box.width();\n label.options.rotationOrigin = RIGHT;\n }\n labelBox = label.box.move(labelX, labelPos);\n } else {\n if (labelsBetweenTicks) {\n firstTickPosition = tickPositions[tickIx];\n nextTickPosition = tickPositions[tickIx + 1];\n } else {\n firstTickPosition = labelPos;\n nextTickPosition = labelPos + labelSize;\n }\n labelY = lineBox.y1;\n if (mirror) {\n labelY -= labelOffset + label.box.height();\n label.options.rotationOrigin = BOTTOM;\n } else {\n labelY += labelOffset;\n label.options.rotationOrigin = TOP;\n }\n labelBox = Box2D(firstTickPosition, labelY, nextTickPosition, labelY + label.box.height());\n }\n label.reflow(labelBox);\n }\n },\n autoRotateLabels: function () {\n if (this.options.autoRotateLabels && !this.options.vertical) {\n var tickPositions = this.getMajorTickPositions();\n var labels = this.labels;\n var labelBox, angle, width, idx;\n for (idx = 0; idx < labels.length; idx++) {\n width = tickPositions[idx + 1] - tickPositions[idx];\n labelBox = labels[idx].box;\n if (labelBox.width() > width) {\n if (labelBox.height() > width) {\n angle = -90;\n break;\n }\n angle = -45;\n }\n }\n if (angle) {\n for (idx = 0; idx < labels.length; idx++) {\n labels[idx].options.rotation = angle;\n labels[idx].reflow(Box2D());\n }\n return true;\n }\n }\n },\n arrangeTitle: function () {\n var axis = this, options = axis.options, mirror = options.labels.mirror, vertical = options.vertical, title = axis.title;\n if (title) {\n if (vertical) {\n title.options.align = mirror ? RIGHT : LEFT;\n title.options.vAlign = title.options.position;\n } else {\n title.options.align = title.options.position;\n title.options.vAlign = mirror ? TOP : BOTTOM;\n }\n title.reflow(axis.box);\n }\n },\n arrangeNotes: function () {\n var axis = this, i, item, slot, value;\n for (i = 0; i < axis.notes.length; i++) {\n item = axis.notes[i];\n value = item.options.value;\n if (defined(value)) {\n if (axis.shouldRenderNote(value)) {\n item.show();\n } else {\n item.hide();\n }\n slot = axis.getSlot(value);\n } else {\n item.hide();\n }\n item.reflow(slot || axis.lineBox());\n }\n },\n alignTo: function (secondAxis) {\n var axis = this, lineBox = secondAxis.lineBox(), vertical = axis.options.vertical, pos = vertical ? Y : X;\n axis.box.snapTo(lineBox, pos);\n if (vertical) {\n axis.box.shrink(0, axis.lineBox().height() - lineBox.height());\n } else {\n axis.box.shrink(axis.lineBox().width() - lineBox.width(), 0);\n }\n axis.box[pos + 1] -= axis.lineBox()[pos + 1] - lineBox[pos + 1];\n axis.box[pos + 2] -= axis.lineBox()[pos + 2] - lineBox[pos + 2];\n },\n axisLabelText: function (value, dataItem, options) {\n var text = value;\n if (options.template) {\n var tmpl = template(options.template);\n text = tmpl({\n value: value,\n dataItem: dataItem,\n format: options.format,\n culture: options.culture\n });\n } else if (options.format) {\n if (options.format.match(FORMAT_REGEX)) {\n text = kendo.format(options.format, value);\n } else {\n text = kendo.toString(value, options.format, options.culture);\n }\n }\n return text;\n },\n slot: function (from, to, limit) {\n var slot = this.getSlot(from, to, limit);\n if (slot) {\n return slot.toRect();\n }\n },\n contentBox: function () {\n var box = this.box.clone();\n var labels = this.labels;\n if (labels.length) {\n if (labels[0].options.visible) {\n box.wrap(labels[0].box);\n }\n if (last(labels).options.visible) {\n box.wrap(last(labels).box);\n }\n }\n return box;\n },\n limitRange: function (from, to, min, max, offset) {\n var options = this.options;\n if (from < min && offset < 0 && (!defined(options.min) || options.min <= min) || max < to && offset > 0 && (!defined(options.max) || max <= options.max)) {\n return;\n }\n if (to < min && offset > 0 || max < from && offset < 0) {\n return {\n min: from,\n max: to\n };\n }\n var rangeSize = to - from;\n if (from < min) {\n from = util.limitValue(from, min, max);\n to = util.limitValue(from + rangeSize, min + rangeSize, max);\n } else if (to > max) {\n to = util.limitValue(to, min, max);\n from = util.limitValue(to - rangeSize, min, max - rangeSize);\n }\n return {\n min: from,\n max: to\n };\n },\n valueRange: function () {\n return {\n min: this.seriesMin,\n max: this.seriesMax\n };\n }\n });\n var Note = BoxElement.extend({\n init: function (value, text, dataItem, category, series, options) {\n var note = this;\n BoxElement.fn.init.call(note, options);\n note.value = value;\n note.text = text;\n note.dataItem = dataItem;\n note.category = category;\n note.series = series;\n note.render();\n },\n options: {\n icon: {\n visible: true,\n type: CIRCLE\n },\n label: {\n position: INSIDE,\n visible: true,\n align: CENTER,\n vAlign: CENTER\n },\n line: { visible: true },\n visible: true,\n position: TOP,\n zIndex: 2\n },\n hide: function () {\n this.options.visible = false;\n },\n show: function () {\n this.options.visible = true;\n },\n render: function () {\n var note = this, options = note.options, label = options.label, text = note.text, icon = options.icon, size = icon.size, box = Box2D(), marker, width, height, noteTemplate;\n if (options.visible) {\n if (defined(label) && label.visible) {\n if (label.template) {\n noteTemplate = template(label.template);\n text = noteTemplate({\n dataItem: note.dataItem,\n category: note.category,\n value: note.value,\n text: text,\n series: note.series\n });\n } else if (label.format) {\n text = autoFormat(label.format, text);\n }\n note.label = new TextBox(text, deepExtend({}, label));\n if (label.position === INSIDE && !defined(size)) {\n if (icon.type === CIRCLE) {\n size = math.max(note.label.box.width(), note.label.box.height());\n } else {\n width = note.label.box.width();\n height = note.label.box.height();\n }\n box.wrap(note.label.box);\n }\n }\n icon.width = width || size || DEFAULT_ICON_SIZE;\n icon.height = height || size || DEFAULT_ICON_SIZE;\n marker = new ShapeElement(deepExtend({}, icon));\n note.marker = marker;\n note.append(marker);\n if (note.label) {\n note.append(note.label);\n }\n marker.reflow(Box2D());\n note.wrapperBox = box.wrap(marker.box);\n }\n },\n reflow: function (targetBox) {\n var note = this, options = note.options, center = targetBox.center(), wrapperBox = note.wrapperBox, length = options.line.length, position = options.position, label = note.label, marker = note.marker, lineStart, box, contentBox;\n if (options.visible) {\n if (inArray(position, [\n LEFT,\n RIGHT\n ])) {\n if (position === LEFT) {\n contentBox = wrapperBox.alignTo(targetBox, position).translate(-length, targetBox.center().y - wrapperBox.center().y);\n if (options.line.visible) {\n lineStart = [\n targetBox.x1,\n center.y\n ];\n note.linePoints = [\n lineStart,\n [\n contentBox.x2,\n center.y\n ]\n ];\n box = contentBox.clone().wrapPoint(lineStart);\n }\n } else {\n contentBox = wrapperBox.alignTo(targetBox, position).translate(length, targetBox.center().y - wrapperBox.center().y);\n if (options.line.visible) {\n lineStart = [\n targetBox.x2,\n center.y\n ];\n note.linePoints = [\n lineStart,\n [\n contentBox.x1,\n center.y\n ]\n ];\n box = contentBox.clone().wrapPoint(lineStart);\n }\n }\n } else {\n if (position === BOTTOM) {\n contentBox = wrapperBox.alignTo(targetBox, position).translate(targetBox.center().x - wrapperBox.center().x, length);\n if (options.line.visible) {\n lineStart = [\n center.x,\n targetBox.y2\n ];\n note.linePoints = [\n lineStart,\n [\n center.x,\n contentBox.y1\n ]\n ];\n box = contentBox.clone().wrapPoint(lineStart);\n }\n } else {\n contentBox = wrapperBox.alignTo(targetBox, position).translate(targetBox.center().x - wrapperBox.center().x, -length);\n if (options.line.visible) {\n lineStart = [\n center.x,\n targetBox.y1\n ];\n note.linePoints = [\n lineStart,\n [\n center.x,\n contentBox.y2\n ]\n ];\n box = contentBox.clone().wrapPoint(lineStart);\n }\n }\n }\n if (marker) {\n marker.reflow(contentBox);\n }\n if (label) {\n label.reflow(contentBox);\n if (marker) {\n if (options.label.position === OUTSIDE) {\n label.box.alignTo(marker.box, position);\n }\n label.reflow(label.box);\n }\n }\n note.contentBox = contentBox;\n note.targetBox = targetBox;\n note.box = box || contentBox;\n }\n },\n createVisual: function () {\n BoxElement.fn.createVisual.call(this);\n this.visual.options.noclip = this.options.noclip;\n if (this.options.visible) {\n this.createLine();\n }\n },\n renderVisual: function () {\n var that = this;\n var options = that.options;\n var customVisual = options.visual;\n if (options.visible && customVisual) {\n that.visual = customVisual({\n dataItem: that.dataItem,\n category: that.category,\n value: that.value,\n text: that.text,\n sender: that.getChart(),\n series: that.series,\n rect: that.targetBox.toRect(),\n options: {\n background: options.background,\n border: options.background,\n icon: options.icon,\n label: options.label,\n line: options.line,\n position: options.position,\n visible: options.visible\n },\n createVisual: function () {\n that.createVisual();\n that.renderChildren();\n var defaultVisual = that.visual;\n delete that.visual;\n return defaultVisual;\n }\n });\n that.addVisual();\n } else {\n BoxElement.fn.renderVisual.call(that);\n }\n },\n createLine: function () {\n var options = this.options.line;\n if (this.linePoints) {\n var path = draw.Path.fromPoints(this.linePoints, {\n stroke: {\n color: options.color,\n width: options.width,\n dashType: options.dashType\n }\n });\n alignPathToPixel(path);\n this.visual.append(path);\n }\n },\n click: function (widget, e) {\n var args = this.eventArgs(e);\n if (!widget.trigger(NOTE_CLICK, args)) {\n e.preventDefault();\n }\n },\n hover: function (widget, e) {\n var args = this.eventArgs(e);\n if (!widget.trigger(NOTE_HOVER, args)) {\n e.preventDefault();\n }\n },\n leave: function (widget) {\n widget._unsetActivePoint();\n },\n eventArgs: function (e) {\n var note = this, options = note.options;\n return {\n element: eventTargetElement(e),\n text: defined(options.label) ? options.label.text : '',\n dataItem: note.dataItem,\n series: note.series,\n value: note.value,\n category: note.category,\n visual: note.visual\n };\n }\n });\n var ShapeElement = BoxElement.extend({\n init: function (options, pointData) {\n this.pointData = pointData;\n BoxElement.fn.init.call(this, options);\n },\n options: {\n type: CIRCLE,\n align: CENTER,\n vAlign: CENTER\n },\n getElement: function () {\n var marker = this, options = marker.options, type = options.type, rotation = options.rotation, box = marker.paddingBox, element, center = box.center(), halfWidth = box.width() / 2;\n if (!options.visible || !marker.hasBox()) {\n return;\n }\n var style = marker.visualStyle();\n if (type === CIRCLE) {\n element = new draw.Circle(new geom.Circle([\n round(box.x1 + halfWidth, COORD_PRECISION),\n round(box.y1 + box.height() / 2, COORD_PRECISION)\n ], halfWidth), style);\n } else if (type === TRIANGLE) {\n element = draw.Path.fromPoints([\n [\n box.x1 + halfWidth,\n box.y1\n ],\n [\n box.x1,\n box.y2\n ],\n [\n box.x2,\n box.y2\n ]\n ], style).close();\n } else if (type === CROSS) {\n element = new draw.MultiPath(style);\n element.moveTo(box.x1, box.y1).lineTo(box.x2, box.y2);\n element.moveTo(box.x1, box.y2).lineTo(box.x2, box.y1);\n } else {\n element = draw.Path.fromRect(box.toRect(), style);\n }\n if (rotation) {\n element.transform(geom.transform().rotate(-rotation, [\n center.x,\n center.y\n ]));\n }\n element.options.zIndex = this.options.zIndex;\n return element;\n },\n createElement: function () {\n var that = this;\n var customVisual = that.options.visual;\n var pointData = that.pointData || {};\n var visual;\n if (customVisual) {\n visual = customVisual({\n value: pointData.value,\n dataItem: pointData.dataItem,\n sender: that.getChart(),\n series: pointData.series,\n category: pointData.category,\n rect: that.paddingBox.toRect(),\n options: that.visualOptions(),\n createVisual: function () {\n return that.getElement();\n }\n });\n } else {\n visual = that.getElement();\n }\n return visual;\n },\n visualOptions: function () {\n var options = this.options;\n return {\n background: options.background,\n border: options.border,\n margin: options.margin,\n padding: options.padding,\n type: options.type,\n size: options.width,\n visible: options.visible\n };\n },\n createVisual: function () {\n this.visual = this.createElement();\n }\n });\n var NumericAxis = Axis.extend({\n init: function (seriesMin, seriesMax, options) {\n var axis = this, defaultOptions = axis.initDefaults(seriesMin, seriesMax, options);\n this.seriesMin = seriesMin;\n this.seriesMax = seriesMax;\n Axis.fn.init.call(axis, defaultOptions);\n },\n startValue: function () {\n return 0;\n },\n options: {\n type: 'numeric',\n min: 0,\n max: 1,\n vertical: true,\n majorGridLines: {\n visible: true,\n width: 1,\n color: BLACK\n },\n labels: { format: '#.####################' },\n zIndex: 1\n },\n initDefaults: function (seriesMin, seriesMax, options) {\n var axis = this, narrowRange = options.narrowRange, autoMin = axis.autoAxisMin(seriesMin, seriesMax, narrowRange), autoMax = axis.autoAxisMax(seriesMin, seriesMax, narrowRange), majorUnit = autoMajorUnit(autoMin, autoMax), autoOptions = { majorUnit: majorUnit }, userSetLimits;\n if (options.roundToMajorUnit !== false) {\n if (autoMin < 0 && remainderClose(autoMin, majorUnit, 1 / 3)) {\n autoMin -= majorUnit;\n }\n if (autoMax > 0 && remainderClose(autoMax, majorUnit, 1 / 3)) {\n autoMax += majorUnit;\n }\n }\n autoOptions.min = floor(autoMin, majorUnit);\n autoOptions.max = ceil(autoMax, majorUnit);\n this.totalMin = defined(options.min) ? math.min(autoOptions.min, options.min) : autoOptions.min;\n this.totalMax = defined(options.max) ? math.max(autoOptions.max, options.max) : autoOptions.max;\n this.totalMajorUnit = majorUnit;\n if (options) {\n userSetLimits = defined(options.min) || defined(options.max);\n if (userSetLimits) {\n if (options.min === options.max) {\n if (options.min > 0) {\n options.min = 0;\n } else {\n options.max = 1;\n }\n }\n }\n if (options.majorUnit) {\n autoOptions.min = floor(autoOptions.min, options.majorUnit);\n autoOptions.max = ceil(autoOptions.max, options.majorUnit);\n } else if (userSetLimits) {\n options = deepExtend(autoOptions, options);\n autoOptions.majorUnit = autoMajorUnit(options.min, options.max);\n }\n }\n autoOptions.minorUnit = (options.majorUnit || autoOptions.majorUnit) / 5;\n return deepExtend(autoOptions, options);\n },\n range: function () {\n var options = this.options;\n return {\n min: options.min,\n max: options.max\n };\n },\n autoAxisMax: function (min, max, narrow) {\n var axisMax, diff;\n if (!min && !max) {\n return 1;\n }\n if (min <= 0 && max <= 0) {\n max = min == max ? 0 : max;\n diff = math.abs((max - min) / max);\n if (narrow === false || !narrow && diff > ZERO_THRESHOLD) {\n return 0;\n }\n axisMax = math.min(0, max - (min - max) / 2);\n } else {\n min = min == max ? 0 : min;\n axisMax = max;\n }\n return axisMax;\n },\n autoAxisMin: function (min, max, narrow) {\n var axisMin, diff;\n if (!min && !max) {\n return 0;\n }\n if (min >= 0 && max >= 0) {\n min = min == max ? 0 : min;\n diff = (max - min) / max;\n if (narrow === false || !narrow && diff > ZERO_THRESHOLD) {\n return 0;\n }\n axisMin = math.max(0, min - (max - min) / 2);\n } else {\n max = min == max ? 0 : max;\n axisMin = min;\n }\n return axisMin;\n },\n getDivisions: function (stepValue) {\n if (stepValue === 0) {\n return 1;\n }\n var options = this.options, range = options.max - options.min;\n return math.floor(round(range / stepValue, COORD_PRECISION)) + 1;\n },\n getTickPositions: function (unit, skipUnit) {\n var axis = this, options = axis.options, vertical = options.vertical, reverse = options.reverse, lineBox = axis.lineBox(), lineSize = vertical ? lineBox.height() : lineBox.width(), range = options.max - options.min, scale = lineSize / range, step = unit * scale, skipStep = 0, divisions = axis.getDivisions(unit), dir = (vertical ? -1 : 1) * (reverse ? -1 : 1), startEdge = dir === 1 ? 1 : 2, pos = lineBox[(vertical ? Y : X) + startEdge], positions = [], i;\n if (skipUnit) {\n skipStep = skipUnit / unit;\n }\n for (i = 0; i < divisions; i++) {\n if (i % skipStep !== 0) {\n positions.push(round(pos, COORD_PRECISION));\n }\n pos = pos + step * dir;\n }\n return positions;\n },\n getMajorTickPositions: function () {\n var axis = this;\n return axis.getTickPositions(axis.options.majorUnit);\n },\n getMinorTickPositions: function () {\n var axis = this;\n return axis.getTickPositions(axis.options.minorUnit);\n },\n getSlot: function (a, b, limit) {\n var axis = this, options = axis.options, reverse = options.reverse, vertical = options.vertical, valueAxis = vertical ? Y : X, lineBox = axis.lineBox(), lineStart = lineBox[valueAxis + (reverse ? 2 : 1)], lineSize = vertical ? lineBox.height() : lineBox.width(), dir = reverse ? -1 : 1, step = dir * (lineSize / (options.max - options.min)), p1, p2, slotBox = new Box2D(lineBox.x1, lineBox.y1, lineBox.x1, lineBox.y1);\n if (!defined(a)) {\n a = b || 0;\n }\n if (!defined(b)) {\n b = a || 0;\n }\n if (limit) {\n a = math.max(math.min(a, options.max), options.min);\n b = math.max(math.min(b, options.max), options.min);\n }\n if (vertical) {\n p1 = options.max - math.max(a, b);\n p2 = options.max - math.min(a, b);\n } else {\n p1 = math.min(a, b) - options.min;\n p2 = math.max(a, b) - options.min;\n }\n slotBox[valueAxis + 1] = limitCoordinate(lineStart + step * (reverse ? p2 : p1));\n slotBox[valueAxis + 2] = limitCoordinate(lineStart + step * (reverse ? p1 : p2));\n return slotBox;\n },\n getValue: function (point) {\n var axis = this, options = axis.options, reverse = options.reverse, vertical = options.vertical, max = options.max * 1, min = options.min * 1, valueAxis = vertical ? Y : X, lineBox = axis.lineBox(), lineStart = lineBox[valueAxis + (reverse ? 2 : 1)], lineSize = vertical ? lineBox.height() : lineBox.width(), dir = reverse ? -1 : 1, offset = dir * (point[valueAxis] - lineStart), step = (max - min) / lineSize, valueOffset = offset * step, value;\n if (offset < 0 || offset > lineSize) {\n return null;\n }\n value = vertical ? max - valueOffset : min + valueOffset;\n return round(value, DEFAULT_PRECISION);\n },\n translateRange: function (delta) {\n var axis = this, options = axis.options, lineBox = axis.lineBox(), vertical = options.vertical, reverse = options.reverse, size = vertical ? lineBox.height() : lineBox.width(), range = options.max - options.min, scale = size / range, offset = round(delta / scale, DEFAULT_PRECISION);\n if ((vertical || reverse) && !(vertical && reverse)) {\n offset = -offset;\n }\n return {\n min: options.min + offset,\n max: options.max + offset\n };\n },\n scaleRange: function (delta) {\n var axis = this, options = axis.options, offset = -delta * options.majorUnit;\n return {\n min: options.min - offset,\n max: options.max + offset\n };\n },\n labelsCount: function () {\n return this.getDivisions(this.options.majorUnit);\n },\n createAxisLabel: function (index, labelOptions) {\n var axis = this, options = axis.options, value = round(options.min + index * options.majorUnit, DEFAULT_PRECISION), text = axis.axisLabelText(value, null, labelOptions);\n return new AxisLabel(value, text, index, null, labelOptions);\n },\n shouldRenderNote: function (value) {\n var range = this.range();\n return range.min <= value && value <= range.max;\n },\n pan: function (delta) {\n var range = this.translateRange(delta);\n return this.limitRange(range.min, range.max, this.totalMin, this.totalMax);\n },\n pointsRange: function (start, end) {\n var startValue = this.getValue(start);\n var endValue = this.getValue(end);\n var min = math.min(startValue, endValue);\n var max = math.max(startValue, endValue);\n if (this.isValidRange(min, max)) {\n return {\n min: min,\n max: max\n };\n }\n },\n zoomRange: function (delta) {\n var newRange = this.scaleRange(delta);\n var totalMax = this.totalMax;\n var totalMin = this.totalMin;\n var min = util.limitValue(newRange.min, totalMin, totalMax);\n var max = util.limitValue(newRange.max, totalMin, totalMax);\n if (this.isValidRange(min, max)) {\n return {\n min: min,\n max: max\n };\n }\n },\n isValidRange: function (min, max) {\n return max - min > MIN_VALUE_RANGE;\n }\n });\n var LogarithmicAxis = Axis.extend({\n init: function (seriesMin, seriesMax, options) {\n this.options = this._initOptions(seriesMin, seriesMax, options);\n this.seriesMin = seriesMin;\n this.seriesMax = seriesMax;\n Axis.fn.init.call(this, options);\n },\n startValue: function () {\n return this.options.min;\n },\n options: {\n type: 'log',\n majorUnit: 10,\n minorUnit: 1,\n axisCrossingValue: 1,\n vertical: true,\n majorGridLines: {\n visible: true,\n width: 1,\n color: BLACK\n },\n zIndex: 1\n },\n getSlot: function (a, b, limit) {\n var axis = this, options = axis.options, reverse = options.reverse, vertical = options.vertical, valueAxis = vertical ? Y : X, lineBox = axis.lineBox(), lineStart = lineBox[valueAxis + (reverse ? 2 : 1)], lineSize = vertical ? lineBox.height() : lineBox.width(), dir = reverse ? -1 : 1, base = options.majorUnit, logMin = axis.logMin, logMax = axis.logMax, step = dir * (lineSize / (logMax - logMin)), p1, p2, slotBox = new Box2D(lineBox.x1, lineBox.y1, lineBox.x1, lineBox.y1);\n if (!defined(a)) {\n a = b || 1;\n }\n if (!defined(b)) {\n b = a || 1;\n }\n if (a <= 0 || b <= 0) {\n return;\n }\n if (limit) {\n a = math.max(math.min(a, options.max), options.min);\n b = math.max(math.min(b, options.max), options.min);\n }\n a = log(a, base);\n b = log(b, base);\n if (vertical) {\n p1 = logMax - math.max(a, b);\n p2 = logMax - math.min(a, b);\n } else {\n p1 = math.min(a, b) - logMin;\n p2 = math.max(a, b) - logMin;\n }\n slotBox[valueAxis + 1] = limitCoordinate(lineStart + step * (reverse ? p2 : p1));\n slotBox[valueAxis + 2] = limitCoordinate(lineStart + step * (reverse ? p1 : p2));\n return slotBox;\n },\n getValue: function (point) {\n var axis = this, options = axis.options, reverse = options.reverse, vertical = options.vertical, lineBox = axis.lineBox(), base = options.majorUnit, logMin = axis.logMin, logMax = axis.logMax, dir = vertical === reverse ? 1 : -1, startEdge = dir === 1 ? 1 : 2, lineSize = vertical ? lineBox.height() : lineBox.width(), step = (logMax - logMin) / lineSize, valueAxis = vertical ? Y : X, lineStart = lineBox[valueAxis + startEdge], offset = dir * (point[valueAxis] - lineStart), valueOffset = offset * step, value;\n if (offset < 0 || offset > lineSize) {\n return null;\n }\n value = logMin + valueOffset;\n return round(math.pow(base, value), DEFAULT_PRECISION);\n },\n range: function () {\n var options = this.options;\n return {\n min: options.min,\n max: options.max\n };\n },\n scaleRange: function (delta) {\n var axis = this, options = axis.options, base = options.majorUnit, offset = -delta;\n return {\n min: math.pow(base, axis.logMin - offset),\n max: math.pow(base, axis.logMax + offset)\n };\n },\n translateRange: function (delta) {\n var axis = this, options = axis.options, base = options.majorUnit, lineBox = axis.lineBox(), vertical = options.vertical, reverse = options.reverse, size = vertical ? lineBox.height() : lineBox.width(), scale = size / (axis.logMax - axis.logMin), offset = round(delta / scale, DEFAULT_PRECISION);\n if ((vertical || reverse) && !(vertical && reverse)) {\n offset = -offset;\n }\n return {\n min: math.pow(base, axis.logMin + offset),\n max: math.pow(base, axis.logMax + offset)\n };\n },\n labelsCount: function () {\n var axis = this, floorMax = math.floor(axis.logMax), count = math.floor(floorMax - axis.logMin) + 1;\n return count;\n },\n getMajorTickPositions: function () {\n var axis = this, ticks = [];\n axis.traverseMajorTicksPositions(function (position) {\n ticks.push(position);\n }, {\n step: 1,\n skip: 0\n });\n return ticks;\n },\n createTicks: function (lineGroup) {\n var axis = this, ticks = [], options = axis.options, lineBox = axis.lineBox(), mirror = options.labels.mirror, majorTicks = options.majorTicks, minorTicks = options.minorTicks, tickLineOptions = { vertical: options.vertical };\n function render(tickPosition, tickOptions) {\n tickLineOptions.tickX = mirror ? lineBox.x2 : lineBox.x2 - tickOptions.size;\n tickLineOptions.tickY = mirror ? lineBox.y1 - tickOptions.size : lineBox.y1;\n tickLineOptions.position = tickPosition;\n lineGroup.append(createAxisTick(tickLineOptions, tickOptions));\n }\n if (majorTicks.visible) {\n axis.traverseMajorTicksPositions(render, majorTicks);\n }\n if (minorTicks.visible) {\n axis.traverseMinorTicksPositions(render, minorTicks);\n }\n return ticks;\n },\n createGridLines: function (altAxis) {\n var axis = this, options = axis.options, majorGridLines = options.majorGridLines, minorGridLines = options.minorGridLines, vertical = options.vertical, lineBox = altAxis.lineBox(), lineOptions = {\n lineStart: lineBox[vertical ? 'x1' : 'y1'],\n lineEnd: lineBox[vertical ? 'x2' : 'y2'],\n vertical: vertical\n }, majorTicks = [];\n var container = this.gridLinesVisual();\n function render(tickPosition, gridLine) {\n if (!inArray(tickPosition, majorTicks)) {\n lineOptions.position = tickPosition;\n container.append(createAxisGridLine(lineOptions, gridLine));\n majorTicks.push(tickPosition);\n }\n }\n if (majorGridLines.visible) {\n axis.traverseMajorTicksPositions(render, majorGridLines);\n }\n if (minorGridLines.visible) {\n axis.traverseMinorTicksPositions(render, minorGridLines);\n }\n return container.children;\n },\n traverseMajorTicksPositions: function (callback, tickOptions) {\n var axis = this, lineOptions = axis._lineOptions(), lineStart = lineOptions.lineStart, step = lineOptions.step, logMin = axis.logMin, logMax = axis.logMax, power, position;\n for (power = math.ceil(logMin) + tickOptions.skip; power <= logMax; power += tickOptions.step) {\n position = round(lineStart + step * (power - logMin), DEFAULT_PRECISION);\n callback(position, tickOptions);\n }\n },\n traverseMinorTicksPositions: function (callback, tickOptions) {\n var axis = this, options = axis.options, lineOptions = axis._lineOptions(), lineStart = lineOptions.lineStart, lineStep = lineOptions.step, base = options.majorUnit, logMin = axis.logMin, logMax = axis.logMax, start = math.floor(logMin), max = options.max, min = options.min, minorUnit = options.minorUnit, power, value, position, minorOptions;\n for (power = start; power < logMax; power++) {\n minorOptions = axis._minorIntervalOptions(power);\n for (var idx = tickOptions.skip; idx < minorUnit; idx += tickOptions.step) {\n value = minorOptions.value + idx * minorOptions.minorStep;\n if (value > max) {\n break;\n }\n if (value >= min) {\n position = round(lineStart + lineStep * (log(value, base) - logMin), DEFAULT_PRECISION);\n callback(position, tickOptions);\n }\n }\n }\n },\n createAxisLabel: function (index, labelOptions) {\n var axis = this, options = axis.options, power = math.ceil(axis.logMin + index), value = Math.pow(options.majorUnit, power), text = axis.axisLabelText(value, null, labelOptions);\n return new AxisLabel(value, text, index, null, labelOptions);\n },\n shouldRenderNote: function (value) {\n var range = this.range();\n return range.min <= value && value <= range.max;\n },\n _throwNegativeValuesError: function () {\n throw new Error('Non positive values cannot be used for a logarithmic axis');\n },\n _initOptions: function (seriesMin, seriesMax, options) {\n var axis = this, axisOptions = deepExtend({}, axis.options, {\n min: seriesMin,\n max: seriesMax\n }, options), min = axisOptions.min, max = axisOptions.max, base = axisOptions.majorUnit, autoMax = this._autoMax(seriesMax, base), autoMin = this._autoMin(seriesMin, seriesMax, axisOptions);\n if (axisOptions.axisCrossingValue <= 0) {\n axis._throwNegativeValuesError();\n }\n if (!defined(options.max)) {\n max = autoMax;\n } else if (options.max <= 0) {\n axis._throwNegativeValuesError();\n }\n if (!defined(options.min)) {\n min = autoMin;\n } else if (options.min <= 0) {\n axis._throwNegativeValuesError();\n }\n this.totalMin = defined(options.min) ? math.min(autoMin, options.min) : autoMin;\n this.totalMax = defined(options.max) ? math.max(autoMax, options.max) : autoMax;\n axis.logMin = round(log(min, base), DEFAULT_PRECISION);\n axis.logMax = round(log(max, base), DEFAULT_PRECISION);\n axisOptions.max = max;\n axisOptions.min = min;\n axisOptions.minorUnit = options.minorUnit || round(base - 1, DEFAULT_PRECISION);\n return axisOptions;\n },\n _autoMin: function (min, max, options) {\n var autoMin = min;\n var base = options.majorUnit;\n if (min <= 0) {\n autoMin = max <= 1 ? math.pow(base, -2) : 1;\n } else if (!options.narrowRange) {\n autoMin = math.pow(base, math.floor(log(min, base)));\n }\n return autoMin;\n },\n _autoMax: function (max, base) {\n var logMaxRemainder = round(log(max, base), DEFAULT_PRECISION) % 1;\n var autoMax;\n if (max <= 0) {\n autoMax = base;\n } else if (logMaxRemainder !== 0 && (logMaxRemainder < 0.3 || logMaxRemainder > 0.9)) {\n autoMax = math.pow(base, log(max, base) + 0.2);\n } else {\n autoMax = math.pow(base, math.ceil(log(max, base)));\n }\n return autoMax;\n },\n pan: function (delta) {\n var range = this.translateRange(delta);\n return this.limitRange(range.min, range.max, this.totalMin, this.totalMax, -delta);\n },\n pointsRange: function (start, end) {\n var startValue = this.getValue(start);\n var endValue = this.getValue(end);\n var min = math.min(startValue, endValue);\n var max = math.max(startValue, endValue);\n return {\n min: min,\n max: max\n };\n },\n zoomRange: function (delta) {\n var options = this.options;\n var newRange = this.scaleRange(delta);\n var totalMax = this.totalMax;\n var totalMin = this.totalMin;\n var min = util.limitValue(newRange.min, totalMin, totalMax);\n var max = util.limitValue(newRange.max, totalMin, totalMax);\n var base = options.majorUnit;\n var acceptOptionsRange = max > min && options.min && options.max && round(log(options.max, base) - log(options.min, base), DEFAULT_PRECISION) < 1;\n var acceptNewRange = !(options.min === totalMin && options.max === totalMax) && round(log(max, base) - log(min, base), DEFAULT_PRECISION) >= 1;\n if (acceptOptionsRange || acceptNewRange) {\n return {\n min: min,\n max: max\n };\n }\n },\n _minorIntervalOptions: function (power) {\n var base = this.options.majorUnit, value = math.pow(base, power), nextValue = math.pow(base, power + 1), difference = nextValue - value, minorStep = difference / this.options.minorUnit;\n return {\n value: value,\n minorStep: minorStep\n };\n },\n _lineOptions: function () {\n var axis = this, options = axis.options, reverse = options.reverse, vertical = options.vertical, valueAxis = vertical ? Y : X, lineBox = axis.lineBox(), dir = vertical === reverse ? 1 : -1, startEdge = dir === 1 ? 1 : 2, lineSize = vertical ? lineBox.height() : lineBox.width(), step = dir * (lineSize / (axis.logMax - axis.logMin)), lineStart = lineBox[valueAxis + startEdge];\n return {\n step: step,\n lineStart: lineStart,\n lineBox: lineBox\n };\n }\n });\n dataviz.Gradients = {\n glass: {\n type: LINEAR,\n rotation: 0,\n stops: [\n {\n offset: 0,\n color: WHITE,\n opacity: 0\n },\n {\n offset: 0.25,\n color: WHITE,\n opacity: 0.3\n },\n {\n offset: 1,\n color: WHITE,\n opacity: 0\n }\n ]\n },\n sharpBevel: {\n type: RADIAL,\n stops: [\n {\n offset: 0,\n color: WHITE,\n opacity: 0.55\n },\n {\n offset: 0.65,\n color: WHITE,\n opacity: 0\n },\n {\n offset: 0.95,\n color: WHITE,\n opacity: 0.25\n }\n ]\n },\n roundedBevel: {\n type: RADIAL,\n stops: [\n {\n offset: 0.33,\n color: WHITE,\n opacity: 0.06\n },\n {\n offset: 0.83,\n color: WHITE,\n opacity: 0.2\n },\n {\n offset: 0.95,\n color: WHITE,\n opacity: 0\n }\n ]\n },\n roundedGlass: {\n type: RADIAL,\n supportVML: false,\n stops: [\n {\n offset: 0,\n color: WHITE,\n opacity: 0\n },\n {\n offset: 0.5,\n color: WHITE,\n opacity: 0.3\n },\n {\n offset: 0.99,\n color: WHITE,\n opacity: 0\n }\n ]\n },\n sharpGlass: {\n type: RADIAL,\n supportVML: false,\n stops: [\n {\n offset: 0,\n color: WHITE,\n opacity: 0.2\n },\n {\n offset: 0.15,\n color: WHITE,\n opacity: 0.15\n },\n {\n offset: 0.17,\n color: WHITE,\n opacity: 0.35\n },\n {\n offset: 0.85,\n color: WHITE,\n opacity: 0.05\n },\n {\n offset: 0.87,\n color: WHITE,\n opacity: 0.15\n },\n {\n offset: 0.99,\n color: WHITE,\n opacity: 0\n }\n ]\n }\n };\n var ExportMixin = {\n extend: function (proto, skipLegacy) {\n if (!proto.exportVisual) {\n throw new Error('Mixin target has no exportVisual method defined.');\n }\n proto.exportSVG = this.exportSVG;\n proto.exportImage = this.exportImage;\n proto.exportPDF = this.exportPDF;\n if (!skipLegacy) {\n proto.svg = this.svg;\n proto.imageDataURL = this.imageDataURL;\n }\n },\n exportSVG: function (options) {\n return draw.exportSVG(this.exportVisual(), options);\n },\n exportImage: function (options) {\n return draw.exportImage(this.exportVisual(options), options);\n },\n exportPDF: function (options) {\n return draw.exportPDF(this.exportVisual(), options);\n },\n svg: function () {\n if (draw.svg.Surface) {\n return draw.svg._exportGroup(this.exportVisual());\n } else {\n throw new Error('SVG Export failed. Unable to export instantiate kendo.drawing.svg.Surface');\n }\n },\n imageDataURL: function () {\n if (!kendo.support.canvas) {\n return null;\n }\n if (draw.canvas.Surface) {\n var container = $('').css({\n display: 'none',\n width: this.element.width(),\n height: this.element.height()\n }).appendTo(document.body);\n var surface = new draw.canvas.Surface(container);\n surface.draw(this.exportVisual());\n var image = surface._rootElement.toDataURL();\n surface.destroy();\n container.remove();\n return image;\n } else {\n throw new Error('Image Export failed. Unable to export instantiate kendo.drawing.canvas.Surface');\n }\n }\n };\n function autoMajorUnit(min, max) {\n var diff = round(max - min, DEFAULT_PRECISION - 1);\n if (diff === 0) {\n if (max === 0) {\n return 0.1;\n }\n diff = math.abs(max);\n }\n var scale = math.pow(10, math.floor(math.log(diff) / math.log(10))), relativeValue = round(diff / scale, DEFAULT_PRECISION), scaleMultiplier = 1;\n if (relativeValue < 1.904762) {\n scaleMultiplier = 0.2;\n } else if (relativeValue < 4.761904) {\n scaleMultiplier = 0.5;\n } else if (relativeValue < 9.523809) {\n scaleMultiplier = 1;\n } else {\n scaleMultiplier = 2;\n }\n return round(scale * scaleMultiplier, DEFAULT_PRECISION);\n }\n function rotatePoint(x, y, cx, cy, angle) {\n var theta = angle * DEG_TO_RAD;\n return new Point2D(cx + (x - cx) * math.cos(theta) + (y - cy) * math.sin(theta), cy - (x - cx) * math.sin(theta) + (y - cy) * math.cos(theta));\n }\n function boxDiff(r, s) {\n if (r.x1 == s.x1 && r.y1 == s.y1 && r.x2 == s.x2 && r.y2 == s.y2) {\n return s;\n }\n var a = math.min(r.x1, s.x1), b = math.max(r.x1, s.x1), c = math.min(r.x2, s.x2), d = math.max(r.x2, s.x2), e = math.min(r.y1, s.y1), f = math.max(r.y1, s.y1), g = math.min(r.y2, s.y2), h = math.max(r.y2, s.y2), result = [];\n result[0] = Box2D(b, e, c, f);\n result[1] = Box2D(a, f, b, g);\n result[2] = Box2D(c, f, d, g);\n result[3] = Box2D(b, g, c, h);\n if (r.x1 == a && r.y1 == e || s.x1 == a && s.y1 == e) {\n result[4] = Box2D(a, e, b, f);\n result[5] = Box2D(c, g, d, h);\n } else {\n result[4] = Box2D(c, e, d, f);\n result[5] = Box2D(a, g, b, h);\n }\n return $.grep(result, function (box) {\n return box.height() > 0 && box.width() > 0;\n })[0];\n }\n function inArray(value, array) {\n return indexOf(value, array) != -1;\n }\n function ceil(value, step) {\n return round(math.ceil(value / step) * step, DEFAULT_PRECISION);\n }\n function floor(value, step) {\n return round(math.floor(value / step) * step, DEFAULT_PRECISION);\n }\n function round(value, precision) {\n var power = math.pow(10, precision || 0);\n return math.round(value * power) / power;\n }\n function log(y, x) {\n return math.log(y) / math.log(x);\n }\n function remainderClose(value, divisor, ratio) {\n var remainder = round(math.abs(value % divisor), DEFAULT_PRECISION), threshold = divisor * (1 - ratio);\n return remainder === 0 || remainder > threshold;\n }\n function interpolateValue(start, end, progress) {\n return round(start + (end - start) * progress, COORD_PRECISION);\n }\n function numericComparer(a, b) {\n return a - b;\n }\n function autoFormat(format, value) {\n if (format.match(FORMAT_REGEX)) {\n return kendo.format.apply(this, arguments);\n }\n return kendo.toString(value, format);\n }\n function clockwise(v1, v2) {\n return -v1.x * v2.y + v1.y * v2.x < 0;\n }\n function dateComparer(a, b) {\n if (a && b) {\n return a.getTime() - b.getTime();\n }\n return -1;\n }\n var CurveProcessor = function (closed) {\n this.closed = closed;\n };\n CurveProcessor.prototype = CurveProcessor.fn = {\n WEIGHT: 0.333,\n EXTREMUM_ALLOWED_DEVIATION: 0.01,\n process: function (dataPoints) {\n var that = this, closed = that.closed, points = dataPoints.slice(0), length = points.length, segments = [], p0, p1, p2, controlPoints, initialControlPoint, lastControlPoint, tangent;\n if (length > 2) {\n that.removeDuplicates(0, points);\n length = points.length;\n }\n if (length < 2 || length == 2 && points[0].equals(points[1])) {\n return segments;\n }\n p0 = points[0];\n p1 = points[1];\n p2 = points[2];\n segments.push(new draw.Segment(p0));\n while (p0.equals(points[length - 1])) {\n closed = true;\n points.pop();\n length--;\n }\n if (length == 2) {\n tangent = that.tangent(p0, p1, X, Y);\n last(segments).controlOut(that.firstControlPoint(tangent, p0, p1, X, Y));\n segments.push(new draw.Segment(p1, that.secondControlPoint(tangent, p0, p1, X, Y)));\n return segments;\n }\n if (closed) {\n p0 = points[length - 1];\n p1 = points[0];\n p2 = points[1];\n controlPoints = that.controlPoints(p0, p1, p2);\n initialControlPoint = controlPoints[1];\n lastControlPoint = controlPoints[0];\n } else {\n tangent = that.tangent(p0, p1, X, Y);\n initialControlPoint = that.firstControlPoint(tangent, p0, p1, X, Y);\n }\n var cp0 = initialControlPoint;\n for (var idx = 0; idx <= length - 3; idx++) {\n that.removeDuplicates(idx, points);\n length = points.length;\n if (idx + 3 <= length) {\n p0 = points[idx];\n p1 = points[idx + 1];\n p2 = points[idx + 2];\n controlPoints = that.controlPoints(p0, p1, p2);\n last(segments).controlOut(cp0);\n cp0 = controlPoints[1];\n var cp1 = controlPoints[0];\n segments.push(new draw.Segment(p1, cp1));\n }\n }\n if (closed) {\n p0 = points[length - 2];\n p1 = points[length - 1];\n p2 = points[0];\n controlPoints = that.controlPoints(p0, p1, p2);\n last(segments).controlOut(cp0);\n segments.push(new draw.Segment(p1, controlPoints[0]));\n last(segments).controlOut(controlPoints[1]);\n segments.push(new draw.Segment(p2, lastControlPoint));\n } else {\n tangent = that.tangent(p1, p2, X, Y);\n last(segments).controlOut(cp0);\n segments.push(new draw.Segment(p2, that.secondControlPoint(tangent, p1, p2, X, Y)));\n }\n return segments;\n },\n removeDuplicates: function (idx, points) {\n while (points[idx + 1] && (points[idx].equals(points[idx + 1]) || points[idx + 1].equals(points[idx + 2]))) {\n points.splice(idx + 1, 1);\n }\n },\n invertAxis: function (p0, p1, p2) {\n var that = this, fn, y2, invertAxis = false;\n if (p0.x === p1.x) {\n invertAxis = true;\n } else if (p1.x === p2.x) {\n if (p1.y < p2.y && p0.y <= p1.y || p2.y < p1.y && p1.y <= p0.y) {\n invertAxis = true;\n }\n } else {\n fn = that.lineFunction(p0, p1);\n y2 = that.calculateFunction(fn, p2.x);\n if (!(p0.y <= p1.y && p2.y <= y2) && !(p1.y <= p0.y && p2.y >= y2)) {\n invertAxis = true;\n }\n }\n return invertAxis;\n },\n isLine: function (p0, p1, p2) {\n var that = this, fn = that.lineFunction(p0, p1), y2 = that.calculateFunction(fn, p2.x);\n return p0.x == p1.x && p1.x == p2.x || round(y2, 1) === round(p2.y, 1);\n },\n lineFunction: function (p1, p2) {\n var a = (p2.y - p1.y) / (p2.x - p1.x), b = p1.y - a * p1.x;\n return [\n b,\n a\n ];\n },\n controlPoints: function (p0, p1, p2) {\n var that = this, xField = X, yField = Y, restrict = false, switchOrientation = false, tangent, monotonic, firstControlPoint, secondControlPoint, allowedDeviation = that.EXTREMUM_ALLOWED_DEVIATION;\n if (that.isLine(p0, p1, p2)) {\n tangent = that.tangent(p0, p1, X, Y);\n } else {\n monotonic = {\n x: that.isMonotonicByField(p0, p1, p2, X),\n y: that.isMonotonicByField(p0, p1, p2, Y)\n };\n if (monotonic.x && monotonic.y) {\n tangent = that.tangent(p0, p2, X, Y);\n restrict = true;\n } else {\n if (that.invertAxis(p0, p1, p2)) {\n xField = Y;\n yField = X;\n }\n if (monotonic[xField]) {\n tangent = 0;\n } else {\n var sign;\n if (p2[yField] < p0[yField] && p0[yField] <= p1[yField] || p0[yField] < p2[yField] && p1[yField] <= p0[yField]) {\n sign = that.sign((p2[yField] - p0[yField]) * (p1[xField] - p0[xField]));\n } else {\n sign = -that.sign((p2[xField] - p0[xField]) * (p1[yField] - p0[yField]));\n }\n tangent = allowedDeviation * sign;\n switchOrientation = true;\n }\n }\n }\n secondControlPoint = that.secondControlPoint(tangent, p0, p1, xField, yField);\n if (switchOrientation) {\n var oldXField = xField;\n xField = yField;\n yField = oldXField;\n }\n firstControlPoint = that.firstControlPoint(tangent, p1, p2, xField, yField);\n if (restrict) {\n that.restrictControlPoint(p0, p1, secondControlPoint, tangent);\n that.restrictControlPoint(p1, p2, firstControlPoint, tangent);\n }\n return [\n secondControlPoint,\n firstControlPoint\n ];\n },\n sign: function (x) {\n return x <= 0 ? -1 : 1;\n },\n restrictControlPoint: function (p1, p2, cp, tangent) {\n if (p1.y < p2.y) {\n if (p2.y < cp.y) {\n cp.x = p1.x + (p2.y - p1.y) / tangent;\n cp.y = p2.y;\n } else if (cp.y < p1.y) {\n cp.x = p2.x - (p2.y - p1.y) / tangent;\n cp.y = p1.y;\n }\n } else {\n if (cp.y < p2.y) {\n cp.x = p1.x - (p1.y - p2.y) / tangent;\n cp.y = p2.y;\n } else if (p1.y < cp.y) {\n cp.x = p2.x + (p1.y - p2.y) / tangent;\n cp.y = p1.y;\n }\n }\n },\n tangent: function (p0, p1, xField, yField) {\n var tangent, x = p1[xField] - p0[xField], y = p1[yField] - p0[yField];\n if (x === 0) {\n tangent = 0;\n } else {\n tangent = y / x;\n }\n return tangent;\n },\n isMonotonicByField: function (p0, p1, p2, field) {\n return p2[field] > p1[field] && p1[field] > p0[field] || p2[field] < p1[field] && p1[field] < p0[field];\n },\n firstControlPoint: function (tangent, p0, p3, xField, yField) {\n var that = this, t1 = p0[xField], t2 = p3[xField], distance = (t2 - t1) * that.WEIGHT;\n return that.point(t1 + distance, p0[yField] + distance * tangent, xField, yField);\n },\n secondControlPoint: function (tangent, p0, p3, xField, yField) {\n var that = this, t1 = p0[xField], t2 = p3[xField], distance = (t2 - t1) * that.WEIGHT;\n return that.point(t2 - distance, p3[yField] - distance * tangent, xField, yField);\n },\n point: function (xValue, yValue, xField, yField) {\n var controlPoint = new geom.Point();\n controlPoint[xField] = xValue;\n controlPoint[yField] = yValue;\n return controlPoint;\n },\n calculateFunction: function (fn, x) {\n var result = 0, length = fn.length;\n for (var i = 0; i < length; i++) {\n result += Math.pow(x, i) * fn[i];\n }\n return result;\n }\n };\n function mwDelta(e) {\n var origEvent = e.originalEvent, delta = 0;\n if (origEvent.wheelDelta) {\n delta = -origEvent.wheelDelta / 120;\n delta = delta > 0 ? math.ceil(delta) : math.floor(delta);\n }\n if (origEvent.detail) {\n delta = round(origEvent.detail / 3);\n }\n return delta;\n }\n function decodeEntities(text) {\n if (!text || !text.indexOf || text.indexOf('&') < 0) {\n return text;\n } else {\n var element = decodeEntities._element;\n element.innerHTML = text;\n return element.textContent || element.innerText;\n }\n }\n function alignPathToPixel(path) {\n if (!kendo.support.vml) {\n var offset = 0.5;\n if (path.options.stroke && defined(path.options.stroke.width)) {\n if (path.options.stroke.width % 2 === 0) {\n offset = 0;\n }\n }\n for (var i = 0; i < path.segments.length; i++) {\n path.segments[i].anchor().round(0).translate(offset, offset);\n }\n }\n return path;\n }\n function innerRadialStops(options) {\n var stops = options.stops, usedSpace = options.innerRadius / options.radius * 100, i, length = stops.length, currentStop, currentStops = [];\n for (i = 0; i < length; i++) {\n currentStop = deepExtend({}, stops[i]);\n currentStop.offset = (currentStop.offset * (100 - usedSpace) + usedSpace) / 100;\n currentStops.push(currentStop);\n }\n return currentStops;\n }\n function rectToBox(rect) {\n var origin = rect.origin;\n var bottomRight = rect.bottomRight();\n return new Box2D(origin.x, origin.y, bottomRight.x, bottomRight.y);\n }\n function eventTargetElement(e) {\n e = e || {};\n var element = $(e.touch ? e.touch.initialTouch : e.target);\n return element;\n }\n function limitCoordinate(value) {\n return math.max(math.min(value, COORDINATE_LIMIT), -COORDINATE_LIMIT);\n }\n decodeEntities._element = document.createElement('span');\n deepExtend(kendo.dataviz, {\n AXIS_LABEL_CLICK: AXIS_LABEL_CLICK,\n COORD_PRECISION: COORD_PRECISION,\n DEFAULT_PRECISION: DEFAULT_PRECISION,\n DEFAULT_WIDTH: DEFAULT_WIDTH,\n DEFAULT_HEIGHT: DEFAULT_HEIGHT,\n DEFAULT_FONT: DEFAULT_FONT,\n INITIAL_ANIMATION_DURATION: INITIAL_ANIMATION_DURATION,\n NOTE_CLICK: NOTE_CLICK,\n NOTE_HOVER: NOTE_HOVER,\n CLIP: CLIP,\n Axis: Axis,\n AxisLabel: AxisLabel,\n Box2D: Box2D,\n BoxElement: BoxElement,\n ChartElement: ChartElement,\n CurveProcessor: CurveProcessor,\n ExportMixin: ExportMixin,\n FloatElement: FloatElement,\n LogarithmicAxis: LogarithmicAxis,\n Note: Note,\n NumericAxis: NumericAxis,\n Point2D: Point2D,\n Ring: Ring,\n RootElement: RootElement,\n Sector: Sector,\n ShapeBuilder: ShapeBuilder,\n ShapeElement: ShapeElement,\n Text: Text,\n TextBox: TextBox,\n Title: Title,\n alignPathToPixel: alignPathToPixel,\n autoFormat: autoFormat,\n autoMajorUnit: autoMajorUnit,\n boxDiff: boxDiff,\n dateComparer: dateComparer,\n decodeEntities: decodeEntities,\n eventTargetElement: eventTargetElement,\n getSpacing: getSpacing,\n inArray: inArray,\n interpolateValue: interpolateValue,\n mwDelta: mwDelta,\n rectToBox: rectToBox,\n rotatePoint: rotatePoint,\n round: round,\n ceil: ceil,\n floor: floor\n });\n }(window.kendo.jQuery));\n return window.kendo;\n}, typeof define == 'function' && define.amd ? define : function (a1, a2, a3) {\n (a3 || a2)();\n}));"],"sourceRoot":"/source/"}