{"version":3,"sources":["kendo.dataviz.chart.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","returnSelf","DefaultAggregates","_defaults","intersection","b1","b2","ua","ua_t","y","u_b","Point2D","applySeriesDefaults","themeOptions","seriesType","baseOptions","series","seriesLength","seriesDefaults","commonDefaults","themeSeriesDefaults","commonThemeDefaults","cleanupNestedSeriesDefaults","type","data","tooltip","bar","column","rangeColumn","line","verticalLine","pie","donut","area","verticalArea","scatter","scatterLine","bubble","candlestick","ohlc","boxPlot","bullet","verticalBullet","polarArea","polarLine","radarArea","radarLine","waterfall","applySeriesColors","currentSeries","seriesColor","defaults","colors","seriesColors","resolveAxisAliases","alias","each","CATEGORY","VALUE","X","Y","applyAxisDefaults","themeAxisDefaults","axisDefaults","axisName","axes","concat","axisOptions","axisColor","labels","title","categoriesCount","seriesCount","categories","getField","row","getter","getDateField","toDate","STRING","parseDate","isArray","toTime","addDuration","date","unit","weekStartDay","hours","getHours","YEARS","getFullYear","adjustDST","MONTHS","getMonth","WEEKS","startOfWeek","DAYS","getDate","HOURS","setUTCMinutes","addTicks","TIME_PER_HOUR","MINUTES","TIME_PER_MINUTE","getSeconds","setSeconds","SECONDS","TIME_PER_SECOND","MILLISECONDS","getMilliseconds","setMilliseconds","day","getDay","daysToSubtract","TIME_PER_DAY","floorDate","ceilDate","dateDiff","absoluteDateDiff","diff","offsetDiff","getTimezoneOffset","ticks","duration","TIME_PER_UNIT","dateIndex","start","baseUnit","baseUnitStep","startDate","timeIndex","singleItemOrArray","axisGroupBox","axisBox","contentBox","wrap","clone","Box2D","equalsIgnoreCase","dateEquals","appendIfNotNull","lteDateIndex","sortedDates","currentDate","low","high","countNumbers","num","count","areNumbers","axisRanges","axis","ranges","range","evalOptions","context","state","dryRun","property","propValue","excluded","depth","needsEval","MAX_EXPAND_DEPTH","hasOwnProperty","isFn","OBJECT","groupSeries","nameTemplate","groupIx","seriesClone","legacyTemplate","groupNameTemplate","dataLength","visibleInLegend","_slotCount","_groupIx","_groupValue","group","filterSeriesByType","types","indexOf","item","sortDates","dates","comparer","dateComparer","uniqueDates","srcDates","isDateAxis","sampleCategory","dateCategory","DATE","transpose","rows","rowIx","colIx","colCount","rowCount","ensureTree","fieldName","target","path","setter","seriesTotal","pointData","sum","SeriesBinder","bindPoint","valueFields","parseFloat","fields","visible","abs","hasGradientOverlay","overlay","gradient","anyHasZIndex","elements","zIndex","preventDefault","_defaultPrevented","pointByCategoryName","points","category","hasValue","toChartAxisRanges","axisRange","acceptKey","mouseKey","accept","ctrlKey","shiftKey","altKey","preloadFonts","fetchFonts","MAX_DEPTH","keys","forEach","clearMissingValues","originalOptions","fieldValue","originalValue","nullValue","isPlainObject","paneAnchor","pane","anchor","PlotAreaFactory","BarLabel","LegendItem","LegendLayout","Legend","CategoryAxis","DateCategoryAxis","DateValueAxis","ClusterLayout","StackWrap","PointEventsMixin","NoteMixin","Bar","BarChartAnimation","FadeInAnimation","ErrorRangeCalculator","CategoricalChart","BarChart","RangeBar","RangeBarChart","BulletChart","Bullet","Target","ErrorBarBase","CategoricalErrorBar","ScatterErrorBar","LinePoint","Bubble","LineSegment","LineChartMixin","ClipAnimationMixin","LineChart","ClipAnimation","StepLineSegment","SplineSegment","AreaSegmentMixin","AreaSegment","AreaChart","SplineAreaSegment","StepAreaSegment","ScatterChart","ScatterLineChart","BubbleChart","Candlestick","CandlestickChart","OHLCPoint","OHLCChart","BoxPlotChart","BoxPlot","VerticalBoxPlot","PieSegment","PieChartMixin","PieChart","DonutSegment","DonutChart","WaterfallChart","WaterfallSegment","Pane","ChartContainer","PlotAreaBase","PlotAreaEventsMixin","CategoricalPlotArea","AxisGroupRangeTracker","XYPlotArea","PiePlotArea","DonutPlotArea","PieAnimation","BubbleAnimation","Highlight","BaseTooltip","Tooltip","SharedTooltip","Crosshair","CrosshairTooltip","Aggregates","Selection","Pannable","ZoomSelection","MousewheelZoom","SeriesAggregator","ChartPlotArea","ChartPane","ChartAxis","ChartSeries","noop","proxy","Observable","DataSource","Widget","ui","isFunction","outerWidth","_outerWidth","outerHeight","_outerHeight","Axis","AxisLabel","BoxElement","ChartElement","Color","CurveProcessor","FloatElement","Note","LogarithmicAxis","NumericAxis","RootElement","Ring","ShapeElement","ShapeBuilder","TextBox","Title","alignPathToPixel","autoFormat","eventTargetElement","getSpacing","interpolate","interpolateValue","mwDelta","geom","geometry","draw","NS","ABOVE","AREA","AUTO","FIT","AXIS_LABEL_CLICK","BAR","BAR_ALIGN_MIN_WIDTH","BAR_BORDER_BRIGHTNESS","BELOW","BLACK","BOTH","BOTTOM","BOX_PLOT","BUBBLE","BULLET","CANDLESTICK","CENTER","CHANGE","CIRCLE","CONTEXTMENU_NS","CLIP","COLOR","COLUMN","COORD_PRECISION","CROSS","CSS_PREFIX","CUSTOM","DATABOUND","DEFAULT_FONT","DEFAULT_HEIGHT","DEFAULT_PRECISION","DEFAULT_WIDTH","DEFAULT_ERROR_BAR_WIDTH","DONUT","DONUT_SECTOR_ANIM_DELAY","DRAG","DRAG_END","DRAG_START","ERROR_LOW_FIELD","ERROR_HIGH_FIELD","X_ERROR_LOW_FIELD","X_ERROR_HIGH_FIELD","Y_ERROR_LOW_FIELD","Y_ERROR_HIGH_FIELD","FADEIN","FIRST","FROM","FUNNEL","GLASS","HORIZONTAL","HORIZONTAL_WATERFALL","INITIAL_ANIMATION_DURATION","INSIDE_BASE","INSIDE_END","INTERPOLATE","LEAVE","LEFT","LEGEND_ITEM_CLICK","LEGEND_ITEM_HOVER","LINE","LINE_MARKER_SIZE","LINEAR","LOGARITHMIC","MAX","MIN","MIN_CATEGORY_POINTS_RANGE","MIN_VALUE","MOUSELEAVE_NS","MOUSEMOVE_TRACKING","MOUSEMOVE_NS","MOUSEMOVE_DELAY","MOUSEWHEEL_DELAY","MOUSEWHEEL_NS","NOTE_CLICK","NOTE_HOVER","NOTE_TEXT","OHLC","OUTSIDE_END","PIE","PIE_SECTOR_ANIM_DELAY","PLOT_AREA_CLICK","PLOT_AREA_HOVER","POINTER","RANGE_BAR","RANGE_COLUMN","RENDER","RIGHT","ROUNDED_BEVEL","ROUNDED_GLASS","SCATTER","SCATTER_LINE","SELECT_START","SELECT","SELECT_END","SERIES_CLICK","SERIES_HOVER","START_SCALE","support","browser","msie","version","STEP","SMOOTH","STD_ERR","STD_DEV","SUMMARY_FIELD","TIME_PER_MILLISECOND","TIME_PER_WEEK","TIME_PER_MONTH","TIME_PER_YEAR","years","months","weeks","days","minutes","seconds","milliseconds","TO","TOP","TOOLTIP_ANIMATION_DURATION","TOOLTIP_OFFSET","TOOLTIP_SHOW_DELAY","TOOLTIP_HIDE_DELAY","TOOLTIP_INVERSE","VERTICAL_AREA","VERTICAL_BOX_PLOT","VERTICAL_BULLET","VERTICAL_LINE","WATERFALL","WHITE","ZERO","ZOOM_ACCELERATION","ZOOM_START","ZOOM","ZOOM_END","BASE_UNITS","EQUALLY_SPACED_SERIES","DateLabelFormats","Chart","userOptions","dataSource","chart","destroy","fn","call","addClass","css","_originalOptions","_initTheme","_initSurface","bind","events","wrapper","_initDataSource","notify","themes","themeName","theme","seriesCopies","_applyDefaults","_dataChangeHandler","_onDataChanged","_bindCategories","_hasDataSource","_redraw","_attachEvents","autoBind","fetch","setDataSource","unbind","_hasData","items","renderAs","chartArea","legend","categoryAxis","highlight","negativeValues","transitions","valueAxis","plotArea","xAxis","yAxis","panes","pannable","zoomable","refresh","_bindSeries","getSize","dimensions","_resize","t","redraw","paneName","_model","_plotArea","findPane","getAxis","findAxisByName","findPaneByName","findPaneByIndex","findSeries","srcSeries","findSeriesByName","_createSeries","findSeriesByIndex","seriesOptions","_seriesOptions","toggleHighlight","show","filter","seriesName","categoryName","firstSeries","filterPoints","pointsBySeriesName","charts","_togglePointsHighlight","_highlight","togglePointHighlight","showTooltip","point","categoryIndex","shared","_sharedTooltip","_tooltip","findPoint","categoryIx","pointsByCategoryIndex","showAt","hideTooltip","hide","surface","_surfaceWrap","clear","resize","Surface","view","model","_getModel","_destroyView","renderVisual","traverse","animation","setup","visual","play","_createTooltip","_setupSelection","_createPannable","_createZoomSelection","_createMousewheelZoom","exportVisual","originalChartArea","_pannable","selection","_zoomSelection","mousewheel","_mousewheelZoom","_tooltipleave","hideCrosshairs","_modelOptions","buildTitle","_createPlotArea","reflow","skipSeries","selections","_selections","_selectStartHandler","_selectStart","_selectHandler","_select","_selectEndHandler","_selectEnd","select","vertical","justified","_mouseover","_mouseout","on","_click","_mousewheel","_mouseleave","_mousemove","throttle","_shouldAttachMouseMove","UserEvents","_userEvents","global","multiTouch","fastTap","tap","_tap","_start","move","_move","end","_end","gesturestart","_gesturestart","gesturechange","_gesturechange","gestureend","_gestureend","_gestureDistance","distance","_unsetActivePoint","suspendTracking","_zooming","resumeTracking","previousGestureDistance","scaleDelta","args","mousewheelZoom","delta","originalEvent","updateRanges","zoom","_drawingChartElement","leave","_events","coords","_eventCoordinates","backgroundContainsPoint","_startNavigation","currentAxis","_navState","pan","startLocation","location","translateRange","_endNavigation","prevented","totalDelta","origEvent","_mwTimeout","clearTimeout","setTimeout","scaleRange","chartEvent","findPointPane","cancel","_suppressHover","_getChartElement","match","eventTarget","chartElement","parent","aliasFor","closest","isTouch","client","clientX","clientY","_toModelCoordinates","offset","paddingLeft","parseInt","paddingTop","win","scrollLeft","top","scrollTop","drawingElement","_activePoint","_propagateClick","_startHover","_supressMouseleave","click","tooltipOptions","isHighlighted","hover","tooltipTracking","_mouseMoveTracking","seriesPoint","containsPoint","getNearestPoint","seriesIx","off","_trackCrosshairs","_trackSharedTooltip","crosshairs","pointArgs","hoverArgs","pointCategoryIndex","_tooltipCategoryIx","eventArgs","categoryPoints","relatedTarget","_sourceSeries","grouped","processedSeries","_isBindable","_applyGroupVisibleState","_deferRedraw","visibleState","action","_groupVisibleState","_saveGroupVisibleState","vml","_clearRedrawTimeout","_redrawTimeout","clearInterval","seriesData","axisIx","categoriesData","definitions","_bindCategoryAxis","dataItems","_bindCategoryAxisFromSeries","s","onAxis","dataIx","dataRow","getFn","dateAxis","uniqueCategories","categoryField","_legendItemClick","seriesIndex","pointIndex","_noTransitionsRedraw","transitionsState","_legendItemHover","pointsBySeriesIndex","setOptions","_setEvents","ExportMixin","PDFMixin","_registry","register","seriesTypes","registry","_valueFields","_otherFields","_nullValue","_undefinedValue","otherFields","binder","_makeValue","canonicalFields","pointIx","fieldData","srcValueFields","srcPointFields","_bindFromArray","sourceFields","_bindFromObject","initialValue","srcFields","srcFieldName","sourceFieldName","content","barLabel","textBox","position","margin","padding","background","border","aboveAxis","delay","createVisual","noclip","targetBox","children","align","vAlign","x1","y1","x2","y2","rotation","bottom","alignToClipBox","clipBox","parentBox","paddingBox","createContainer","createMarker","createLabel","container","markerOptions","markerColor","markers","labelOptions","renderComplete","cursor","eventSink","_itemOverlay","Path","fromRect","toRect","fill","opacity","stroke","appendVisual","widget","that","customVisual","active","renderChildren","defaultVisual","addVisual","render","legendItem","Layout","spacing","lineSpacing","orientation","rect","bbox","clippedBBox","rectToBox","createItems","offsetX","offsetY","userAlign","shrinkToFit","innerElement","isVertical","reverse","hasItems","containerCustomReflow","containerReflow","containerBox","alignTarget","translate","_initFields","_initCategories","_ticks","outOfRangeMin","outOfRangeMax","definedMin","definedMax","srcCategories","ceil","majorGridLines","rangeIndices","totalRange","totalRangeIndices","limit","_seriesMax","getScale","lineBox","scale","getTickPositions","stepSize","positions","getLabelsTickPositions","tickPositions","getMajorTickPositions","unshift","labelTickIndex","label","arrangeLabels","hideOutOfRangeLabels","firstLabel","lastLabel","getTicks","majorTicks","getMinorTickPositions","minorTicks","getHash","_hash","getSlot","from","to","p1","p2","lineStart","slotBox","singleSlot","slot","startValue","lineEnd","getCategory","zoomRange","rate","totalMax","totalMin","labelsCount","labelsRange","skip","step","createAxisLabel","dataItem","axisLabelText","shouldRenderNote","limitRange","pointsRange","diffStart","diffEnd","rangeMin","rangeMax","valueRange","useDefault","roundToBaseUnit","userSetBaseUnit","userSetBaseUnitStep","defaultBaseUnit","autoBaseUnit","_groupsStart","groupCategories","dateFormats","autoBaseUnitSteps","maxDateGroups","parseNoteValue","rounds","cat","lastCat","minDiff","_categoryRange","_range","categoryLimits","categoriesRange","minIdx","maxIdx","_roundToTotalStep","currentRange","datesRange","panRange","totalLimits","indicesRange","baseUnitIndex","autoBaseUnitStep","maxDiff","rangeDiff","stepIndex","autoUnit","stepOptions","unitSteps","nextStep","autoUnitIx","span","units","totalUnits","_timeScale","timeRange","maxCategory","lineSize","_collapse","nextDate","groups","upper","roundToNext","roundedStep","roundedDate","unitFormat","format","seriesMin","seriesMax","axisCrossingValue","axisCrossingValues","applyDefaults","timeUnits","baseUnitTime","autoMin","autoMax","userMajorUnit","majorUnit","autoMajorUnit","actualUnits","unitsToAdd","head","tail","minorUnit","getDivisions","stepValue","dir","startEdge","divisions","getValue","exact","limittedRange","endValue","gap","childBox","cluster","slots","slotSize","currentChild","positionAxis","childrenCount","snapTo","percentage","stackValue","runningTotal","total","createNote","notes","noteText","note","_rendered","errorBar","labelText","labelTemplate","formatValue","owner","formatPointValue","errorBars","rectVisual","sender","getChart","Group","createRect","strokeOpacity","getBorderColor","dashType","lineJoin","createGradientOverlay","baseColor","createHighlight","highlightVisual","highlightVisualArgs","borderColor","brightness","_brightness","toHex","tooltipAnchor","tooltipWidth","tooltipHeight","isStacked","overlapsBox","overlaps","Animation","fromScale","origin","Point","transform","abort","scaleX","scaleY","AnimationFactory","easing","fadeTo","errorValue","initGlobalRanges","prototype","percentRegex","standardDeviationRegex","RegExp","average","deviation","multiple","errorRange","standardError","deviationMatch","exec","valueGetter","createValueGetter","getAverage","getStandardDeviation","globalRange","getStandardError","getErrorRange","pointValue","percentValue","Error","sqrt","isSample","squareDifferenceSum","seriesCategoryAxis","valueAxisRanges","seriesPoints","_evalSeries","invertAxes","clip","traverseDataPoints","addValue","pointOptions","pointType","plotValue","categoryPts","categorySum","otherValues","other","stack","otherStack","isStacked100","plotRange","positive","prevValue","isStackedBar","otherValue","seriesValueAxis","categoryAxisCrossingValue","stackLimits","stackName","pIx","updateStackRange","limits","errorTotals","chartSeries","limitsCache","negative","addErrorBar","lowValue","highValue","seriesErrorRanges","addPointErrorBar","stackedErrorRange","updateRange","createPoint","evalPointOptions","doEval","namedValueAxes","categorySlots","chartPoints","categorySlot","valueSlot","pointSlot","reflowPoint","reflowCategories","crossingValues","axisIndex","slotX","slotY","currentCategory","_outOfRangeCallback","_bindPoint","outOfRangePoint","bindCache","_bindCache","clusterType","stackType","stackWrap","negativeColor","getStackWrap","stackGroup","wraps","_stackGroup","stackAxis","zeroSlot","childrenLength","createAnimation","_setAnimationOptions","_setChildrenAnimation","pointVisual","fromOptions","toOptions","labelFrom","_createLabel","labelTo","rangeBar","plotLimits","wrapData","seriesItem","bulletOptions","shape","targetSlot","targetValueSlot","targetSlotX","targetSlotY","set","bodyVisual","endCaps","linePoints","valueBox","centerBox","center","capsWidth","getCapsWidth","capValue","capStart","capEnd","boxSize","createDefaultVisual","lineOptions","moveTo","lineTo","seriesAxes","marker","markerBorder","markerBox","_childBox","noteTargetBox","reflowLabel","alignTo","defaultColor","shadow","getElement","halfSize","Rect","radius","Circle","segment","closed","visualPoints","fromPoints","close","renderSegments","sortedPoints","pointCount","lastSegment","_segments","sortPoints","seriesMissingValues","createSegment","_addSegment","missingValues","assumeZero","nearestPoint","pointBox","pointDistance","allPoints","nearestPointDistance","distanceTo","clipPath","root","getRoot","animationPoints","_setEnd","segments","topRight","bottomRight","setX","calculateStepPoints","prevPoint","prevMarkerBoxCenter","markerBoxCenter","isInterpolate","revDir","curveProcessor","curve","process","firstPoint","lastPoint","valueAxisLineBox","categoryAxisLineBox","stackPoints","_linePoints","createArea","createLine","lineCap","prevSegment","_gapStackPoints","stackPoint","_stackPoints","currentSeriesIx","gapStackPoint","startIdx","endIdx","_previousSegmentPoint","_createGapStackPoint","segmentIx","seriesIdx","strokeSegments","_strokeSegments","createFill","createStroke","prevStrokeSegments","prevAnchor","stackSegments","firstAnchor","fillSegments","Segment","controlOut","controlIn","closeFill","fillPath","xAxisRanges","yAxisRanges","valueErrorField","lowField","highField","createMissingValue","xAxisName","yAxisName","xAxisRange","yAxisRange","namedXAxes","axisX","namedYAxes","axisY","currentSeriesPoints","missingValue","_maxSize","updateBubblesSize","pointsCount","animationOptions","minSize","maxSize","minR","maxR","minArea","maxArea","areaRange","areaRatio","baseZIndex","mid","ocSlot","lhSlot","open","realBody","lines","reflowNote","_mainVisual","mainVisual","createOverlay","createBody","createLines","drawLines","lineStyle","normalColor","valueParts","splitValue","downColor","oSlot","cSlot","oPoints","cPoints","lhPoints","lower","q1","median","q3","filterOutliers","outliers","mean","extremes","whiskerSlot","boxSlot","medianSlot","meanSlot","reflowBoxSlot","reflowWhiskerSlot","meanPoints","calcMeanPoints","whiskerPoints","calcWhiskerPoints","medianPoints","calcMedianPoints","renderOutliers","markersBorder","outlierValue","outerFence","reflowOutliers","sector","animationDelay","lp","labelWidth","labelHeight","labelsOptions","labelsDistance","angle","middle","expand","startAngle","innerRadius","ir","endAngle","createSegmentVisual","borderOptions","fallbackFill","userSpace","singleSegment","createRing","adjacentBox","createLegendItem","itemLabelOptions","pointVisible","legendOptions","inactiveItems","inactiveItemsLabels","legendItems","connectors","anglePerValue","explode","currentAngle","colorsCount","evalSegmentOptions","segmentOptions","seriesConfig","space","minWidth","halfMinWidth","defaultPadding","newBox","newBoxCenter","seriesConfigs","boxCenter","leftSideLabels","rightSideLabels","labelComparator","leftLabelsReflow","rightLabelsReflow","distances","distanceBetweenLabels","distributeLabels","secondBox","firstBox","lr","remaining","_takeDistance","reflowLabels","amount","available","boxX","labelDistance","boxY","hAlignLabel","connectorLine","connectorsColor","centerPoint","sr","crossing","_connectorLines","seriesId","pointInCircle","originalX","direction","cx","cy","holeSize","totalSize","seriesWithoutSize","currentSize","createSegments","summary","totalCategories","fromBox","toBox","guid","createTitle","chartContainer","titleOptions","appendAxis","appendChart","empty","removeAxis","removeChart","pop","visualStyle","createGridLines","stackRoot","clipRoot","gridLines","j","altAxis","allAxes","vGridLines","hGridLines","createGradient","chartsBox","axisValueField","shouldClip","_clipBox","clipRect","unclipLabels","initSeries","createPanes","createCrosshairs","setTitle","currentPane","paneOptions","panesLength","paneIndex","currentCrosshair","crosshair","removeCrosshairs","matchingPane","axisToRemove","filteredAxes","chartToRemove","filteredCharts","addToLegend","seriesVisible","groupAxes","paneAxes","paneIx","xAxes","yAxes","any","groupSeriesByPane","seriesByPane","seriesPaneName","filterVisibleSeries","unpad","reflowPanes","reflowAxes","reflowCharts","crossingAxes","valuesToAdd","alignAxisTo","targetAxis","crossingValue","targetCrossingValue","slotEdge","targetEdge","alignAxes","anchorCrossings","paneId","xAnchor","yAnchor","xAnchorCrossings","yAnchorCrossings","leftAnchors","rightAnchors","topAnchors","bottomAnchors","_overlap","_mirrored","mirror","shrinkAxisWidth","overflowX","shrink","shrinkAxisHeight","overflowY","shrinked","fitAxes","paneBox","reflowPaneAxes","autoRotateAxisLabels","groupedAxes","rotated","autoRotateLabels","chartPane","percents","remainingHeight","remainingPanes","autoHeightPanes","backgroundBox","axisA","axisB","axesCount","chartsBoxes","boxes","addBackgroundPaths","multipath","paths","bg","_bgVisual","MultiPath","paneByPoint","_dispatchEvent","namedCategoryAxes","valueAxisRangeTracker","stack100","createCategoryAxes","aggregateCategories","createCategoryAxesLabels","createCharts","createValueAxes","reset","paneSeries","visibleSeries","groupSeriesByCategoryAxis","createChartGroup","createAreaChart","createBarChart","createRangeBarChart","createBulletChart","createCandlestickChart","createBoxPlotChart","createOHLCChart","createWaterfallChart","createLineChart","axisPane","aggregateSeries","filterSeries","minCategory","outOfRangePoints","_outOfRangeMinPoint","_outOfRangeMaxPoint","aggregator","outOfRangeMinCategory","outOfRangeMaxCategory","srcData","srcPoints","aggregatorSeries","outOfRangeMinIdx","outOfRangeMaxIdx","aggregatePoints","categoriesToAdd","update","grep","defaultPaneName","stackableChartOptions","axisSeries","unique","categoryAxes","barChart","rangeColumnChart","bulletChart","lineChart","areaChart","waterfallChart","axisRequiresRounding","categoryAxisName","categoryAxisIndex","seriesAxis","centeredSeries","aggregatedAxis","createLabels","primaryAxis","_deferLabels","isJustified","axisType","defaultAxisRange","tracker","defaultRange","query","roundToMajorUnit","eventType","pointPane","updateAxisOptions","axesOptions","chartAxisRanges","chartRange","xAxisRangeTracker","yAxisRangeTracker","filteredSeries","createScatterChart","createScatterLineChart","createBubbleChart","createAxes","xAxisOptions","yAxisOptions","createXYAxis","seriesAxisName","firstPointValue","inferredDate","namedAxes","isLog","typeSamples","xAxesOptions","yAxesOptions","currentValue","xValues","yValues","createPieChart","pieChart","createDonutChart","donutChart","_points","hasHighlight","toggleHandler","toggle","mobileScrollerSelector","padding-top","padding-right","padding-bottom","padding-left","attr","_mobileScroller","_clearShowTimeout","remove","_offset","_ensureElement","stop","animate","showTimeout","_padding","_chartPadding","_measure","chartPadding","chartOffset","zoomLevel","viewport","pageYOffset","documentElement","pageXOffset","movable","_fit","setStyle","pointColor","percBrightness","toggleClass","backgroundColor","borderWidth","_hideElement","appendTo","contains","fadeOut","always","_pointContent","tooltipTemplate","xLow","xHigh","yLow","yHigh","_pointAnchor","viewPortSize","html","sharedTemplate","categoryFormat","_content","_slotAnchor","_defaultAnchor","hCenter","slotCenter","categoryText","stickyMode","moveLine","getBox","dim","axisLineBox","getAnchor","halfWidth","halfHeight","bottomLeft","topLeft","sumOrNull","avg","aggregates","getValueAxis","selectorPrefix","_dateAxis","find","leftMask","rightMask","leftHandle","rightHandle","_index","cssText","stopPropagation","userEvents","press","_press","add","removeClass","_state","_rangeEventArgs","_value","moveTarget","parents","handle","oldRange","is","p0","touches","rightClick","which","_slot","leftMaskWidth","rightMaskWidth","zDir","lock","_active","_panAxes","updatedAxes","_marquee","zoomPane","elementOffset","_zoomPane","_elementOffset","_zoomPaneClipBox","selectionPosition","_selectionPosition","_updateAxisRanges","initialDelta","defaultAggregates","fieldAggregate","sa","seriesFields","_seriesFields","rootAggregate","aggregate","_series","_binder","canonicalName","srcValues","_bindPoints","firstDataItem","_bindField","backgroundVisual","_chart","_pane","chartsVisual","_axis","_options","_filterPoints","_clearFields","toggleVisibility","hasFilter","_filterData","easeOutElastic","asin","sin","plugin","errorLow","errorHigh"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;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GACZC,aAAcA,GACd4B,UAAWA,GACXL,UAAWA,GACXE,YAAaA,GACb6B,KAAMA,GACNS,aAAcA,GACdd,SAAUA,GACVD,cAAeA,GACfa,YAAaA,GACbd,WAAYA,GACZS,aAAcA,GACdC,oBAAqBA,GACrB5D,gBAAiBA,GACjBU,iBAAkBA,GAClBQ,SAAUA,GACVC,cAAeA,GACfqB,aAAcA,GACdf,gBAAiBA,GACjBgB,iBAAkBA,GAClBkC,UAAWA,GACXI,iBAAkBA,GAClBxH,aAAcA,GACdoJ,aAAcA,GACdzE,cAAeA,GACfI,kBAAmBA,GACnB7B,UAAWA,GACX6D,QAASA,GACTxB,UAAWA,GACXD,UAAWA,GACXU,eAAgBA,GAChBC,iBAAkBA,GAClBO,WAAYA,GACZe,eAAgBA,GAChBD,cAAeA,GACfD,SAAUA,GACVjP,YAAaA,EACbkE,WAAYA,EACZjB,aAAcA,EACd7D,gBAAiBA,EACjB6C,SAAUA,EACV8B,aAAcA,EACdvB,SAAUA,EACV4E,WAAYA,EACZlB,QAASA,EACTla,SAAUA,EACVgW,UAAWA,EACXgE,mBAAoBA,EACpB8C,SAAUA,EACVpF,aAAcA,EACda,YAAaA,EACbkD,YAAaA,EACbzE,kBAAmBA,EACnBoD,UAAWA,EACXxF,YAAaA,EACbkG,UAAWA,EACXnH,OAAQA,EACRI,OAAQA,EACRyG,YAAaA,KAEnBrS,OAAO3F,MAAMoK,QACRzE,OAAO3F,OACE,kBAAV1D,SAAwBA,OAAOgK,IAAMhK,OAAS,SAAUiK,EAAIC,EAAIC,IACrEA,GAAMD","file":"kendo.dataviz.chart.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.chart', [\n 'kendo.color',\n 'kendo.data',\n 'kendo.dataviz.core',\n 'kendo.dataviz.themes',\n 'kendo.drawing',\n 'kendo.userevents'\n ], f);\n}(function () {\n var __meta__ = {\n id: 'dataviz.chart',\n name: 'Chart',\n category: 'dataviz',\n description: 'The Chart widget uses modern browser technologies to render high-quality data visualizations in the browser.',\n depends: [\n 'data',\n 'userevents',\n 'drawing',\n 'dataviz.core',\n 'dataviz.themes'\n ],\n features: [\n {\n id: 'dataviz.chart-polar',\n name: 'Polar & Radar',\n description: 'Support for Polar and Radar charts.',\n depends: ['dataviz.chart.polar'],\n requireJS: false\n },\n {\n id: 'dataviz.chart-funnel',\n name: 'Funnel chart',\n description: 'Support for Funnel chart.',\n depends: ['dataviz.chart.funnel'],\n requireJS: false\n },\n {\n id: 'dataviz.chart-pdf-export',\n name: 'PDF export',\n description: 'Export Chart as PDF',\n depends: ['pdf']\n }\n ]\n };\n (function ($, undefined) {\n var each = $.each, isArray = $.isArray, isPlainObject = $.isPlainObject, map = $.map, math = Math, noop = $.noop, extend = $.extend, proxy = $.proxy, kendo = window.kendo, Class = kendo.Class, Observable = kendo.Observable, DataSource = kendo.data.DataSource, Widget = kendo.ui.Widget, deepExtend = kendo.deepExtend, getter = kendo.getter, isFn = kendo.isFunction, template = kendo.template, outerWidth = kendo._outerWidth, outerHeight = kendo._outerHeight, dataviz = kendo.dataviz, Axis = dataviz.Axis, AxisLabel = dataviz.AxisLabel, Box2D = dataviz.Box2D, BoxElement = dataviz.BoxElement, ChartElement = dataviz.ChartElement, Color = kendo.drawing.Color, CurveProcessor = dataviz.CurveProcessor, FloatElement = dataviz.FloatElement, Note = dataviz.Note, LogarithmicAxis = dataviz.LogarithmicAxis, NumericAxis = dataviz.NumericAxis, Point2D = dataviz.Point2D, RootElement = dataviz.RootElement, Ring = dataviz.Ring, ShapeElement = dataviz.ShapeElement, ShapeBuilder = dataviz.ShapeBuilder, TextBox = dataviz.TextBox, Title = dataviz.Title, alignPathToPixel = dataviz.alignPathToPixel, autoFormat = dataviz.autoFormat, dateComparer = dataviz.dateComparer, eventTargetElement = dataviz.eventTargetElement, getSpacing = dataviz.getSpacing, inArray = dataviz.inArray, interpolate = dataviz.interpolateValue, mwDelta = dataviz.mwDelta, round = dataviz.round, util = kendo.util, append = util.append, defined = util.defined, last = util.last, limitValue = util.limitValue, sparseArrayLimits = util.sparseArrayLimits, sparseArrayMin = util.sparseArrayMin, sparseArrayMax = util.sparseArrayMax, renderTemplate = util.renderTemplate, valueOrDefault = util.valueOrDefault, geom = dataviz.geometry, draw = dataviz.drawing;\n var NS = '.kendoChart', ABOVE = 'above', AREA = 'area', AUTO = 'auto', FIT = 'fit', AXIS_LABEL_CLICK = dataviz.AXIS_LABEL_CLICK, BAR = 'bar', BAR_ALIGN_MIN_WIDTH = 6, BAR_BORDER_BRIGHTNESS = 0.8, BELOW = 'below', BLACK = '#000', BOTH = 'both', BOTTOM = 'bottom', BOX_PLOT = 'boxPlot', BUBBLE = 'bubble', BULLET = 'bullet', CANDLESTICK = 'candlestick', CATEGORY = 'category', CENTER = 'center', CHANGE = 'change', CIRCLE = 'circle', CONTEXTMENU_NS = 'contextmenu' + NS, CLIP = dataviz.CLIP, COLOR = 'color', COLUMN = 'column', COORD_PRECISION = dataviz.COORD_PRECISION, CROSS = 'cross', CSS_PREFIX = 'k-', CUSTOM = 'custom', DATABOUND = 'dataBound', DATE = 'date', DAYS = 'days', DEFAULT_FONT = dataviz.DEFAULT_FONT, DEFAULT_HEIGHT = dataviz.DEFAULT_HEIGHT, DEFAULT_PRECISION = dataviz.DEFAULT_PRECISION, DEFAULT_WIDTH = dataviz.DEFAULT_WIDTH, DEFAULT_ERROR_BAR_WIDTH = 4, DONUT = 'donut', DONUT_SECTOR_ANIM_DELAY = 50, DRAG = 'drag', DRAG_END = 'dragEnd', DRAG_START = 'dragStart', ERROR_LOW_FIELD = 'errorLow', ERROR_HIGH_FIELD = 'errorHigh', X_ERROR_LOW_FIELD = 'xErrorLow', X_ERROR_HIGH_FIELD = 'xErrorHigh', Y_ERROR_LOW_FIELD = 'yErrorLow', Y_ERROR_HIGH_FIELD = 'yErrorHigh', FADEIN = 'fadeIn', FIRST = 'first', FROM = 'from', FUNNEL = 'funnel', GLASS = 'glass', HORIZONTAL = 'horizontal', HORIZONTAL_WATERFALL = 'horizontalWaterfall', HOURS = 'hours', INITIAL_ANIMATION_DURATION = dataviz.INITIAL_ANIMATION_DURATION, INSIDE_BASE = 'insideBase', INSIDE_END = 'insideEnd', INTERPOLATE = 'interpolate', LEAVE = 'leave', LEFT = 'left', LEGEND_ITEM_CLICK = 'legendItemClick', LEGEND_ITEM_HOVER = 'legendItemHover', LINE = 'line', LINE_MARKER_SIZE = 8, LINEAR = 'linear', LOGARITHMIC = 'log', MAX = 'max', MAX_EXPAND_DEPTH = 5, MAX_VALUE = Number.MAX_VALUE, MIN = 'min', MIN_CATEGORY_POINTS_RANGE = 0.01, MIN_VALUE = -Number.MAX_VALUE, MINUTES = 'minutes', MONTHS = 'months', MOUSELEAVE_NS = 'mouseleave' + NS, MOUSEMOVE_TRACKING = 'mousemove.tracking', MOUSEMOVE_NS = 'mousemove' + NS, MOUSEMOVE_DELAY = 20, MOUSEWHEEL_DELAY = 150, MOUSEWHEEL_NS = 'DOMMouseScroll' + NS + ' mousewheel' + NS, NOTE_CLICK = dataviz.NOTE_CLICK, NOTE_HOVER = dataviz.NOTE_HOVER, NOTE_TEXT = 'noteText', OBJECT = 'object', OHLC = 'ohlc', OUTSIDE_END = 'outsideEnd', PIE = 'pie', PIE_SECTOR_ANIM_DELAY = 70, PLOT_AREA_CLICK = 'plotAreaClick', PLOT_AREA_HOVER = 'plotAreaHover', POINTER = 'pointer', RANGE_BAR = 'rangeBar', RANGE_COLUMN = 'rangeColumn', RENDER = 'render', RIGHT = 'right', ROUNDED_BEVEL = 'roundedBevel', ROUNDED_GLASS = 'roundedGlass', SCATTER = 'scatter', SCATTER_LINE = 'scatterLine', SECONDS = 'seconds', MILLISECONDS = 'milliseconds', SELECT_START = 'selectStart', SELECT = 'select', SELECT_END = 'selectEnd', SERIES_CLICK = 'seriesClick', SERIES_HOVER = 'seriesHover', START_SCALE = kendo.support.browser.msie && kendo.support.browser.version === 10 ? 0.001 : 0, STEP = 'step', SMOOTH = 'smooth', STD_ERR = 'stderr', STD_DEV = 'stddev', STRING = 'string', SUMMARY_FIELD = 'summary', TIME_PER_MILLISECOND = 1, TIME_PER_SECOND = 1000 * TIME_PER_MILLISECOND, TIME_PER_MINUTE = 60 * TIME_PER_SECOND, TIME_PER_HOUR = 60 * TIME_PER_MINUTE, TIME_PER_DAY = 24 * TIME_PER_HOUR, TIME_PER_WEEK = 7 * TIME_PER_DAY, TIME_PER_MONTH = 31 * TIME_PER_DAY, TIME_PER_YEAR = 365 * TIME_PER_DAY, TIME_PER_UNIT = {\n 'years': TIME_PER_YEAR,\n 'months': TIME_PER_MONTH,\n 'weeks': TIME_PER_WEEK,\n 'days': TIME_PER_DAY,\n 'hours': TIME_PER_HOUR,\n 'minutes': TIME_PER_MINUTE,\n 'seconds': TIME_PER_SECOND,\n 'milliseconds': TIME_PER_MILLISECOND\n }, TO = 'to', TOP = 'top', TOOLTIP_ANIMATION_DURATION = 150, TOOLTIP_OFFSET = 5, TOOLTIP_SHOW_DELAY = 100, TOOLTIP_HIDE_DELAY = 100, TOOLTIP_INVERSE = 'chart-tooltip-inverse', VALUE = 'value', VERTICAL_AREA = 'verticalArea', VERTICAL_BOX_PLOT = 'verticalBoxPlot', VERTICAL_BULLET = 'verticalBullet', VERTICAL_LINE = 'verticalLine', WATERFALL = 'waterfall', WEEKS = 'weeks', WHITE = '#fff', X = 'x', Y = 'y', YEARS = 'years', ZERO = 'zero', ZOOM_ACCELERATION = 3, ZOOM_START = 'zoomStart', ZOOM = 'zoom', ZOOM_END = 'zoomEnd', BASE_UNITS = [\n MILLISECONDS,\n SECONDS,\n MINUTES,\n HOURS,\n DAYS,\n WEEKS,\n MONTHS,\n YEARS\n ], EQUALLY_SPACED_SERIES = [\n BAR,\n COLUMN,\n OHLC,\n CANDLESTICK,\n BOX_PLOT,\n VERTICAL_BOX_PLOT,\n BULLET,\n RANGE_COLUMN,\n RANGE_BAR,\n WATERFALL,\n HORIZONTAL_WATERFALL\n ];\n var DateLabelFormats = {\n milliseconds: 'HH:mm:ss.fff',\n seconds: 'HH:mm:ss',\n minutes: 'HH:mm',\n hours: 'HH:mm',\n days: 'M/d',\n weeks: 'M/d',\n months: 'MMM \\'yy',\n years: 'yyyy'\n };\n var Chart = Widget.extend({\n init: function (element, userOptions) {\n var chart = this, options, dataSource;\n kendo.destroy(element);\n Widget.fn.init.call(chart, element);\n chart.element.addClass(CSS_PREFIX + this.options.name.toLowerCase()).css('position', 'relative');\n if (userOptions) {\n dataSource = userOptions.dataSource;\n userOptions.dataSource = undefined;\n }\n options = deepExtend({}, chart.options, userOptions);\n chart._originalOptions = deepExtend({}, options);\n chart._initTheme(options);\n chart._initSurface();\n chart.bind(chart.events, chart.options);\n chart.wrapper = chart.element;\n if (userOptions) {\n userOptions.dataSource = dataSource;\n }\n chart._initDataSource(userOptions);\n kendo.notify(chart, dataviz.ui);\n },\n _initTheme: function (options) {\n var chart = this, themes = dataviz.ui.themes || {}, themeName = options.theme, theme = themes[themeName] || themes[themeName.toLowerCase()], themeOptions = themeName && theme ? theme.chart : {}, seriesCopies = [], series = options.series || [], i;\n for (i = 0; i < series.length; i++) {\n seriesCopies.push($.extend({}, series[i]));\n }\n options.series = seriesCopies;\n resolveAxisAliases(options);\n chart._applyDefaults(options, themeOptions);\n if (options.seriesColors === null) {\n options.seriesColors = undefined;\n }\n chart.options = deepExtend({}, themeOptions, options);\n applySeriesColors(chart.options);\n },\n _initDataSource: function (userOptions) {\n var chart = this, dataSource = (userOptions || {}).dataSource;\n chart._dataChangeHandler = proxy(chart._onDataChanged, chart);\n chart.dataSource = DataSource.create(dataSource).bind(CHANGE, chart._dataChangeHandler);\n chart._bindCategories();\n if (dataSource) {\n chart._hasDataSource = true;\n }\n preloadFonts(userOptions, function () {\n chart._redraw();\n chart._attachEvents();\n });\n if (dataSource) {\n if (chart.options.autoBind) {\n chart.dataSource.fetch();\n }\n }\n },\n setDataSource: function (dataSource) {\n var chart = this;\n chart.dataSource.unbind(CHANGE, chart._dataChangeHandler);\n chart.dataSource = dataSource = DataSource.create(dataSource);\n chart._hasDataSource = true;\n chart._hasData = false;\n dataSource.bind(CHANGE, chart._dataChangeHandler);\n if (chart.options.autoBind) {\n dataSource.fetch();\n }\n },\n events: [\n DATABOUND,\n SERIES_CLICK,\n SERIES_HOVER,\n AXIS_LABEL_CLICK,\n LEGEND_ITEM_CLICK,\n LEGEND_ITEM_HOVER,\n PLOT_AREA_CLICK,\n PLOT_AREA_HOVER,\n DRAG_START,\n DRAG,\n DRAG_END,\n ZOOM_START,\n ZOOM,\n ZOOM_END,\n SELECT_START,\n SELECT,\n SELECT_END,\n NOTE_CLICK,\n NOTE_HOVER,\n RENDER\n ],\n items: function () {\n return $();\n },\n options: {\n name: 'Chart',\n renderAs: '',\n theme: 'default',\n chartArea: {},\n legend: {\n visible: true,\n labels: {}\n },\n categoryAxis: {},\n autoBind: true,\n seriesDefaults: {\n type: COLUMN,\n data: [],\n highlight: { visible: true },\n labels: {},\n negativeValues: { visible: false }\n },\n series: [],\n seriesColors: null,\n tooltip: { visible: false },\n transitions: true,\n valueAxis: {},\n plotArea: {},\n title: {},\n xAxis: {},\n yAxis: {},\n panes: [{}],\n pannable: false,\n zoomable: false\n },\n refresh: function () {\n var chart = this;\n chart._applyDefaults(chart.options);\n applySeriesColors(chart.options);\n chart._bindSeries();\n chart._bindCategories();\n chart.trigger(DATABOUND);\n chart._redraw();\n },\n getSize: function () {\n return kendo.dimensions(this.element);\n },\n _resize: function () {\n var t = this.options.transitions;\n this.options.transitions = false;\n this._redraw();\n this.options.transitions = t;\n },\n redraw: function (paneName) {\n var chart = this, pane, plotArea;\n chart._applyDefaults(chart.options);\n applySeriesColors(chart.options);\n if (paneName) {\n plotArea = chart._model._plotArea;\n pane = plotArea.findPane(paneName);\n plotArea.redraw(pane);\n } else {\n chart._redraw();\n }\n },\n getAxis: function (name) {\n var axes = this._plotArea.axes;\n for (var idx = 0; idx < axes.length; idx++) {\n if (axes[idx].options.name === name) {\n return new ChartAxis(axes[idx]);\n }\n }\n },\n findAxisByName: function (name) {\n return this.getAxis(name);\n },\n plotArea: function () {\n return new ChartPlotArea(this._plotArea);\n },\n findPaneByName: function (name) {\n var panes = this._plotArea.panes;\n for (var idx = 0; idx < panes.length; idx++) {\n if (panes[idx].options.name === name) {\n return new ChartPane(this, panes[idx]);\n }\n }\n },\n findPaneByIndex: function (idx) {\n var panes = this._plotArea.panes;\n if (panes[idx]) {\n return new ChartPane(this, panes[idx]);\n }\n },\n findSeries: function (callback) {\n var plotArea = this._plotArea;\n var series = plotArea.srcSeries || plotArea.series;\n for (var idx = 0; idx < series.length; idx++) {\n if (callback(series[idx])) {\n return new ChartSeries(this, series[idx]);\n }\n }\n },\n findSeriesByName: function (name) {\n return this._createSeries({ name: name });\n },\n findSeriesByIndex: function (index) {\n return this._createSeries({ index: index });\n },\n _createSeries: function (options) {\n var seriesOptions = this._seriesOptions(options);\n if (seriesOptions) {\n return new ChartSeries(this, seriesOptions);\n }\n },\n _seriesOptions: function (options) {\n var plotArea = this._plotArea;\n var series = plotArea.srcSeries || plotArea.series;\n var seriesOptions;\n if (defined(options.index)) {\n seriesOptions = series[options.index];\n } else if (defined(options.name)) {\n for (var idx = 0; idx < series.length; idx++) {\n if (series[idx].name === options.name) {\n seriesOptions = series[idx];\n break;\n }\n }\n }\n return seriesOptions;\n },\n toggleHighlight: function (show, filter) {\n var plotArea = this._plotArea;\n var firstSeries = (plotArea.srcSeries || plotArea.series || [])[0];\n var seriesName, categoryName, points;\n if (kendo.isFunction(filter)) {\n points = plotArea.filterPoints(filter);\n } else {\n if (isPlainObject(filter)) {\n seriesName = filter.series;\n categoryName = filter.category;\n } else {\n seriesName = categoryName = filter;\n }\n if (firstSeries.type === DONUT) {\n points = pointByCategoryName(plotArea.pointsBySeriesName(seriesName), categoryName);\n } else if (firstSeries.type === PIE || firstSeries.type === FUNNEL) {\n points = pointByCategoryName((plotArea.charts[0] || {}).points, categoryName);\n } else {\n points = plotArea.pointsBySeriesName(seriesName);\n }\n }\n if (points) {\n this._togglePointsHighlight(show, points);\n }\n },\n _togglePointsHighlight: function (show, points) {\n var highlight = this._highlight;\n for (var idx = 0; idx < points.length; idx++) {\n highlight.togglePointHighlight(points[idx], show);\n }\n },\n showTooltip: function (filter) {\n var shared = this._sharedTooltip();\n var tooltip = this._tooltip;\n var plotArea = this._plotArea;\n var point, categoryIndex;\n if (kendo.isFunction(filter)) {\n point = plotArea.findPoint(filter);\n if (point && shared) {\n categoryIndex = point.categoryIx;\n }\n } else if (shared && defined(filter)) {\n categoryIndex = plotArea.categoryAxis.categoryIndex(filter);\n }\n if (shared) {\n if (categoryIndex >= 0) {\n var points = this._plotArea.pointsByCategoryIndex(categoryIndex);\n tooltip.showAt(points);\n }\n } else if (point) {\n tooltip.show(point);\n }\n },\n hideTooltip: function () {\n this._tooltip.hide();\n },\n _initSurface: function () {\n var surface = this.surface;\n var wrap = this._surfaceWrap();\n var chartArea = this.options.chartArea;\n if (chartArea.width) {\n wrap.css('width', chartArea.width);\n }\n if (chartArea.height) {\n wrap.css('height', chartArea.height);\n }\n if (!surface || surface.options.type !== this.options.renderAs) {\n if (surface) {\n surface.destroy();\n }\n this.surface = draw.Surface.create(wrap, { type: this.options.renderAs });\n } else {\n this.surface.clear();\n this.surface.resize();\n }\n },\n _surfaceWrap: function () {\n return this.element;\n },\n _redraw: function () {\n var chart = this, model = chart._getModel(), view;\n chart._destroyView();\n chart._model = model;\n chart._plotArea = model._plotArea;\n model.renderVisual();\n if (this.options.transitions !== false) {\n model.traverse(function (element) {\n if (element.animation) {\n element.animation.setup();\n }\n });\n }\n chart._initSurface();\n chart.surface.draw(model.visual);\n if (this.options.transitions !== false) {\n model.traverse(function (element) {\n if (element.animation) {\n element.animation.play();\n }\n });\n }\n chart._tooltip = chart._createTooltip();\n chart._highlight = new Highlight(view);\n chart._setupSelection();\n chart._createPannable();\n chart._createZoomSelection();\n chart._createMousewheelZoom();\n if (!chart._hasDataSource || chart._hasData || !chart.options.autoBind) {\n chart.trigger(RENDER);\n }\n },\n exportVisual: function (options) {\n var visual;\n if (options && (options.width || options.height)) {\n var chartArea = this.options.chartArea;\n var originalChartArea = this._originalOptions.chartArea;\n deepExtend(chartArea, options);\n var model = this._getModel();\n chartArea.width = originalChartArea.width;\n chartArea.height = originalChartArea.height;\n model.renderVisual();\n visual = model.visual;\n } else {\n visual = this.surface.exportVisual();\n }\n return visual;\n },\n _sharedTooltip: function () {\n var chart = this, options = chart.options;\n return chart._plotArea instanceof CategoricalPlotArea && options.tooltip.shared;\n },\n _createPannable: function () {\n var options = this.options;\n if (options.pannable !== false) {\n this._pannable = new Pannable(this._plotArea, options.pannable);\n }\n },\n _createZoomSelection: function () {\n var zoomable = this.options.zoomable;\n var selection = (zoomable || {}).selection;\n if (zoomable !== false && selection !== false) {\n this._zoomSelection = new ZoomSelection(this, selection);\n }\n },\n _createMousewheelZoom: function () {\n var zoomable = this.options.zoomable;\n var mousewheel = (zoomable || {}).mousewheel;\n if (zoomable !== false && mousewheel !== false) {\n this._mousewheelZoom = new MousewheelZoom(this, mousewheel);\n }\n },\n _createTooltip: function () {\n var chart = this, options = chart.options, element = chart.element, tooltip;\n if (chart._sharedTooltip()) {\n tooltip = new SharedTooltip(element, chart._plotArea, options.tooltip);\n } else {\n tooltip = new Tooltip(element, options.tooltip);\n }\n tooltip.bind(LEAVE, proxy(chart._tooltipleave, chart));\n return tooltip;\n },\n _tooltipleave: function () {\n var chart = this, plotArea = chart._plotArea, highlight = chart._highlight;\n plotArea.hideCrosshairs();\n highlight.hide();\n },\n _applyDefaults: function (options, themeOptions) {\n applyAxisDefaults(options, themeOptions);\n applySeriesDefaults(options, themeOptions);\n },\n _getModel: function () {\n var chart = this, options = chart.options, model = new RootElement(chart._modelOptions()), plotArea;\n model.chart = chart;\n Title.buildTitle(options.title, model);\n plotArea = model._plotArea = chart._createPlotArea();\n if (options.legend.visible) {\n model.append(new Legend(plotArea.options.legend));\n }\n model.append(plotArea);\n model.reflow();\n return model;\n },\n _modelOptions: function () {\n var chart = this, options = chart.options, element = chart.element, height = math.floor(element.height()), width = math.floor(element.width());\n chart._size = null;\n return deepExtend({\n width: width || DEFAULT_WIDTH,\n height: height || DEFAULT_HEIGHT,\n transitions: options.transitions\n }, options.chartArea);\n },\n _createPlotArea: function (skipSeries) {\n var chart = this, options = chart.options;\n return PlotAreaFactory.current.create(skipSeries ? [] : options.series, options);\n },\n _setupSelection: function () {\n var chart = this, plotArea = chart._plotArea, axes = plotArea.axes, selections = chart._selections = [], selection, i, axis, min, max, options;\n if (!chart._selectStartHandler) {\n chart._selectStartHandler = proxy(chart._selectStart, chart);\n chart._selectHandler = proxy(chart._select, chart);\n chart._selectEndHandler = proxy(chart._selectEnd, chart);\n }\n for (i = 0; i < axes.length; i++) {\n axis = axes[i];\n options = axis.options;\n if (axis instanceof CategoryAxis && options.select && !options.vertical) {\n min = 0;\n max = options.categories.length - 1;\n if (axis instanceof DateCategoryAxis) {\n min = options.categories[min];\n max = options.categories[max];\n }\n if (!options.justified) {\n if (axis instanceof DateCategoryAxis) {\n max = addDuration(max, 1, options.baseUnit, options.weekStartDay);\n } else {\n max++;\n }\n }\n selection = new Selection(chart, axis, deepExtend({\n min: min,\n max: max\n }, options.select));\n selection.bind(SELECT_START, chart._selectStartHandler);\n selection.bind(SELECT, chart._selectHandler);\n selection.bind(SELECT_END, chart._selectEndHandler);\n selections.push(selection);\n }\n }\n },\n _selectStart: function (e) {\n return this.trigger(SELECT_START, e);\n },\n _select: function (e) {\n return this.trigger(SELECT, e);\n },\n _selectEnd: function (e) {\n return this.trigger(SELECT_END, e);\n },\n _attachEvents: function () {\n var chart = this, element = chart.element, surface = chart.surface;\n surface.bind('mouseenter', proxy(chart._mouseover, chart));\n surface.bind('mouseleave', proxy(chart._mouseout, chart));\n element.on(CONTEXTMENU_NS, proxy(chart._click, chart));\n element.on(MOUSEWHEEL_NS, proxy(chart._mousewheel, chart));\n element.on(MOUSELEAVE_NS, proxy(chart._mouseleave, chart));\n chart._mousemove = kendo.throttle(proxy(chart._mousemove, chart), MOUSEMOVE_DELAY);\n if (chart._shouldAttachMouseMove()) {\n element.on(MOUSEMOVE_NS, chart._mousemove);\n }\n if (kendo.UserEvents) {\n chart._userEvents = new kendo.UserEvents(element, {\n global: true,\n multiTouch: true,\n fastTap: true,\n tap: proxy(chart._tap, chart),\n start: proxy(chart._start, chart),\n move: proxy(chart._move, chart),\n end: proxy(chart._end, chart),\n gesturestart: proxy(chart._gesturestart, chart),\n gesturechange: proxy(chart._gesturechange, chart),\n gestureend: proxy(chart._gestureend, chart)\n });\n }\n },\n _gesturestart: function (e) {\n if (this._mousewheelZoom) {\n this._gestureDistance = e.distance;\n this._unsetActivePoint();\n this.surface.suspendTracking();\n }\n },\n _gestureend: function () {\n if (this._zooming) {\n if (this.surface) {\n this.surface.resumeTracking();\n }\n this._zooming = false;\n this.trigger(ZOOM_END, {});\n }\n },\n _gesturechange: function (e) {\n var chart = this;\n var mousewheelZoom = chart._mousewheelZoom;\n if (mousewheelZoom) {\n e.preventDefault();\n var previousGestureDistance = chart._gestureDistance;\n var scaleDelta = -e.distance / previousGestureDistance + 1;\n if (math.abs(scaleDelta) >= 0.1) {\n scaleDelta = math.round(scaleDelta * 10);\n chart._gestureDistance = e.distance;\n var args = {\n delta: scaleDelta,\n axisRanges: axisRanges(chart._plotArea.axes),\n originalEvent: e\n };\n if (chart._zooming || !chart.trigger(ZOOM_START, args)) {\n if (!chart._zooming) {\n chart._zooming = true;\n }\n var ranges = args.axisRanges = mousewheelZoom.updateRanges(scaleDelta);\n if (ranges && !chart.trigger(ZOOM, args)) {\n mousewheelZoom.zoom();\n }\n }\n }\n }\n },\n _mouseout: function (e) {\n if (e.element) {\n var element = this._drawingChartElement(e.element, e);\n if (element && element.leave) {\n element.leave(this, e.originalEvent);\n }\n }\n },\n _start: function (e) {\n var chart = this, events = chart._events, coords = chart._eventCoordinates(e);\n if (!chart._plotArea.backgroundContainsPoint(coords)) {\n return;\n }\n if (defined(events[DRAG_START] || events[DRAG] || events[DRAG_END])) {\n chart._startNavigation(e, coords, DRAG_START);\n }\n if (chart._pannable && chart._pannable.start(e)) {\n this.surface.suspendTracking();\n this._unsetActivePoint();\n }\n if (chart._zoomSelection) {\n if (chart._zoomSelection.start(e)) {\n this.trigger(ZOOM_START, {\n axisRanges: axisRanges(this._plotArea.axes),\n originalEvent: e\n });\n }\n }\n },\n _move: function (e) {\n var chart = this, state = chart._navState, pannable = chart._pannable, axes, ranges = {}, i, currentAxis, axisName, axis, delta;\n if (pannable) {\n e.preventDefault();\n ranges = pannable.move(e);\n if (ranges && !chart.trigger(DRAG, {\n axisRanges: ranges,\n originalEvent: e\n })) {\n pannable.pan();\n }\n } else if (state) {\n e.preventDefault();\n axes = state.axes;\n for (i = 0; i < axes.length; i++) {\n currentAxis = axes[i];\n axisName = currentAxis.options.name;\n if (axisName) {\n axis = currentAxis.options.vertical ? e.y : e.x;\n delta = axis.startLocation - axis.location;\n if (delta !== 0) {\n ranges[currentAxis.options.name] = currentAxis.translateRange(delta);\n }\n }\n }\n state.axisRanges = ranges;\n chart.trigger(DRAG, {\n axisRanges: ranges,\n originalEvent: e\n });\n }\n if (chart._zoomSelection) {\n chart._zoomSelection.move(e);\n }\n },\n _end: function (e) {\n var pannable = this._pannable;\n if (pannable && pannable.end(e)) {\n this.surface.resumeTracking();\n this.trigger(DRAG_END, {\n axisRanges: axisRanges(this._plotArea.axes),\n originalEvent: e\n });\n } else {\n this._endNavigation(e, DRAG_END);\n }\n if (this._zoomSelection) {\n var ranges = this._zoomSelection.end(e);\n if (ranges && !this.trigger(ZOOM, {\n axisRanges: ranges,\n originalEvent: e\n })) {\n this._zoomSelection.zoom();\n this.trigger(ZOOM_END, {\n axisRanges: ranges,\n originalEvent: e\n });\n }\n }\n },\n _mousewheel: function (e) {\n var chart = this, origEvent = e.originalEvent, prevented, delta = mwDelta(e), totalDelta, state = chart._navState, axes, i, currentAxis, axisName, ranges = {}, mousewheelZoom = chart._mousewheelZoom, coords = chart._eventCoordinates(origEvent);\n if (!chart._plotArea.backgroundContainsPoint(coords)) {\n return;\n }\n if (mousewheelZoom) {\n var args = {\n delta: delta,\n axisRanges: axisRanges(this._plotArea.axes),\n originalEvent: e\n };\n if (chart._zooming || !chart.trigger(ZOOM_START, args)) {\n e.preventDefault();\n if (!chart._zooming) {\n chart._unsetActivePoint();\n chart.surface.suspendTracking();\n chart._zooming = true;\n }\n if (chart._mwTimeout) {\n clearTimeout(chart._mwTimeout);\n }\n args.axisRanges = ranges = mousewheelZoom.updateRanges(delta);\n if (ranges && !chart.trigger(ZOOM, args)) {\n mousewheelZoom.zoom();\n }\n chart._mwTimeout = setTimeout(function () {\n chart.trigger(ZOOM_END, args);\n chart._zooming = false;\n if (chart.surface) {\n chart.surface.resumeTracking();\n }\n }, MOUSEWHEEL_DELAY);\n }\n } else {\n if (!state) {\n prevented = chart._startNavigation(origEvent, coords, ZOOM_START);\n if (!prevented) {\n state = chart._navState;\n }\n }\n if (state) {\n totalDelta = state.totalDelta || delta;\n state.totalDelta = totalDelta + delta;\n axes = chart._navState.axes;\n for (i = 0; i < axes.length; i++) {\n currentAxis = axes[i];\n axisName = currentAxis.options.name;\n if (axisName) {\n ranges[axisName] = currentAxis.scaleRange(-totalDelta);\n }\n }\n chart.trigger(ZOOM, {\n delta: delta,\n axisRanges: ranges,\n originalEvent: e\n });\n if (chart._mwTimeout) {\n clearTimeout(chart._mwTimeout);\n }\n chart._mwTimeout = setTimeout(function () {\n chart._endNavigation(e, ZOOM_END);\n }, MOUSEWHEEL_DELAY);\n }\n }\n },\n _startNavigation: function (e, coords, chartEvent) {\n var chart = this, plotArea = chart._model._plotArea, pane = plotArea.findPointPane(coords), axes = plotArea.axes.slice(0), prevented;\n if (!pane) {\n return;\n }\n var ranges = axisRanges(axes);\n prevented = chart.trigger(chartEvent, {\n axisRanges: ranges,\n originalEvent: e\n });\n if (prevented) {\n chart._userEvents.cancel();\n } else {\n chart._suppressHover = true;\n chart._unsetActivePoint();\n chart._navState = {\n axisRanges: ranges,\n pane: pane,\n axes: axes\n };\n }\n },\n _endNavigation: function (e, chartEvent) {\n var chart = this;\n if (chart._navState) {\n chart.trigger(chartEvent, {\n axisRanges: chart._navState.axisRanges,\n originalEvent: e\n });\n chart._suppressHover = false;\n chart._navState = null;\n }\n },\n _getChartElement: function (e, match) {\n var element = this.surface.eventTarget(e);\n if (element) {\n return this._drawingChartElement(element, e, match);\n }\n },\n _drawingChartElement: function (element, e, match) {\n var chartElement;\n while (element && !chartElement) {\n chartElement = element.chartElement;\n element = element.parent;\n }\n if (chartElement) {\n if (chartElement.aliasFor) {\n chartElement = chartElement.aliasFor(e, this._eventCoordinates(e));\n }\n if (match) {\n chartElement = chartElement.closest(match);\n }\n return chartElement;\n }\n },\n _eventCoordinates: function (e) {\n var chart = this, isTouch = defined((e.x || {}).client), clientX = isTouch ? e.x.client : e.clientX, clientY = isTouch ? e.y.client : e.clientY;\n return chart._toModelCoordinates(clientX, clientY);\n },\n _toModelCoordinates: function (clientX, clientY) {\n var element = this.element, offset = element.offset(), paddingLeft = parseInt(element.css('paddingLeft'), 10), paddingTop = parseInt(element.css('paddingTop'), 10), win = $(window);\n return new Point2D(clientX - offset.left - paddingLeft + win.scrollLeft(), clientY - offset.top - paddingTop + win.scrollTop());\n },\n _tap: function (e) {\n var chart = this, drawingElement = chart.surface.eventTarget(e), element = chart._drawingChartElement(drawingElement, e);\n if (chart._activePoint === element) {\n chart._propagateClick(element, e);\n } else {\n if (!chart._startHover(drawingElement, e)) {\n chart._unsetActivePoint();\n }\n chart._propagateClick(element, e);\n }\n chart._supressMouseleave = true;\n setTimeout(function () {\n chart._supressMouseleave = false;\n }, 0);\n },\n _click: function (e) {\n var chart = this, element = chart._getChartElement(e);\n chart._propagateClick(element, e);\n },\n _propagateClick: function (element, e) {\n while (element) {\n if (element.click) {\n element.click(this, e);\n }\n element = element.parent;\n }\n },\n _startHover: function (element, e) {\n var chart = this, chartElement = chart._drawingChartElement(element, e), tooltip = chart._tooltip, highlight = chart._highlight, tooltipOptions = chart.options.tooltip, point;\n if (chart._suppressHover || !highlight || highlight.isHighlighted(chartElement) || chart._sharedTooltip()) {\n return;\n }\n point = chart._drawingChartElement(element, e, function (element) {\n return element.hover && !(element instanceof PlotAreaBase);\n });\n if (point && !point.hover(chart, e)) {\n chart._activePoint = point;\n tooltipOptions = deepExtend({}, tooltipOptions, point.options.tooltip);\n if (tooltipOptions.visible) {\n tooltip.show(point);\n }\n highlight.show(point);\n return point;\n }\n },\n _mouseover: function (e) {\n var chart = this;\n var point = chart._startHover(e.element, e.originalEvent);\n if (point && point.tooltipTracking) {\n $(document).on(MOUSEMOVE_TRACKING, proxy(chart._mouseMoveTracking, chart));\n }\n },\n _mouseMoveTracking: function (e) {\n var chart = this, options = chart.options, tooltip = chart._tooltip, highlight = chart._highlight, coords = chart._eventCoordinates(e), point = chart._activePoint, tooltipOptions, seriesPoint;\n if (chart._plotArea.box.containsPoint(coords)) {\n if (point && point.tooltipTracking && point.series && point.parent.getNearestPoint) {\n seriesPoint = point.parent.getNearestPoint(coords.x, coords.y, point.seriesIx);\n if (seriesPoint && seriesPoint != point) {\n seriesPoint.hover(chart, e);\n chart._activePoint = seriesPoint;\n tooltipOptions = deepExtend({}, options.tooltip, point.options.tooltip);\n if (tooltipOptions.visible) {\n tooltip.show(seriesPoint);\n }\n highlight.show(seriesPoint);\n }\n }\n } else {\n $(document).off(MOUSEMOVE_TRACKING);\n chart._unsetActivePoint();\n }\n },\n _mousemove: function (e) {\n var coords = this._eventCoordinates(e);\n this._trackCrosshairs(coords);\n if (this._plotArea.hover) {\n this._plotArea.hover(this, e);\n }\n if (this._sharedTooltip()) {\n this._trackSharedTooltip(coords, e);\n }\n },\n _trackCrosshairs: function (coords) {\n var crosshairs = this._plotArea.crosshairs, i, current;\n for (i = 0; i < crosshairs.length; i++) {\n current = crosshairs[i];\n if (current.box.containsPoint(coords)) {\n current.showAt(coords);\n } else {\n current.hide();\n }\n }\n },\n _trackSharedTooltip: function (coords, e) {\n var chart = this, options = chart.options, plotArea = chart._plotArea, categoryAxis = plotArea.categoryAxis, tooltip = chart._tooltip, tooltipOptions = options.tooltip, highlight = chart._highlight, index, points;\n if (plotArea.box.containsPoint(coords)) {\n index = categoryAxis.pointCategoryIndex(coords);\n if (index !== chart._tooltipCategoryIx) {\n points = plotArea.pointsByCategoryIndex(index);\n var pointArgs = $.map(points, function (point) {\n return point.eventArgs(e);\n });\n var hoverArgs = pointArgs[0] || {};\n hoverArgs.categoryPoints = pointArgs;\n if (points.length > 0 && !this.trigger(SERIES_HOVER, hoverArgs)) {\n if (tooltipOptions.visible) {\n tooltip.showAt(points, coords);\n }\n highlight.show(points);\n } else {\n tooltip.hide();\n }\n chart._tooltipCategoryIx = index;\n }\n }\n },\n _mouseleave: function (e) {\n var chart = this, plotArea = chart._plotArea, tooltip = chart._tooltip, highlight = chart._highlight, target = e.relatedTarget;\n if (!(target && $(target).closest(tooltip.element).length) && !chart._supressMouseleave) {\n chart._mousemove.cancel();\n plotArea.hideCrosshairs();\n highlight.hide();\n setTimeout(proxy(tooltip.hide, tooltip), TOOLTIP_HIDE_DELAY);\n chart._tooltipCategoryIx = null;\n }\n },\n _unsetActivePoint: function () {\n var chart = this, tooltip = chart._tooltip, highlight = chart._highlight;\n chart._activePoint = null;\n if (tooltip) {\n tooltip.hide();\n }\n if (highlight) {\n highlight.hide();\n }\n },\n _onDataChanged: function (e) {\n var chart = this, options = chart.options, series = chart._sourceSeries || options.series, seriesIx, seriesLength = series.length, data = chart.dataSource.view(), grouped = (chart.dataSource.group() || []).length > 0, processedSeries = [], currentSeries;\n for (seriesIx = 0; seriesIx < seriesLength; seriesIx++) {\n currentSeries = series[seriesIx];\n if (chart._isBindable(currentSeries) && grouped) {\n append(processedSeries, groupSeries(currentSeries, data));\n this._applyGroupVisibleState(processedSeries, e);\n } else {\n processedSeries.push(currentSeries || []);\n }\n }\n chart._sourceSeries = series;\n options.series = processedSeries;\n applySeriesColors(chart.options);\n chart._bindSeries();\n chart._bindCategories();\n chart._hasData = true;\n chart._deferRedraw();\n },\n _applyGroupVisibleState: function (processedSeries, e) {\n if (e && e.action) {\n var visibleState = this._groupVisibleState = this._groupVisibleState || {};\n for (var idx = 0; idx < processedSeries.length; idx++) {\n if (visibleState[processedSeries[idx]._groupValue] === false) {\n processedSeries[idx].visible = false;\n }\n }\n } else {\n delete this._groupVisibleState;\n }\n },\n _saveGroupVisibleState: function (series) {\n if (defined(series._groupValue)) {\n if (!this._groupVisibleState) {\n this._groupVisibleState = {};\n }\n this._groupVisibleState[series._groupValue] = series.visible;\n }\n },\n _deferRedraw: function () {\n var chart = this;\n if (kendo.support.vml) {\n chart._clearRedrawTimeout();\n chart._redrawTimeout = setTimeout(function () {\n if (!chart.surface) {\n return;\n }\n chart.trigger(DATABOUND);\n chart._redraw();\n }, 0);\n } else {\n chart.trigger(DATABOUND);\n chart._redraw();\n }\n },\n _clearRedrawTimeout: function () {\n if (this._redrawTimeout) {\n clearInterval(this._redrawTimeout);\n this._redrawTimeout = null;\n }\n },\n _bindSeries: function () {\n var chart = this, data = chart.dataSource.view(), series = chart.options.series, seriesIx, seriesLength = series.length, currentSeries, groupIx, seriesData;\n for (seriesIx = 0; seriesIx < seriesLength; seriesIx++) {\n currentSeries = series[seriesIx];\n if (chart._isBindable(currentSeries)) {\n groupIx = currentSeries._groupIx;\n seriesData = defined(groupIx) ? (data[groupIx] || {}).items : data;\n if (currentSeries.autoBind !== false) {\n currentSeries.data = seriesData;\n }\n }\n }\n },\n _bindCategories: function () {\n var chart = this, data = chart.dataSource.view() || [], grouped = (chart.dataSource.group() || []).length > 0, categoriesData = data, options = chart.options, definitions = [].concat(options.categoryAxis), axisIx, axis;\n if (grouped) {\n if (data.length) {\n categoriesData = data[0].items;\n }\n }\n for (axisIx = 0; axisIx < definitions.length; axisIx++) {\n axis = definitions[axisIx];\n if (axis.autoBind !== false) {\n chart._bindCategoryAxis(axis, categoriesData, axisIx);\n }\n }\n },\n _bindCategoryAxis: function (axis, data, axisIx) {\n var count = (data || []).length, categoryIx, category, row;\n if (axis.field) {\n axis.categories = [];\n for (categoryIx = 0; categoryIx < count; categoryIx++) {\n row = data[categoryIx];\n category = getField(axis.field, row);\n if (categoryIx === 0) {\n axis.categories = [category];\n axis.dataItems = [row];\n } else {\n axis.categories.push(category);\n axis.dataItems.push(row);\n }\n }\n } else {\n this._bindCategoryAxisFromSeries(axis, axisIx);\n }\n },\n _bindCategoryAxisFromSeries: function (axis, axisIx) {\n var chart = this, items = [], result, series = chart.options.series, seriesLength = series.length, seriesIx, s, onAxis, data, dataIx, dataLength, dataRow, category, uniqueCategories = {}, getFn, dateAxis;\n for (seriesIx = 0; seriesIx < seriesLength; seriesIx++) {\n s = series[seriesIx];\n onAxis = s.categoryAxis === axis.name || !s.categoryAxis && axisIx === 0;\n data = s.data;\n dataLength = data.length;\n if (s.categoryField && onAxis && dataLength > 0) {\n dateAxis = isDateAxis(axis, getField(s.categoryField, data[0]));\n getFn = dateAxis ? getDateField : getField;\n for (dataIx = 0; dataIx < dataLength; dataIx++) {\n dataRow = data[dataIx];\n category = getFn(s.categoryField, dataRow);\n if (dateAxis || !uniqueCategories[category]) {\n items.push([\n category,\n dataRow\n ]);\n if (!dateAxis) {\n uniqueCategories[category] = true;\n }\n }\n }\n }\n }\n if (items.length > 0) {\n if (dateAxis) {\n items = uniqueDates(items, function (a, b) {\n return dateComparer(a[0], b[0]);\n });\n }\n result = transpose(items);\n axis.categories = result[0];\n axis.dataItems = result[1];\n }\n },\n _isBindable: function (series) {\n var valueFields = SeriesBinder.current.valueFields(series), result = true, field, i;\n for (i = 0; i < valueFields.length; i++) {\n field = valueFields[i];\n if (field === VALUE) {\n field = 'field';\n } else {\n field = field + 'Field';\n }\n if (!defined(series[field])) {\n result = false;\n break;\n }\n }\n return result;\n },\n _legendItemClick: function (seriesIndex, pointIndex) {\n var chart = this, plotArea = chart._plotArea, currentSeries = (plotArea.srcSeries || plotArea.series)[seriesIndex], visible, point;\n if (inArray(currentSeries.type, [\n PIE,\n DONUT,\n FUNNEL\n ])) {\n point = currentSeries.data[pointIndex];\n if (!defined(point.visible)) {\n visible = false;\n } else {\n visible = !point.visible;\n }\n point.visible = visible;\n } else {\n currentSeries.visible = !currentSeries.visible;\n this._saveGroupVisibleState(currentSeries);\n }\n this._noTransitionsRedraw();\n },\n _noTransitionsRedraw: function () {\n var options = this.options;\n var transitionsState;\n if (options.transitions) {\n options.transitions = false;\n transitionsState = true;\n }\n this.redraw();\n if (transitionsState) {\n options.transitions = true;\n }\n },\n _legendItemHover: function (seriesIndex, pointIndex) {\n var chart = this, plotArea = chart._plotArea, highlight = chart._highlight, currentSeries = (plotArea.srcSeries || plotArea.series)[seriesIndex], items;\n if (inArray(currentSeries.type, [\n PIE,\n DONUT,\n FUNNEL\n ])) {\n items = plotArea.findPoint(function (point) {\n return point.series.index === seriesIndex && point.index === pointIndex;\n });\n } else {\n items = plotArea.pointsBySeriesIndex(seriesIndex);\n }\n highlight.show(items);\n },\n _shouldAttachMouseMove: function () {\n var chart = this;\n var events = chart._events;\n return chart._plotArea.crosshairs.length || chart._tooltip && chart._sharedTooltip() || defined(events[PLOT_AREA_HOVER]);\n },\n setOptions: function (options) {\n var chart = this, dataSource = options.dataSource;\n options.dataSource = undefined;\n clearMissingValues(chart._originalOptions, options);\n chart._originalOptions = deepExtend(chart._originalOptions, options);\n chart.options = deepExtend({}, chart._originalOptions);\n chart._sourceSeries = null;\n $(document).off(MOUSEMOVE_NS);\n Widget.fn._setEvents.call(chart, options);\n chart._initTheme(chart.options);\n if (dataSource) {\n chart.setDataSource(dataSource);\n }\n if (chart._hasDataSource) {\n chart._onDataChanged();\n } else {\n chart._bindCategories();\n chart.redraw();\n }\n if (chart._shouldAttachMouseMove()) {\n chart.element.on(MOUSEMOVE_NS, chart._mousemove);\n }\n },\n destroy: function () {\n var chart = this, dataSource = chart.dataSource;\n chart.element.off(NS);\n if (dataSource) {\n dataSource.unbind(CHANGE, chart._dataChangeHandler);\n }\n $(document).off(MOUSEMOVE_TRACKING);\n if (chart._userEvents) {\n chart._userEvents.destroy();\n }\n chart._destroyView();\n chart.surface.destroy();\n chart.surface = null;\n chart._clearRedrawTimeout();\n Widget.fn.destroy.call(chart);\n },\n _destroyView: function () {\n var chart = this, model = chart._model, selections = chart._selections;\n if (model) {\n model.destroy();\n chart._model = null;\n }\n if (selections) {\n while (selections.length > 0) {\n selections.shift().destroy();\n }\n }\n chart._unsetActivePoint();\n if (chart._tooltip) {\n chart._tooltip.destroy();\n }\n if (chart._highlight) {\n chart._highlight.destroy();\n }\n if (chart._zoomSelection) {\n chart._zoomSelection.destroy();\n delete chart._zoomSelection;\n }\n if (chart._pannable) {\n chart._pannable.destroy();\n delete chart._pannable;\n }\n if (chart._mousewheelZoom) {\n chart._mousewheelZoom.destroy();\n delete chart._mousewheelZoom;\n }\n }\n });\n dataviz.ExportMixin.extend(Chart.fn);\n if (kendo.PDFMixin) {\n kendo.PDFMixin.extend(Chart.fn);\n }\n var PlotAreaFactory = Class.extend({\n init: function () {\n this._registry = [];\n },\n register: function (type, seriesTypes) {\n this._registry.push({\n type: type,\n seriesTypes: seriesTypes\n });\n },\n create: function (srcSeries, options) {\n var registry = this._registry, match = registry[0], i, entry, series;\n for (i = 0; i < registry.length; i++) {\n entry = registry[i];\n series = filterSeriesByType(srcSeries, entry.seriesTypes);\n if (series.length > 0) {\n match = entry;\n break;\n }\n }\n return new match.type(series, options);\n }\n });\n PlotAreaFactory.current = new PlotAreaFactory();\n var SeriesBinder = Class.extend({\n init: function () {\n this._valueFields = {};\n this._otherFields = {};\n this._nullValue = {};\n this._undefinedValue = {};\n },\n register: function (seriesTypes, valueFields, otherFields) {\n var binder = this, i, type;\n valueFields = valueFields || [VALUE];\n for (i = 0; i < seriesTypes.length; i++) {\n type = seriesTypes[i];\n binder._valueFields[type] = valueFields;\n binder._otherFields[type] = otherFields;\n binder._nullValue[type] = binder._makeValue(valueFields, null);\n binder._undefinedValue[type] = binder._makeValue(valueFields, undefined);\n }\n },\n canonicalFields: function (series) {\n return this.valueFields(series).concat(this.otherFields(series));\n },\n valueFields: function (series) {\n return this._valueFields[series.type] || [VALUE];\n },\n otherFields: function (series) {\n return this._otherFields[series.type] || [VALUE];\n },\n bindPoint: function (series, pointIx, item) {\n var binder = this, data = series.data, pointData = defined(item) ? item : data[pointIx], result = { valueFields: { value: pointData } }, fields, fieldData, srcValueFields, srcPointFields, valueFields = binder.valueFields(series), otherFields = binder._otherFields[series.type], value;\n if (pointData === null) {\n value = binder._nullValue[series.type];\n } else if (!defined(pointData)) {\n value = binder._undefinedValue[series.type];\n } else if (isArray(pointData)) {\n fieldData = pointData.slice(valueFields.length);\n value = binder._bindFromArray(pointData, valueFields);\n fields = binder._bindFromArray(fieldData, otherFields);\n } else if (typeof pointData === OBJECT) {\n srcValueFields = binder.sourceFields(series, valueFields);\n srcPointFields = binder.sourceFields(series, otherFields);\n value = binder._bindFromObject(pointData, valueFields, srcValueFields);\n fields = binder._bindFromObject(pointData, otherFields, srcPointFields);\n }\n if (defined(value)) {\n if (valueFields.length === 1) {\n result.valueFields.value = value[valueFields[0]];\n } else {\n result.valueFields = value;\n }\n }\n result.fields = fields || {};\n return result;\n },\n _makeValue: function (fields, initialValue) {\n var value = {}, i, length = fields.length, fieldName;\n for (i = 0; i < length; i++) {\n fieldName = fields[i];\n value[fieldName] = initialValue;\n }\n return value;\n },\n _bindFromArray: function (array, fields) {\n var value = {}, i, length;\n if (fields) {\n length = math.min(fields.length, array.length);\n for (i = 0; i < length; i++) {\n value[fields[i]] = array[i];\n }\n }\n return value;\n },\n _bindFromObject: function (object, fields, srcFields) {\n var value = {}, i, length, fieldName, srcFieldName;\n if (fields) {\n length = fields.length;\n srcFields = srcFields || fields;\n for (i = 0; i < length; i++) {\n fieldName = fields[i];\n srcFieldName = srcFields[i];\n value[fieldName] = getField(srcFieldName, object);\n }\n }\n return value;\n },\n sourceFields: function (series, canonicalFields) {\n var i, length, fieldName, sourceFields, sourceFieldName;\n if (canonicalFields) {\n length = canonicalFields.length;\n sourceFields = [];\n for (i = 0; i < length; i++) {\n fieldName = canonicalFields[i];\n sourceFieldName = fieldName === VALUE ? 'field' : fieldName + 'Field';\n sourceFields.push(series[sourceFieldName] || fieldName);\n }\n }\n return sourceFields;\n }\n });\n SeriesBinder.current = new SeriesBinder();\n var BarLabel = ChartElement.extend({\n init: function (content, options) {\n var barLabel = this;\n ChartElement.fn.init.call(barLabel, options);\n this.textBox = new TextBox(content, barLabel.options);\n barLabel.append(this.textBox);\n },\n options: {\n position: OUTSIDE_END,\n margin: getSpacing(3),\n padding: getSpacing(4),\n color: BLACK,\n background: '',\n border: {\n width: 1,\n color: ''\n },\n aboveAxis: true,\n vertical: false,\n animation: {\n type: FADEIN,\n delay: INITIAL_ANIMATION_DURATION\n },\n zIndex: 2\n },\n createVisual: function () {\n this.textBox.options.noclip = this.options.noclip;\n },\n reflow: function (targetBox) {\n var barLabel = this, options = barLabel.options, vertical = options.vertical, aboveAxis = options.aboveAxis, text = barLabel.children[0], box = text.box, padding = text.options.padding;\n text.options.align = vertical ? CENTER : LEFT;\n text.options.vAlign = vertical ? TOP : CENTER;\n if (options.position == INSIDE_END) {\n if (vertical) {\n text.options.vAlign = TOP;\n if (!aboveAxis && box.height() < targetBox.height()) {\n text.options.vAlign = BOTTOM;\n }\n } else {\n text.options.align = aboveAxis ? RIGHT : LEFT;\n }\n } else if (options.position == CENTER) {\n text.options.vAlign = CENTER;\n text.options.align = CENTER;\n } else if (options.position == INSIDE_BASE) {\n if (vertical) {\n text.options.vAlign = aboveAxis ? BOTTOM : TOP;\n } else {\n text.options.align = aboveAxis ? LEFT : RIGHT;\n }\n } else if (options.position == OUTSIDE_END) {\n if (vertical) {\n if (aboveAxis) {\n targetBox = new Box2D(targetBox.x1, targetBox.y1 - box.height(), targetBox.x2, targetBox.y1);\n } else {\n targetBox = new Box2D(targetBox.x1, targetBox.y2, targetBox.x2, targetBox.y2 + box.height());\n }\n } else {\n text.options.align = CENTER;\n if (aboveAxis) {\n targetBox = new Box2D(targetBox.x2, targetBox.y1, targetBox.x2 + box.width(), targetBox.y2);\n } else {\n targetBox = new Box2D(targetBox.x1 - box.width(), targetBox.y1, targetBox.x1, targetBox.y2);\n }\n }\n }\n if (!options.rotation) {\n if (vertical) {\n padding.left = padding.right = (targetBox.width() - text.contentBox.width()) / 2;\n } else {\n padding.top = padding.bottom = (targetBox.height() - text.contentBox.height()) / 2;\n }\n }\n text.reflow(targetBox);\n },\n alignToClipBox: function (clipBox) {\n var barLabel = this, vertical = barLabel.options.vertical, field = vertical ? Y : X, start = field + '1', end = field + '2', text = barLabel.children[0], parentBox = barLabel.parent.box, targetBox;\n if (parentBox[start] < clipBox[start] || clipBox[end] < parentBox[end]) {\n targetBox = text.paddingBox.clone();\n targetBox[start] = math.max(parentBox[start], clipBox[start]);\n targetBox[end] = math.min(parentBox[end], clipBox[end]);\n this.reflow(targetBox);\n }\n }\n });\n var LegendItem = BoxElement.extend({\n init: function (options) {\n var item = this;\n BoxElement.fn.init.call(item, options);\n item.createContainer();\n item.createMarker();\n item.createLabel();\n },\n createContainer: function () {\n var item = this;\n item.container = new FloatElement({\n vertical: false,\n wrap: false,\n align: CENTER\n });\n item.append(item.container);\n },\n createMarker: function () {\n this.container.append(new ShapeElement(this.markerOptions()));\n },\n markerOptions: function () {\n var options = this.options;\n var markerColor = options.markerColor;\n return deepExtend({}, options.markers, {\n background: markerColor,\n border: { color: markerColor }\n });\n },\n createLabel: function () {\n var item = this, options = item.options, labelOptions = deepExtend({}, options.labels);\n item.container.append(new TextBox(options.text, labelOptions));\n },\n renderComplete: function () {\n ChartElement.fn.renderComplete.call(this);\n var cursor = this.options.cursor || {};\n var eventSink = this._itemOverlay = draw.Path.fromRect(this.container.box.toRect(), {\n fill: {\n color: WHITE,\n opacity: 0\n },\n stroke: null,\n cursor: cursor.style || cursor\n });\n this.appendVisual(eventSink);\n },\n click: function (widget, e) {\n var args = this.eventArgs(e);\n if (!widget.trigger(LEGEND_ITEM_CLICK, args)) {\n e.preventDefault();\n widget._legendItemClick(args.seriesIndex, args.pointIndex);\n }\n },\n hover: function (widget, e) {\n var args = this.eventArgs(e);\n if (!widget.trigger(LEGEND_ITEM_HOVER, args)) {\n e.preventDefault();\n widget._legendItemHover(args.seriesIndex, args.pointIndex);\n }\n return true;\n },\n leave: function (widget) {\n widget._unsetActivePoint();\n },\n eventArgs: function (e) {\n var options = this.options;\n return {\n element: eventTargetElement(e),\n text: options.text,\n series: options.series,\n seriesIndex: options.series.index,\n pointIndex: options.pointIndex\n };\n },\n renderVisual: function () {\n var that = this;\n var options = that.options;\n var customVisual = options.visual;\n if (customVisual) {\n that.visual = customVisual({\n active: options.active,\n series: options.series,\n pointIndex: options.pointIndex,\n options: {\n markers: that.markerOptions(),\n labels: options.labels\n },\n createVisual: function () {\n that.createVisual();\n that.renderChildren();\n that.renderComplete();\n var defaultVisual = that.visual;\n delete that.visual;\n return defaultVisual;\n }\n });\n this.addVisual();\n } else {\n ChartElement.fn.renderVisual.call(that);\n }\n }\n });\n var LegendLayout = ChartElement.extend({\n render: function () {\n var legendItem, items = this.children;\n var options = this.options;\n var vertical = options.vertical;\n this.visual = new draw.Layout(null, {\n spacing: vertical ? 0 : options.spacing,\n lineSpacing: vertical ? options.spacing : 0,\n orientation: vertical ? 'vertical' : 'horizontal'\n });\n for (var idx = 0; idx < items.length; idx++) {\n legendItem = items[idx];\n legendItem.reflow(new Box2D());\n legendItem.renderVisual();\n }\n },\n reflow: function (box) {\n this.visual.rect(box.toRect());\n this.visual.reflow();\n var bbox = this.visual.clippedBBox();\n if (bbox) {\n this.box = dataviz.rectToBox(bbox);\n } else {\n this.box = new Box2D();\n }\n },\n renderVisual: function () {\n this.addVisual();\n },\n createVisual: noop\n });\n var Legend = ChartElement.extend({\n init: function (options) {\n var legend = this;\n ChartElement.fn.init.call(legend, options);\n if (!inArray(legend.options.position, [\n TOP,\n RIGHT,\n BOTTOM,\n LEFT,\n CUSTOM\n ])) {\n legend.options.position = RIGHT;\n }\n legend.createContainer();\n legend.createItems();\n },\n options: {\n position: RIGHT,\n items: [],\n labels: { margin: { left: 6 } },\n offsetX: 0,\n offsetY: 0,\n margin: getSpacing(5),\n padding: getSpacing(5),\n border: {\n color: BLACK,\n width: 0\n },\n item: { cursor: POINTER },\n spacing: 6,\n background: '',\n zIndex: 1,\n markers: {\n border: { width: 1 },\n width: 7,\n height: 7,\n type: 'rect',\n align: LEFT,\n vAlign: CENTER\n }\n },\n createContainer: function () {\n var legend = this, options = legend.options, userAlign = options.align, position = options.position, align = position, vAlign = CENTER;\n if (position == CUSTOM) {\n align = LEFT;\n } else if (inArray(position, [\n TOP,\n BOTTOM\n ])) {\n if (userAlign == 'start') {\n align = LEFT;\n } else if (userAlign == 'end') {\n align = RIGHT;\n } else {\n align = CENTER;\n }\n vAlign = position;\n } else if (userAlign) {\n if (userAlign == 'start') {\n vAlign = TOP;\n } else if (userAlign == 'end') {\n vAlign = BOTTOM;\n }\n }\n legend.container = new BoxElement({\n margin: options.margin,\n padding: options.padding,\n background: options.background,\n border: options.border,\n vAlign: vAlign,\n align: align,\n zIndex: options.zIndex,\n shrinkToFit: true\n });\n legend.append(legend.container);\n },\n createItems: function () {\n var legend = this, options = legend.options, items = options.items, count = items.length, vertical = legend.isVertical(), innerElement, i, item;\n innerElement = new LegendLayout({\n vertical: vertical,\n spacing: options.spacing\n });\n if (options.reverse) {\n items = items.slice(0).reverse();\n }\n for (i = 0; i < count; i++) {\n item = items[i];\n innerElement.append(new LegendItem(deepExtend({}, {\n markers: options.markers,\n labels: options.labels\n }, options.item, item)));\n }\n innerElement.render();\n legend.container.append(innerElement);\n },\n isVertical: function () {\n var legend = this, options = legend.options, orientation = options.orientation, position = options.position, vertical = position == CUSTOM && orientation != HORIZONTAL || (defined(orientation) ? orientation != HORIZONTAL : inArray(position, [\n LEFT,\n RIGHT\n ]));\n return vertical;\n },\n hasItems: function () {\n return this.container.children[0].children.length > 0;\n },\n reflow: function (targetBox) {\n var legend = this, options = legend.options;\n targetBox = targetBox.clone();\n if (!legend.hasItems()) {\n legend.box = targetBox;\n return;\n }\n if (options.position === CUSTOM) {\n legend.containerCustomReflow(targetBox);\n legend.box = targetBox;\n } else {\n legend.containerReflow(targetBox);\n }\n },\n containerReflow: function (targetBox) {\n var legend = this, options = legend.options, position = options.position, pos = position == TOP || position == BOTTOM ? X : Y, containerBox = targetBox.clone(), container = legend.container, width = options.width, height = options.height, vertical = legend.isVertical(), alignTarget = targetBox.clone(), box;\n if (position == LEFT || position == RIGHT) {\n containerBox.y1 = alignTarget.y1 = 0;\n }\n if (vertical && height) {\n containerBox.y2 = containerBox.y1 + height;\n containerBox.align(alignTarget, Y, container.options.vAlign);\n } else if (!vertical && width) {\n containerBox.x2 = containerBox.x1 + width;\n containerBox.align(alignTarget, X, container.options.align);\n }\n container.reflow(containerBox);\n containerBox = container.box;\n box = containerBox.clone();\n if (options.offsetX || options.offsetY) {\n containerBox.translate(options.offsetX, options.offsetY);\n legend.container.reflow(containerBox);\n }\n box[pos + 1] = targetBox[pos + 1];\n box[pos + 2] = targetBox[pos + 2];\n legend.box = box;\n },\n containerCustomReflow: function (targetBox) {\n var legend = this, options = legend.options, offsetX = options.offsetX, offsetY = options.offsetY, container = legend.container, width = options.width, height = options.height, vertical = legend.isVertical(), containerBox = targetBox.clone();\n if (vertical && height) {\n containerBox.y2 = containerBox.y1 + height;\n } else if (!vertical && width) {\n containerBox.x2 = containerBox.x1 + width;\n }\n container.reflow(containerBox);\n containerBox = container.box;\n container.reflow(Box2D(offsetX, offsetY, offsetX + containerBox.width(), offsetY + containerBox.height()));\n },\n renderVisual: function () {\n if (this.hasItems()) {\n ChartElement.fn.renderVisual.call(this);\n }\n }\n });\n var CategoryAxis = Axis.extend({\n init: function (options) {\n var axis = this;\n options = options || {};\n this._initFields();\n this._initCategories(options);\n Axis.fn.init.call(axis, options);\n },\n _initFields: function () {\n this._ticks = {};\n this.outOfRangeMin = 0;\n this.outOfRangeMax = 0;\n },\n _initCategories: function (options) {\n var categories = (options.categories || []).slice(0);\n var definedMin = defined(options.min);\n var definedMax = defined(options.max);\n options.categories = categories;\n if ((definedMin || definedMax) && categories.length) {\n options.srcCategories = options.categories;\n var min = definedMin ? math.floor(options.min) : 0;\n var max = definedMax ? options.justified ? math.floor(options.max) + 1 : math.ceil(options.max) : categories.length;\n options.categories = options.categories.slice(min, max);\n }\n },\n options: {\n type: CATEGORY,\n categories: [],\n vertical: false,\n majorGridLines: {\n visible: false,\n width: 1,\n color: BLACK\n },\n labels: { zIndex: 1 },\n justified: false\n },\n rangeIndices: function () {\n var options = this.options;\n var length = options.categories.length || 1;\n var min = isNumber(options.min) ? options.min % 1 : 0;\n var max;\n if (isNumber(options.max) && options.max % 1 !== 0 && options.max < this.totalRange().max) {\n max = length - (1 - options.max % 1);\n } else {\n max = length - (options.justified ? 1 : 0);\n }\n return {\n min: min,\n max: max\n };\n },\n totalRangeIndices: function (limit) {\n var options = this.options;\n var min = isNumber(options.min) ? options.min : 0;\n var max;\n if (isNumber(options.max)) {\n max = options.max;\n } else if (isNumber(options.min)) {\n max = min + options.categories.length;\n } else {\n max = (options.srcCategories || options.categories).length - (options.justified ? 1 : 0) || 1;\n }\n if (limit) {\n var totalRange = this.totalRange();\n min = limitValue(min, 0, totalRange.max);\n max = limitValue(max, 0, totalRange.max);\n }\n return {\n min: min,\n max: max\n };\n },\n range: function () {\n var options = this.options;\n return {\n min: isNumber(options.min) ? options.min : 0,\n max: isNumber(options.max) ? options.max : options.categories.length\n };\n },\n totalRange: function () {\n var options = this.options;\n return {\n min: 0,\n max: math.max(this._seriesMax || 0, (options.srcCategories || options.categories).length) - (options.justified ? 1 : 0)\n };\n },\n getScale: function () {\n var range = this.rangeIndices();\n var min = range.min;\n var max = range.max;\n var lineBox = this.lineBox();\n var size = this.options.vertical ? lineBox.height() : lineBox.width();\n var scale = size / (max - min || 1);\n return scale * (this.options.reverse ? -1 : 1);\n },\n getTickPositions: function (stepSize) {\n var axis = this, options = axis.options, vertical = options.vertical, lineBox = axis.lineBox(), reverse = options.reverse, scale = axis.getScale(), range = axis.rangeIndices(), min = range.min, max = range.max, current = min % 1 !== 0 ? math.floor(min / 1) + stepSize : min, pos = lineBox[(vertical ? Y : X) + (reverse ? 2 : 1)], positions = [];\n while (current <= max) {\n positions.push(pos + round(scale * (current - min), COORD_PRECISION));\n current += stepSize;\n }\n return positions;\n },\n getLabelsTickPositions: function () {\n var tickPositions = this.getMajorTickPositions().slice(0);\n var range = this.rangeIndices();\n var scale = this.getScale();\n var box = this.lineBox();\n var options = this.options;\n var axis = options.vertical ? Y : X;\n var start = options.reverse ? 2 : 1;\n var end = options.reverse ? 1 : 2;\n if (range.min % 1 !== 0) {\n tickPositions.unshift(box[axis + start] - scale * (range.min % 1));\n }\n if (range.max % 1 !== 0) {\n tickPositions.push(box[axis + end] + scale * (1 - range.max % 1));\n }\n return tickPositions;\n },\n labelTickIndex: function (label) {\n var index = label.index;\n var range = this.rangeIndices();\n if (range.min > 0) {\n index = index - math.floor(range.min);\n }\n return index;\n },\n arrangeLabels: function () {\n Axis.fn.arrangeLabels.call(this);\n this.hideOutOfRangeLabels();\n },\n hideOutOfRangeLabels: function () {\n var box = this.box, labels = this.labels, valueAxis = this.options.vertical ? Y : X, start = box[valueAxis + 1], end = box[valueAxis + 2], firstLabel = labels[0], lastLabel = last(labels);\n if (labels.length) {\n if (firstLabel.box[valueAxis + 1] > end || firstLabel.box[valueAxis + 2] < start) {\n firstLabel.options.visible = false;\n }\n if (lastLabel.box[valueAxis + 1] > end || lastLabel.box[valueAxis + 2] < start) {\n lastLabel.options.visible = false;\n }\n }\n },\n getMajorTickPositions: function () {\n return this.getTicks().majorTicks;\n },\n getMinorTickPositions: function () {\n return this.getTicks().minorTicks;\n },\n getTicks: function () {\n var axis = this, cache = axis._ticks, options = axis.options, range = axis.rangeIndices(), reverse = options.reverse, justified = options.justified, lineBox = axis.lineBox(), hash;\n hash = lineBox.getHash() + range.min + ',' + range.max + reverse + justified;\n if (cache._hash !== hash) {\n cache._hash = hash;\n cache.majorTicks = axis.getTickPositions(1);\n cache.minorTicks = axis.getTickPositions(0.5);\n }\n return cache;\n },\n getSlot: function (from, to, limit) {\n var axis = this, options = axis.options, reverse = options.reverse, justified = options.justified, valueAxis = options.vertical ? Y : X, lineBox = axis.lineBox(), range = axis.rangeIndices(), min = range.min, scale = this.getScale(), lineStart = lineBox[valueAxis + (reverse ? 2 : 1)], slotBox = lineBox.clone(), p1, p2;\n var singleSlot = !defined(to);\n from = valueOrDefault(from, 0);\n to = valueOrDefault(to, from);\n to = math.max(to - 1, from);\n to = math.max(from, to);\n p1 = lineStart + (from - min) * scale;\n p2 = lineStart + (to + 1 - min) * scale;\n if (singleSlot && justified) {\n p2 = p1;\n }\n if (limit) {\n p1 = limitValue(p1, lineBox[valueAxis + 1], lineBox[valueAxis + 2]);\n p2 = limitValue(p2, lineBox[valueAxis + 1], lineBox[valueAxis + 2]);\n }\n slotBox[valueAxis + 1] = reverse ? p2 : p1;\n slotBox[valueAxis + 2] = reverse ? p1 : p2;\n return slotBox;\n },\n slot: function (from, to, limit) {\n if (typeof from === 'string') {\n from = this.categoryIndex(from);\n }\n if (typeof to === 'string') {\n to = this.categoryIndex(to);\n }\n return Axis.fn.slot.call(this, from, to, limit);\n },\n pointCategoryIndex: function (point) {\n var axis = this, options = axis.options, reverse = options.reverse, justified = options.justified, valueAxis = options.vertical ? Y : X, lineBox = axis.lineBox(), range = axis.rangeIndices(), startValue = reverse ? range.max : range.min, scale = this.getScale(), lineStart = lineBox[valueAxis + 1], lineEnd = lineBox[valueAxis + 2], pos = point[valueAxis];\n if (pos < lineStart || pos > lineEnd) {\n return null;\n }\n var size = pos - lineStart;\n var value = size / scale;\n value = startValue + value;\n var diff = value % 1;\n if (justified) {\n value = math.round(value);\n } else if (diff === 0 && value > 0) {\n value--;\n }\n return math.floor(value);\n },\n getCategory: function (point) {\n var index = this.pointCategoryIndex(point);\n if (index === null) {\n return null;\n }\n return this.options.categories[index];\n },\n categoryIndex: function (value) {\n var options = this.options;\n var index = indexOf(value, options.srcCategories || options.categories);\n return index - math.floor(options.min || 0);\n },\n translateRange: function (delta) {\n var axis = this, options = axis.options, lineBox = axis.lineBox(), size = options.vertical ? lineBox.height() : lineBox.width(), range = options.categories.length, scale = size / range, offset = round(delta / scale, DEFAULT_PRECISION);\n return {\n min: offset,\n max: range + offset\n };\n },\n zoomRange: function (rate) {\n var rangeIndices = this.totalRangeIndices();\n var totalRange = this.totalRange();\n var totalMax = totalRange.max;\n var totalMin = totalRange.min;\n var min = limitValue(rangeIndices.min + rate, totalMin, totalMax);\n var max = limitValue(rangeIndices.max - rate, totalMin, totalMax);\n if (max - min > 0) {\n return {\n min: min,\n max: max\n };\n }\n },\n scaleRange: function (scale) {\n var axis = this, options = axis.options, range = options.categories.length, delta = scale * range;\n return {\n min: -delta,\n max: range + delta\n };\n },\n labelsCount: function () {\n var labelsRange = this.labelsRange();\n return labelsRange.max - labelsRange.min;\n },\n labelsRange: function () {\n var options = this.options;\n var labelOptions = options.labels;\n var justified = options.justified;\n var range = this.totalRangeIndices(true);\n var min = range.min;\n var max = range.max;\n var start = math.floor(min);\n var skip;\n if (!justified) {\n min = math.floor(min);\n max = math.ceil(max);\n } else {\n min = math.ceil(min);\n max = math.floor(max);\n }\n if (min > labelOptions.skip) {\n skip = labelOptions.skip + labelOptions.step * math.ceil((min - labelOptions.skip) / labelOptions.step);\n } else {\n skip = labelOptions.skip;\n }\n return {\n min: skip - start,\n max: (options.categories.length ? max + (justified ? 1 : 0) : 0) - start\n };\n },\n createAxisLabel: function (index, labelOptions) {\n var axis = this, options = axis.options, dataItem = options.dataItems ? options.dataItems[index] : null, category = valueOrDefault(options.categories[index], ''), text = axis.axisLabelText(category, dataItem, labelOptions);\n return new AxisLabel(category, text, index, dataItem, labelOptions);\n },\n shouldRenderNote: function (value) {\n var categories = this.options.categories;\n return categories.length && (categories.length > value && value >= 0);\n },\n pan: function (delta) {\n var range = this.totalRangeIndices(true), scale = this.getScale(), offset = round(delta / scale, DEFAULT_PRECISION), totalRange = this.totalRange(), min = range.min + offset, max = range.max + offset;\n return this.limitRange(min, max, 0, totalRange.max, offset);\n },\n pointsRange: function (start, end) {\n var axis = this, options = axis.options, reverse = options.reverse, valueAxis = options.vertical ? Y : X, lineBox = axis.lineBox(), range = axis.totalRangeIndices(true), scale = this.getScale(), lineStart = lineBox[valueAxis + (reverse ? 2 : 1)];\n var diffStart = start[valueAxis] - lineStart;\n var diffEnd = end[valueAxis] - lineStart;\n var min = range.min + diffStart / scale;\n var max = range.min + diffEnd / scale;\n var rangeMin = math.min(min, max);\n var rangeMax = math.max(min, max);\n if (rangeMax - rangeMin >= MIN_CATEGORY_POINTS_RANGE) {\n return {\n min: rangeMin,\n max: rangeMax\n };\n }\n },\n valueRange: function () {\n return this.range();\n }\n });\n var DateCategoryAxis = CategoryAxis.extend({\n init: function (options) {\n var axis = this, baseUnit, useDefault;\n options = options || {};\n options = deepExtend({ roundToBaseUnit: true }, options, {\n categories: toDate(options.categories),\n min: toDate(options.min),\n max: toDate(options.max)\n });\n options.userSetBaseUnit = options.userSetBaseUnit || options.baseUnit;\n options.userSetBaseUnitStep = options.userSetBaseUnitStep || options.baseUnitStep;\n if (options.categories && options.categories.length > 0) {\n baseUnit = (options.baseUnit || '').toLowerCase();\n useDefault = baseUnit !== FIT && !inArray(baseUnit, BASE_UNITS);\n if (useDefault) {\n options.baseUnit = axis.defaultBaseUnit(options);\n }\n if (baseUnit === FIT || options.baseUnitStep === AUTO) {\n axis.autoBaseUnit(options);\n }\n this._groupsStart = addDuration(options.categories[0], 0, options.baseUnit, options.weekStartDay);\n axis.groupCategories(options);\n } else {\n options.baseUnit = options.baseUnit || DAYS;\n }\n this._initFields();\n Axis.fn.init.call(axis, options);\n },\n options: {\n type: DATE,\n labels: { dateFormats: DateLabelFormats },\n autoBaseUnitSteps: {\n milliseconds: [\n 1,\n 10,\n 100\n ],\n seconds: [\n 1,\n 2,\n 5,\n 15,\n 30\n ],\n minutes: [\n 1,\n 2,\n 5,\n 15,\n 30\n ],\n hours: [\n 1,\n 2,\n 3\n ],\n days: [\n 1,\n 2,\n 3\n ],\n weeks: [\n 1,\n 2\n ],\n months: [\n 1,\n 2,\n 3,\n 6\n ],\n years: [\n 1,\n 2,\n 3,\n 5,\n 10,\n 25,\n 50\n ]\n },\n maxDateGroups: 10\n },\n shouldRenderNote: function (value) {\n var axis = this, range = axis.range(), categories = axis.options.categories || [];\n return dateComparer(value, range.min) >= 0 && dateComparer(value, range.max) <= 0 && categories.length;\n },\n parseNoteValue: function (value) {\n return toDate(value);\n },\n translateRange: function (delta) {\n var axis = this, options = axis.options, baseUnit = options.baseUnit, weekStartDay = options.weekStartDay, lineBox = axis.lineBox(), size = options.vertical ? lineBox.height() : lineBox.width(), range = axis.range(), scale = size / (range.max - range.min), offset = round(delta / scale, DEFAULT_PRECISION), from, to;\n if (range.min && range.max) {\n from = addTicks(options.min || range.min, offset);\n to = addTicks(options.max || range.max, offset);\n range = {\n min: addDuration(from, 0, baseUnit, weekStartDay),\n max: addDuration(to, 0, baseUnit, weekStartDay)\n };\n }\n return range;\n },\n scaleRange: function (delta) {\n var axis = this, rounds = math.abs(delta), range = axis.range(), from = range.min, to = range.max, step;\n if (range.min && range.max) {\n while (rounds--) {\n range = dateDiff(from, to);\n step = math.round(range * 0.1);\n if (delta < 0) {\n from = addTicks(from, step);\n to = addTicks(to, -step);\n } else {\n from = addTicks(from, -step);\n to = addTicks(to, step);\n }\n }\n range = {\n min: from,\n max: to\n };\n }\n return range;\n },\n defaultBaseUnit: function (options) {\n var categories = options.categories, count = defined(categories) ? categories.length : 0, categoryIx, cat, diff, minDiff = MAX_VALUE, lastCat, unit;\n for (categoryIx = 0; categoryIx < count; categoryIx++) {\n cat = categories[categoryIx];\n if (cat && lastCat) {\n diff = absoluteDateDiff(cat, lastCat);\n if (diff > 0) {\n minDiff = math.min(minDiff, diff);\n if (minDiff >= TIME_PER_YEAR) {\n unit = YEARS;\n } else if (minDiff >= TIME_PER_MONTH - TIME_PER_DAY * 3) {\n unit = MONTHS;\n } else if (minDiff >= TIME_PER_WEEK) {\n unit = WEEKS;\n } else if (minDiff >= TIME_PER_DAY) {\n unit = DAYS;\n } else if (minDiff >= TIME_PER_HOUR) {\n unit = HOURS;\n } else if (minDiff >= TIME_PER_MINUTE) {\n unit = MINUTES;\n } else {\n unit = SECONDS;\n }\n }\n }\n lastCat = cat;\n }\n return unit || DAYS;\n },\n _categoryRange: function (categories) {\n var range = categories._range;\n if (!range) {\n range = categories._range = sparseArrayLimits(categories);\n }\n return range;\n },\n totalRange: function () {\n return {\n min: 0,\n max: this.options.categories.length\n };\n },\n rangeIndices: function () {\n var options = this.options;\n var baseUnit = options.baseUnit;\n var baseUnitStep = options.baseUnitStep || 1;\n var categories = options.categories;\n var categoryLimits = this.categoriesRange();\n var min = toDate(options.min || categoryLimits.min);\n var max = toDate(options.max || categoryLimits.max);\n var minIdx = 0, maxIdx = 0;\n if (categories.length) {\n minIdx = dateIndex(min, categories[0], baseUnit, baseUnitStep);\n maxIdx = dateIndex(max, categories[0], baseUnit, baseUnitStep);\n if (options.roundToBaseUnit) {\n minIdx = math.floor(minIdx);\n maxIdx = options.justified ? math.floor(maxIdx) : math.ceil(maxIdx);\n }\n }\n return {\n min: minIdx,\n max: maxIdx\n };\n },\n labelsRange: function () {\n var options = this.options;\n var labelOptions = options.labels;\n var range = this.rangeIndices();\n var min = math.floor(range.min);\n var max = math.ceil(range.max);\n return {\n min: min + labelOptions.skip,\n max: options.categories.length ? max + (options.justified ? 1 : 0) : 0\n };\n },\n categoriesRange: function () {\n var options = this.options;\n var range = this._categoryRange(options.srcCategories || options.categories);\n var max = toDate(range.max);\n if (!options.justified && dateEquals(max, this._roundToTotalStep(max, options, false))) {\n max = this._roundToTotalStep(max, options, true, true);\n }\n return {\n min: toDate(range.min),\n max: max\n };\n },\n currentRange: function () {\n var options = this.options;\n var round = options.roundToBaseUnit !== false;\n var totalRange = this.categoriesRange();\n var min = options.min;\n var max = options.max;\n if (!min) {\n min = round ? this._roundToTotalStep(totalRange.min, options, false) : totalRange.min;\n }\n if (!max) {\n max = round ? this._roundToTotalStep(totalRange.max, options, !options.justified) : totalRange.max;\n }\n return {\n min: min,\n max: max\n };\n },\n datesRange: function () {\n var range = this._categoryRange(this.options.srcCategories || this.options.categories);\n return {\n min: toDate(range.min),\n max: toDate(range.max)\n };\n },\n pan: function (delta) {\n var axis = this, options = axis.options, baseUnit = options.baseUnit, lineBox = axis.lineBox(), size = options.vertical ? lineBox.height() : lineBox.width(), range = this.currentRange(), totalLimits = this.totalLimits(), min = range.min, max = range.max, scale = size / (max - min), offset = round(delta / scale, DEFAULT_PRECISION), panRange, from, to;\n from = addTicks(min, offset);\n to = addTicks(max, offset);\n panRange = this.limitRange(toTime(from), toTime(to), toTime(totalLimits.min), toTime(totalLimits.max), offset);\n if (panRange) {\n panRange.min = toDate(panRange.min);\n panRange.max = toDate(panRange.max);\n panRange.baseUnit = baseUnit;\n panRange.baseUnitStep = options.baseUnitStep || 1;\n panRange.userSetBaseUnit = options.userSetBaseUnit;\n panRange.userSetBaseUnitStep = options.userSetBaseUnitStep;\n return panRange;\n }\n },\n pointsRange: function (start, end) {\n var pointsRange = CategoryAxis.fn.pointsRange.call(this, start, end);\n var datesRange = this.currentRange();\n var indicesRange = this.rangeIndices();\n var scale = dateDiff(datesRange.max, datesRange.min) / (indicesRange.max - indicesRange.min);\n var options = this.options;\n var min = addTicks(datesRange.min, pointsRange.min * scale);\n var max = addTicks(datesRange.min, pointsRange.max * scale);\n return {\n min: min,\n max: max,\n baseUnit: options.userSetBaseUnit,\n baseUnitStep: options.userSetBaseUnitStep\n };\n },\n zoomRange: function (delta) {\n var options = this.options;\n var totalLimits = this.totalLimits();\n var currentRange = this.currentRange();\n var baseUnit = options.baseUnit;\n var baseUnitStep = options.baseUnitStep || 1;\n var weekStartDay = options.weekStartDay;\n var rangeMax = currentRange.max;\n var rangeMin = currentRange.min;\n var min = addDuration(rangeMin, delta * baseUnitStep, baseUnit, weekStartDay);\n var max = addDuration(rangeMax, -delta * baseUnitStep, baseUnit, weekStartDay);\n if (options.userSetBaseUnit == FIT) {\n var autoBaseUnitSteps = options.autoBaseUnitSteps;\n var maxDateGroups = options.maxDateGroups;\n var baseUnitIndex = indexOf(baseUnit, BASE_UNITS);\n var autoBaseUnitStep;\n var diff = dateDiff(max, min);\n var maxDiff = last(autoBaseUnitSteps[baseUnit]) * maxDateGroups * TIME_PER_UNIT[baseUnit];\n var rangeDiff = dateDiff(rangeMax, rangeMin);\n var ticks;\n if (diff < TIME_PER_UNIT[baseUnit] && baseUnit !== MILLISECONDS) {\n baseUnit = BASE_UNITS[baseUnitIndex - 1];\n autoBaseUnitStep = last(autoBaseUnitSteps[baseUnit]);\n ticks = (rangeDiff - (maxDateGroups - 1) * autoBaseUnitStep * TIME_PER_UNIT[baseUnit]) / 2;\n min = addTicks(rangeMin, ticks);\n max = addTicks(rangeMax, -ticks);\n } else if (diff > maxDiff && baseUnit !== YEARS) {\n var stepIndex = 0;\n do {\n baseUnitIndex++;\n baseUnit = BASE_UNITS[baseUnitIndex];\n stepIndex = 0;\n ticks = 2 * TIME_PER_UNIT[baseUnit];\n do {\n autoBaseUnitStep = autoBaseUnitSteps[baseUnit][stepIndex];\n stepIndex++;\n } while (stepIndex < autoBaseUnitSteps[baseUnit].length && ticks * autoBaseUnitStep < rangeDiff);\n } while (baseUnit !== YEARS && ticks * autoBaseUnitStep < rangeDiff);\n ticks = (ticks * autoBaseUnitStep - rangeDiff) / 2;\n if (ticks > 0) {\n min = addTicks(rangeMin, -ticks);\n max = addTicks(rangeMax, ticks);\n min = addTicks(min, limitValue(max, totalLimits.min, totalLimits.max) - max);\n max = addTicks(max, limitValue(min, totalLimits.min, totalLimits.max) - min);\n }\n }\n }\n min = toDate(limitValue(min, totalLimits.min, totalLimits.max));\n max = toDate(limitValue(max, totalLimits.min, totalLimits.max));\n if (min && max && dateDiff(max, min) > 0) {\n return {\n min: min,\n max: max,\n baseUnit: options.userSetBaseUnit,\n baseUnitStep: options.userSetBaseUnitStep\n };\n }\n },\n totalLimits: function () {\n var options = this.options;\n var datesRange = this.datesRange();\n var min = this._roundToTotalStep(toDate(datesRange.min), options, false);\n var max = datesRange.max;\n if (!options.justified) {\n max = this._roundToTotalStep(max, options, true, dateEquals(max, this._roundToTotalStep(max, options, false)));\n }\n return {\n min: min,\n max: max\n };\n },\n range: function (options) {\n options = options || this.options;\n var categories = options.categories, autoUnit = options.baseUnit === FIT, baseUnit = autoUnit ? BASE_UNITS[0] : options.baseUnit, baseUnitStep = options.baseUnitStep || 1, stepOptions = {\n baseUnit: baseUnit,\n baseUnitStep: baseUnitStep,\n weekStartDay: options.weekStartDay\n }, categoryLimits = this._categoryRange(categories), min = toDate(options.min || categoryLimits.min), max = toDate(options.max || categoryLimits.max);\n return {\n min: this._roundToTotalStep(min, stepOptions, false),\n max: this._roundToTotalStep(max, stepOptions, true, true)\n };\n },\n autoBaseUnit: function (options) {\n var axis = this, categoryLimits = this._categoryRange(options.categories), min = toDate(options.min || categoryLimits.min), max = toDate(options.max || categoryLimits.max), autoUnit = options.baseUnit === FIT, autoUnitIx = 0, baseUnit = autoUnit ? BASE_UNITS[autoUnitIx++] : options.baseUnit, span = max - min, units = span / TIME_PER_UNIT[baseUnit], totalUnits = units, maxDateGroups = options.maxDateGroups || axis.options.maxDateGroups, autoBaseUnitSteps = deepExtend({}, axis.options.autoBaseUnitSteps, options.autoBaseUnitSteps), unitSteps, step, nextStep;\n while (!step || units >= maxDateGroups) {\n unitSteps = unitSteps || autoBaseUnitSteps[baseUnit].slice(0);\n nextStep = unitSteps.shift();\n if (nextStep) {\n step = nextStep;\n units = totalUnits / step;\n } else if (baseUnit === last(BASE_UNITS)) {\n step = math.ceil(totalUnits / maxDateGroups);\n break;\n } else if (autoUnit) {\n baseUnit = BASE_UNITS[autoUnitIx++] || last(BASE_UNITS);\n totalUnits = span / TIME_PER_UNIT[baseUnit];\n unitSteps = null;\n } else {\n if (units > maxDateGroups) {\n step = math.ceil(totalUnits / maxDateGroups);\n }\n break;\n }\n }\n options.baseUnitStep = step;\n options.baseUnit = baseUnit;\n },\n _timeScale: function () {\n var axis = this, range = axis.range(), options = axis.options, lineBox = axis.lineBox(), vertical = options.vertical, lineSize = vertical ? lineBox.height() : lineBox.width(), timeRange;\n if (options.justified && options._collapse !== false) {\n var categoryLimits = this._categoryRange(options.categories);\n var maxCategory = toTime(categoryLimits.max);\n timeRange = toDate(maxCategory) - range.min;\n } else {\n timeRange = range.max - range.min;\n }\n return lineSize / timeRange;\n },\n groupCategories: function (options) {\n var axis = this, categories = options.categories, maxCategory = toDate(sparseArrayMax(categories)), baseUnit = options.baseUnit, baseUnitStep = options.baseUnitStep || 1, range = axis.range(options), max = range.max, date, nextDate, groups = [];\n for (date = range.min; date < max; date = nextDate) {\n groups.push(date);\n nextDate = addDuration(date, baseUnitStep, baseUnit, options.weekStartDay);\n if (nextDate > maxCategory && !options.max) {\n break;\n }\n }\n options.srcCategories = categories;\n options.categories = groups;\n },\n _roundToTotalStep: function (value, options, upper, roundToNext) {\n options = options || this.options;\n var baseUnit = options.baseUnit;\n var baseUnitStep = options.baseUnitStep || 1;\n var start = this._groupsStart;\n if (start) {\n var step = dateIndex(value, start, baseUnit, baseUnitStep);\n var roundedStep = upper ? math.ceil(step) : math.floor(step);\n if (roundToNext) {\n roundedStep++;\n }\n return addDuration(start, roundedStep * baseUnitStep, baseUnit, options.weekStartDay);\n } else {\n return addDuration(value, upper ? baseUnitStep : 0, baseUnit, options.weekStartDay);\n }\n },\n createAxisLabel: function (index, labelOptions) {\n var options = this.options, dataItem = options.dataItems ? options.dataItems[index] : null, date = options.categories[index], baseUnit = options.baseUnit, visible = true, unitFormat = labelOptions.dateFormats[baseUnit];\n if (options.justified) {\n var roundedDate = floorDate(date, baseUnit, options.weekStartDay);\n visible = dateEquals(roundedDate, date);\n } else if (!options.roundToBaseUnit) {\n visible = !dateEquals(this.range().max, date);\n }\n if (visible) {\n labelOptions.format = labelOptions.format || unitFormat;\n var text = this.axisLabelText(date, dataItem, labelOptions);\n if (text) {\n return new AxisLabel(date, text, index, dataItem, labelOptions);\n }\n }\n },\n categoryIndex: function (value) {\n var axis = this;\n var options = axis.options;\n var categories = options.categories;\n var index = -1;\n if (categories.length) {\n index = math.floor(dateIndex(toDate(value), categories[0], options.baseUnit, options.baseUnitStep || 1));\n }\n return index;\n },\n getSlot: function (a, b, limit) {\n var axis = this;\n if (typeof a === OBJECT) {\n a = axis.categoryIndex(a);\n }\n if (typeof b === OBJECT) {\n b = axis.categoryIndex(b);\n }\n return CategoryAxis.fn.getSlot.call(axis, a, b, limit);\n },\n valueRange: function () {\n var options = this.options;\n var range = this._categoryRange(options.srcCategories || options.categories);\n return {\n min: toDate(range.min),\n max: toDate(range.max)\n };\n }\n });\n var DateValueAxis = Axis.extend({\n init: function (seriesMin, seriesMax, options) {\n var axis = this;\n options = options || {};\n deepExtend(options, {\n min: toDate(options.min),\n max: toDate(options.max),\n axisCrossingValue: toDate(options.axisCrossingValues || options.axisCrossingValue)\n });\n this.seriesMin = toDate(seriesMin);\n this.seriesMax = toDate(seriesMax);\n options = axis.applyDefaults(this.seriesMin, this.seriesMax, options);\n Axis.fn.init.call(axis, options);\n },\n options: {\n type: DATE,\n majorGridLines: {\n visible: true,\n width: 1,\n color: BLACK\n },\n labels: { dateFormats: DateLabelFormats }\n },\n applyDefaults: function (seriesMin, seriesMax, options) {\n var axis = this, min = options.min || seriesMin, max = options.max || seriesMax, baseUnit = options.baseUnit || (max && min ? axis.timeUnits(absoluteDateDiff(max, min)) : HOURS), baseUnitTime = TIME_PER_UNIT[baseUnit], autoMin = floorDate(toTime(min) - 1, baseUnit) || toDate(max), autoMax = ceilDate(toTime(max) + 1, baseUnit), userMajorUnit = options.majorUnit ? options.majorUnit : undefined, majorUnit = userMajorUnit || dataviz.ceil(dataviz.autoMajorUnit(autoMin.getTime(), autoMax.getTime()), baseUnitTime) / baseUnitTime, actualUnits = duration(autoMin, autoMax, baseUnit), totalUnits = dataviz.ceil(actualUnits, majorUnit), unitsToAdd = totalUnits - actualUnits, head = math.floor(unitsToAdd / 2), tail = unitsToAdd - head;\n if (!options.baseUnit) {\n delete options.baseUnit;\n }\n options.baseUnit = options.baseUnit || baseUnit;\n options.min = options.min || addDuration(autoMin, -head, baseUnit);\n options.max = options.max || addDuration(autoMax, tail, baseUnit);\n options.minorUnit = options.minorUnit || majorUnit / 5;\n options.majorUnit = majorUnit;\n this.totalMin = toTime(floorDate(toTime(seriesMin) - 1, baseUnit));\n this.totalMax = toTime(ceilDate(toTime(seriesMax) + 1, baseUnit));\n return options;\n },\n range: function () {\n var options = this.options;\n return {\n min: options.min,\n max: options.max\n };\n },\n getDivisions: function (stepValue) {\n var options = this.options;\n return math.floor(duration(options.min, options.max, options.baseUnit) / stepValue + 1);\n },\n getTickPositions: function (step) {\n var options = this.options;\n var vertical = options.vertical;\n var reverse = options.reverse;\n var lineBox = this.lineBox();\n var dir = (vertical ? -1 : 1) * (reverse ? -1 : 1);\n var startEdge = dir === 1 ? 1 : 2;\n var start = lineBox[(vertical ? Y : X) + startEdge];\n var divisions = this.getDivisions(step);\n var timeRange = dateDiff(options.max, options.min);\n var lineSize = vertical ? lineBox.height() : lineBox.width();\n var scale = lineSize / timeRange;\n var positions = [start];\n for (var i = 1; i < divisions; i++) {\n var date = addDuration(options.min, i * step, options.baseUnit);\n var pos = start + dateDiff(date, options.min) * scale * dir;\n positions.push(round(pos, COORD_PRECISION));\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 return NumericAxis.fn.getSlot.call(this, toDate(a), toDate(b), limit);\n },\n getValue: function (point) {\n var value = NumericAxis.fn.getValue.call(this, point);\n return value !== null ? toDate(value) : null;\n },\n labelsCount: function () {\n return this.getDivisions(this.options.majorUnit);\n },\n createAxisLabel: function (index, labelOptions) {\n var options = this.options;\n var offset = index * options.majorUnit;\n var date = options.min;\n if (offset > 0) {\n date = addDuration(date, offset, options.baseUnit);\n }\n var unitFormat = labelOptions.dateFormats[options.baseUnit];\n labelOptions.format = labelOptions.format || unitFormat;\n var text = this.axisLabelText(date, null, labelOptions);\n return new AxisLabel(date, text, index, null, labelOptions);\n },\n timeUnits: function (delta) {\n var unit = HOURS;\n if (delta >= TIME_PER_YEAR) {\n unit = YEARS;\n } else if (delta >= TIME_PER_MONTH) {\n unit = MONTHS;\n } else if (delta >= TIME_PER_WEEK) {\n unit = WEEKS;\n } else if (delta >= TIME_PER_DAY) {\n unit = DAYS;\n }\n return unit;\n },\n translateRange: function (delta, exact) {\n var axis = this, options = axis.options, baseUnit = options.baseUnit, weekStartDay = options.weekStartDay, lineBox = axis.lineBox(), size = options.vertical ? lineBox.height() : lineBox.width(), range = axis.range(), scale = size / dateDiff(range.max, range.min), offset = round(delta / scale, DEFAULT_PRECISION), from = addTicks(options.min, offset), to = addTicks(options.max, offset);\n if (!exact) {\n from = addDuration(from, 0, baseUnit, weekStartDay);\n to = addDuration(to, 0, baseUnit, weekStartDay);\n }\n return {\n min: from,\n max: to\n };\n },\n scaleRange: function (delta) {\n var axis = this, options = axis.options, rounds = math.abs(delta), from = options.min, to = options.max, range, step;\n while (rounds--) {\n range = dateDiff(from, to);\n step = math.round(range * 0.1);\n if (delta < 0) {\n from = addTicks(from, step);\n to = addTicks(to, -step);\n } else {\n from = addTicks(from, -step);\n to = addTicks(to, step);\n }\n }\n return {\n min: from,\n max: to\n };\n },\n shouldRenderNote: function (value) {\n var range = this.range();\n return dateComparer(value, range.min) >= 0 && dateComparer(value, range.max) <= 0;\n },\n pan: function (delta) {\n var range = this.translateRange(delta, true);\n var limittedRange = this.limitRange(toTime(range.min), toTime(range.max), this.totalMin, this.totalMax);\n if (limittedRange) {\n return {\n min: toDate(limittedRange.min),\n max: toDate(limittedRange.max)\n };\n }\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: toDate(min),\n max: toDate(max)\n };\n },\n zoomRange: function (delta) {\n var range = this.scaleRange(delta);\n var min = toDate(limitValue(toTime(range.min), this.totalMin, this.totalMax));\n var max = toDate(limitValue(toTime(range.max), this.totalMin, this.totalMax));\n return {\n min: min,\n max: max\n };\n }\n });\n var ClusterLayout = ChartElement.extend({\n options: {\n vertical: false,\n gap: 0,\n spacing: 0\n },\n reflow: function (box) {\n var cluster = this, options = cluster.options, vertical = options.vertical, axis = vertical ? Y : X, children = cluster.children, gap = options.gap, spacing = options.spacing, count = children.length, slots = count + gap + spacing * (count - 1), slotSize = (vertical ? box.height() : box.width()) / slots, position = box[axis + 1] + slotSize * (gap / 2), childBox, i;\n for (i = 0; i < count; i++) {\n childBox = (children[i].box || box).clone();\n childBox[axis + 1] = position;\n childBox[axis + 2] = position + slotSize;\n children[i].reflow(childBox);\n if (i < count - 1) {\n position += slotSize * spacing;\n }\n position += slotSize;\n }\n }\n });\n var StackWrap = ChartElement.extend({\n options: { vertical: true },\n reflow: function (targetBox) {\n var options = this.options, vertical = options.vertical, positionAxis = vertical ? X : Y, children = this.children, box = this.box = new Box2D(), childrenCount = children.length, i;\n for (i = 0; i < childrenCount; i++) {\n var currentChild = children[i], childBox;\n if (currentChild.visible !== false) {\n childBox = currentChild.box.clone();\n childBox.snapTo(targetBox, positionAxis);\n if (i === 0) {\n box = this.box = childBox.clone();\n }\n currentChild.reflow(childBox);\n box.wrap(childBox);\n }\n }\n }\n });\n var PointEventsMixin = {\n click: function (chart, e) {\n return chart.trigger(SERIES_CLICK, this.eventArgs(e));\n },\n hover: function (chart, e) {\n return chart.trigger(SERIES_HOVER, this.eventArgs(e));\n },\n eventArgs: function (e) {\n return {\n value: this.value,\n percentage: this.percentage,\n stackValue: this.stackValue,\n category: this.category,\n series: this.series,\n dataItem: this.dataItem,\n runningTotal: this.runningTotal,\n total: this.total,\n element: eventTargetElement(e),\n originalEvent: e,\n point: this\n };\n }\n };\n var NoteMixin = {\n createNote: function () {\n var element = this, options = element.options.notes, text = element.noteText || options.label.text;\n if (options.visible !== false && defined(text) && text !== null) {\n element.note = new Note(element.value, text, element.dataItem, element.category, element.series, element.options.notes);\n element.append(element.note);\n }\n }\n };\n var Bar = ChartElement.extend({\n init: function (value, options) {\n var bar = this;\n ChartElement.fn.init.call(bar);\n bar.options = options;\n bar.color = options.color || WHITE;\n bar.aboveAxis = valueOrDefault(bar.options.aboveAxis, true);\n bar.value = value;\n },\n defaults: {\n border: { width: 1 },\n vertical: true,\n overlay: { gradient: GLASS },\n labels: {\n visible: false,\n format: '{0}'\n },\n opacity: 1,\n notes: { label: {} }\n },\n render: function () {\n if (this._rendered) {\n return;\n } else {\n this._rendered = true;\n }\n this.createLabel();\n this.createNote();\n if (this.errorBar) {\n this.append(this.errorBar);\n }\n },\n createLabel: function () {\n var options = this.options;\n var labels = options.labels;\n var labelText;\n if (labels.visible) {\n if (labels.template) {\n var labelTemplate = template(labels.template);\n labelText = labelTemplate({\n dataItem: this.dataItem,\n category: this.category,\n value: this.value,\n percentage: this.percentage,\n stackValue: this.stackValue,\n runningTotal: this.runningTotal,\n total: this.total,\n series: this.series\n });\n } else {\n labelText = this.formatValue(labels.format);\n }\n this.label = new BarLabel(labelText, deepExtend({ vertical: options.vertical }, options.labels));\n this.append(this.label);\n }\n },\n formatValue: function (format) {\n return this.owner.formatPointValue(this, format);\n },\n reflow: function (targetBox) {\n this.render();\n var bar = this, label = bar.label;\n bar.box = targetBox;\n if (label) {\n label.options.aboveAxis = bar.aboveAxis;\n label.reflow(targetBox);\n }\n if (bar.note) {\n bar.note.reflow(targetBox);\n }\n if (bar.errorBars) {\n for (var i = 0; i < bar.errorBars.length; i++) {\n bar.errorBars[i].reflow(targetBox);\n }\n }\n },\n createVisual: function () {\n var bar = this;\n var box = bar.box;\n var options = bar.options;\n var customVisual = options.visual;\n if (bar.visible !== false) {\n ChartElement.fn.createVisual.call(bar);\n if (customVisual) {\n var visual = this.rectVisual = customVisual({\n category: bar.category,\n dataItem: bar.dataItem,\n value: bar.value,\n sender: bar.getChart(),\n series: bar.series,\n percentage: bar.percentage,\n stackValue: this.stackValue,\n runningTotal: bar.runningTotal,\n total: bar.total,\n rect: box.toRect(),\n createVisual: function () {\n var group = new draw.Group();\n bar.createRect(group);\n return group;\n },\n options: options\n });\n if (visual) {\n bar.visual.append(visual);\n }\n } else if (box.width() > 0 && box.height() > 0) {\n bar.createRect(bar.visual);\n }\n }\n },\n createRect: function (visual) {\n var options = this.options;\n var border = options.border;\n var strokeOpacity = defined(border.opacity) ? border.opacity : options.opacity;\n var rect = this.box.toRect();\n rect.size.width = Math.round(rect.size.width);\n var path = this.rectVisual = draw.Path.fromRect(rect, {\n fill: {\n color: this.color,\n opacity: options.opacity\n },\n stroke: {\n color: this.getBorderColor(),\n width: border.width,\n opacity: strokeOpacity,\n dashType: border.dashType\n }\n });\n var width = this.box.width();\n var height = this.box.height();\n var size = options.vertical ? width : height;\n if (size > BAR_ALIGN_MIN_WIDTH) {\n alignPathToPixel(path);\n if (width < 1 || height < 1) {\n path.options.stroke.lineJoin = 'round';\n }\n }\n visual.append(path);\n if (hasGradientOverlay(options)) {\n visual.append(this.createGradientOverlay(path, { baseColor: this.color }, deepExtend({\n end: !options.vertical ? [\n 0,\n 1\n ] : undefined\n }, options.overlay)));\n }\n },\n createHighlight: function (style) {\n var highlight = draw.Path.fromRect(this.box.toRect(), style);\n return alignPathToPixel(highlight);\n },\n highlightVisual: function () {\n return this.rectVisual;\n },\n highlightVisualArgs: function () {\n return {\n options: this.options,\n rect: this.box.toRect(),\n visual: this.rectVisual\n };\n },\n getBorderColor: function () {\n var bar = this, options = bar.options, color = bar.color, border = options.border, borderColor = border.color, brightness = border._brightness || BAR_BORDER_BRIGHTNESS;\n if (!defined(borderColor)) {\n borderColor = new Color(color).brightness(brightness).toHex();\n }\n return borderColor;\n },\n tooltipAnchor: function (tooltipWidth, tooltipHeight) {\n var bar = this, options = bar.options, box = bar.box, vertical = options.vertical, aboveAxis = bar.aboveAxis, clipBox = bar.owner.pane.clipBox() || box, x, y;\n if (vertical) {\n x = math.min(box.x2, clipBox.x2) + TOOLTIP_OFFSET;\n y = aboveAxis ? math.max(box.y1, clipBox.y1) : math.min(box.y2, clipBox.y2) - tooltipHeight;\n } else {\n var x1 = math.max(box.x1, clipBox.x1), x2 = math.min(box.x2, clipBox.x2);\n if (options.isStacked) {\n x = aboveAxis ? x2 - tooltipWidth : x1;\n y = math.max(box.y1, clipBox.y1) - tooltipHeight - TOOLTIP_OFFSET;\n } else {\n x = aboveAxis ? x2 + TOOLTIP_OFFSET : x1 - tooltipWidth - TOOLTIP_OFFSET;\n y = math.max(box.y1, clipBox.y1);\n }\n }\n return new Point2D(x, y);\n },\n overlapsBox: function (box) {\n return this.box.overlaps(box);\n }\n });\n deepExtend(Bar.fn, PointEventsMixin);\n deepExtend(Bar.fn, NoteMixin);\n var BarChartAnimation = draw.Animation.extend({\n options: { duration: INITIAL_ANIMATION_DURATION },\n setup: function () {\n var element = this.element;\n var options = this.options;\n var bbox = element.bbox();\n if (bbox) {\n this.origin = options.origin;\n var axis = options.vertical ? Y : X;\n var fromScale = this.fromScale = new geom.Point(1, 1);\n fromScale[axis] = START_SCALE;\n element.transform(geom.transform().scale(fromScale.x, fromScale.y));\n } else {\n this.abort();\n }\n },\n step: function (pos) {\n var scaleX = interpolate(this.fromScale.x, 1, pos);\n var scaleY = interpolate(this.fromScale.y, 1, pos);\n this.element.transform(geom.transform().scale(scaleX, scaleY, this.origin));\n },\n abort: function () {\n draw.Animation.fn.abort.call(this);\n this.element.transform(null);\n }\n });\n draw.AnimationFactory.current.register(BAR, BarChartAnimation);\n var FadeInAnimation = draw.Animation.extend({\n options: {\n duration: 200,\n easing: LINEAR\n },\n setup: function () {\n this.fadeTo = this.element.opacity();\n this.element.opacity(0);\n },\n step: function (pos) {\n this.element.opacity(pos * this.fadeTo);\n }\n });\n draw.AnimationFactory.current.register(FADEIN, FadeInAnimation);\n var ErrorRangeCalculator = function (errorValue, series, field) {\n var that = this;\n that.initGlobalRanges(errorValue, series, field);\n };\n ErrorRangeCalculator.prototype = ErrorRangeCalculator.fn = {\n percentRegex: /percent(?:\\w*)\\((\\d+)\\)/,\n standardDeviationRegex: new RegExp('^' + STD_DEV + '(?:\\\\((\\\\d+(?:\\\\.\\\\d+)?)\\\\))?$'),\n initGlobalRanges: function (errorValue, series, field) {\n var that = this, data = series.data, deviationMatch = that.standardDeviationRegex.exec(errorValue);\n if (deviationMatch) {\n that.valueGetter = that.createValueGetter(series, field);\n var average = that.getAverage(data), deviation = that.getStandardDeviation(data, average, false), multiple = deviationMatch[1] ? parseFloat(deviationMatch[1]) : 1, errorRange = {\n low: average.value - deviation * multiple,\n high: average.value + deviation * multiple\n };\n that.globalRange = function () {\n return errorRange;\n };\n } else if (errorValue.indexOf && errorValue.indexOf(STD_ERR) >= 0) {\n that.valueGetter = that.createValueGetter(series, field);\n var standardError = that.getStandardError(data, that.getAverage(data));\n that.globalRange = function (value) {\n return {\n low: value - standardError,\n high: value + standardError\n };\n };\n }\n },\n createValueGetter: function (series, field) {\n var data = series.data, binder = SeriesBinder.current, valueFields = binder.valueFields(series), item = defined(data[0]) ? data[0] : {}, idx, srcValueFields, valueGetter;\n if (isArray(item)) {\n idx = field ? indexOf(field, valueFields) : 0;\n valueGetter = getter('[' + idx + ']');\n } else if (isNumber(item)) {\n valueGetter = getter();\n } else if (typeof item === OBJECT) {\n srcValueFields = binder.sourceFields(series, valueFields);\n valueGetter = getter(srcValueFields[indexOf(field, valueFields)]);\n }\n return valueGetter;\n },\n getErrorRange: function (pointValue, errorValue) {\n var that = this, low, high, value;\n if (!defined(errorValue)) {\n return;\n }\n if (that.globalRange) {\n return that.globalRange(pointValue);\n }\n if (isArray(errorValue)) {\n low = pointValue - errorValue[0];\n high = pointValue + errorValue[1];\n } else if (isNumber(value = parseFloat(errorValue))) {\n low = pointValue - value;\n high = pointValue + value;\n } else if (value = that.percentRegex.exec(errorValue)) {\n var percentValue = pointValue * (parseFloat(value[1]) / 100);\n low = pointValue - math.abs(percentValue);\n high = pointValue + math.abs(percentValue);\n } else {\n throw new Error('Invalid ErrorBar value: ' + errorValue);\n }\n return {\n low: low,\n high: high\n };\n },\n getStandardError: function (data, average) {\n return this.getStandardDeviation(data, average, true) / math.sqrt(average.count);\n },\n getStandardDeviation: function (data, average, isSample) {\n var squareDifferenceSum = 0, length = data.length, total = isSample ? average.count - 1 : average.count, value;\n for (var i = 0; i < length; i++) {\n value = this.valueGetter(data[i]);\n if (isNumber(value)) {\n squareDifferenceSum += math.pow(value - average.value, 2);\n }\n }\n return math.sqrt(squareDifferenceSum / total);\n },\n getAverage: function (data) {\n var sum = 0, count = 0, length = data.length, value;\n for (var i = 0; i < length; i++) {\n value = this.valueGetter(data[i]);\n if (isNumber(value)) {\n sum += value;\n count++;\n }\n }\n return {\n value: sum / count,\n count: count\n };\n }\n };\n var CategoricalChart = ChartElement.extend({\n init: function (plotArea, options) {\n var chart = this;\n ChartElement.fn.init.call(chart, options);\n chart.plotArea = plotArea;\n chart.categoryAxis = plotArea.seriesCategoryAxis(options.series[0]);\n chart.valueAxisRanges = {};\n chart.points = [];\n chart.categoryPoints = [];\n chart.seriesPoints = [];\n chart.seriesOptions = [];\n chart._evalSeries = [];\n chart.render();\n },\n options: {\n series: [],\n invertAxes: false,\n isStacked: false,\n clip: true\n },\n render: function () {\n var chart = this;\n chart.traverseDataPoints(proxy(chart.addValue, chart));\n },\n pointOptions: function (series, seriesIx) {\n var options = this.seriesOptions[seriesIx];\n if (!options) {\n var defaults = this.pointType().fn.defaults;\n this.seriesOptions[seriesIx] = options = deepExtend({}, defaults, { vertical: !this.options.invertAxes }, series);\n }\n return options;\n },\n plotValue: function (point) {\n if (!point) {\n return 0;\n }\n if (this.options.isStacked100 && isNumber(point.value)) {\n var categoryIx = point.categoryIx;\n var categoryPts = this.categoryPoints[categoryIx];\n var categorySum = 0;\n var otherValues = [];\n for (var i = 0; i < categoryPts.length; i++) {\n var other = categoryPts[i];\n if (other) {\n var stack = point.series.stack;\n var otherStack = other.series.stack;\n if (stack && otherStack && stack.group !== otherStack.group) {\n continue;\n }\n if (isNumber(other.value)) {\n categorySum += math.abs(other.value);\n otherValues.push(math.abs(other.value));\n }\n }\n }\n if (categorySum > 0) {\n return point.value / categorySum;\n }\n }\n return point.value;\n },\n plotRange: function (point, startValue) {\n var categoryIx = point.categoryIx;\n var categoryPts = this.categoryPoints[categoryIx];\n if (this.options.isStacked) {\n startValue = startValue || 0;\n var plotValue = this.plotValue(point);\n var positive = plotValue >= 0;\n var prevValue = startValue;\n var isStackedBar = false;\n for (var i = 0; i < categoryPts.length; i++) {\n var other = categoryPts[i];\n if (point === other) {\n break;\n }\n var stack = point.series.stack;\n var otherStack = other.series.stack;\n if (stack && otherStack) {\n if (typeof stack === STRING && stack !== otherStack) {\n continue;\n }\n if (stack.group && stack.group !== otherStack.group) {\n continue;\n }\n }\n var otherValue = this.plotValue(other);\n if (otherValue >= 0 && positive || otherValue < 0 && !positive) {\n prevValue += otherValue;\n plotValue += otherValue;\n isStackedBar = true;\n if (this.options.isStacked100) {\n plotValue = math.min(plotValue, 1);\n }\n }\n }\n if (isStackedBar) {\n prevValue -= startValue;\n }\n return [\n prevValue,\n plotValue\n ];\n }\n var series = point.series;\n var valueAxis = this.seriesValueAxis(series);\n var axisCrossingValue = this.categoryAxisCrossingValue(valueAxis);\n return [\n axisCrossingValue,\n point.value || axisCrossingValue\n ];\n },\n stackLimits: function (axisName, stackName) {\n var min = MAX_VALUE;\n var max = MIN_VALUE;\n for (var i = 0; i < this.categoryPoints.length; i++) {\n var categoryPts = this.categoryPoints[i];\n if (!categoryPts) {\n continue;\n }\n for (var pIx = 0; pIx < categoryPts.length; pIx++) {\n var point = categoryPts[pIx];\n if (point) {\n if (point.series.stack === stackName || point.series.axis === axisName) {\n var to = this.plotRange(point, 0)[1];\n if (defined(to) && isFinite(to)) {\n max = math.max(max, to);\n min = math.min(min, to);\n }\n }\n }\n }\n }\n return {\n min: min,\n max: max\n };\n },\n updateStackRange: function () {\n var chart = this;\n var chartSeries = chart.options.series;\n var isStacked = chart.options.isStacked;\n var limits;\n var limitsCache = {};\n if (isStacked) {\n for (var i = 0; i < chartSeries.length; i++) {\n var series = chartSeries[i];\n var axisName = series.axis;\n var key = axisName + series.stack;\n limits = limitsCache[key];\n if (!limits) {\n limits = chart.stackLimits(axisName, series.stack);\n var errorTotals = chart.errorTotals;\n if (errorTotals) {\n if (errorTotals.negative.length) {\n limits.min = math.min(limits.min, sparseArrayMin(errorTotals.negative));\n }\n if (errorTotals.positive.length) {\n limits.max = math.max(limits.max, sparseArrayMax(errorTotals.positive));\n }\n }\n if (limits.min !== MAX_VALUE || limits.max !== MIN_VALUE) {\n limitsCache[key] = limits;\n } else {\n limits = null;\n }\n }\n if (limits) {\n chart.valueAxisRanges[axisName] = limits;\n }\n }\n }\n },\n addErrorBar: function (point, data, categoryIx) {\n var chart = this, value = point.value, series = point.series, seriesIx = point.seriesIx, errorBars = point.options.errorBars, errorRange, lowValue = data.fields[ERROR_LOW_FIELD], highValue = data.fields[ERROR_HIGH_FIELD];\n if (isNumber(lowValue) && isNumber(highValue)) {\n errorRange = {\n low: lowValue,\n high: highValue\n };\n } else if (errorBars && defined(errorBars.value)) {\n chart.seriesErrorRanges = chart.seriesErrorRanges || [];\n chart.seriesErrorRanges[seriesIx] = chart.seriesErrorRanges[seriesIx] || new ErrorRangeCalculator(errorBars.value, series, VALUE);\n errorRange = chart.seriesErrorRanges[seriesIx].getErrorRange(value, errorBars.value);\n }\n if (errorRange) {\n point.low = errorRange.low;\n point.high = errorRange.high;\n chart.addPointErrorBar(point, categoryIx);\n }\n },\n addPointErrorBar: function (point, categoryIx) {\n var chart = this, series = point.series, low = point.low, high = point.high, isVertical = !chart.options.invertAxes, options = point.options.errorBars, errorBar, stackedErrorRange;\n if (chart.options.isStacked) {\n stackedErrorRange = chart.stackedErrorRange(point, categoryIx);\n low = stackedErrorRange.low;\n high = stackedErrorRange.high;\n } else {\n var fields = {\n categoryIx: categoryIx,\n series: series\n };\n chart.updateRange({ value: low }, fields);\n chart.updateRange({ value: high }, fields);\n }\n errorBar = new CategoricalErrorBar(low, high, isVertical, chart, series, options);\n point.errorBars = [errorBar];\n point.append(errorBar);\n },\n stackedErrorRange: function (point, categoryIx) {\n var chart = this, plotValue = chart.plotRange(point, 0)[1] - point.value, low = point.low + plotValue, high = point.high + plotValue;\n chart.errorTotals = chart.errorTotals || {\n positive: [],\n negative: []\n };\n if (low < 0) {\n chart.errorTotals.negative[categoryIx] = math.min(chart.errorTotals.negative[categoryIx] || 0, low);\n }\n if (high > 0) {\n chart.errorTotals.positive[categoryIx] = math.max(chart.errorTotals.positive[categoryIx] || 0, high);\n }\n return {\n low: low,\n high: high\n };\n },\n addValue: function (data, fields) {\n var chart = this;\n var categoryIx = fields.categoryIx;\n var series = fields.series;\n var seriesIx = fields.seriesIx;\n var categoryPoints = chart.categoryPoints[categoryIx];\n if (!categoryPoints) {\n chart.categoryPoints[categoryIx] = categoryPoints = [];\n }\n var seriesPoints = chart.seriesPoints[seriesIx];\n if (!seriesPoints) {\n chart.seriesPoints[seriesIx] = seriesPoints = [];\n }\n var point = chart.createPoint(data, fields);\n if (point) {\n $.extend(point, fields);\n point.owner = chart;\n point.dataItem = series.data[categoryIx];\n point.noteText = data.fields.noteText;\n chart.addErrorBar(point, data, categoryIx);\n }\n chart.points.push(point);\n seriesPoints.push(point);\n categoryPoints.push(point);\n chart.updateRange(data.valueFields, fields);\n },\n evalPointOptions: function (options, value, category, categoryIx, series, seriesIx) {\n var state = {\n defaults: series._defaults,\n excluded: [\n 'data',\n 'aggregate',\n '_events',\n 'tooltip',\n 'template',\n 'visual',\n 'toggle',\n '_outOfRangeMinPoint',\n '_outOfRangeMaxPoint'\n ]\n };\n var doEval = this._evalSeries[seriesIx];\n if (!defined(doEval)) {\n this._evalSeries[seriesIx] = doEval = evalOptions(options, {}, state, true);\n }\n if (doEval) {\n options = deepExtend({}, options);\n evalOptions(options, {\n value: value,\n category: category,\n index: categoryIx,\n series: series,\n dataItem: series.data[categoryIx]\n }, state);\n }\n return options;\n },\n updateRange: function (data, fields) {\n var chart = this, axisName = fields.series.axis, value = data.value, axisRange = chart.valueAxisRanges[axisName];\n if (isFinite(value) && value !== null) {\n axisRange = chart.valueAxisRanges[axisName] = axisRange || {\n min: MAX_VALUE,\n max: MIN_VALUE\n };\n axisRange.min = math.min(axisRange.min, value);\n axisRange.max = math.max(axisRange.max, value);\n }\n },\n seriesValueAxis: function (series) {\n var plotArea = this.plotArea, axisName = series.axis, axis = axisName ? plotArea.namedValueAxes[axisName] : plotArea.valueAxis;\n if (!axis) {\n throw new Error('Unable to locate value axis with name ' + axisName);\n }\n return axis;\n },\n reflow: function (targetBox) {\n var chart = this, pointIx = 0, categorySlots = chart.categorySlots = [], chartPoints = chart.points, categoryAxis = chart.categoryAxis, value, valueAxis, point;\n chart.traverseDataPoints(function (data, fields) {\n var categoryIx = fields.categoryIx;\n var currentSeries = fields.series;\n value = chart.pointValue(data);\n valueAxis = chart.seriesValueAxis(currentSeries);\n point = chartPoints[pointIx++];\n var categorySlot = categorySlots[categoryIx];\n if (!categorySlot) {\n categorySlots[categoryIx] = categorySlot = chart.categorySlot(categoryAxis, categoryIx, valueAxis);\n }\n if (point) {\n var plotRange = chart.plotRange(point, valueAxis.startValue());\n var valueSlot = valueAxis.getSlot(plotRange[0], plotRange[1], !chart.options.clip);\n if (valueSlot) {\n var pointSlot = chart.pointSlot(categorySlot, valueSlot);\n point.aboveAxis = chart.aboveAxis(point, valueAxis);\n point.stackValue = plotRange[1];\n if (chart.options.isStacked100) {\n point.percentage = chart.plotValue(point);\n }\n chart.reflowPoint(point, pointSlot);\n } else {\n point.visible = false;\n }\n }\n });\n chart.reflowCategories(categorySlots);\n chart.box = targetBox;\n },\n aboveAxis: function (point, valueAxis) {\n var axisCrossingValue = this.categoryAxisCrossingValue(valueAxis);\n var value = point.value;\n return valueAxis.options.reverse ? value < axisCrossingValue : value >= axisCrossingValue;\n },\n categoryAxisCrossingValue: function (valueAxis) {\n var categoryAxis = this.categoryAxis, options = valueAxis.options, crossingValues = [].concat(options.axisCrossingValues || options.axisCrossingValue);\n return crossingValues[categoryAxis.axisIndex || 0] || 0;\n },\n reflowPoint: function (point, pointSlot) {\n point.reflow(pointSlot);\n },\n reflowCategories: function () {\n },\n pointSlot: function (categorySlot, valueSlot) {\n var chart = this, options = chart.options, invertAxes = options.invertAxes, slotX = invertAxes ? valueSlot : categorySlot, slotY = invertAxes ? categorySlot : valueSlot;\n return new Box2D(slotX.x1, slotY.y1, slotX.x2, slotY.y2);\n },\n categorySlot: function (categoryAxis, categoryIx) {\n return categoryAxis.getSlot(categoryIx);\n },\n traverseDataPoints: function (callback) {\n var chart = this, options = chart.options, series = options.series, categories = chart.categoryAxis.options.categories || [], count = categoriesCount(series), categoryIx, seriesIx, pointData, currentCategory, currentSeries, seriesCount = series.length;\n for (seriesIx = 0; seriesIx < seriesCount; seriesIx++) {\n this._outOfRangeCallback(series[seriesIx], '_outOfRangeMinPoint', seriesIx, callback);\n }\n for (categoryIx = 0; categoryIx < count; categoryIx++) {\n for (seriesIx = 0; seriesIx < seriesCount; seriesIx++) {\n currentSeries = series[seriesIx];\n currentCategory = categories[categoryIx];\n pointData = this._bindPoint(currentSeries, seriesIx, categoryIx);\n callback(pointData, {\n category: currentCategory,\n categoryIx: categoryIx,\n series: currentSeries,\n seriesIx: seriesIx\n });\n }\n }\n for (seriesIx = 0; seriesIx < seriesCount; seriesIx++) {\n this._outOfRangeCallback(series[seriesIx], '_outOfRangeMaxPoint', seriesIx, callback);\n }\n },\n _outOfRangeCallback: function (series, field, seriesIx, callback) {\n var outOfRangePoint = series[field];\n if (outOfRangePoint) {\n var categoryIx = outOfRangePoint.categoryIx;\n var pointData = this._bindPoint(series, seriesIx, categoryIx, outOfRangePoint.item);\n callback(pointData, {\n category: outOfRangePoint.category,\n categoryIx: categoryIx,\n series: series,\n seriesIx: seriesIx\n });\n }\n },\n _bindPoint: function (series, seriesIx, categoryIx, item) {\n if (!this._bindCache) {\n this._bindCache = [];\n }\n var bindCache = this._bindCache[seriesIx];\n if (!bindCache) {\n bindCache = this._bindCache[seriesIx] = [];\n }\n var data = bindCache[categoryIx];\n if (!data) {\n data = bindCache[categoryIx] = SeriesBinder.current.bindPoint(series, categoryIx, item);\n }\n return data;\n },\n formatPointValue: function (point, format) {\n if (point.value === null) {\n return '';\n }\n return autoFormat(format, point.value);\n },\n pointValue: function (data) {\n return data.valueFields.value;\n }\n });\n var BarChart = CategoricalChart.extend({\n options: { animation: { type: BAR } },\n render: function () {\n var chart = this;\n CategoricalChart.fn.render.apply(chart);\n chart.updateStackRange();\n },\n pointType: function () {\n return Bar;\n },\n clusterType: function () {\n return ClusterLayout;\n },\n stackType: function () {\n return StackWrap;\n },\n stackLimits: function (axisName, stackName) {\n var limits = CategoricalChart.fn.stackLimits.call(this, axisName, stackName);\n return limits;\n },\n createPoint: function (data, fields) {\n var chart = this;\n var categoryIx = fields.categoryIx;\n var category = fields.category;\n var series = fields.series;\n var seriesIx = fields.seriesIx;\n var value = chart.pointValue(data);\n var options = chart.options;\n var children = chart.children;\n var isStacked = chart.options.isStacked;\n var point;\n var pointType = chart.pointType();\n var pointOptions;\n var cluster;\n var clusterType = chart.clusterType();\n pointOptions = this.pointOptions(series, seriesIx);\n var labelOptions = pointOptions.labels;\n if (isStacked) {\n if (labelOptions.position == OUTSIDE_END) {\n labelOptions.position = INSIDE_END;\n }\n }\n pointOptions.isStacked = isStacked;\n var color = data.fields.color || series.color;\n if (value < 0 && pointOptions.negativeColor) {\n color = pointOptions.negativeColor;\n }\n pointOptions = chart.evalPointOptions(pointOptions, value, category, categoryIx, series, seriesIx);\n if (kendo.isFunction(series.color)) {\n color = pointOptions.color;\n }\n point = new pointType(value, pointOptions);\n point.color = color;\n cluster = children[categoryIx];\n if (!cluster) {\n cluster = new clusterType({\n vertical: options.invertAxes,\n gap: options.gap,\n spacing: options.spacing\n });\n chart.append(cluster);\n }\n if (isStacked) {\n var stackWrap = chart.getStackWrap(series, cluster);\n stackWrap.append(point);\n } else {\n cluster.append(point);\n }\n return point;\n },\n getStackWrap: function (series, cluster) {\n var stack = series.stack;\n var stackGroup = stack ? stack.group || stack : stack;\n var wraps = cluster.children;\n var stackWrap;\n if (typeof stackGroup === STRING) {\n for (var i = 0; i < wraps.length; i++) {\n if (wraps[i]._stackGroup === stackGroup) {\n stackWrap = wraps[i];\n break;\n }\n }\n } else {\n stackWrap = wraps[0];\n }\n if (!stackWrap) {\n var stackType = this.stackType();\n stackWrap = new stackType({ vertical: !this.options.invertAxes });\n stackWrap._stackGroup = stackGroup;\n cluster.append(stackWrap);\n }\n return stackWrap;\n },\n categorySlot: function (categoryAxis, categoryIx, valueAxis) {\n var chart = this, options = chart.options, categorySlot = categoryAxis.getSlot(categoryIx), startValue = valueAxis.startValue(), stackAxis, zeroSlot;\n if (options.isStacked) {\n zeroSlot = valueAxis.getSlot(startValue, startValue, true);\n stackAxis = options.invertAxes ? X : Y;\n categorySlot[stackAxis + 1] = categorySlot[stackAxis + 2] = zeroSlot[stackAxis + 1];\n }\n return categorySlot;\n },\n reflowCategories: function (categorySlots) {\n var chart = this, children = chart.children, childrenLength = children.length, i;\n for (i = 0; i < childrenLength; i++) {\n children[i].reflow(categorySlots[i]);\n }\n },\n createAnimation: function () {\n this._setAnimationOptions();\n ChartElement.fn.createAnimation.call(this);\n if (anyHasZIndex(this.options.series)) {\n this._setChildrenAnimation();\n }\n },\n _setChildrenAnimation: function () {\n var points = this.points;\n var point, pointVisual;\n for (var idx = 0; idx < points.length; idx++) {\n point = points[idx];\n pointVisual = point.visual;\n if (pointVisual && defined(pointVisual.options.zIndex)) {\n point.options.animation = this.options.animation;\n point.createAnimation();\n }\n }\n },\n _setAnimationOptions: function () {\n var options = this.options;\n var animation = options.animation || {};\n var origin;\n if (this.options.isStacked) {\n var valueAxis = this.seriesValueAxis(options.series[0]);\n origin = valueAxis.getSlot(valueAxis.startValue());\n } else {\n origin = this.categoryAxis.getSlot(0);\n }\n animation.origin = new geom.Point(origin.x1, origin.y1);\n animation.vertical = !options.invertAxes;\n }\n });\n var RangeBar = Bar.extend({\n defaults: {\n labels: { format: '{0} - {1}' },\n tooltip: { format: '{1}' }\n },\n createLabel: function () {\n var labels = this.options.labels;\n var fromOptions = deepExtend({}, labels, labels.from);\n var toOptions = deepExtend({}, labels, labels.to);\n if (fromOptions.visible) {\n this.labelFrom = this._createLabel(fromOptions);\n this.append(this.labelFrom);\n }\n if (toOptions.visible) {\n this.labelTo = this._createLabel(toOptions);\n this.append(this.labelTo);\n }\n },\n _createLabel: function (options) {\n var labelText;\n if (options.template) {\n var labelTemplate = template(options.template);\n labelText = labelTemplate({\n dataItem: this.dataItem,\n category: this.category,\n value: this.value,\n percentage: this.percentage,\n runningTotal: this.runningTotal,\n total: this.total,\n series: this.series\n });\n } else {\n labelText = this.formatValue(options.format);\n }\n return new BarLabel(labelText, deepExtend({ vertical: this.options.vertical }, options));\n },\n reflow: function (targetBox) {\n this.render();\n var rangeBar = this, labelFrom = rangeBar.labelFrom, labelTo = rangeBar.labelTo;\n rangeBar.box = targetBox;\n if (labelFrom) {\n labelFrom.options.aboveAxis = rangeBar.value.from > rangeBar.value.to;\n labelFrom.reflow(targetBox);\n }\n if (labelTo) {\n labelTo.options.aboveAxis = rangeBar.value.to > rangeBar.value.from;\n labelTo.reflow(targetBox);\n }\n if (rangeBar.note) {\n rangeBar.note.reflow(targetBox);\n }\n }\n });\n var RangeBarChart = BarChart.extend({\n pointType: function () {\n return RangeBar;\n },\n pointValue: function (data) {\n return data.valueFields;\n },\n formatPointValue: function (point, format) {\n if (point.value.from === null && point.value.to === null) {\n return '';\n }\n return autoFormat(format, point.value.from, point.value.to);\n },\n plotLimits: CategoricalChart.fn.plotLimits,\n plotRange: function (point) {\n if (!point) {\n return 0;\n }\n return [\n point.value.from,\n point.value.to\n ];\n },\n updateRange: function (value, fields) {\n var chart = this, axisName = fields.series.axis, from = value.from, to = value.to, axisRange = chart.valueAxisRanges[axisName];\n if (value !== null && isNumber(from) && isNumber(to)) {\n axisRange = chart.valueAxisRanges[axisName] = axisRange || {\n min: MAX_VALUE,\n max: MIN_VALUE\n };\n axisRange.min = math.min(axisRange.min, from);\n axisRange.max = math.max(axisRange.max, from);\n axisRange.min = math.min(axisRange.min, to);\n axisRange.max = math.max(axisRange.max, to);\n }\n },\n aboveAxis: function (point) {\n var value = point.value;\n return value.from < value.to;\n }\n });\n var BulletChart = CategoricalChart.extend({\n init: function (plotArea, options) {\n var chart = this;\n chart.wrapData(options);\n CategoricalChart.fn.init.call(chart, plotArea, options);\n },\n options: { animation: { type: BAR } },\n wrapData: function (options) {\n var series = options.series, i, data, seriesItem;\n for (i = 0; i < series.length; i++) {\n seriesItem = series[i];\n data = seriesItem.data;\n if (data && !isArray(data[0]) && typeof data[0] != OBJECT) {\n seriesItem.data = [data];\n }\n }\n },\n reflowCategories: function (categorySlots) {\n var chart = this, children = chart.children, childrenLength = children.length, i;\n for (i = 0; i < childrenLength; i++) {\n children[i].reflow(categorySlots[i]);\n }\n },\n plotRange: function (point) {\n var series = point.series;\n var valueAxis = this.seriesValueAxis(series);\n var axisCrossingValue = this.categoryAxisCrossingValue(valueAxis);\n return [\n axisCrossingValue,\n point.value.current || axisCrossingValue\n ];\n },\n createPoint: function (data, fields) {\n var chart = this;\n var categoryIx = fields.categoryIx;\n var category = fields.category;\n var series = fields.series;\n var seriesIx = fields.seriesIx;\n var value = data.valueFields;\n var options = chart.options;\n var children = chart.children;\n var bullet;\n var bulletOptions;\n var cluster;\n bulletOptions = deepExtend({\n vertical: !options.invertAxes,\n overlay: series.overlay,\n categoryIx: categoryIx,\n invertAxes: options.invertAxes\n }, series);\n var color = data.fields.color || series.color;\n bulletOptions = chart.evalPointOptions(bulletOptions, value, category, categoryIx, series, seriesIx);\n if (kendo.isFunction(series.color)) {\n color = bulletOptions.color;\n }\n bullet = new Bullet(value, bulletOptions);\n bullet.color = color;\n cluster = children[categoryIx];\n if (!cluster) {\n cluster = new ClusterLayout({\n vertical: options.invertAxes,\n gap: options.gap,\n spacing: options.spacing\n });\n chart.append(cluster);\n }\n cluster.append(bullet);\n return bullet;\n },\n updateRange: function (value, fields) {\n var chart = this, axisName = fields.series.axis, current = value.current, target = value.target, axisRange = chart.valueAxisRanges[axisName];\n if (defined(current) && !isNaN(current) && defined(target && !isNaN(target))) {\n axisRange = chart.valueAxisRanges[axisName] = axisRange || {\n min: MAX_VALUE,\n max: MIN_VALUE\n };\n axisRange.min = math.min.apply(math, [\n axisRange.min,\n current,\n target\n ]);\n axisRange.max = math.max.apply(math, [\n axisRange.max,\n current,\n target\n ]);\n }\n },\n formatPointValue: function (point, format) {\n return autoFormat(format, point.value.current, point.value.target);\n },\n pointValue: function (data) {\n return data.valueFields.current;\n },\n aboveAxis: function (point) {\n var value = point.value.current;\n return value > 0;\n },\n createAnimation: function () {\n var points = this.points;\n var point;\n this._setAnimationOptions();\n for (var idx = 0; idx < points.length; idx++) {\n point = points[idx];\n point.options.animation = this.options.animation;\n point.createAnimation();\n }\n },\n _setAnimationOptions: BarChart.fn._setAnimationOptions\n });\n var Bullet = ChartElement.extend({\n init: function (value, options) {\n var bullet = this;\n ChartElement.fn.init.call(bullet, options);\n bullet.aboveAxis = bullet.options.aboveAxis;\n bullet.color = options.color || WHITE;\n bullet.value = value;\n },\n options: {\n border: { width: 1 },\n vertical: false,\n opacity: 1,\n target: {\n shape: '',\n border: {\n width: 0,\n color: 'green'\n },\n line: { width: 2 }\n },\n tooltip: { format: 'Current: {0}Target: {1}' }\n },\n render: function () {\n var bullet = this, options = bullet.options;\n if (!bullet._rendered) {\n bullet._rendered = true;\n if (defined(bullet.value.target)) {\n bullet.target = new Target({\n type: options.target.shape,\n background: options.target.color || bullet.color,\n opacity: options.opacity,\n zIndex: options.zIndex,\n border: options.target.border,\n vAlign: TOP,\n align: RIGHT\n });\n bullet.target.value = this.value;\n bullet.target.dataItem = this.dataItem;\n bullet.target.series = this.series;\n bullet.append(bullet.target);\n }\n bullet.createNote();\n }\n },\n reflow: function (box) {\n this.render();\n var bullet = this, options = bullet.options, chart = bullet.owner, target = bullet.target, invertAxes = options.invertAxes, valueAxis = chart.seriesValueAxis(bullet.options), categorySlot = chart.categorySlot(chart.categoryAxis, options.categoryIx, valueAxis), targetValueSlot = valueAxis.getSlot(bullet.value.target), targetSlotX = invertAxes ? targetValueSlot : categorySlot, targetSlotY = invertAxes ? categorySlot : targetValueSlot, targetSlot;\n if (target) {\n targetSlot = new Box2D(targetSlotX.x1, targetSlotY.y1, targetSlotX.x2, targetSlotY.y2);\n target.options.height = invertAxes ? targetSlot.height() : options.target.line.width;\n target.options.width = invertAxes ? options.target.line.width : targetSlot.width();\n target.reflow(targetSlot);\n }\n if (bullet.note) {\n bullet.note.reflow(box);\n }\n bullet.box = box;\n },\n createVisual: function () {\n ChartElement.fn.createVisual.call(this);\n var options = this.options;\n var body = draw.Path.fromRect(this.box.toRect(), {\n fill: {\n color: this.color,\n opacity: options.opacity\n },\n stroke: null\n });\n if (options.border.width > 0) {\n body.options.set('stroke', {\n color: options.border.color || this.color,\n width: options.border.width,\n dashType: options.border.dashType,\n opacity: valueOrDefault(options.border.opacity, options.opacity)\n });\n }\n this.bodyVisual = body;\n alignPathToPixel(body);\n this.visual.append(body);\n },\n createAnimation: function () {\n if (this.bodyVisual) {\n this.animation = draw.Animation.create(this.bodyVisual, this.options.animation);\n }\n },\n tooltipAnchor: Bar.fn.tooltipAnchor,\n createHighlight: function (style) {\n return draw.Path.fromRect(this.box.toRect(), style);\n },\n highlightVisual: function () {\n return this.bodyVisual;\n },\n highlightVisualArgs: function () {\n return {\n rect: this.box.toRect(),\n visual: this.bodyVisual,\n options: this.options\n };\n },\n formatValue: function (format) {\n var bullet = this;\n return bullet.owner.formatPointValue(bullet, format);\n }\n });\n deepExtend(Bullet.fn, PointEventsMixin);\n deepExtend(Bullet.fn, NoteMixin);\n var Target = ShapeElement.extend();\n deepExtend(Target.fn, PointEventsMixin);\n var ErrorBarBase = ChartElement.extend({\n init: function (low, high, isVertical, chart, series, options) {\n var errorBar = this;\n errorBar.low = low;\n errorBar.high = high;\n errorBar.isVertical = isVertical;\n errorBar.chart = chart;\n errorBar.series = series;\n ChartElement.fn.init.call(errorBar, options);\n },\n options: {\n animation: {\n type: FADEIN,\n delay: INITIAL_ANIMATION_DURATION\n },\n endCaps: true,\n line: { width: 1 },\n zIndex: 1\n },\n getAxis: function () {\n },\n reflow: function (targetBox) {\n var linePoints, errorBar = this, endCaps = errorBar.options.endCaps, isVertical = errorBar.isVertical, axis = errorBar.getAxis(), valueBox = axis.getSlot(errorBar.low, errorBar.high), centerBox = targetBox.center(), capsWidth = errorBar.getCapsWidth(targetBox, isVertical), capValue = isVertical ? centerBox.x : centerBox.y, capStart = capValue - capsWidth, capEnd = capValue + capsWidth;\n if (isVertical) {\n linePoints = [\n Point2D(centerBox.x, valueBox.y1),\n Point2D(centerBox.x, valueBox.y2)\n ];\n if (endCaps) {\n linePoints.push(Point2D(capStart, valueBox.y1), Point2D(capEnd, valueBox.y1), Point2D(capStart, valueBox.y2), Point2D(capEnd, valueBox.y2));\n }\n errorBar.box = Box2D(capStart, valueBox.y1, capEnd, valueBox.y2);\n } else {\n linePoints = [\n Point2D(valueBox.x1, centerBox.y),\n Point2D(valueBox.x2, centerBox.y)\n ];\n if (endCaps) {\n linePoints.push(Point2D(valueBox.x1, capStart), Point2D(valueBox.x1, capEnd), Point2D(valueBox.x2, capStart), Point2D(valueBox.x2, capEnd));\n }\n errorBar.box = Box2D(valueBox.x1, capStart, valueBox.x2, capEnd);\n }\n errorBar.linePoints = linePoints;\n },\n getCapsWidth: function (box, isVertical) {\n var boxSize = isVertical ? box.width() : box.height(), capsWidth = math.min(math.floor(boxSize / 2), DEFAULT_ERROR_BAR_WIDTH) || DEFAULT_ERROR_BAR_WIDTH;\n return capsWidth;\n },\n createVisual: function () {\n var that = this;\n var options = that.options;\n var visual = options.visual;\n if (visual) {\n that.visual = visual({\n low: that.low,\n high: that.high,\n rect: that.box.toRect(),\n sender: that.getChart(),\n options: {\n endCaps: options.endCaps,\n color: options.color,\n line: options.line\n },\n createVisual: function () {\n that.createDefaultVisual();\n var defaultVisual = that.visual;\n delete that.visual;\n return defaultVisual;\n }\n });\n } else {\n that.createDefaultVisual();\n }\n },\n createDefaultVisual: function () {\n var errorBar = this, options = errorBar.options, lineOptions = {\n stroke: {\n color: options.color,\n width: options.line.width,\n dashType: options.line.dashType\n }\n }, linePoints = errorBar.linePoints;\n ChartElement.fn.createVisual.call(this);\n for (var idx = 0; idx < linePoints.length; idx += 2) {\n var line = new draw.Path(lineOptions).moveTo(linePoints[idx].x, linePoints[idx].y).lineTo(linePoints[idx + 1].x, linePoints[idx + 1].y);\n this.visual.append(line);\n }\n }\n });\n var CategoricalErrorBar = ErrorBarBase.extend({\n getAxis: function () {\n var errorBar = this, chart = errorBar.chart, series = errorBar.series, axis = chart.seriesValueAxis(series);\n return axis;\n }\n });\n var ScatterErrorBar = ErrorBarBase.extend({\n getAxis: function () {\n var errorBar = this, chart = errorBar.chart, series = errorBar.series, axes = chart.seriesAxes(series), axis = errorBar.isVertical ? axes.y : axes.x;\n return axis;\n }\n });\n var LinePoint = ChartElement.extend({\n init: function (value, options) {\n var point = this;\n ChartElement.fn.init.call(point);\n point.value = value;\n point.options = options;\n point.aboveAxis = valueOrDefault(point.options.aboveAxis, true);\n point.tooltipTracking = true;\n },\n defaults: {\n vertical: true,\n markers: {\n visible: true,\n background: WHITE,\n size: LINE_MARKER_SIZE,\n type: CIRCLE,\n border: { width: 2 },\n opacity: 1\n },\n labels: {\n visible: false,\n position: ABOVE,\n margin: getSpacing(3),\n padding: getSpacing(4),\n animation: {\n type: FADEIN,\n delay: INITIAL_ANIMATION_DURATION\n }\n },\n notes: { label: {} },\n highlight: { markers: { border: {} } }\n },\n render: function () {\n var point = this, options = point.options, markers = options.markers, labels = options.labels, labelText = point.value;\n if (point._rendered) {\n return;\n } else {\n point._rendered = true;\n }\n if (markers.visible && markers.size) {\n point.marker = point.createMarker();\n point.append(point.marker);\n }\n if (labels.visible) {\n if (labels.template) {\n var labelTemplate = template(labels.template);\n labelText = labelTemplate({\n dataItem: point.dataItem,\n category: point.category,\n value: point.value,\n percentage: point.percentage,\n stackValue: this.stackValue,\n series: point.series\n });\n } else if (labels.format) {\n labelText = point.formatValue(labels.format);\n }\n point.label = new TextBox(labelText, deepExtend({\n align: CENTER,\n vAlign: CENTER,\n margin: {\n left: 5,\n right: 5\n },\n zIndex: valueOrDefault(labels.zIndex, this.series.zIndex)\n }, labels));\n point.append(point.label);\n }\n point.createNote();\n if (point.errorBar) {\n point.append(point.errorBar);\n }\n },\n markerBorder: function () {\n var options = this.options.markers;\n var background = options.background;\n var border = deepExtend({ color: this.color }, options.border);\n if (!defined(border.color)) {\n border.color = new Color(background).brightness(BAR_BORDER_BRIGHTNESS).toHex();\n }\n return border;\n },\n createVisual: noop,\n createMarker: function () {\n var options = this.options.markers;\n var marker = new ShapeElement({\n type: options.type,\n width: options.size,\n height: options.size,\n rotation: options.rotation,\n background: options.background,\n border: this.markerBorder(),\n opacity: options.opacity,\n zIndex: valueOrDefault(options.zIndex, this.series.zIndex),\n animation: options.animation,\n visual: options.visual\n }, {\n dataItem: this.dataItem,\n value: this.value,\n series: this.series,\n category: this.category\n });\n return marker;\n },\n markerBox: function () {\n if (!this.marker) {\n this.marker = this.createMarker();\n this.marker.reflow(this._childBox);\n }\n return this.marker.box;\n },\n reflow: function (targetBox) {\n var point = this, options = point.options, vertical = options.vertical, aboveAxis = point.aboveAxis, childBox, center;\n point.render();\n point.box = targetBox;\n childBox = targetBox.clone();\n if (vertical) {\n if (aboveAxis) {\n childBox.y1 -= childBox.height();\n } else {\n childBox.y2 += childBox.height();\n }\n } else {\n if (aboveAxis) {\n childBox.x1 += childBox.width();\n } else {\n childBox.x2 -= childBox.width();\n }\n }\n point._childBox = childBox;\n if (point.marker) {\n point.marker.reflow(childBox);\n }\n point.reflowLabel(childBox);\n if (point.errorBars) {\n for (var i = 0; i < point.errorBars.length; i++) {\n point.errorBars[i].reflow(childBox);\n }\n }\n if (point.note) {\n var noteTargetBox = point.markerBox();\n if (!(options.markers.visible && options.markers.size)) {\n center = noteTargetBox.center();\n noteTargetBox = Box2D(center.x, center.y, center.x, center.y);\n }\n point.note.reflow(noteTargetBox);\n }\n },\n reflowLabel: function (box) {\n var point = this, options = point.options, label = point.label, anchor = options.labels.position;\n if (label) {\n anchor = anchor === ABOVE ? TOP : anchor;\n anchor = anchor === BELOW ? BOTTOM : anchor;\n label.reflow(box);\n label.box.alignTo(point.markerBox(), anchor);\n label.reflow(label.box);\n }\n },\n createHighlight: function () {\n var highlight = this.options.highlight;\n var markers = highlight.markers;\n var defaultColor = this.markerBorder().color;\n var options = this.options.markers;\n var shadow = new ShapeElement({\n type: options.type,\n width: options.size,\n height: options.size,\n rotation: options.rotation,\n background: markers.color || defaultColor,\n border: {\n color: markers.border.color,\n width: markers.border.width,\n opacity: valueOrDefault(markers.border.opacity, 1)\n },\n opacity: valueOrDefault(markers.opacity, 1)\n });\n shadow.reflow(this._childBox);\n return shadow.getElement();\n },\n highlightVisual: function () {\n return (this.marker || {}).visual;\n },\n highlightVisualArgs: function () {\n var marker = this.marker;\n var visual;\n var rect;\n if (marker) {\n rect = marker.paddingBox.toRect();\n visual = marker.visual;\n } else {\n var size = this.options.markers.size;\n var halfSize = size / 2;\n var center = this.box.center();\n rect = new geom.Rect([\n center.x - halfSize,\n center.y - halfSize\n ], [\n size,\n size\n ]);\n }\n return {\n options: this.options,\n rect: rect,\n visual: visual\n };\n },\n tooltipAnchor: function (tooltipWidth, tooltipHeight) {\n var point = this, markerBox = point.markerBox(), aboveAxis = point.aboveAxis, x = markerBox.x2 + TOOLTIP_OFFSET, y = aboveAxis ? markerBox.y1 - tooltipHeight : markerBox.y2, clipBox = point.owner.pane.clipBox(), showTooltip = !clipBox || clipBox.overlaps(markerBox);\n if (showTooltip) {\n return Point2D(x, y);\n }\n },\n formatValue: function (format) {\n var point = this;\n return point.owner.formatPointValue(point, format);\n },\n overlapsBox: function (box) {\n var markerBox = this.markerBox();\n return markerBox.overlaps(box);\n }\n });\n deepExtend(LinePoint.fn, PointEventsMixin);\n deepExtend(LinePoint.fn, NoteMixin);\n var Bubble = LinePoint.extend({\n init: function (value, options) {\n var point = this;\n LinePoint.fn.init.call(point, value, options);\n point.category = value.category;\n },\n defaults: {\n labels: { position: CENTER },\n highlight: {\n opacity: 1,\n border: {\n width: 1,\n opacity: 1\n }\n }\n },\n createHighlight: function () {\n var highlight = this.options.highlight;\n var border = highlight.border;\n var markers = this.options.markers;\n var center = this.box.center();\n var radius = markers.size / 2 - border.width / 2;\n var overlay = new draw.Circle(new geom.Circle([\n center.x,\n center.y\n ], radius), {\n stroke: {\n color: border.color || new Color(markers.background).brightness(BAR_BORDER_BRIGHTNESS).toHex(),\n width: border.width,\n opacity: border.opacity\n },\n fill: {\n color: markers.background,\n opacity: highlight.opacity\n }\n });\n return overlay;\n }\n });\n var LineSegment = ChartElement.extend({\n init: function (linePoints, series, seriesIx) {\n var segment = this;\n ChartElement.fn.init.call(segment);\n segment.linePoints = linePoints;\n segment.series = series;\n segment.seriesIx = seriesIx;\n },\n options: { closed: false },\n points: function (visualPoints) {\n var segment = this, linePoints = segment.linePoints.concat(visualPoints || []), points = [];\n for (var i = 0, length = linePoints.length; i < length; i++) {\n if (linePoints[i].visible !== false) {\n points.push(linePoints[i]._childBox.toRect().center());\n }\n }\n return points;\n },\n createVisual: function () {\n var options = this.options;\n var series = this.series;\n var defaults = series._defaults;\n var color = series.color;\n if (isFn(color) && defaults) {\n color = defaults.color;\n }\n var line = draw.Path.fromPoints(this.points(), {\n stroke: {\n color: color,\n width: series.width,\n opacity: series.opacity,\n dashType: series.dashType\n },\n zIndex: series.zIndex\n });\n if (options.closed) {\n line.close();\n }\n this.visual = line;\n },\n aliasFor: function (e, coords) {\n var segment = this, seriesIx = segment.seriesIx;\n return segment.parent.getNearestPoint(coords.x, coords.y, seriesIx);\n }\n });\n var LineChartMixin = {\n renderSegments: function () {\n var chart = this, options = chart.options, series = options.series, seriesPoints = chart.seriesPoints, currentSeries, seriesIx, seriesCount = seriesPoints.length, sortedPoints, linePoints, point, pointIx, pointCount, lastSegment;\n this._segments = [];\n for (seriesIx = 0; seriesIx < seriesCount; seriesIx++) {\n currentSeries = series[seriesIx];\n sortedPoints = chart.sortPoints(seriesPoints[seriesIx]);\n pointCount = sortedPoints.length;\n linePoints = [];\n for (pointIx = 0; pointIx < pointCount; pointIx++) {\n point = sortedPoints[pointIx];\n if (point) {\n linePoints.push(point);\n } else if (chart.seriesMissingValues(currentSeries) !== INTERPOLATE) {\n if (linePoints.length > 1) {\n lastSegment = chart.createSegment(linePoints, currentSeries, seriesIx, lastSegment);\n this._addSegment(lastSegment);\n }\n linePoints = [];\n }\n }\n if (linePoints.length > 1) {\n lastSegment = chart.createSegment(linePoints, currentSeries, seriesIx, lastSegment);\n this._addSegment(lastSegment);\n }\n }\n this.children.unshift.apply(this.children, this._segments);\n },\n _addSegment: function (segment) {\n this._segments.push(segment);\n segment.parent = this;\n },\n sortPoints: function (points) {\n return points;\n },\n seriesMissingValues: function (series) {\n var missingValues = series.missingValues, assumeZero = !missingValues && this.options.isStacked;\n return assumeZero ? ZERO : missingValues || INTERPOLATE;\n },\n getNearestPoint: function (x, y, seriesIx) {\n var target = new Point2D(x, y);\n var allPoints = this.seriesPoints[seriesIx];\n var nearestPointDistance = MAX_VALUE;\n var nearestPoint;\n for (var i = 0; i < allPoints.length; i++) {\n var point = allPoints[i];\n if (point && defined(point.value) && point.value !== null && point.visible !== false) {\n var pointBox = point.box;\n var pointDistance = pointBox.center().distanceTo(target);\n if (pointDistance < nearestPointDistance) {\n nearestPoint = point;\n nearestPointDistance = pointDistance;\n }\n }\n }\n return nearestPoint;\n }\n };\n var ClipAnimationMixin = {\n createAnimation: function () {\n var root = this.getRoot();\n if (root && (root.options || {}).transitions !== false) {\n var box = root.box;\n var clipPath = draw.Path.fromRect(box.toRect());\n this.visual.clip(clipPath);\n this.animation = new ClipAnimation(clipPath, { box: box });\n if (anyHasZIndex(this.options.series)) {\n this._setChildrenAnimation(clipPath);\n }\n }\n },\n _setChildrenAnimation: function (clipPath) {\n var points = this.animationPoints();\n var point;\n for (var idx = 0; idx < points.length; idx++) {\n point = points[idx];\n if (point && point.visual && defined(point.visual.options.zIndex)) {\n point.visual.clip(clipPath);\n }\n }\n }\n };\n var LineChart = CategoricalChart.extend({\n render: function () {\n var chart = this;\n CategoricalChart.fn.render.apply(chart);\n chart.updateStackRange();\n chart.renderSegments();\n },\n pointType: function () {\n return LinePoint;\n },\n createPoint: function (data, fields) {\n var chart = this;\n var categoryIx = fields.categoryIx;\n var category = fields.category;\n var series = fields.series;\n var seriesIx = fields.seriesIx;\n var value = data.valueFields.value;\n var missingValues = chart.seriesMissingValues(series);\n var point;\n var pointOptions;\n if (!defined(value) || value === null) {\n if (missingValues === ZERO) {\n value = 0;\n } else {\n return null;\n }\n }\n pointOptions = this.pointOptions(series, seriesIx);\n pointOptions = chart.evalPointOptions(pointOptions, value, category, categoryIx, series, seriesIx);\n var color = data.fields.color || series.color;\n if (kendo.isFunction(series.color)) {\n color = pointOptions.color;\n }\n point = new LinePoint(value, pointOptions);\n point.color = color;\n chart.append(point);\n return point;\n },\n plotRange: function (point) {\n var plotValue = this.plotValue(point);\n if (this.options.isStacked) {\n var categoryIx = point.categoryIx;\n var categoryPts = this.categoryPoints[categoryIx];\n for (var i = 0; i < categoryPts.length; i++) {\n var other = categoryPts[i];\n if (point === other) {\n break;\n }\n plotValue += this.plotValue(other);\n if (this.options.isStacked100) {\n plotValue = math.min(plotValue, 1);\n }\n }\n }\n return [\n plotValue,\n plotValue\n ];\n },\n createSegment: function (linePoints, currentSeries, seriesIx) {\n var pointType, style = currentSeries.style;\n if (style === STEP) {\n pointType = StepLineSegment;\n } else if (style === SMOOTH) {\n pointType = SplineSegment;\n } else {\n pointType = LineSegment;\n }\n return new pointType(linePoints, currentSeries, seriesIx);\n },\n animationPoints: function () {\n var points = this.points;\n var result = [];\n for (var idx = 0; idx < points.length; idx++) {\n result.push((points[idx] || {}).marker);\n }\n return result.concat(this._segments);\n }\n });\n deepExtend(LineChart.fn, LineChartMixin, ClipAnimationMixin);\n var ClipAnimation = draw.Animation.extend({\n options: { duration: INITIAL_ANIMATION_DURATION },\n setup: function () {\n this._setEnd(this.options.box.x1);\n },\n step: function (pos) {\n var box = this.options.box;\n this._setEnd(interpolate(box.x1, box.x2, pos));\n },\n _setEnd: function (x) {\n var element = this.element;\n var segments = element.segments;\n var topRight = segments[1].anchor();\n var bottomRight = segments[2].anchor();\n element.suspend();\n topRight.setX(x);\n element.resume();\n bottomRight.setX(x);\n }\n });\n draw.AnimationFactory.current.register(CLIP, ClipAnimation);\n var StepLineSegment = LineSegment.extend({\n points: function (visualPoints) {\n var segment = this, points;\n points = segment.calculateStepPoints(segment.linePoints);\n if (visualPoints && visualPoints.length) {\n points = points.concat(segment.calculateStepPoints(visualPoints).reverse());\n }\n return points;\n },\n calculateStepPoints: function (points) {\n var segment = this, chart = segment.parent, plotArea = chart.plotArea, categoryAxis = plotArea.seriesCategoryAxis(segment.series), isInterpolate = chart.seriesMissingValues(segment.series) === INTERPOLATE, length = points.length, reverse = categoryAxis.options.reverse, vertical = categoryAxis.options.vertical, dir = reverse ? 2 : 1, revDir = reverse ? 1 : 2, prevPoint, point, i, prevMarkerBoxCenter, markerBoxCenter, result = [];\n for (i = 1; i < length; i++) {\n prevPoint = points[i - 1];\n point = points[i];\n prevMarkerBoxCenter = prevPoint.markerBox().center();\n markerBoxCenter = point.markerBox().center();\n if (categoryAxis.options.justified) {\n result.push(new geom.Point(prevMarkerBoxCenter.x, prevMarkerBoxCenter.y));\n if (vertical) {\n result.push(new geom.Point(prevMarkerBoxCenter.x, markerBoxCenter.y));\n } else {\n result.push(new geom.Point(markerBoxCenter.x, prevMarkerBoxCenter.y));\n }\n result.push(new geom.Point(markerBoxCenter.x, markerBoxCenter.y));\n } else {\n if (vertical) {\n result.push(new geom.Point(prevMarkerBoxCenter.x, prevPoint.box[Y + dir]));\n result.push(new geom.Point(prevMarkerBoxCenter.x, prevPoint.box[Y + revDir]));\n if (isInterpolate) {\n result.push(new geom.Point(prevMarkerBoxCenter.x, point.box[Y + dir]));\n }\n result.push(new geom.Point(markerBoxCenter.x, point.box[Y + dir]));\n result.push(new geom.Point(markerBoxCenter.x, point.box[Y + revDir]));\n } else {\n result.push(new geom.Point(prevPoint.box[X + dir], prevMarkerBoxCenter.y));\n result.push(new geom.Point(prevPoint.box[X + revDir], prevMarkerBoxCenter.y));\n if (isInterpolate) {\n result.push(new geom.Point(point.box[X + dir], prevMarkerBoxCenter.y));\n }\n result.push(new geom.Point(point.box[X + dir], markerBoxCenter.y));\n result.push(new geom.Point(point.box[X + revDir], markerBoxCenter.y));\n }\n }\n }\n return result || [];\n }\n });\n var SplineSegment = LineSegment.extend({\n createVisual: function () {\n var series = this.series;\n var defaults = series._defaults;\n var color = series.color;\n if (isFn(color) && defaults) {\n color = defaults.color;\n }\n var curveProcessor = new CurveProcessor(this.options.closed);\n var segments = curveProcessor.process(this.points());\n var curve = new draw.Path({\n stroke: {\n color: color,\n width: series.width,\n opacity: series.opacity,\n dashType: series.dashType\n },\n zIndex: series.zIndex\n });\n curve.segments.push.apply(curve.segments, segments);\n this.visual = curve;\n }\n });\n var AreaSegmentMixin = {\n points: function () {\n var segment = this, chart = segment.parent, plotArea = chart.plotArea, invertAxes = chart.options.invertAxes, valueAxis = chart.seriesValueAxis(segment.series), valueAxisLineBox = valueAxis.lineBox(), categoryAxis = plotArea.seriesCategoryAxis(segment.series), categoryAxisLineBox = categoryAxis.lineBox(), end = invertAxes ? categoryAxisLineBox.x1 : categoryAxisLineBox.y1, stackPoints = segment.stackPoints, points = segment._linePoints(stackPoints), pos = invertAxes ? X : Y, firstPoint, lastPoint;\n end = limitValue(end, valueAxisLineBox[pos + 1], valueAxisLineBox[pos + 2]);\n if (!segment.stackPoints && points.length > 1) {\n firstPoint = points[0];\n lastPoint = last(points);\n if (invertAxes) {\n points.unshift(new geom.Point(end, firstPoint.y));\n points.push(new geom.Point(end, lastPoint.y));\n } else {\n points.unshift(new geom.Point(firstPoint.x, end));\n points.push(new geom.Point(lastPoint.x, end));\n }\n }\n return points;\n },\n createVisual: function () {\n var series = this.series;\n var defaults = series._defaults;\n var color = series.color;\n if (isFn(color) && defaults) {\n color = defaults.color;\n }\n this.visual = new draw.Group({ zIndex: series.zIndex });\n this.createArea(color);\n this.createLine(color);\n },\n createLine: function (color) {\n var series = this.series;\n var lineOptions = deepExtend({\n color: color,\n opacity: series.opacity\n }, series.line);\n if (lineOptions.visible !== false && lineOptions.width > 0) {\n var line = draw.Path.fromPoints(this._linePoints(), {\n stroke: {\n color: lineOptions.color,\n width: lineOptions.width,\n opacity: lineOptions.opacity,\n dashType: lineOptions.dashType,\n lineCap: 'butt'\n }\n });\n this.visual.append(line);\n }\n },\n createArea: function (color) {\n var series = this.series;\n var area = draw.Path.fromPoints(this.points(), {\n fill: {\n color: color,\n opacity: series.opacity\n },\n stroke: null\n });\n this.visual.append(area);\n }\n };\n var AreaSegment = LineSegment.extend({\n init: function (linePoints, stackPoints, currentSeries, seriesIx) {\n var segment = this;\n segment.stackPoints = stackPoints;\n LineSegment.fn.init.call(segment, linePoints, currentSeries, seriesIx);\n },\n _linePoints: LineSegment.fn.points\n });\n deepExtend(AreaSegment.fn, AreaSegmentMixin);\n var AreaChart = LineChart.extend({\n createSegment: function (linePoints, currentSeries, seriesIx, prevSegment) {\n var chart = this, options = chart.options, isStacked = options.isStacked, stackPoints, pointType, style = (currentSeries.line || {}).style;\n if (isStacked && seriesIx > 0 && prevSegment) {\n var missingValues = this.seriesMissingValues(currentSeries);\n if (missingValues != 'gap') {\n stackPoints = prevSegment.linePoints;\n } else {\n stackPoints = this._gapStackPoints(linePoints, seriesIx, style);\n }\n if (style !== STEP) {\n stackPoints = stackPoints.slice(0).reverse();\n }\n }\n if (style === SMOOTH) {\n return new SplineAreaSegment(linePoints, prevSegment, isStacked, currentSeries, seriesIx);\n }\n if (style === STEP) {\n pointType = StepAreaSegment;\n } else {\n pointType = AreaSegment;\n }\n return new pointType(linePoints, stackPoints, currentSeries, seriesIx);\n },\n reflow: function (targetBox) {\n LineChart.fn.reflow.call(this, targetBox);\n var stackPoints = this._stackPoints;\n if (stackPoints) {\n var stackPoint, pointSlot;\n for (var idx = 0; idx < stackPoints.length; idx++) {\n stackPoint = stackPoints[idx];\n pointSlot = this.categoryAxis.getSlot(stackPoint.categoryIx);\n stackPoint.reflow(pointSlot);\n }\n }\n },\n _gapStackPoints: function (linePoints, seriesIx, style) {\n var seriesPoints = this.seriesPoints;\n var startIdx = linePoints[0].categoryIx;\n var endIdx = startIdx + linePoints.length;\n var stackPoints = [];\n var currentSeriesIx;\n var point, gapStackPoint;\n this._stackPoints = this._stackPoints || [];\n for (var idx = startIdx; idx < endIdx; idx++) {\n currentSeriesIx = seriesIx;\n do {\n currentSeriesIx--;\n point = seriesPoints[currentSeriesIx][idx];\n } while (currentSeriesIx > 0 && !point);\n if (point) {\n if (style !== STEP && idx > startIdx && !seriesPoints[currentSeriesIx][idx - 1]) {\n stackPoints.push(this._previousSegmentPoint(idx, idx - 1, currentSeriesIx));\n }\n stackPoints.push(point);\n if (style !== STEP && idx + 1 < endIdx && !seriesPoints[currentSeriesIx][idx + 1]) {\n stackPoints.push(this._previousSegmentPoint(idx, idx + 1, currentSeriesIx));\n }\n } else {\n gapStackPoint = this._createGapStackPoint(idx);\n this._stackPoints.push(gapStackPoint);\n stackPoints.push(gapStackPoint);\n }\n }\n return stackPoints;\n },\n _previousSegmentPoint: function (categoryIx, segmentIx, seriesIdx) {\n var seriesPoints = this.seriesPoints;\n var point;\n while (seriesIdx > 0 && !point) {\n seriesIdx--;\n point = seriesPoints[seriesIdx][segmentIx];\n }\n if (!point) {\n point = this._createGapStackPoint(categoryIx);\n this._stackPoints.push(point);\n } else {\n point = seriesPoints[seriesIdx][categoryIx];\n }\n return point;\n },\n _createGapStackPoint: function (categoryIx) {\n var options = this.pointOptions({}, 0);\n var point = new LinePoint(0, options);\n point.categoryIx = categoryIx;\n point.series = {};\n return point;\n },\n seriesMissingValues: function (series) {\n return series.missingValues || ZERO;\n }\n });\n var SplineAreaSegment = AreaSegment.extend({\n init: function (linePoints, prevSegment, isStacked, currentSeries, seriesIx) {\n var segment = this;\n segment.prevSegment = prevSegment;\n segment.isStacked = isStacked;\n LineSegment.fn.init.call(segment, linePoints, currentSeries, seriesIx);\n },\n strokeSegments: function () {\n var segments = this._strokeSegments;\n if (!segments) {\n var curveProcessor = new CurveProcessor(this.options.closed);\n var linePoints = LineSegment.fn.points.call(this);\n segments = this._strokeSegments = curveProcessor.process(linePoints);\n }\n return segments;\n },\n createVisual: function () {\n var series = this.series;\n var defaults = series._defaults;\n var color = series.color;\n if (isFn(color) && defaults) {\n color = defaults.color;\n }\n this.visual = new draw.Group({ zIndex: series.zIndex });\n this.createFill({\n fill: {\n color: color,\n opacity: series.opacity\n },\n stroke: null\n });\n this.createStroke({\n stroke: deepExtend({\n color: color,\n opacity: series.opacity,\n lineCap: 'butt'\n }, series.line)\n });\n },\n createFill: function (style) {\n var strokeSegments = this.strokeSegments();\n var fillSegments = strokeSegments.slice(0);\n var prevSegment = this.prevSegment;\n if (this.isStacked && prevSegment) {\n var prevStrokeSegments = prevSegment.strokeSegments();\n var prevAnchor = last(prevStrokeSegments).anchor();\n fillSegments.push(new draw.Segment(prevAnchor, prevAnchor, last(strokeSegments).anchor()));\n var stackSegments = $.map(prevStrokeSegments, function (segment) {\n return new draw.Segment(segment.anchor(), segment.controlOut(), segment.controlIn());\n }).reverse();\n append(fillSegments, stackSegments);\n var firstAnchor = fillSegments[0].anchor();\n fillSegments.push(new draw.Segment(firstAnchor, firstAnchor, last(stackSegments).anchor()));\n }\n var fill = new draw.Path(style);\n fill.segments.push.apply(fill.segments, fillSegments);\n this.closeFill(fill);\n this.visual.append(fill);\n },\n closeFill: function (fillPath) {\n var segment = this, chart = segment.parent, prevSegment = segment.prevSegment, plotArea = chart.plotArea, invertAxes = chart.options.invertAxes, valueAxis = chart.seriesValueAxis(segment.series), valueAxisLineBox = valueAxis.lineBox(), categoryAxis = plotArea.seriesCategoryAxis(segment.series), categoryAxisLineBox = categoryAxis.lineBox(), end = invertAxes ? categoryAxisLineBox.x1 : categoryAxisLineBox.y1, pos = invertAxes ? X : Y, segments = segment.strokeSegments(), firstPoint = segments[0].anchor(), lastPoint = last(segments).anchor();\n end = limitValue(end, valueAxisLineBox[pos + 1], valueAxisLineBox[pos + 2]);\n if (!(chart.options.isStacked && prevSegment) && segments.length > 1) {\n if (invertAxes) {\n fillPath.lineTo(end, lastPoint.y).lineTo(end, firstPoint.y);\n } else {\n fillPath.lineTo(lastPoint.x, end).lineTo(firstPoint.x, end);\n }\n }\n },\n createStroke: function (style) {\n if (style.stroke.width > 0) {\n var stroke = new draw.Path(style);\n stroke.segments.push.apply(stroke.segments, this.strokeSegments());\n this.visual.append(stroke);\n }\n }\n });\n var StepAreaSegment = StepLineSegment.extend({\n init: function (linePoints, stackPoints, currentSeries, seriesIx) {\n var segment = this;\n segment.stackPoints = stackPoints;\n StepLineSegment.fn.init.call(segment, linePoints, currentSeries, seriesIx);\n },\n _linePoints: StepLineSegment.fn.points\n });\n deepExtend(StepAreaSegment.fn, AreaSegmentMixin);\n var ScatterChart = ChartElement.extend({\n init: function (plotArea, options) {\n var chart = this;\n ChartElement.fn.init.call(chart, options);\n chart.plotArea = plotArea;\n chart.xAxisRanges = {};\n chart.yAxisRanges = {};\n chart.points = [];\n chart.seriesPoints = [];\n chart.seriesOptions = [];\n chart._evalSeries = [];\n chart.render();\n },\n options: {\n series: [],\n tooltip: { format: '{0}, {1}' },\n labels: { format: '{0}, {1}' },\n clip: true\n },\n render: function () {\n var chart = this;\n chart.traverseDataPoints(proxy(chart.addValue, chart));\n },\n addErrorBar: function (point, field, fields) {\n var errorRange, chart = this, value = point.value[field], valueErrorField = field + 'Value', lowField = field + 'ErrorLow', highField = field + 'ErrorHigh', seriesIx = fields.seriesIx, series = fields.series, errorBars = point.options.errorBars, lowValue = fields[lowField], highValue = fields[highField];\n if (isNumber(value)) {\n if (isNumber(lowValue) && isNumber(highValue)) {\n errorRange = {\n low: lowValue,\n high: highValue\n };\n }\n if (errorBars && defined(errorBars[valueErrorField])) {\n chart.seriesErrorRanges = chart.seriesErrorRanges || {\n x: [],\n y: []\n };\n chart.seriesErrorRanges[field][seriesIx] = chart.seriesErrorRanges[field][seriesIx] || new ErrorRangeCalculator(errorBars[valueErrorField], series, field);\n errorRange = chart.seriesErrorRanges[field][seriesIx].getErrorRange(value, errorBars[valueErrorField]);\n }\n if (errorRange) {\n chart.addPointErrorBar(errorRange, point, field);\n }\n }\n },\n addPointErrorBar: function (errorRange, point, field) {\n var chart = this, low = errorRange.low, high = errorRange.high, series = point.series, isVertical = field === Y, options = point.options.errorBars, item = {}, errorBar;\n point[field + 'Low'] = low;\n point[field + 'High'] = high;\n point.errorBars = point.errorBars || [];\n errorBar = new ScatterErrorBar(low, high, isVertical, chart, series, options);\n point.errorBars.push(errorBar);\n point.append(errorBar);\n item[field] = low;\n chart.updateRange(item, series);\n item[field] = high;\n chart.updateRange(item, series);\n },\n addValue: function (value, fields) {\n var chart = this, point, x = value.x, y = value.y, seriesIx = fields.seriesIx, series = this.options.series[seriesIx], missingValues = this.seriesMissingValues(series), seriesPoints = chart.seriesPoints[seriesIx];\n if (!(hasValue(x) && hasValue(y))) {\n value = this.createMissingValue(value, missingValues);\n }\n if (value) {\n point = chart.createPoint(value, fields);\n if (point) {\n extend(point, fields);\n chart.addErrorBar(point, X, fields);\n chart.addErrorBar(point, Y, fields);\n }\n chart.updateRange(value, fields.series);\n }\n chart.points.push(point);\n seriesPoints.push(point);\n },\n seriesMissingValues: function (series) {\n return series.missingValues;\n },\n createMissingValue: noop,\n updateRange: function (value, series) {\n var chart = this, x = value.x, y = value.y, xAxisName = series.xAxis, yAxisName = series.yAxis, xAxisRange = chart.xAxisRanges[xAxisName], yAxisRange = chart.yAxisRanges[yAxisName];\n if (hasValue(x)) {\n xAxisRange = chart.xAxisRanges[xAxisName] = xAxisRange || {\n min: MAX_VALUE,\n max: MIN_VALUE\n };\n if (typeof x === STRING) {\n x = toDate(x);\n }\n xAxisRange.min = math.min(xAxisRange.min, x);\n xAxisRange.max = math.max(xAxisRange.max, x);\n }\n if (hasValue(y)) {\n yAxisRange = chart.yAxisRanges[yAxisName] = yAxisRange || {\n min: MAX_VALUE,\n max: MIN_VALUE\n };\n if (typeof y === STRING) {\n y = toDate(y);\n }\n yAxisRange.min = math.min(yAxisRange.min, y);\n yAxisRange.max = math.max(yAxisRange.max, y);\n }\n },\n evalPointOptions: function (options, value, fields) {\n var series = fields.series;\n var seriesIx = fields.seriesIx;\n var state = {\n defaults: series._defaults,\n excluded: [\n 'data',\n 'tooltip',\n 'tempate',\n 'visual',\n 'toggle',\n '_outOfRangeMinPoint',\n '_outOfRangeMaxPoint'\n ]\n };\n var doEval = this._evalSeries[seriesIx];\n if (!defined(doEval)) {\n this._evalSeries[seriesIx] = doEval = evalOptions(options, {}, state, true);\n }\n if (doEval) {\n options = deepExtend({}, options);\n evalOptions(options, {\n value: value,\n series: series,\n dataItem: fields.dataItem\n }, state);\n }\n return options;\n },\n pointType: function () {\n return LinePoint;\n },\n pointOptions: function (series, seriesIx) {\n var options = this.seriesOptions[seriesIx];\n if (!options) {\n var defaults = this.pointType().fn.defaults;\n this.seriesOptions[seriesIx] = options = deepExtend({}, defaults, {\n markers: { opacity: series.opacity },\n tooltip: { format: this.options.tooltip.format },\n labels: { format: this.options.labels.format }\n }, series);\n }\n return options;\n },\n createPoint: function (value, fields) {\n var chart = this, series = fields.series, point;\n var pointOptions = this.pointOptions(series, fields.seriesIx);\n var color = fields.color || series.color;\n pointOptions = chart.evalPointOptions(pointOptions, value, fields);\n if (kendo.isFunction(series.color)) {\n color = pointOptions.color;\n }\n point = new LinePoint(value, pointOptions);\n point.color = color;\n chart.append(point);\n return point;\n },\n seriesAxes: function (series) {\n var plotArea = this.plotArea, xAxisName = series.xAxis, xAxis = xAxisName ? plotArea.namedXAxes[xAxisName] : plotArea.axisX, yAxisName = series.yAxis, yAxis = yAxisName ? plotArea.namedYAxes[yAxisName] : plotArea.axisY;\n if (!xAxis) {\n throw new Error('Unable to locate X axis with name ' + xAxisName);\n }\n if (!yAxis) {\n throw new Error('Unable to locate Y axis with name ' + yAxisName);\n }\n return {\n x: xAxis,\n y: yAxis\n };\n },\n reflow: function (targetBox) {\n var chart = this, chartPoints = chart.points, pointIx = 0, point, seriesAxes, limit = !chart.options.clip;\n chart.traverseDataPoints(function (value, fields) {\n point = chartPoints[pointIx++];\n seriesAxes = chart.seriesAxes(fields.series);\n var slotX = seriesAxes.x.getSlot(value.x, value.x, limit), slotY = seriesAxes.y.getSlot(value.y, value.y, limit), pointSlot;\n if (point) {\n if (slotX && slotY) {\n pointSlot = chart.pointSlot(slotX, slotY);\n point.reflow(pointSlot);\n } else {\n point.visible = false;\n }\n }\n });\n chart.box = targetBox;\n },\n pointSlot: function (slotX, slotY) {\n return new Box2D(slotX.x1, slotY.y1, slotX.x2, slotY.y2);\n },\n traverseDataPoints: function (callback) {\n var chart = this, options = chart.options, series = options.series, seriesPoints = chart.seriesPoints, pointIx, seriesIx, currentSeries, currentSeriesPoints, pointData, value, fields;\n for (seriesIx = 0; seriesIx < series.length; seriesIx++) {\n currentSeries = series[seriesIx];\n currentSeriesPoints = seriesPoints[seriesIx];\n if (!currentSeriesPoints) {\n seriesPoints[seriesIx] = [];\n }\n for (pointIx = 0; pointIx < currentSeries.data.length; pointIx++) {\n pointData = this._bindPoint(currentSeries, seriesIx, pointIx);\n value = pointData.valueFields;\n fields = pointData.fields;\n callback(value, deepExtend({\n pointIx: pointIx,\n series: currentSeries,\n seriesIx: seriesIx,\n dataItem: currentSeries.data[pointIx],\n owner: chart\n }, fields));\n }\n }\n },\n _bindPoint: CategoricalChart.fn._bindPoint,\n formatPointValue: function (point, format) {\n var value = point.value;\n return autoFormat(format, value.x, value.y);\n },\n animationPoints: function () {\n var points = this.points;\n var result = [];\n for (var idx = 0; idx < points.length; idx++) {\n result.push((points[idx] || {}).marker);\n }\n return result;\n }\n });\n deepExtend(ScatterChart.fn, ClipAnimationMixin);\n var ScatterLineChart = ScatterChart.extend({\n render: function () {\n var chart = this;\n ScatterChart.fn.render.call(chart);\n chart.renderSegments();\n },\n createSegment: function (linePoints, currentSeries, seriesIx) {\n var pointType, style = currentSeries.style;\n if (style === SMOOTH) {\n pointType = SplineSegment;\n } else {\n pointType = LineSegment;\n }\n return new pointType(linePoints, currentSeries, seriesIx);\n },\n animationPoints: function () {\n var points = ScatterChart.fn.animationPoints.call(this);\n return points.concat(this._segments);\n },\n createMissingValue: function (value, missingValues) {\n if (missingValues === ZERO) {\n var missingValue = {\n x: value.x,\n y: value.y\n };\n if (!hasValue(missingValue.x)) {\n missingValue.x = 0;\n }\n if (!hasValue(missingValue.y)) {\n missingValue.y = 0;\n }\n return missingValue;\n }\n }\n });\n deepExtend(ScatterLineChart.fn, LineChartMixin);\n var BubbleChart = ScatterChart.extend({\n init: function (plotArea, options) {\n this._maxSize = MIN_VALUE;\n ScatterChart.fn.init.call(this, plotArea, options);\n },\n options: {\n tooltip: { format: '{3}' },\n labels: { format: '{3}' }\n },\n addValue: function (value, fields) {\n if (value.size !== null && (value.size > 0 || value.size < 0 && fields.series.negativeValues.visible)) {\n this._maxSize = math.max(this._maxSize, math.abs(value.size));\n ScatterChart.fn.addValue.call(this, value, fields);\n } else {\n this.points.push(null);\n this.seriesPoints[fields.seriesIx].push(null);\n }\n },\n reflow: function (box) {\n var chart = this;\n chart.updateBubblesSize(box);\n ScatterChart.fn.reflow.call(chart, box);\n },\n pointType: function () {\n return Bubble;\n },\n createPoint: function (value, fields) {\n var chart = this, series = fields.series, pointsCount = series.data.length, delay = fields.pointIx * (INITIAL_ANIMATION_DURATION / pointsCount), animationOptions = {\n delay: delay,\n duration: INITIAL_ANIMATION_DURATION - delay,\n type: BUBBLE\n }, point, pointOptions;\n var color = fields.color || series.color;\n if (value.size < 0 && series.negativeValues.visible) {\n color = valueOrDefault(series.negativeValues.color, color);\n }\n pointOptions = deepExtend({\n labels: {\n animation: {\n delay: delay,\n duration: INITIAL_ANIMATION_DURATION - delay\n }\n }\n }, this.pointOptions(series, fields.seriesIx), {\n markers: {\n type: CIRCLE,\n border: series.border,\n opacity: series.opacity,\n animation: animationOptions\n }\n });\n pointOptions = chart.evalPointOptions(pointOptions, value, fields);\n if (kendo.isFunction(series.color)) {\n color = pointOptions.color;\n }\n pointOptions.markers.background = color;\n point = new Bubble(value, pointOptions);\n point.color = color;\n chart.append(point);\n return point;\n },\n updateBubblesSize: function (box) {\n var chart = this, options = chart.options, series = options.series, boxSize = math.min(box.width(), box.height()), seriesIx, pointIx;\n for (seriesIx = 0; seriesIx < series.length; seriesIx++) {\n var currentSeries = series[seriesIx], seriesPoints = chart.seriesPoints[seriesIx], minSize = currentSeries.minSize || math.max(boxSize * 0.02, 10), maxSize = currentSeries.maxSize || boxSize * 0.2, minR = minSize / 2, maxR = maxSize / 2, minArea = math.PI * minR * minR, maxArea = math.PI * maxR * maxR, areaRange = maxArea - minArea, areaRatio = areaRange / chart._maxSize;\n for (pointIx = 0; pointIx < seriesPoints.length; pointIx++) {\n var point = seriesPoints[pointIx];\n if (point) {\n var area = math.abs(point.value.size) * areaRatio, r = math.sqrt((minArea + area) / math.PI), baseZIndex = valueOrDefault(point.options.zIndex, 0), zIndex = baseZIndex + (1 - r / maxR);\n deepExtend(point.options, {\n zIndex: zIndex,\n markers: {\n size: r * 2,\n zIndex: zIndex\n },\n labels: { zIndex: zIndex + 1 }\n });\n }\n }\n }\n },\n formatPointValue: function (point, format) {\n var value = point.value;\n return autoFormat(format, value.x, value.y, value.size, point.category);\n },\n createAnimation: noop,\n createVisual: noop\n });\n var Candlestick = ChartElement.extend({\n init: function (value, options) {\n ChartElement.fn.init.call(this, options);\n this.value = value;\n },\n options: {\n vertical: true,\n border: { _brightness: 0.8 },\n line: { width: 2 },\n overlay: { gradient: GLASS },\n tooltip: { format: '' + '{4:d} | ' + 'Open: | {0:C} |
' + 'High: | {1:C} |
' + 'Low: | {2:C} |
' + 'Close: | {3:C} |
' + '
' },\n highlight: {\n opacity: 1,\n border: {\n width: 1,\n opacity: 1\n },\n line: {\n width: 1,\n opacity: 1\n }\n },\n notes: {\n visible: true,\n label: {}\n }\n },\n reflow: function (box) {\n var point = this, options = point.options, chart = point.owner, value = point.value, valueAxis = chart.seriesValueAxis(options), points = [], mid, ocSlot, lhSlot;\n ocSlot = valueAxis.getSlot(value.open, value.close);\n lhSlot = valueAxis.getSlot(value.low, value.high);\n ocSlot.x1 = lhSlot.x1 = box.x1;\n ocSlot.x2 = lhSlot.x2 = box.x2;\n point.realBody = ocSlot;\n mid = lhSlot.center().x;\n points.push([\n [\n mid,\n lhSlot.y1\n ],\n [\n mid,\n ocSlot.y1\n ]\n ]);\n points.push([\n [\n mid,\n ocSlot.y2\n ],\n [\n mid,\n lhSlot.y2\n ]\n ]);\n point.lines = points;\n point.box = lhSlot.clone().wrap(ocSlot);\n if (!point._rendered) {\n point._rendered = true;\n point.createNote();\n }\n point.reflowNote();\n },\n reflowNote: function () {\n var point = this;\n if (point.note) {\n point.note.reflow(point.box);\n }\n },\n createVisual: function () {\n ChartElement.fn.createVisual.call(this);\n this._mainVisual = this.mainVisual(this.options);\n this.visual.append(this._mainVisual);\n this.createOverlay();\n },\n mainVisual: function (options) {\n var group = new draw.Group();\n this.createBody(group, options);\n this.createLines(group, options);\n return group;\n },\n createBody: function (container, options) {\n var body = draw.Path.fromRect(this.realBody.toRect(), {\n fill: {\n color: this.color,\n opacity: options.opacity\n },\n stroke: null\n });\n if (options.border.width > 0) {\n body.options.set('stroke', {\n color: this.getBorderColor(),\n width: options.border.width,\n dashType: options.border.dashType,\n opacity: valueOrDefault(options.border.opacity, options.opacity)\n });\n }\n alignPathToPixel(body);\n container.append(body);\n if (hasGradientOverlay(options)) {\n container.append(this.createGradientOverlay(body, { baseColor: this.color }, deepExtend({\n end: !options.vertical ? [\n 0,\n 1\n ] : undefined\n }, options.overlay)));\n }\n },\n createLines: function (container, options) {\n this.drawLines(container, options, this.lines, options.line);\n },\n drawLines: function (container, options, lines, lineOptions) {\n if (!lines) {\n return;\n }\n var lineStyle = {\n stroke: {\n color: lineOptions.color || this.color,\n opacity: valueOrDefault(lineOptions.opacity, options.opacity),\n width: lineOptions.width,\n dashType: lineOptions.dashType,\n lineCap: 'butt'\n }\n };\n for (var i = 0; i < lines.length; i++) {\n var line = draw.Path.fromPoints(lines[i], lineStyle);\n alignPathToPixel(line);\n container.append(line);\n }\n },\n getBorderColor: function () {\n var point = this, options = point.options, border = options.border, borderColor = border.color;\n if (!defined(borderColor)) {\n borderColor = new Color(point.color).brightness(border._brightness).toHex();\n }\n return borderColor;\n },\n createOverlay: function () {\n var overlay = draw.Path.fromRect(this.box.toRect(), {\n fill: {\n color: WHITE,\n opacity: 0\n },\n stroke: null\n });\n this.visual.append(overlay);\n },\n createHighlight: function () {\n var highlight = this.options.highlight;\n var normalColor = this.color;\n this.color = highlight.color || this.color;\n var overlay = this.mainVisual(deepExtend({}, this.options, { line: { color: this.getBorderColor() } }, highlight));\n this.color = normalColor;\n return overlay;\n },\n highlightVisual: function () {\n return this._mainVisual;\n },\n highlightVisualArgs: function () {\n return {\n options: this.options,\n rect: this.box.toRect(),\n visual: this._mainVisual\n };\n },\n tooltipAnchor: function () {\n var point = this, box = point.box, clipBox = point.owner.pane.clipBox() || box;\n return new Point2D(box.x2 + TOOLTIP_OFFSET, math.max(box.y1, clipBox.y1) + TOOLTIP_OFFSET);\n },\n formatValue: function (format) {\n var point = this;\n return point.owner.formatPointValue(point, format);\n },\n overlapsBox: function (box) {\n return this.box.overlaps(box);\n }\n });\n deepExtend(Candlestick.fn, PointEventsMixin);\n deepExtend(Candlestick.fn, NoteMixin);\n var CandlestickChart = CategoricalChart.extend({\n options: {},\n reflowCategories: function (categorySlots) {\n var chart = this, children = chart.children, childrenLength = children.length, i;\n for (i = 0; i < childrenLength; i++) {\n children[i].reflow(categorySlots[i]);\n }\n },\n addValue: function (data, fields) {\n var chart = this;\n var categoryIx = fields.categoryIx;\n var category = fields.category;\n var series = fields.series;\n var seriesIx = fields.seriesIx;\n var options = chart.options;\n var value = data.valueFields;\n var children = chart.children;\n var valueParts = chart.splitValue(value);\n var hasValue = areNumbers(valueParts);\n var categoryPoints = chart.categoryPoints[categoryIx];\n var dataItem = series.data[categoryIx];\n var point, cluster;\n if (!categoryPoints) {\n chart.categoryPoints[categoryIx] = categoryPoints = [];\n }\n if (hasValue) {\n point = chart.createPoint(data, fields);\n }\n cluster = children[categoryIx];\n if (!cluster) {\n cluster = new ClusterLayout({\n vertical: options.invertAxes,\n gap: options.gap,\n spacing: options.spacing\n });\n chart.append(cluster);\n }\n if (point) {\n chart.updateRange(value, fields);\n cluster.append(point);\n point.categoryIx = categoryIx;\n point.category = category;\n point.series = series;\n point.seriesIx = seriesIx;\n point.owner = chart;\n point.dataItem = dataItem;\n point.noteText = data.fields.noteText;\n }\n chart.points.push(point);\n categoryPoints.push(point);\n },\n pointType: function () {\n return Candlestick;\n },\n createPoint: function (data, fields) {\n var chart = this;\n var categoryIx = fields.categoryIx;\n var category = fields.category;\n var series = fields.series;\n var seriesIx = fields.seriesIx;\n var value = data.valueFields;\n var pointOptions = deepExtend({}, series);\n var pointType = chart.pointType();\n var color = data.fields.color || series.color;\n pointOptions = chart.evalPointOptions(pointOptions, value, category, categoryIx, series, seriesIx);\n if (series.type == CANDLESTICK) {\n if (value.open > value.close) {\n color = data.fields.downColor || series.downColor || series.color;\n }\n }\n if (kendo.isFunction(series.color)) {\n color = pointOptions.color;\n }\n pointOptions.vertical = !chart.options.invertAxes;\n var point = new pointType(value, pointOptions);\n point.color = color;\n return point;\n },\n splitValue: function (value) {\n return [\n value.low,\n value.open,\n value.close,\n value.high\n ];\n },\n updateRange: function (value, fields) {\n var chart = this, axisName = fields.series.axis, axisRange = chart.valueAxisRanges[axisName], parts = chart.splitValue(value);\n axisRange = chart.valueAxisRanges[axisName] = axisRange || {\n min: MAX_VALUE,\n max: MIN_VALUE\n };\n axisRange = chart.valueAxisRanges[axisName] = {\n min: math.min.apply(math, parts.concat([axisRange.min])),\n max: math.max.apply(math, parts.concat([axisRange.max]))\n };\n },\n formatPointValue: function (point, format) {\n var value = point.value;\n return autoFormat(format, value.open, value.high, value.low, value.close, point.category);\n },\n animationPoints: function () {\n return this.points;\n }\n });\n deepExtend(CandlestickChart.fn, ClipAnimationMixin);\n var OHLCPoint = Candlestick.extend({\n reflow: function (box) {\n var point = this, options = point.options, chart = point.owner, value = point.value, valueAxis = chart.seriesValueAxis(options), oPoints = [], cPoints = [], lhPoints = [], mid, oSlot, cSlot, lhSlot;\n lhSlot = valueAxis.getSlot(value.low, value.high);\n oSlot = valueAxis.getSlot(value.open, value.open);\n cSlot = valueAxis.getSlot(value.close, value.close);\n oSlot.x1 = cSlot.x1 = lhSlot.x1 = box.x1;\n oSlot.x2 = cSlot.x2 = lhSlot.x2 = box.x2;\n mid = lhSlot.center().x;\n oPoints.push([\n oSlot.x1,\n oSlot.y1\n ]);\n oPoints.push([\n mid,\n oSlot.y1\n ]);\n cPoints.push([\n mid,\n cSlot.y1\n ]);\n cPoints.push([\n cSlot.x2,\n cSlot.y1\n ]);\n lhPoints.push([\n mid,\n lhSlot.y1\n ]);\n lhPoints.push([\n mid,\n lhSlot.y2\n ]);\n point.lines = [\n oPoints,\n cPoints,\n lhPoints\n ];\n point.box = lhSlot.clone().wrap(oSlot.clone().wrap(cSlot));\n point.reflowNote();\n },\n createBody: $.noop\n });\n var OHLCChart = CandlestickChart.extend({\n pointType: function () {\n return OHLCPoint;\n }\n });\n var BoxPlotChart = CandlestickChart.extend({\n addValue: function (data, fields) {\n var chart = this;\n var categoryIx = fields.categoryIx;\n var category = fields.category;\n var series = fields.series;\n var seriesIx = fields.seriesIx;\n var options = chart.options;\n var children = chart.children;\n var value = data.valueFields;\n var valueParts = chart.splitValue(value);\n var hasValue = areNumbers(valueParts);\n var categoryPoints = chart.categoryPoints[categoryIx];\n var dataItem = series.data[categoryIx];\n var point, cluster;\n if (!categoryPoints) {\n chart.categoryPoints[categoryIx] = categoryPoints = [];\n }\n if (hasValue) {\n point = chart.createPoint(data, fields);\n }\n cluster = children[categoryIx];\n if (!cluster) {\n cluster = new ClusterLayout({\n vertical: options.invertAxes,\n gap: options.gap,\n spacing: options.spacing\n });\n chart.append(cluster);\n }\n if (point) {\n chart.updateRange(value, fields);\n cluster.append(point);\n point.categoryIx = categoryIx;\n point.category = category;\n point.series = series;\n point.seriesIx = seriesIx;\n point.owner = chart;\n point.dataItem = dataItem;\n }\n chart.points.push(point);\n categoryPoints.push(point);\n },\n pointType: function () {\n if (this.options.invertAxes) {\n return VerticalBoxPlot;\n }\n return BoxPlot;\n },\n splitValue: function (value) {\n return [\n value.lower,\n value.q1,\n value.median,\n value.q3,\n value.upper\n ];\n },\n updateRange: function (value, fields) {\n var chart = this, axisName = fields.series.axis, axisRange = chart.valueAxisRanges[axisName], parts = chart.splitValue(value).concat(chart.filterOutliers(value.outliers));\n if (defined(value.mean)) {\n parts = parts.concat(value.mean);\n }\n axisRange = chart.valueAxisRanges[axisName] = axisRange || {\n min: MAX_VALUE,\n max: MIN_VALUE\n };\n axisRange = chart.valueAxisRanges[axisName] = {\n min: math.min.apply(math, parts.concat([axisRange.min])),\n max: math.max.apply(math, parts.concat([axisRange.max]))\n };\n },\n formatPointValue: function (point, format) {\n var value = point.value;\n return autoFormat(format, value.lower, value.q1, value.median, value.q3, value.upper, value.mean, point.category);\n },\n filterOutliers: function (items) {\n var length = (items || []).length, result = [], i, item;\n for (i = 0; i < length; i++) {\n item = items[i];\n if (defined(item)) {\n appendIfNotNull(result, item);\n }\n }\n return result;\n }\n });\n var BoxPlot = Candlestick.extend({\n init: function (value, options) {\n var point = this;\n ChartElement.fn.init.call(point, options);\n point.value = value;\n point.createNote();\n },\n options: {\n border: { _brightness: 0.8 },\n line: { width: 2 },\n mean: {\n width: 2,\n dashType: 'dash'\n },\n overlay: { gradient: GLASS },\n tooltip: { format: '' + '{6:d} | ' + 'Lower: | {0:C} |
' + 'Q1: | {1:C} |
' + 'Median: | {2:C} |
' + 'Mean: | {5:C} |
' + 'Q3: | {3:C} |
' + 'Upper: | {4:C} |
' + '
' },\n highlight: {\n opacity: 1,\n border: {\n width: 1,\n opacity: 1\n },\n line: {\n width: 1,\n opacity: 1\n }\n },\n notes: {\n visible: true,\n label: {}\n },\n outliers: {\n visible: true,\n size: LINE_MARKER_SIZE,\n type: CROSS,\n background: WHITE,\n border: {\n width: 2,\n opacity: 1\n },\n opacity: 0\n },\n extremes: {\n visible: true,\n size: LINE_MARKER_SIZE,\n type: CIRCLE,\n background: WHITE,\n border: {\n width: 2,\n opacity: 1\n },\n opacity: 0\n }\n },\n reflow: function (box) {\n var point = this, options = point.options, chart = point.owner, value = point.value, valueAxis = chart.seriesValueAxis(options), whiskerSlot, boxSlot, medianSlot, meanSlot;\n point.boxSlot = boxSlot = valueAxis.getSlot(value.q1, value.q3);\n point.realBody = boxSlot;\n point.reflowBoxSlot(box);\n point.whiskerSlot = whiskerSlot = valueAxis.getSlot(value.lower, value.upper);\n point.reflowWhiskerSlot(box);\n medianSlot = valueAxis.getSlot(value.median);\n if (value.mean) {\n meanSlot = valueAxis.getSlot(value.mean);\n point.meanPoints = point.calcMeanPoints(box, meanSlot);\n }\n point.whiskerPoints = point.calcWhiskerPoints(boxSlot, whiskerSlot);\n point.medianPoints = point.calcMedianPoints(box, medianSlot);\n point.box = whiskerSlot.clone().wrap(boxSlot);\n point.reflowNote();\n },\n reflowBoxSlot: function (box) {\n this.boxSlot.x1 = box.x1;\n this.boxSlot.x2 = box.x2;\n },\n reflowWhiskerSlot: function (box) {\n this.whiskerSlot.x1 = box.x1;\n this.whiskerSlot.x2 = box.x2;\n },\n calcMeanPoints: function (box, meanSlot) {\n return [[\n [\n box.x1,\n meanSlot.y1\n ],\n [\n box.x2,\n meanSlot.y1\n ]\n ]];\n },\n calcWhiskerPoints: function (boxSlot, whiskerSlot) {\n var mid = whiskerSlot.center().x;\n return [\n [\n [\n mid - 5,\n whiskerSlot.y1\n ],\n [\n mid + 5,\n whiskerSlot.y1\n ],\n [\n mid,\n whiskerSlot.y1\n ],\n [\n mid,\n boxSlot.y1\n ]\n ],\n [\n [\n mid - 5,\n whiskerSlot.y2\n ],\n [\n mid + 5,\n whiskerSlot.y2\n ],\n [\n mid,\n whiskerSlot.y2\n ],\n [\n mid,\n boxSlot.y2\n ]\n ]\n ];\n },\n calcMedianPoints: function (box, medianSlot) {\n return [[\n [\n box.x1,\n medianSlot.y1\n ],\n [\n box.x2,\n medianSlot.y1\n ]\n ]];\n },\n renderOutliers: function (options) {\n var point = this, markers = options.markers || {}, value = point.value, outliers = value.outliers || [], outerFence = math.abs(value.q3 - value.q1) * 3, markersBorder, shape, outlierValue, i;\n var elements = [];\n for (i = 0; i < outliers.length; i++) {\n outlierValue = outliers[i];\n if (outlierValue < value.q3 + outerFence && outlierValue > value.q1 - outerFence) {\n markers = options.outliers;\n } else {\n markers = options.extremes;\n }\n markersBorder = deepExtend({}, markers.border);\n if (!defined(markersBorder.color)) {\n if (defined(point.color)) {\n markersBorder.color = point.color;\n } else {\n markersBorder.color = new Color(markers.background).brightness(BAR_BORDER_BRIGHTNESS).toHex();\n }\n }\n shape = new ShapeElement({\n type: markers.type,\n width: markers.size,\n height: markers.size,\n rotation: markers.rotation,\n background: markers.background,\n border: markersBorder,\n opacity: markers.opacity\n });\n shape.value = outlierValue;\n elements.push(shape);\n }\n this.reflowOutliers(elements);\n return elements;\n },\n reflowOutliers: function (outliers) {\n var valueAxis = this.owner.seriesValueAxis(this.options);\n var center = this.box.center();\n for (var i = 0; i < outliers.length; i++) {\n var outlierValue = outliers[i].value;\n var markerBox = valueAxis.getSlot(outlierValue);\n if (this.options.vertical) {\n markerBox.move(center.x);\n } else {\n markerBox.move(undefined, center.y);\n }\n this.box = this.box.wrap(markerBox);\n outliers[i].reflow(markerBox);\n }\n },\n mainVisual: function (options) {\n var group = Candlestick.fn.mainVisual.call(this, options);\n var outliers = this.renderOutliers(options);\n for (var i = 0; i < outliers.length; i++) {\n var element = outliers[i].getElement();\n if (element) {\n group.append(element);\n }\n }\n return group;\n },\n createLines: function (container, options) {\n this.drawLines(container, options, this.whiskerPoints, options.line);\n this.drawLines(container, options, this.medianPoints, options.median);\n this.drawLines(container, options, this.meanPoints, options.mean);\n },\n getBorderColor: function () {\n if (this.color) {\n return this.color;\n }\n return Candlestick.getBorderColor.call(this);\n }\n });\n deepExtend(BoxPlot.fn, PointEventsMixin);\n var VerticalBoxPlot = BoxPlot.extend({\n reflowBoxSlot: function (box) {\n this.boxSlot.y1 = box.y1;\n this.boxSlot.y2 = box.y2;\n },\n reflowWhiskerSlot: function (box) {\n this.whiskerSlot.y1 = box.y1;\n this.whiskerSlot.y2 = box.y2;\n },\n calcMeanPoints: function (box, meanSlot) {\n return [[\n [\n meanSlot.x1,\n box.y1\n ],\n [\n meanSlot.x1,\n box.y2\n ]\n ]];\n },\n calcWhiskerPoints: function (boxSlot, whiskerSlot) {\n var mid = whiskerSlot.center().y;\n return [\n [\n [\n whiskerSlot.x1,\n mid - 5\n ],\n [\n whiskerSlot.x1,\n mid + 5\n ],\n [\n whiskerSlot.x1,\n mid\n ],\n [\n boxSlot.x1,\n mid\n ]\n ],\n [\n [\n whiskerSlot.x2,\n mid - 5\n ],\n [\n whiskerSlot.x2,\n mid + 5\n ],\n [\n whiskerSlot.x2,\n mid\n ],\n [\n boxSlot.x2,\n mid\n ]\n ]\n ];\n },\n calcMedianPoints: function (box, medianSlot) {\n return [[\n [\n medianSlot.x1,\n box.y1\n ],\n [\n medianSlot.x1,\n box.y2\n ]\n ]];\n }\n });\n var PieSegment = ChartElement.extend({\n init: function (value, sector, options) {\n var segment = this;\n segment.value = value;\n segment.sector = sector;\n ChartElement.fn.init.call(segment, options);\n },\n options: {\n color: WHITE,\n overlay: { gradient: ROUNDED_BEVEL },\n border: { width: 0.5 },\n labels: {\n visible: false,\n distance: 35,\n font: DEFAULT_FONT,\n margin: getSpacing(0.5),\n align: CIRCLE,\n zIndex: 1,\n position: OUTSIDE_END\n },\n animation: { type: PIE },\n highlight: {\n visible: true,\n border: { width: 1 }\n },\n visible: true\n },\n render: function () {\n var segment = this, options = segment.options, labels = options.labels, labelText = segment.value, labelTemplate;\n if (segment._rendered || segment.visible === false) {\n return;\n } else {\n segment._rendered = true;\n }\n if (labels.template) {\n labelTemplate = template(labels.template);\n labelText = labelTemplate({\n dataItem: segment.dataItem,\n category: segment.category,\n value: segment.value,\n series: segment.series,\n percentage: segment.percentage\n });\n } else if (labels.format) {\n labelText = autoFormat(labels.format, labelText);\n }\n if (labels.visible && labelText) {\n segment.label = new TextBox(labelText, deepExtend({}, labels, {\n align: CENTER,\n vAlign: '',\n animation: {\n type: FADEIN,\n delay: segment.animationDelay\n }\n }));\n segment.append(segment.label);\n }\n },\n reflow: function (targetBox) {\n var segment = this;\n segment.render();\n segment.box = targetBox;\n segment.reflowLabel();\n },\n reflowLabel: function () {\n var segment = this, sector = segment.sector.clone(), options = segment.options, label = segment.label, labelsOptions = options.labels, labelsDistance = labelsOptions.distance, angle = sector.middle(), lp, x1, labelWidth, labelHeight;\n if (label) {\n labelHeight = label.box.height();\n labelWidth = label.box.width();\n if (labelsOptions.position == CENTER) {\n sector.r = math.abs((sector.r - labelHeight) / 2) + labelHeight;\n lp = sector.point(angle);\n label.reflow(Box2D(lp.x, lp.y - labelHeight / 2, lp.x, lp.y));\n } else if (labelsOptions.position == INSIDE_END) {\n sector.r = sector.r - labelHeight / 2;\n lp = sector.point(angle);\n label.reflow(Box2D(lp.x, lp.y - labelHeight / 2, lp.x, lp.y));\n } else {\n lp = sector.clone().expand(labelsDistance).point(angle);\n if (lp.x >= sector.c.x) {\n x1 = lp.x + labelWidth;\n label.orientation = RIGHT;\n } else {\n x1 = lp.x - labelWidth;\n label.orientation = LEFT;\n }\n label.reflow(Box2D(x1, lp.y - labelHeight, lp.x, lp.y));\n }\n }\n },\n createVisual: function () {\n var segment = this, sector = segment.sector, options = segment.options;\n ChartElement.fn.createVisual.call(this);\n if (segment.value) {\n if (options.visual) {\n var startAngle = (sector.startAngle + 180) % 360;\n var visual = options.visual({\n category: segment.category,\n dataItem: segment.dataItem,\n value: segment.value,\n series: segment.series,\n percentage: segment.percentage,\n center: new geom.Point(sector.c.x, sector.c.y),\n radius: sector.r,\n innerRadius: sector.ir,\n startAngle: startAngle,\n endAngle: startAngle + sector.angle,\n options: options,\n createVisual: function () {\n var group = new draw.Group();\n segment.createSegmentVisual(group);\n return group;\n }\n });\n if (visual) {\n segment.visual.append(visual);\n }\n } else {\n segment.createSegmentVisual(segment.visual);\n }\n }\n },\n createSegmentVisual: function (group) {\n var segment = this, sector = segment.sector, options = segment.options, borderOptions = options.border || {}, border = borderOptions.width > 0 ? {\n stroke: {\n color: borderOptions.color,\n width: borderOptions.width,\n opacity: borderOptions.opacity,\n dashType: borderOptions.dashType\n }\n } : {}, color = options.color, fill = {\n color: color,\n opacity: options.opacity\n }, visual;\n visual = segment.createSegment(sector, deepExtend({\n fill: fill,\n stroke: { opacity: options.opacity },\n zIndex: options.zIndex\n }, border));\n group.append(visual);\n if (hasGradientOverlay(options)) {\n group.append(this.createGradientOverlay(visual, {\n baseColor: color,\n fallbackFill: fill\n }, deepExtend({\n center: [\n sector.c.x,\n sector.c.y\n ],\n innerRadius: sector.ir,\n radius: sector.r,\n userSpace: true\n }, options.overlay)));\n }\n },\n createSegment: function (sector, options) {\n if (options.singleSegment) {\n return new draw.Circle(new geom.Circle(new geom.Point(sector.c.x, sector.c.y), sector.r), options);\n } else {\n return ShapeBuilder.current.createRing(sector, options);\n }\n },\n createAnimation: function () {\n var options = this.options;\n var center = this.sector.c;\n deepExtend(options, {\n animation: {\n center: [\n center.x,\n center.y\n ],\n delay: this.animationDelay\n }\n });\n ChartElement.fn.createAnimation.call(this);\n },\n createHighlight: function (options) {\n var segment = this, highlight = segment.options.highlight || {}, border = highlight.border || {};\n return segment.createSegment(segment.sector, deepExtend({}, options, {\n fill: {\n color: highlight.color,\n opacity: highlight.opacity\n },\n stroke: {\n opacity: border.opacity,\n width: border.width,\n color: border.color\n }\n }));\n },\n highlightVisual: function () {\n return this.visual.children[0];\n },\n highlightVisualArgs: function () {\n var sector = this.sector;\n return {\n options: this.options,\n radius: sector.r,\n innerRadius: sector.ir,\n center: new geom.Point(sector.c.x, sector.c.y),\n startAngle: sector.startAngle,\n endAngle: sector.angle + sector.startAngle,\n visual: this.visual\n };\n },\n tooltipAnchor: function (width, height) {\n var point = this, box = point.sector.adjacentBox(TOOLTIP_OFFSET, width, height);\n return new Point2D(box.x1, box.y1);\n },\n formatValue: function (format) {\n var point = this;\n return point.owner.formatPointValue(point, format);\n }\n });\n deepExtend(PieSegment.fn, PointEventsMixin);\n var PieChartMixin = {\n createLegendItem: function (value, point, options) {\n var chart = this, legendOptions = chart.options.legend || {}, labelsOptions = legendOptions.labels || {}, inactiveItems = legendOptions.inactiveItems || {}, inactiveItemsLabels = inactiveItems.labels || {}, text, labelTemplate, markerColor, itemLabelOptions, pointVisible;\n if (options && options.visibleInLegend !== false) {\n pointVisible = options.visible !== false;\n text = options.category || '';\n labelTemplate = pointVisible ? labelsOptions.template : inactiveItemsLabels.template || labelsOptions.template;\n if (labelTemplate) {\n text = template(labelTemplate)({\n text: text,\n series: options.series,\n dataItem: options.dataItem,\n percentage: options.percentage,\n value: value\n });\n }\n if (pointVisible) {\n itemLabelOptions = {};\n markerColor = point.color;\n } else {\n itemLabelOptions = {\n color: inactiveItemsLabels.color,\n font: inactiveItemsLabels.font\n };\n markerColor = (inactiveItems.markers || {}).color;\n }\n if (text) {\n chart.legendItems.push({\n pointIndex: options.index,\n text: text,\n series: options.series,\n markerColor: markerColor,\n labels: itemLabelOptions\n });\n }\n }\n }\n };\n var PieChart = ChartElement.extend({\n init: function (plotArea, options) {\n var chart = this;\n ChartElement.fn.init.call(chart, options);\n chart.plotArea = plotArea;\n chart.points = [];\n chart.legendItems = [];\n chart.render();\n },\n options: {\n startAngle: 90,\n connectors: {\n width: 1,\n color: '#939393',\n padding: 4\n },\n inactiveItems: {\n markers: {},\n labels: {}\n }\n },\n render: function () {\n var chart = this;\n chart.traverseDataPoints(proxy(chart.addValue, chart));\n },\n traverseDataPoints: function (callback) {\n var chart = this, options = chart.options, colors = chart.plotArea.options.seriesColors || [], colorsCount = colors.length, series = options.series, seriesCount = series.length, currentSeries, pointData, fields, seriesIx, angle, data, anglePerValue, value, plotValue, explode, total, currentAngle, i, pointIx = 0;\n for (seriesIx = 0; seriesIx < seriesCount; seriesIx++) {\n currentSeries = series[seriesIx];\n data = currentSeries.data;\n total = seriesTotal(currentSeries);\n anglePerValue = 360 / total;\n if (defined(currentSeries.startAngle)) {\n currentAngle = currentSeries.startAngle;\n } else {\n currentAngle = options.startAngle;\n }\n if (seriesIx != seriesCount - 1) {\n if (currentSeries.labels.position == OUTSIDE_END) {\n currentSeries.labels.position = CENTER;\n }\n }\n for (i = 0; i < data.length; i++) {\n pointData = SeriesBinder.current.bindPoint(currentSeries, i);\n value = pointData.valueFields.value;\n plotValue = math.abs(value);\n fields = pointData.fields;\n angle = plotValue * anglePerValue;\n explode = data.length != 1 && !!fields.explode;\n if (!isFn(currentSeries.color)) {\n currentSeries.color = fields.color || colors[i % colorsCount];\n }\n callback(value, new Ring(null, 0, 0, currentAngle, angle), {\n owner: chart,\n category: fields.category || '',\n index: pointIx,\n series: currentSeries,\n seriesIx: seriesIx,\n dataItem: data[i],\n percentage: total !== 0 ? plotValue / total : 0,\n explode: explode,\n visibleInLegend: fields.visibleInLegend,\n visible: fields.visible,\n zIndex: seriesCount - seriesIx,\n animationDelay: chart.animationDelay(i, seriesIx, seriesCount)\n });\n if (pointData.fields.visible !== false) {\n currentAngle += angle;\n }\n pointIx++;\n }\n pointIx = 0;\n }\n },\n evalSegmentOptions: function (options, value, fields) {\n var series = fields.series;\n evalOptions(options, {\n value: value,\n series: series,\n dataItem: fields.dataItem,\n category: fields.category,\n percentage: fields.percentage\n }, {\n defaults: series._defaults,\n excluded: [\n 'data',\n 'template',\n 'visual',\n 'toggle'\n ]\n });\n },\n addValue: function (value, sector, fields) {\n var chart = this, segment;\n var segmentOptions = deepExtend({}, fields.series, { index: fields.index });\n chart.evalSegmentOptions(segmentOptions, value, fields);\n chart.createLegendItem(value, segmentOptions, fields);\n if (fields.visible === false) {\n return;\n }\n segment = new PieSegment(value, sector, segmentOptions);\n extend(segment, fields);\n chart.append(segment);\n chart.points.push(segment);\n },\n reflow: function (targetBox) {\n var chart = this, options = chart.options, box = targetBox.clone(), space = 5, minWidth = math.min(box.width(), box.height()), halfMinWidth = minWidth / 2, defaultPadding = minWidth - minWidth * 0.85, padding = valueOrDefault(options.padding, defaultPadding), newBox = Box2D(box.x1, box.y1, box.x1 + minWidth, box.y1 + minWidth), newBoxCenter = newBox.center(), seriesConfigs = chart.seriesConfigs || [], boxCenter = box.center(), points = chart.points, count = points.length, seriesCount = options.series.length, leftSideLabels = [], rightSideLabels = [], seriesConfig, seriesIndex, label, segment, sector, r, i, c;\n padding = padding > halfMinWidth - space ? halfMinWidth - space : padding;\n newBox.translate(boxCenter.x - newBoxCenter.x, boxCenter.y - newBoxCenter.y);\n r = halfMinWidth - padding;\n c = Point2D(r + newBox.x1 + padding, r + newBox.y1 + padding);\n for (i = 0; i < count; i++) {\n segment = points[i];\n sector = segment.sector;\n sector.r = r;\n sector.c = c;\n seriesIndex = segment.seriesIx;\n if (seriesConfigs.length) {\n seriesConfig = seriesConfigs[seriesIndex];\n sector.ir = seriesConfig.ir;\n sector.r = seriesConfig.r;\n }\n if (seriesIndex == seriesCount - 1 && segment.explode) {\n sector.c = sector.clone().radius(sector.r * 0.15).point(sector.middle());\n }\n segment.reflow(newBox);\n label = segment.label;\n if (label) {\n if (label.options.position === OUTSIDE_END) {\n if (seriesIndex == seriesCount - 1) {\n if (label.orientation === RIGHT) {\n rightSideLabels.push(label);\n } else {\n leftSideLabels.push(label);\n }\n }\n }\n }\n }\n if (leftSideLabels.length > 0) {\n leftSideLabels.sort(chart.labelComparator(true));\n chart.leftLabelsReflow(leftSideLabels);\n }\n if (rightSideLabels.length > 0) {\n rightSideLabels.sort(chart.labelComparator(false));\n chart.rightLabelsReflow(rightSideLabels);\n }\n chart.box = newBox;\n },\n leftLabelsReflow: function (labels) {\n var chart = this, distances = chart.distanceBetweenLabels(labels);\n chart.distributeLabels(distances, labels);\n },\n rightLabelsReflow: function (labels) {\n var chart = this, distances = chart.distanceBetweenLabels(labels);\n chart.distributeLabels(distances, labels);\n },\n distanceBetweenLabels: function (labels) {\n var chart = this, points = chart.points, segment = points[points.length - 1], sector = segment.sector, firstBox = labels[0].box, count = labels.length - 1, lr = sector.r + segment.options.labels.distance, distances = [], secondBox, distance, i;\n distance = round(firstBox.y1 - (sector.c.y - lr - firstBox.height() - firstBox.height() / 2));\n distances.push(distance);\n for (i = 0; i < count; i++) {\n firstBox = labels[i].box;\n secondBox = labels[i + 1].box;\n distance = round(secondBox.y1 - firstBox.y2);\n distances.push(distance);\n }\n distance = round(sector.c.y + lr - labels[count].box.y2 - labels[count].box.height() / 2);\n distances.push(distance);\n return distances;\n },\n distributeLabels: function (distances, labels) {\n var chart = this, count = distances.length, remaining, left, right, i;\n for (i = 0; i < count; i++) {\n left = right = i;\n remaining = -distances[i];\n while (remaining > 0 && (left >= 0 || right < count)) {\n remaining = chart._takeDistance(distances, i, --left, remaining);\n remaining = chart._takeDistance(distances, i, ++right, remaining);\n }\n }\n chart.reflowLabels(distances, labels);\n },\n _takeDistance: function (distances, anchor, position, amount) {\n if (distances[position] > 0) {\n var available = math.min(distances[position], amount);\n amount -= available;\n distances[position] -= available;\n distances[anchor] += available;\n }\n return amount;\n },\n reflowLabels: function (distances, labels) {\n var chart = this, points = chart.points, segment = points[points.length - 1], sector = segment.sector, labelsCount = labels.length, labelOptions = segment.options.labels, labelDistance = labelOptions.distance, boxY = sector.c.y - (sector.r + labelDistance) - labels[0].box.height(), label, boxX, box, i;\n distances[0] += 2;\n for (i = 0; i < labelsCount; i++) {\n label = labels[i];\n boxY += distances[i];\n box = label.box;\n boxX = chart.hAlignLabel(box.x2, sector.clone().expand(labelDistance), boxY, boxY + box.height(), label.orientation == RIGHT);\n if (label.orientation == RIGHT) {\n if (labelOptions.align !== CIRCLE) {\n boxX = sector.r + sector.c.x + labelDistance;\n }\n label.reflow(Box2D(boxX + box.width(), boxY, boxX, boxY));\n } else {\n if (labelOptions.align !== CIRCLE) {\n boxX = sector.c.x - sector.r - labelDistance;\n }\n label.reflow(Box2D(boxX - box.width(), boxY, boxX, boxY));\n }\n boxY += box.height();\n }\n },\n createVisual: function () {\n var chart = this, options = chart.options, connectors = options.connectors, points = chart.points, connectorLine, count = points.length, space = 4, connectorsColor, sector, angle, segment, seriesIx, label, i;\n ChartElement.fn.createVisual.call(this);\n this._connectorLines = [];\n for (i = 0; i < count; i++) {\n segment = points[i];\n sector = segment.sector;\n angle = sector.middle();\n label = segment.label;\n seriesIx = { seriesId: segment.seriesIx };\n connectorsColor = (segment.options.connectors || {}).color || connectors.color;\n if (label) {\n connectorLine = new draw.Path({\n stroke: {\n color: connectorsColor,\n width: connectors.width\n },\n animation: {\n type: FADEIN,\n delay: segment.animationDelay\n }\n });\n if (label.options.position === OUTSIDE_END && segment.value !== 0) {\n var box = label.box, centerPoint = sector.c, start = sector.point(angle), middle = Point2D(box.x1, box.center().y), sr, end, crossing;\n start = sector.clone().expand(connectors.padding).point(angle);\n connectorLine.moveTo(start.x, start.y);\n if (label.orientation == RIGHT) {\n end = Point2D(box.x1 - connectors.padding, box.center().y);\n crossing = intersection(centerPoint, start, middle, end);\n middle = Point2D(end.x - space, end.y);\n crossing = crossing || middle;\n crossing.x = math.min(crossing.x, middle.x);\n if (chart.pointInCircle(crossing, sector.c, sector.r + space) || crossing.x < sector.c.x) {\n sr = sector.c.x + sector.r + space;\n if (segment.options.labels.align !== COLUMN) {\n if (sr < middle.x) {\n connectorLine.lineTo(sr, start.y);\n } else {\n connectorLine.lineTo(start.x + space * 2, start.y);\n }\n } else {\n connectorLine.lineTo(sr, start.y);\n }\n connectorLine.lineTo(middle.x, end.y);\n } else {\n crossing.y = end.y;\n connectorLine.lineTo(crossing.x, crossing.y);\n }\n } else {\n end = Point2D(box.x2 + connectors.padding, box.center().y);\n crossing = intersection(centerPoint, start, middle, end);\n middle = Point2D(end.x + space, end.y);\n crossing = crossing || middle;\n crossing.x = math.max(crossing.x, middle.x);\n if (chart.pointInCircle(crossing, sector.c, sector.r + space) || crossing.x > sector.c.x) {\n sr = sector.c.x - sector.r - space;\n if (segment.options.labels.align !== COLUMN) {\n if (sr > middle.x) {\n connectorLine.lineTo(sr, start.y);\n } else {\n connectorLine.lineTo(start.x - space * 2, start.y);\n }\n } else {\n connectorLine.lineTo(sr, start.y);\n }\n connectorLine.lineTo(middle.x, end.y);\n } else {\n crossing.y = end.y;\n connectorLine.lineTo(crossing.x, crossing.y);\n }\n }\n connectorLine.lineTo(end.x, end.y);\n this._connectorLines.push(connectorLine);\n this.visual.append(connectorLine);\n }\n }\n }\n },\n labelComparator: function (reverse) {\n reverse = reverse ? -1 : 1;\n return function (a, b) {\n a = (a.parent.sector.middle() + 270) % 360;\n b = (b.parent.sector.middle() + 270) % 360;\n return (a - b) * reverse;\n };\n },\n hAlignLabel: function (originalX, sector, y1, y2, direction) {\n var cx = sector.c.x, cy = sector.c.y, r = sector.r, t = math.min(math.abs(cy - y1), math.abs(cy - y2));\n if (t > r) {\n return originalX;\n } else {\n return cx + math.sqrt(r * r - t * t) * (direction ? 1 : -1);\n }\n },\n pointInCircle: function (point, c, r) {\n return sqr(c.x - point.x) + sqr(c.y - point.y) < sqr(r);\n },\n formatPointValue: function (point, format) {\n return autoFormat(format, point.value);\n },\n animationDelay: function (categoryIndex) {\n return categoryIndex * PIE_SECTOR_ANIM_DELAY;\n }\n });\n deepExtend(PieChart.fn, PieChartMixin);\n var DonutSegment = PieSegment.extend({\n options: {\n overlay: { gradient: ROUNDED_GLASS },\n labels: { position: CENTER },\n animation: { type: PIE }\n },\n reflowLabel: function () {\n var segment = this, sector = segment.sector.clone(), options = segment.options, label = segment.label, labelsOptions = options.labels, lp, angle = sector.middle(), labelHeight;\n if (label) {\n labelHeight = label.box.height();\n if (labelsOptions.position == CENTER) {\n sector.r -= (sector.r - sector.ir) / 2;\n lp = sector.point(angle);\n label.reflow(new Box2D(lp.x, lp.y - labelHeight / 2, lp.x, lp.y));\n } else {\n PieSegment.fn.reflowLabel.call(segment);\n }\n }\n },\n createSegment: function (sector, options) {\n return ShapeBuilder.current.createRing(sector, options);\n }\n });\n deepExtend(DonutSegment.fn, PointEventsMixin);\n var DonutChart = PieChart.extend({\n options: {\n startAngle: 90,\n connectors: {\n width: 1,\n color: '#939393',\n padding: 4\n }\n },\n addValue: function (value, sector, fields) {\n var chart = this, segment;\n var segmentOptions = deepExtend({}, fields.series, { index: fields.index });\n chart.evalSegmentOptions(segmentOptions, value, fields);\n chart.createLegendItem(value, segmentOptions, fields);\n if (!value || fields.visible === false) {\n return;\n }\n segment = new DonutSegment(value, sector, segmentOptions);\n extend(segment, fields);\n chart.append(segment);\n chart.points.push(segment);\n },\n reflow: function (targetBox) {\n var chart = this, options = chart.options, box = targetBox.clone(), space = 5, minWidth = math.min(box.width(), box.height()), halfMinWidth = minWidth / 2, defaultPadding = minWidth - minWidth * 0.85, padding = valueOrDefault(options.padding, defaultPadding), series = options.series, currentSeries, seriesCount = series.length, seriesWithoutSize = 0, holeSize, totalSize, size, margin = 0, i, r, ir = 0, currentSize = 0;\n chart.seriesConfigs = [];\n padding = padding > halfMinWidth - space ? halfMinWidth - space : padding;\n totalSize = halfMinWidth - padding;\n for (i = 0; i < seriesCount; i++) {\n currentSeries = series[i];\n if (i === 0) {\n if (defined(currentSeries.holeSize)) {\n holeSize = currentSeries.holeSize;\n totalSize -= currentSeries.holeSize;\n }\n }\n if (defined(currentSeries.size)) {\n totalSize -= currentSeries.size;\n } else {\n seriesWithoutSize++;\n }\n if (defined(currentSeries.margin) && i != seriesCount - 1) {\n totalSize -= currentSeries.margin;\n }\n }\n if (!defined(holeSize)) {\n currentSize = (halfMinWidth - padding) / (seriesCount + 0.75);\n holeSize = currentSize * 0.75;\n totalSize -= holeSize;\n }\n ir = holeSize;\n for (i = 0; i < seriesCount; i++) {\n currentSeries = series[i];\n size = valueOrDefault(currentSeries.size, totalSize / seriesWithoutSize);\n ir += margin;\n r = ir + size;\n chart.seriesConfigs.push({\n ir: ir,\n r: r\n });\n margin = currentSeries.margin || 0;\n ir = r;\n }\n PieChart.fn.reflow.call(chart, targetBox);\n },\n animationDelay: function (categoryIndex, seriesIndex, seriesCount) {\n return categoryIndex * DONUT_SECTOR_ANIM_DELAY + INITIAL_ANIMATION_DURATION * (seriesIndex + 1) / (seriesCount + 1);\n }\n });\n var WaterfallChart = BarChart.extend({\n render: function () {\n BarChart.fn.render.call(this);\n this.createSegments();\n },\n traverseDataPoints: function (callback) {\n var series = this.options.series;\n var categories = this.categoryAxis.options.categories || [];\n var totalCategories = categoriesCount(series);\n var isVertical = !this.options.invertAxes;\n for (var seriesIx = 0; seriesIx < series.length; seriesIx++) {\n var currentSeries = series[seriesIx];\n var total = 0;\n var runningTotal = 0;\n for (var categoryIx = 0; categoryIx < totalCategories; categoryIx++) {\n var data = SeriesBinder.current.bindPoint(currentSeries, categoryIx);\n var value = data.valueFields.value;\n var summary = data.fields.summary;\n var from = total;\n var to;\n if (summary) {\n if (summary.toLowerCase() === 'total') {\n data.valueFields.value = total;\n from = 0;\n to = total;\n } else {\n data.valueFields.value = runningTotal;\n to = from - runningTotal;\n runningTotal = 0;\n }\n } else if (isNumber(value)) {\n runningTotal += value;\n total += value;\n to = total;\n }\n callback(data, {\n category: categories[categoryIx],\n categoryIx: categoryIx,\n series: currentSeries,\n seriesIx: seriesIx,\n total: total,\n runningTotal: runningTotal,\n from: from,\n to: to,\n isVertical: isVertical\n });\n }\n }\n },\n updateRange: function (value, fields) {\n BarChart.fn.updateRange.call(this, { value: fields.to }, fields);\n },\n aboveAxis: function (point) {\n return point.value >= 0;\n },\n plotRange: function (point) {\n return [\n point.from,\n point.to\n ];\n },\n createSegments: function () {\n var series = this.options.series;\n var seriesPoints = this.seriesPoints;\n var segments = this.segments = [];\n for (var seriesIx = 0; seriesIx < series.length; seriesIx++) {\n var currentSeries = series[seriesIx];\n var points = seriesPoints[seriesIx];\n if (points) {\n var prevPoint;\n for (var pointIx = 0; pointIx < points.length; pointIx++) {\n var point = points[pointIx];\n if (point && prevPoint) {\n var segment = new WaterfallSegment(prevPoint, point, currentSeries);\n segments.push(segment);\n this.append(segment);\n }\n prevPoint = point;\n }\n }\n }\n }\n });\n var WaterfallSegment = ChartElement.extend({\n init: function (from, to, series) {\n var segment = this;\n ChartElement.fn.init.call(segment);\n segment.from = from;\n segment.to = to;\n segment.series = series;\n },\n options: {\n animation: {\n type: FADEIN,\n delay: INITIAL_ANIMATION_DURATION\n }\n },\n linePoints: function () {\n var points = [];\n var from = this.from;\n var fromBox = from.box;\n var toBox = this.to.box;\n if (from.isVertical) {\n var y = from.aboveAxis ? fromBox.y1 : fromBox.y2;\n points.push([\n fromBox.x1,\n y\n ], [\n toBox.x2,\n y\n ]);\n } else {\n var x = from.aboveAxis ? fromBox.x2 : fromBox.x1;\n points.push([\n x,\n fromBox.y1\n ], [\n x,\n toBox.y2\n ]);\n }\n return points;\n },\n createVisual: function () {\n ChartElement.fn.createVisual.call(this);\n var line = this.series.line || {};\n var path = draw.Path.fromPoints(this.linePoints(), {\n stroke: {\n color: line.color,\n width: line.width,\n opacity: line.opacity,\n dashType: line.dashType\n }\n });\n alignPathToPixel(path);\n this.visual.append(path);\n }\n });\n function returnSelf() {\n return this;\n }\n var Pane = BoxElement.extend({\n init: function (options) {\n var pane = this;\n BoxElement.fn.init.call(pane, options);\n options = pane.options;\n pane.id = kendo.guid();\n pane.createTitle();\n pane.content = new ChartElement();\n pane.chartContainer = new ChartContainer({}, pane);\n pane.append(pane.content);\n pane.axes = [];\n pane.charts = [];\n },\n options: {\n zIndex: -1,\n shrinkToFit: true,\n title: { align: LEFT },\n visible: true\n },\n createTitle: function () {\n var pane = this;\n var titleOptions = pane.options.title;\n if (typeof titleOptions === OBJECT) {\n titleOptions = deepExtend({}, titleOptions, {\n align: titleOptions.position,\n position: TOP\n });\n }\n pane.title = Title.buildTitle(titleOptions, pane, Pane.fn.options.title);\n },\n appendAxis: function (axis) {\n var pane = this;\n pane.content.append(axis);\n pane.axes.push(axis);\n axis.pane = pane;\n },\n appendChart: function (chart) {\n var pane = this;\n if (pane.chartContainer.parent !== pane.content) {\n pane.content.append(pane.chartContainer);\n }\n pane.charts.push(chart);\n pane.chartContainer.append(chart);\n chart.pane = pane;\n },\n empty: function () {\n var pane = this, plotArea = pane.parent, i;\n if (plotArea) {\n for (i = 0; i < pane.axes.length; i++) {\n plotArea.removeAxis(pane.axes[i]);\n }\n for (i = 0; i < pane.charts.length; i++) {\n plotArea.removeChart(pane.charts[i]);\n }\n }\n pane.axes = [];\n pane.charts = [];\n pane.content.destroy();\n pane.content.children = [];\n pane.chartContainer.children = [];\n },\n reflow: function (targetBox) {\n var pane = this;\n var content;\n if (last(pane.children) === pane.content) {\n content = pane.children.pop();\n }\n BoxElement.fn.reflow.call(pane, targetBox);\n if (content) {\n pane.children.push(content);\n }\n if (pane.title) {\n pane.contentBox.y1 += pane.title.box.height();\n }\n },\n visualStyle: function () {\n var style = BoxElement.fn.visualStyle.call(this);\n style.zIndex = -10;\n return style;\n },\n renderComplete: function () {\n if (this.options.visible) {\n this.createGridLines();\n }\n },\n stackRoot: returnSelf,\n clipRoot: returnSelf,\n createGridLines: function () {\n var pane = this, axes = pane.axes, allAxes = axes.concat(pane.parent.axes), vGridLines = [], hGridLines = [], gridLines, i, j, axis, vertical, altAxis;\n for (i = 0; i < axes.length; i++) {\n axis = axes[i];\n vertical = axis.options.vertical;\n gridLines = vertical ? vGridLines : hGridLines;\n for (j = 0; j < allAxes.length; j++) {\n if (gridLines.length === 0) {\n altAxis = allAxes[j];\n if (vertical !== altAxis.options.vertical) {\n append(gridLines, axis.createGridLines(altAxis));\n }\n }\n }\n }\n },\n refresh: function () {\n this.visual.clear();\n this.content.parent = null;\n this.content.createGradient = $.proxy(this.createGradient, this);\n this.content.renderVisual();\n this.content.parent = this;\n if (this.title) {\n this.visual.append(this.title.visual);\n }\n this.visual.append(this.content.visual);\n this.renderComplete();\n },\n chartsBox: function () {\n var axes = this.axes, length = axes.length, chartsBox = new Box2D(), axisValueField, lineBox, axis, idx;\n for (idx = 0; idx < length; idx++) {\n axis = axes[idx];\n axisValueField = axis.options.vertical ? Y : X;\n lineBox = axis.lineBox();\n chartsBox[axisValueField + 1] = lineBox[axisValueField + 1];\n chartsBox[axisValueField + 2] = lineBox[axisValueField + 2];\n }\n if (chartsBox.x2 === 0) {\n var allAxes = this.parent.axes;\n length = allAxes.length;\n for (idx = 0; idx < length; idx++) {\n axis = allAxes[idx];\n if (!axis.options.vertical) {\n lineBox = axis.lineBox();\n chartsBox.x1 = lineBox.x1;\n chartsBox.x2 = lineBox.x2;\n }\n }\n }\n return chartsBox;\n },\n clipBox: function () {\n return this.chartContainer.clipBox;\n }\n });\n var ChartContainer = ChartElement.extend({\n init: function (options, pane) {\n var container = this;\n ChartElement.fn.init.call(container, options);\n container.pane = pane;\n },\n shouldClip: function () {\n var container = this, children = container.children, length = children.length, i;\n for (i = 0; i < length; i++) {\n if (children[i].options.clip === true) {\n return true;\n }\n }\n return false;\n },\n _clipBox: function () {\n return this.pane.chartsBox();\n },\n createVisual: function () {\n this.visual = new draw.Group({ zIndex: 0 });\n if (this.shouldClip()) {\n var clipBox = this.clipBox = this._clipBox();\n var clipRect = clipBox.toRect();\n var clipPath = draw.Path.fromRect(clipRect);\n this.visual.clip(clipPath);\n this.unclipLabels();\n }\n },\n stackRoot: returnSelf,\n unclipLabels: function () {\n var container = this, charts = container.children, clipBox = container.clipBox, points, point, i, j, length, label, note;\n for (i = 0; i < charts.length; i++) {\n points = charts[i].points || {};\n length = points.length;\n for (j = 0; j < length; j++) {\n point = points[j];\n if (point && point.overlapsBox && point.overlapsBox(clipBox)) {\n label = point.label;\n note = point.note;\n if (label && label.options.visible) {\n if (label.alignToClipBox) {\n label.alignToClipBox(clipBox);\n }\n label.options.noclip = true;\n }\n if (note && note.options.visible) {\n note.options.noclip = true;\n }\n }\n }\n }\n },\n destroy: function () {\n ChartElement.fn.destroy.call(this);\n delete this.parent;\n }\n });\n var PlotAreaBase = ChartElement.extend({\n init: function (series, options) {\n var plotArea = this;\n ChartElement.fn.init.call(plotArea, options);\n plotArea.series = series;\n plotArea.initSeries();\n plotArea.charts = [];\n plotArea.options.legend.items = [];\n plotArea.axes = [];\n plotArea.crosshairs = [];\n plotArea.createPanes();\n plotArea.render();\n plotArea.createCrosshairs();\n },\n options: {\n series: [],\n plotArea: { margin: {} },\n background: '',\n border: {\n color: BLACK,\n width: 0\n },\n legend: {\n inactiveItems: {\n labels: { color: '#919191' },\n markers: { color: '#919191' }\n }\n }\n },\n initSeries: function () {\n var series = this.series, i, currentSeries;\n for (i = 0; i < series.length; i++) {\n currentSeries = series[i];\n currentSeries.index = i;\n }\n },\n createPanes: function () {\n var plotArea = this, defaults = { title: { color: (plotArea.options.title || {}).color } }, panes = [], paneOptions = plotArea.options.panes || [], i, panesLength = math.max(paneOptions.length, 1), currentPane;\n function setTitle(options, defaults) {\n if (typeof options.title === 'string') {\n options.title = { text: options.title };\n }\n options.title = deepExtend({}, defaults.title, options.title);\n }\n for (i = 0; i < panesLength; i++) {\n var options = paneOptions[i] || {};\n setTitle(options, defaults);\n currentPane = new Pane(options);\n currentPane.paneIndex = i;\n panes.push(currentPane);\n plotArea.append(currentPane);\n }\n plotArea.panes = panes;\n },\n createCrosshairs: function (panes) {\n var plotArea = this, i, j, pane, axis, currentCrosshair;\n panes = panes || plotArea.panes;\n for (i = 0; i < panes.length; i++) {\n pane = panes[i];\n for (j = 0; j < pane.axes.length; j++) {\n axis = pane.axes[j];\n if (axis.options.crosshair && axis.options.crosshair.visible) {\n currentCrosshair = new Crosshair(axis, axis.options.crosshair);\n plotArea.crosshairs.push(currentCrosshair);\n pane.content.append(currentCrosshair);\n }\n }\n }\n },\n removeCrosshairs: function (pane) {\n var plotArea = this, crosshairs = plotArea.crosshairs, axes = pane.axes, i, j;\n for (i = crosshairs.length - 1; i >= 0; i--) {\n for (j = 0; j < axes.length; j++) {\n if (crosshairs[i].axis === axes[j]) {\n crosshairs.splice(i, 1);\n break;\n }\n }\n }\n },\n hideCrosshairs: function () {\n var crosshairs = this.crosshairs;\n for (var idx = 0; idx < crosshairs.length; idx++) {\n crosshairs[idx].hide();\n }\n },\n findPane: function (name) {\n var plotArea = this, panes = plotArea.panes, i, matchingPane;\n for (i = 0; i < panes.length; i++) {\n if (panes[i].options.name === name) {\n matchingPane = panes[i];\n break;\n }\n }\n return matchingPane || panes[0];\n },\n findPointPane: function (point) {\n var plotArea = this, panes = plotArea.panes, i, matchingPane;\n for (i = 0; i < panes.length; i++) {\n if (panes[i].box.containsPoint(point)) {\n matchingPane = panes[i];\n break;\n }\n }\n return matchingPane;\n },\n appendAxis: function (axis) {\n var plotArea = this, pane = plotArea.findPane(axis.options.pane);\n pane.appendAxis(axis);\n plotArea.axes.push(axis);\n axis.plotArea = plotArea;\n },\n removeAxis: function (axisToRemove) {\n var plotArea = this, i, axis, filteredAxes = [];\n for (i = 0; i < plotArea.axes.length; i++) {\n axis = plotArea.axes[i];\n if (axisToRemove !== axis) {\n filteredAxes.push(axis);\n } else {\n axis.destroy();\n }\n }\n plotArea.axes = filteredAxes;\n },\n appendChart: function (chart, pane) {\n var plotArea = this;\n plotArea.charts.push(chart);\n if (pane) {\n pane.appendChart(chart);\n } else {\n plotArea.append(chart);\n }\n },\n removeChart: function (chartToRemove) {\n var plotArea = this, i, chart, filteredCharts = [];\n for (i = 0; i < plotArea.charts.length; i++) {\n chart = plotArea.charts[i];\n if (chart !== chartToRemove) {\n filteredCharts.push(chart);\n } else {\n chart.destroy();\n }\n }\n plotArea.charts = filteredCharts;\n },\n addToLegend: function (series) {\n var count = series.length, data = [], i, currentSeries, text, legend = this.options.legend, labels = legend.labels || {}, inactiveItems = legend.inactiveItems || {}, inactiveItemsLabels = inactiveItems.labels || {}, color, itemLabelOptions, markerColor, defaults, seriesVisible, labelTemplate;\n for (i = 0; i < count; i++) {\n currentSeries = series[i];\n seriesVisible = currentSeries.visible !== false;\n if (currentSeries.visibleInLegend === false) {\n continue;\n }\n text = currentSeries.name || '';\n labelTemplate = seriesVisible ? labels.template : inactiveItemsLabels.template || labels.template;\n if (labelTemplate) {\n text = template(labelTemplate)({\n text: text,\n series: currentSeries\n });\n }\n color = currentSeries.color;\n defaults = currentSeries._defaults;\n if (isFn(color) && defaults) {\n color = defaults.color;\n }\n if (seriesVisible) {\n itemLabelOptions = {};\n markerColor = color;\n } else {\n itemLabelOptions = {\n color: inactiveItemsLabels.color,\n font: inactiveItemsLabels.font\n };\n markerColor = inactiveItems.markers.color;\n }\n if (text) {\n data.push({\n text: text,\n labels: itemLabelOptions,\n markerColor: markerColor,\n series: currentSeries,\n active: seriesVisible\n });\n }\n }\n append(legend.items, data);\n },\n groupAxes: function (panes) {\n var xAxes = [], yAxes = [], paneAxes, axis, paneIx, axisIx;\n for (paneIx = 0; paneIx < panes.length; paneIx++) {\n paneAxes = panes[paneIx].axes;\n for (axisIx = 0; axisIx < paneAxes.length; axisIx++) {\n axis = paneAxes[axisIx];\n if (axis.options.vertical) {\n yAxes.push(axis);\n } else {\n xAxes.push(axis);\n }\n }\n }\n return {\n x: xAxes,\n y: yAxes,\n any: xAxes.concat(yAxes)\n };\n },\n groupSeriesByPane: function () {\n var plotArea = this, series = plotArea.series, seriesByPane = {}, i, pane, currentSeries;\n for (i = 0; i < series.length; i++) {\n currentSeries = series[i];\n pane = plotArea.seriesPaneName(currentSeries);\n if (seriesByPane[pane]) {\n seriesByPane[pane].push(currentSeries);\n } else {\n seriesByPane[pane] = [currentSeries];\n }\n }\n return seriesByPane;\n },\n filterVisibleSeries: function (series) {\n var i, currentSeries, result = [];\n for (i = 0; i < series.length; i++) {\n currentSeries = series[i];\n if (currentSeries.visible !== false) {\n result.push(currentSeries);\n }\n }\n return result;\n },\n reflow: function (targetBox) {\n var plotArea = this, options = plotArea.options.plotArea, panes = plotArea.panes, margin = getSpacing(options.margin);\n plotArea.box = targetBox.clone().unpad(margin);\n plotArea.reflowPanes();\n plotArea.reflowAxes(panes);\n plotArea.reflowCharts(panes);\n },\n redraw: function (panes) {\n var plotArea = this, i;\n panes = [].concat(panes);\n this.initSeries();\n for (i = 0; i < panes.length; i++) {\n plotArea.removeCrosshairs(panes[i]);\n panes[i].empty();\n }\n plotArea.render(panes);\n plotArea.reflowAxes(plotArea.panes);\n plotArea.reflowCharts(panes);\n plotArea.createCrosshairs(panes);\n for (i = 0; i < panes.length; i++) {\n panes[i].refresh();\n }\n },\n axisCrossingValues: function (axis, crossingAxes) {\n var options = axis.options, crossingValues = [].concat(options.axisCrossingValues || options.axisCrossingValue), valuesToAdd = crossingAxes.length - crossingValues.length, defaultValue = crossingValues[0] || 0, i;\n for (i = 0; i < valuesToAdd; i++) {\n crossingValues.push(defaultValue);\n }\n return crossingValues;\n },\n alignAxisTo: function (axis, targetAxis, crossingValue, targetCrossingValue) {\n var slot = axis.getSlot(crossingValue, crossingValue, true), slotEdge = axis.options.reverse ? 2 : 1, targetSlot = targetAxis.getSlot(targetCrossingValue, targetCrossingValue, true), targetEdge = targetAxis.options.reverse ? 2 : 1, axisBox = axis.box.translate(targetSlot[X + targetEdge] - slot[X + slotEdge], targetSlot[Y + targetEdge] - slot[Y + slotEdge]);\n if (axis.pane !== targetAxis.pane) {\n axisBox.translate(0, axis.pane.box.y1 - targetAxis.pane.box.y1);\n }\n axis.reflow(axisBox);\n },\n alignAxes: function (xAxes, yAxes) {\n var plotArea = this, xAnchor = xAxes[0], yAnchor = yAxes[0], xAnchorCrossings = plotArea.axisCrossingValues(xAnchor, yAxes), yAnchorCrossings = plotArea.axisCrossingValues(yAnchor, xAxes), anchor, anchorCrossings, leftAnchors = {}, rightAnchors = {}, topAnchors = {}, bottomAnchors = {}, pane, paneId, axis, i;\n for (i = 0; i < yAxes.length; i++) {\n axis = yAxes[i];\n pane = axis.pane;\n paneId = pane.id;\n anchor = paneAnchor(xAxes, pane) || xAnchor;\n anchorCrossings = xAnchorCrossings;\n if (anchor !== xAnchor) {\n anchorCrossings = plotArea.axisCrossingValues(anchor, yAxes);\n }\n plotArea.alignAxisTo(axis, anchor, yAnchorCrossings[i], anchorCrossings[i]);\n if (axis.options._overlap) {\n continue;\n }\n if (round(axis.lineBox().x1) === round(anchor.lineBox().x1)) {\n if (leftAnchors[paneId]) {\n axis.reflow(axis.box.alignTo(leftAnchors[paneId].box, LEFT).translate(-axis.options.margin, 0));\n }\n leftAnchors[paneId] = axis;\n }\n if (round(axis.lineBox().x2) === round(anchor.lineBox().x2)) {\n if (!axis._mirrored) {\n axis.options.labels.mirror = !axis.options.labels.mirror;\n axis._mirrored = true;\n }\n plotArea.alignAxisTo(axis, anchor, yAnchorCrossings[i], anchorCrossings[i]);\n if (rightAnchors[paneId]) {\n axis.reflow(axis.box.alignTo(rightAnchors[paneId].box, RIGHT).translate(axis.options.margin, 0));\n }\n rightAnchors[paneId] = axis;\n }\n if (i !== 0 && yAnchor.pane === axis.pane) {\n axis.alignTo(yAnchor);\n axis.reflow(axis.box);\n }\n }\n for (i = 0; i < xAxes.length; i++) {\n axis = xAxes[i];\n pane = axis.pane;\n paneId = pane.id;\n anchor = paneAnchor(yAxes, pane) || yAnchor;\n anchorCrossings = yAnchorCrossings;\n if (anchor !== yAnchor) {\n anchorCrossings = plotArea.axisCrossingValues(anchor, xAxes);\n }\n plotArea.alignAxisTo(axis, anchor, xAnchorCrossings[i], anchorCrossings[i]);\n if (axis.options._overlap) {\n continue;\n }\n if (round(axis.lineBox().y1) === round(anchor.lineBox().y1)) {\n if (!axis._mirrored) {\n axis.options.labels.mirror = !axis.options.labels.mirror;\n axis._mirrored = true;\n }\n plotArea.alignAxisTo(axis, anchor, xAnchorCrossings[i], anchorCrossings[i]);\n if (topAnchors[paneId]) {\n axis.reflow(axis.box.alignTo(topAnchors[paneId].box, TOP).translate(0, -axis.options.margin));\n }\n topAnchors[paneId] = axis;\n }\n if (round(axis.lineBox().y2, COORD_PRECISION) === round(anchor.lineBox().y2, COORD_PRECISION)) {\n if (bottomAnchors[paneId]) {\n axis.reflow(axis.box.alignTo(bottomAnchors[paneId].box, BOTTOM).translate(0, axis.options.margin));\n }\n bottomAnchors[paneId] = axis;\n }\n if (i !== 0) {\n axis.alignTo(xAnchor);\n axis.reflow(axis.box);\n }\n }\n },\n shrinkAxisWidth: function (panes) {\n var plotArea = this, axes = plotArea.groupAxes(panes).any, axisBox = axisGroupBox(axes), overflowX = 0, i, currentPane, currentAxis;\n for (i = 0; i < panes.length; i++) {\n currentPane = panes[i];\n if (currentPane.axes.length > 0) {\n overflowX = math.max(overflowX, axisBox.width() - currentPane.contentBox.width());\n }\n }\n if (overflowX !== 0) {\n for (i = 0; i < axes.length; i++) {\n currentAxis = axes[i];\n if (!currentAxis.options.vertical) {\n currentAxis.reflow(currentAxis.box.shrink(overflowX, 0));\n }\n }\n }\n },\n shrinkAxisHeight: function (panes) {\n var i, currentPane, axes, overflowY, j, currentAxis, shrinked;\n for (i = 0; i < panes.length; i++) {\n currentPane = panes[i];\n axes = currentPane.axes;\n overflowY = math.max(0, axisGroupBox(axes).height() - currentPane.contentBox.height());\n if (overflowY !== 0) {\n for (j = 0; j < axes.length; j++) {\n currentAxis = axes[j];\n if (currentAxis.options.vertical) {\n currentAxis.reflow(currentAxis.box.shrink(0, overflowY));\n }\n }\n shrinked = true;\n }\n }\n return shrinked;\n },\n fitAxes: function (panes) {\n var plotArea = this, axes = plotArea.groupAxes(panes).any, offsetX = 0, paneAxes, paneBox, axisBox, offsetY, currentPane, currentAxis, i, j;\n for (i = 0; i < panes.length; i++) {\n currentPane = panes[i];\n paneAxes = currentPane.axes;\n paneBox = currentPane.contentBox;\n if (paneAxes.length > 0) {\n axisBox = axisGroupBox(paneAxes);\n offsetX = math.max(offsetX, paneBox.x1 - axisBox.x1);\n offsetY = math.max(paneBox.y1 - axisBox.y1, paneBox.y2 - axisBox.y2);\n for (j = 0; j < paneAxes.length; j++) {\n currentAxis = paneAxes[j];\n currentAxis.reflow(currentAxis.box.translate(0, offsetY));\n }\n }\n }\n for (i = 0; i < axes.length; i++) {\n currentAxis = axes[i];\n currentAxis.reflow(currentAxis.box.translate(offsetX, 0));\n }\n },\n reflowAxes: function (panes) {\n var plotArea = this, i, axes = plotArea.groupAxes(panes);\n for (i = 0; i < panes.length; i++) {\n plotArea.reflowPaneAxes(panes[i]);\n }\n if (axes.x.length > 0 && axes.y.length > 0) {\n plotArea.alignAxes(axes.x, axes.y);\n plotArea.shrinkAxisWidth(panes);\n plotArea.autoRotateAxisLabels(axes);\n plotArea.alignAxes(axes.x, axes.y);\n if (plotArea.shrinkAxisWidth(panes)) {\n plotArea.alignAxes(axes.x, axes.y);\n }\n plotArea.shrinkAxisHeight(panes);\n plotArea.alignAxes(axes.x, axes.y);\n if (plotArea.shrinkAxisHeight(panes)) {\n plotArea.alignAxes(axes.x, axes.y);\n }\n plotArea.fitAxes(panes);\n }\n },\n autoRotateAxisLabels: function (groupedAxes) {\n var axes = this.axes;\n var panes = this.panes;\n var axis, idx, rotated;\n for (idx = 0; idx < axes.length; idx++) {\n axis = axes[idx];\n if (axis.autoRotateLabels()) {\n rotated = true;\n }\n }\n if (rotated) {\n for (idx = 0; idx < panes.length; idx++) {\n this.reflowPaneAxes(panes[idx]);\n }\n if (groupedAxes.x.length > 0 && groupedAxes.y.length > 0) {\n this.alignAxes(groupedAxes.x, groupedAxes.y);\n this.shrinkAxisWidth(panes);\n }\n }\n },\n reflowPaneAxes: function (pane) {\n var axes = pane.axes, i, length = axes.length;\n if (length > 0) {\n for (i = 0; i < length; i++) {\n axes[i].reflow(pane.contentBox);\n }\n }\n },\n reflowCharts: function (panes) {\n var plotArea = this, charts = plotArea.charts, count = charts.length, box = plotArea.box, chartPane, i;\n for (i = 0; i < count; i++) {\n chartPane = charts[i].pane;\n if (!chartPane || inArray(chartPane, panes)) {\n charts[i].reflow(box);\n }\n }\n },\n reflowPanes: function () {\n var plotArea = this, box = plotArea.box, panes = plotArea.panes, panesLength = panes.length, i, currentPane, paneBox, remainingHeight = box.height(), remainingPanes = panesLength, autoHeightPanes = 0, top = box.y1, height, percents;\n for (i = 0; i < panesLength; i++) {\n currentPane = panes[i];\n height = currentPane.options.height;\n currentPane.options.width = box.width();\n if (!currentPane.options.height) {\n autoHeightPanes++;\n } else {\n if (height.indexOf && height.indexOf('%')) {\n percents = parseInt(height, 10) / 100;\n currentPane.options.height = percents * box.height();\n }\n currentPane.reflow(box.clone());\n remainingHeight -= currentPane.options.height;\n }\n }\n for (i = 0; i < panesLength; i++) {\n currentPane = panes[i];\n if (!currentPane.options.height) {\n currentPane.options.height = remainingHeight / autoHeightPanes;\n }\n }\n for (i = 0; i < panesLength; i++) {\n currentPane = panes[i];\n paneBox = box.clone().move(box.x1, top);\n currentPane.reflow(paneBox);\n remainingPanes--;\n top += currentPane.options.height;\n }\n },\n backgroundBox: function () {\n var plotArea = this, axes = plotArea.axes, axesCount = axes.length, lineBox, box, i, j, axisA, axisB;\n for (i = 0; i < axesCount; i++) {\n axisA = axes[i];\n for (j = 0; j < axesCount; j++) {\n axisB = axes[j];\n if (axisA.options.vertical !== axisB.options.vertical) {\n lineBox = axisA.lineBox().clone().wrap(axisB.lineBox());\n if (!box) {\n box = lineBox;\n } else {\n box = box.wrap(lineBox);\n }\n }\n }\n }\n return box || plotArea.box;\n },\n chartsBoxes: function () {\n var panes = this.panes;\n var boxes = [];\n for (var idx = 0; idx < panes.length; idx++) {\n boxes.push(panes[idx].chartsBox());\n }\n return boxes;\n },\n addBackgroundPaths: function (multipath) {\n var boxes = this.chartsBoxes();\n for (var idx = 0; idx < boxes.length; idx++) {\n multipath.paths.push(draw.Path.fromRect(boxes[idx].toRect()));\n }\n },\n backgroundContainsPoint: function (point) {\n var boxes = this.chartsBoxes();\n for (var idx = 0; idx < boxes.length; idx++) {\n if (boxes[idx].containsPoint(point)) {\n return true;\n }\n }\n },\n createVisual: function () {\n ChartElement.fn.createVisual.call(this);\n var options = this.options.plotArea;\n var border = options.border || {};\n var background = options.background;\n var opacity = options.opacity;\n if (util.isTransparent(background)) {\n background = WHITE;\n opacity = 0;\n }\n var bg = this._bgVisual = new draw.MultiPath({\n fill: {\n color: background,\n opacity: opacity\n },\n stroke: {\n color: border.width ? border.color : '',\n width: border.width,\n dashType: border.dashType\n },\n zIndex: -1\n });\n this.addBackgroundPaths(bg);\n this.appendVisual(bg);\n },\n pointsByCategoryIndex: function (categoryIndex) {\n var charts = this.charts, result = [], i, j, points, point, chart;\n if (categoryIndex !== null) {\n for (i = 0; i < charts.length; i++) {\n chart = charts[i];\n if (chart.pane.options.name === '_navigator') {\n continue;\n }\n points = charts[i].categoryPoints[categoryIndex];\n if (points && points.length) {\n for (j = 0; j < points.length; j++) {\n point = points[j];\n if (point && defined(point.value) && point.value !== null) {\n result.push(point);\n }\n }\n }\n }\n }\n return result;\n },\n pointsBySeriesIndex: function (seriesIndex) {\n return this.filterPoints(function (point) {\n return point.series.index === seriesIndex;\n });\n },\n pointsBySeriesName: function (name) {\n return this.filterPoints(function (point) {\n return point.series.name === name;\n });\n },\n filterPoints: function (callback) {\n var charts = this.charts, result = [], points, point, i, j, chart;\n for (i = 0; i < charts.length; i++) {\n chart = charts[i];\n points = chart.points;\n for (j = 0; j < points.length; j++) {\n point = points[j];\n if (point && callback(point)) {\n result.push(point);\n }\n }\n }\n return result;\n },\n findPoint: function (callback) {\n var charts = this.charts, points, point, i, j, chart;\n for (i = 0; i < charts.length; i++) {\n chart = charts[i];\n points = chart.points;\n for (j = 0; j < points.length; j++) {\n point = points[j];\n if (point && callback(point)) {\n return point;\n }\n }\n }\n },\n paneByPoint: function (point) {\n var plotArea = this, panes = plotArea.panes, pane, i;\n for (i = 0; i < panes.length; i++) {\n pane = panes[i];\n if (pane.box.containsPoint(point)) {\n return pane;\n }\n }\n }\n });\n var PlotAreaEventsMixin = {\n hover: function (chart, e) {\n this._dispatchEvent(chart, e, PLOT_AREA_HOVER);\n },\n click: function (chart, e) {\n this._dispatchEvent(chart, e, PLOT_AREA_CLICK);\n }\n };\n var CategoricalPlotArea = PlotAreaBase.extend({\n init: function (series, options) {\n var plotArea = this;\n plotArea.namedCategoryAxes = {};\n plotArea.namedValueAxes = {};\n plotArea.valueAxisRangeTracker = new AxisGroupRangeTracker();\n if (series.length > 0) {\n plotArea.invertAxes = inArray(series[0].type, [\n BAR,\n BULLET,\n VERTICAL_LINE,\n VERTICAL_AREA,\n RANGE_BAR,\n HORIZONTAL_WATERFALL,\n VERTICAL_BOX_PLOT\n ]);\n for (var i = 0; i < series.length; i++) {\n var stack = series[i].stack;\n if (stack && stack.type === '100%') {\n plotArea.stack100 = true;\n break;\n }\n }\n }\n PlotAreaBase.fn.init.call(plotArea, series, options);\n },\n options: {\n categoryAxis: { categories: [] },\n valueAxis: {}\n },\n render: function (panes) {\n var plotArea = this;\n panes = panes || plotArea.panes;\n plotArea.createCategoryAxes(panes);\n plotArea.aggregateCategories(panes);\n plotArea.createCategoryAxesLabels(panes);\n plotArea.createCharts(panes);\n plotArea.createValueAxes(panes);\n },\n removeAxis: function (axis) {\n var plotArea = this, axisName = axis.options.name;\n PlotAreaBase.fn.removeAxis.call(plotArea, axis);\n if (axis instanceof CategoryAxis) {\n delete plotArea.namedCategoryAxes[axisName];\n } else {\n plotArea.valueAxisRangeTracker.reset(axisName);\n delete plotArea.namedValueAxes[axisName];\n }\n if (axis === plotArea.categoryAxis) {\n delete plotArea.categoryAxis;\n }\n if (axis === plotArea.valueAxis) {\n delete plotArea.valueAxis;\n }\n },\n createCharts: function (panes) {\n var seriesByPane = this.groupSeriesByPane();\n for (var i = 0; i < panes.length; i++) {\n var pane = panes[i];\n var paneSeries = seriesByPane[pane.options.name || 'default'] || [];\n this.addToLegend(paneSeries);\n var visibleSeries = this.filterVisibleSeries(paneSeries);\n if (!visibleSeries) {\n continue;\n }\n var groups = this.groupSeriesByCategoryAxis(visibleSeries);\n for (var groupIx = 0; groupIx < groups.length; groupIx++) {\n this.createChartGroup(groups[groupIx], pane);\n }\n }\n },\n createChartGroup: function (series, pane) {\n this.createAreaChart(filterSeriesByType(series, [\n AREA,\n VERTICAL_AREA\n ]), pane);\n this.createBarChart(filterSeriesByType(series, [\n COLUMN,\n BAR\n ]), pane);\n this.createRangeBarChart(filterSeriesByType(series, [\n RANGE_COLUMN,\n RANGE_BAR\n ]), pane);\n this.createBulletChart(filterSeriesByType(series, [\n BULLET,\n VERTICAL_BULLET\n ]), pane);\n this.createCandlestickChart(filterSeriesByType(series, CANDLESTICK), pane);\n this.createBoxPlotChart(filterSeriesByType(series, [\n BOX_PLOT,\n VERTICAL_BOX_PLOT\n ]), pane);\n this.createOHLCChart(filterSeriesByType(series, OHLC), pane);\n this.createWaterfallChart(filterSeriesByType(series, [\n WATERFALL,\n HORIZONTAL_WATERFALL\n ]), pane);\n this.createLineChart(filterSeriesByType(series, [\n LINE,\n VERTICAL_LINE\n ]), pane);\n },\n aggregateCategories: function (panes) {\n var plotArea = this, series = plotArea.srcSeries || plotArea.series, processedSeries = [], i, currentSeries, categoryAxis, axisPane, dateAxis;\n for (i = 0; i < series.length; i++) {\n currentSeries = series[i];\n categoryAxis = plotArea.seriesCategoryAxis(currentSeries);\n axisPane = plotArea.findPane(categoryAxis.options.pane);\n dateAxis = equalsIgnoreCase(categoryAxis.options.type, DATE);\n if ((dateAxis || currentSeries.categoryField) && inArray(axisPane, panes)) {\n currentSeries = plotArea.aggregateSeries(currentSeries, categoryAxis);\n } else if (isNumber(categoryAxis.options.min) || isNumber(categoryAxis.options.max)) {\n currentSeries = plotArea.filterSeries(currentSeries, categoryAxis);\n }\n processedSeries.push(currentSeries);\n }\n plotArea.srcSeries = series;\n plotArea.series = processedSeries;\n },\n filterSeries: function (currentSeries, categoryAxis) {\n var range = categoryAxis.totalRangeIndices();\n var justified = categoryAxis.options.justified;\n var outOfRangePoints = inArray(currentSeries.type, [\n LINE,\n VERTICAL_LINE,\n AREA,\n VERTICAL_AREA\n ]);\n var categoryIx;\n range.min = isNumber(categoryAxis.options.min) ? math.floor(range.min) : 0;\n range.max = isNumber(categoryAxis.options.max) ? justified ? math.floor(range.max) + 1 : math.ceil(range.max) : currentSeries.data.length;\n currentSeries = deepExtend({}, currentSeries);\n if (outOfRangePoints) {\n var minCategory = range.min - 1;\n var srcCategories = categoryAxis.options.srcCategories || [];\n if (minCategory >= 0 && minCategory < currentSeries.data.length) {\n categoryIx = minCategory;\n currentSeries._outOfRangeMinPoint = {\n item: currentSeries.data[categoryIx],\n category: srcCategories[categoryIx],\n categoryIx: -1\n };\n }\n if (range.max < currentSeries.data.length) {\n categoryIx = range.max;\n currentSeries._outOfRangeMaxPoint = {\n item: currentSeries.data[categoryIx],\n category: srcCategories[categoryIx],\n categoryIx: range.max - range.min\n };\n }\n }\n categoryAxis._seriesMax = math.max(categoryAxis._seriesMax || 0, currentSeries.data.length);\n currentSeries.data = (currentSeries.data || []).slice(range.min, range.max);\n return currentSeries;\n },\n aggregateSeries: function (series, categoryAxis) {\n var axisOptions = categoryAxis.options, dateAxis = equalsIgnoreCase(categoryAxis.options.type, DATE), categories = axisOptions.categories, srcCategories = axisOptions.srcCategories || categories, srcData = series.data, srcPoints = [], result = deepExtend({}, series), aggregatorSeries = deepExtend({}, series), dataItems = axisOptions.dataItems || [], i, category, categoryIx, data, aggregator, getFn = getField, outOfRangeMinIdx = util.MIN_NUM, outOfRangeMinCategory, outOfRangeMaxCategory, outOfRangeMaxIdx = util.MAX_NUM, outOfRangePoints = inArray(series.type, [\n LINE,\n VERTICAL_LINE,\n AREA,\n VERTICAL_AREA\n ]);\n result.data = data = [];\n if (dateAxis) {\n getFn = getDateField;\n }\n for (i = 0; i < srcData.length; i++) {\n if (series.categoryField) {\n category = getFn(series.categoryField, srcData[i]);\n } else {\n category = srcCategories[i];\n }\n if (defined(category)) {\n categoryIx = categoryAxis.categoryIndex(category);\n if (0 <= categoryIx && categoryIx < categories.length) {\n srcPoints[categoryIx] = srcPoints[categoryIx] || [];\n srcPoints[categoryIx].push(i);\n } else if (outOfRangePoints) {\n if (categoryIx < 0) {\n if (categoryIx == outOfRangeMinIdx) {\n outOfRangeMinCategory.points.push(i);\n } else if (categoryIx > outOfRangeMinIdx) {\n outOfRangeMinIdx = categoryIx;\n outOfRangeMinCategory = {\n category: category,\n points: [i]\n };\n }\n } else if (categoryIx >= categories.length) {\n if (categoryIx == outOfRangeMaxIdx) {\n outOfRangeMaxCategory.points.push(i);\n } else if (categoryIx < outOfRangeMaxIdx) {\n outOfRangeMaxIdx = categoryIx;\n outOfRangeMaxCategory = {\n category: category,\n points: [i]\n };\n }\n }\n }\n }\n }\n aggregator = new SeriesAggregator(aggregatorSeries, SeriesBinder.current, DefaultAggregates.current);\n for (i = 0; i < categories.length; i++) {\n data[i] = aggregator.aggregatePoints(srcPoints[i], categories[i]);\n if (srcPoints[i]) {\n dataItems[i] = data[i];\n }\n }\n if (outOfRangeMinCategory && data.length) {\n result._outOfRangeMinPoint = {\n item: aggregator.aggregatePoints(outOfRangeMinCategory.points, outOfRangeMinCategory.category),\n categoryIx: outOfRangeMinIdx,\n category: outOfRangeMinCategory.category\n };\n }\n if (outOfRangeMaxCategory && data.length) {\n result._outOfRangeMaxPoint = {\n item: aggregator.aggregatePoints(outOfRangeMaxCategory.points, outOfRangeMaxCategory.category),\n categoryIx: outOfRangeMaxIdx,\n category: outOfRangeMaxCategory.category\n };\n }\n categoryAxis.options.dataItems = dataItems;\n return result;\n },\n appendChart: function (chart, pane) {\n var plotArea = this, series = chart.options.series, categoryAxis = plotArea.seriesCategoryAxis(series[0]), categories = categoryAxis.options.categories, categoriesToAdd = math.max(0, categoriesCount(series) - categories.length);\n while (categoriesToAdd--) {\n categories.push('');\n }\n plotArea.valueAxisRangeTracker.update(chart.valueAxisRanges);\n PlotAreaBase.fn.appendChart.call(plotArea, chart, pane);\n },\n seriesPaneName: function (series) {\n var plotArea = this, options = plotArea.options, axisName = series.axis, axisOptions = [].concat(options.valueAxis), axis = $.grep(axisOptions, function (a) {\n return a.name === axisName;\n })[0], panes = options.panes || [{}], defaultPaneName = (panes[0] || {}).name || 'default', paneName = (axis || {}).pane || defaultPaneName;\n return paneName;\n },\n seriesCategoryAxis: function (series) {\n var plotArea = this, axisName = series.categoryAxis, axis = axisName ? plotArea.namedCategoryAxes[axisName] : plotArea.categoryAxis;\n if (!axis) {\n throw new Error('Unable to locate category axis with name ' + axisName);\n }\n return axis;\n },\n stackableChartOptions: function (firstSeries, pane) {\n var stack = firstSeries.stack;\n var isStacked100 = stack && stack.type === '100%';\n var clip = pane.options.clip;\n return {\n isStacked: stack,\n isStacked100: isStacked100,\n clip: clip\n };\n },\n groupSeriesByCategoryAxis: function (series) {\n var unique = {};\n var categoryAxes = $.map(series, function (s) {\n var name = s.categoryAxis || '$$default$$';\n if (!unique.hasOwnProperty(name)) {\n unique[name] = true;\n return name;\n }\n });\n function groupSeries(axis, axisIx) {\n return $.grep(series, function (s) {\n return axisIx === 0 && !s.categoryAxis || s.categoryAxis == axis;\n });\n }\n var groups = [];\n for (var axisIx = 0; axisIx < categoryAxes.length; axisIx++) {\n var axis = categoryAxes[axisIx];\n var axisSeries = groupSeries(axis, axisIx);\n if (axisSeries.length === 0) {\n continue;\n }\n groups.push(axisSeries);\n }\n return groups;\n },\n createBarChart: function (series, pane) {\n if (series.length === 0) {\n return;\n }\n var plotArea = this, firstSeries = series[0], barChart = new BarChart(plotArea, extend({\n series: series,\n invertAxes: plotArea.invertAxes,\n gap: firstSeries.gap,\n spacing: firstSeries.spacing\n }, plotArea.stackableChartOptions(firstSeries, pane)));\n plotArea.appendChart(barChart, pane);\n },\n createRangeBarChart: function (series, pane) {\n if (series.length === 0) {\n return;\n }\n var plotArea = this, firstSeries = series[0], rangeColumnChart = new RangeBarChart(plotArea, {\n series: series,\n invertAxes: plotArea.invertAxes,\n gap: firstSeries.gap,\n spacing: firstSeries.spacing\n });\n plotArea.appendChart(rangeColumnChart, pane);\n },\n createBulletChart: function (series, pane) {\n if (series.length === 0) {\n return;\n }\n var plotArea = this, firstSeries = series[0], bulletChart = new BulletChart(plotArea, {\n series: series,\n invertAxes: plotArea.invertAxes,\n gap: firstSeries.gap,\n spacing: firstSeries.spacing,\n clip: pane.options.clip\n });\n plotArea.appendChart(bulletChart, pane);\n },\n createLineChart: function (series, pane) {\n if (series.length === 0) {\n return;\n }\n var plotArea = this, firstSeries = series[0], lineChart = new LineChart(plotArea, extend({\n invertAxes: plotArea.invertAxes,\n series: series\n }, plotArea.stackableChartOptions(firstSeries, pane)));\n plotArea.appendChart(lineChart, pane);\n },\n createAreaChart: function (series, pane) {\n if (series.length === 0) {\n return;\n }\n var plotArea = this, firstSeries = series[0], areaChart = new AreaChart(plotArea, extend({\n invertAxes: plotArea.invertAxes,\n series: series\n }, plotArea.stackableChartOptions(firstSeries, pane)));\n plotArea.appendChart(areaChart, pane);\n },\n createOHLCChart: function (series, pane) {\n if (series.length === 0) {\n return;\n }\n var plotArea = this, firstSeries = series[0], chart = new OHLCChart(plotArea, {\n invertAxes: plotArea.invertAxes,\n gap: firstSeries.gap,\n series: series,\n spacing: firstSeries.spacing,\n clip: pane.options.clip\n });\n plotArea.appendChart(chart, pane);\n },\n createCandlestickChart: function (series, pane) {\n if (series.length === 0) {\n return;\n }\n var plotArea = this, firstSeries = series[0], chart = new CandlestickChart(plotArea, {\n invertAxes: plotArea.invertAxes,\n gap: firstSeries.gap,\n series: series,\n spacing: firstSeries.spacing,\n clip: pane.options.clip\n });\n plotArea.appendChart(chart, pane);\n },\n createBoxPlotChart: function (series, pane) {\n if (series.length === 0) {\n return;\n }\n var plotArea = this, firstSeries = series[0], chart = new BoxPlotChart(plotArea, {\n invertAxes: plotArea.invertAxes,\n gap: firstSeries.gap,\n series: series,\n spacing: firstSeries.spacing,\n clip: pane.options.clip\n });\n plotArea.appendChart(chart, pane);\n },\n createWaterfallChart: function (series, pane) {\n if (series.length === 0) {\n return;\n }\n var plotArea = this, firstSeries = series[0], waterfallChart = new WaterfallChart(plotArea, {\n series: series,\n invertAxes: plotArea.invertAxes,\n gap: firstSeries.gap,\n spacing: firstSeries.spacing\n });\n plotArea.appendChart(waterfallChart, pane);\n },\n axisRequiresRounding: function (categoryAxisName, categoryAxisIndex) {\n var plotArea = this, centeredSeries = filterSeriesByType(plotArea.series, EQUALLY_SPACED_SERIES), seriesIx, seriesAxis;\n for (seriesIx = 0; seriesIx < plotArea.series.length; seriesIx++) {\n var currentSeries = plotArea.series[seriesIx];\n if (currentSeries.type === LINE || currentSeries.type === AREA) {\n var line = currentSeries.line;\n if (line && line.style === STEP) {\n centeredSeries.push(currentSeries);\n }\n }\n }\n for (seriesIx = 0; seriesIx < centeredSeries.length; seriesIx++) {\n seriesAxis = centeredSeries[seriesIx].categoryAxis || '';\n if (seriesAxis === categoryAxisName || !seriesAxis && categoryAxisIndex === 0) {\n return true;\n }\n }\n },\n aggregatedAxis: function (categoryAxisName, categoryAxisIndex) {\n var plotArea = this, series = plotArea.series, seriesIx, seriesAxis;\n for (seriesIx = 0; seriesIx < series.length; seriesIx++) {\n seriesAxis = series[seriesIx].categoryAxis || '';\n if ((seriesAxis === categoryAxisName || !seriesAxis && categoryAxisIndex === 0) && series[seriesIx].categoryField) {\n return true;\n }\n }\n },\n createCategoryAxesLabels: function () {\n var axes = this.axes;\n for (var i = 0; i < axes.length; i++) {\n if (axes[i] instanceof CategoryAxis) {\n axes[i].createLabels();\n }\n }\n },\n createCategoryAxes: function (panes) {\n var plotArea = this, invertAxes = plotArea.invertAxes, definitions = [].concat(plotArea.options.categoryAxis), i, axisOptions, axisPane, categories, type, name, categoryAxis, axes = [], primaryAxis;\n for (i = 0; i < definitions.length; i++) {\n axisOptions = definitions[i];\n axisPane = plotArea.findPane(axisOptions.pane);\n if (inArray(axisPane, panes)) {\n name = axisOptions.name;\n categories = axisOptions.categories || [];\n type = axisOptions.type || '';\n axisOptions = deepExtend({\n vertical: invertAxes,\n axisCrossingValue: invertAxes ? MAX_VALUE : 0,\n _deferLabels: true\n }, axisOptions);\n if (!defined(axisOptions.justified)) {\n axisOptions.justified = plotArea.isJustified();\n }\n if (plotArea.axisRequiresRounding(name, i)) {\n axisOptions.justified = false;\n }\n if (isDateAxis(axisOptions, categories[0])) {\n categoryAxis = new DateCategoryAxis(axisOptions);\n } else {\n categoryAxis = new CategoryAxis(axisOptions);\n }\n if (name) {\n if (plotArea.namedCategoryAxes[name]) {\n throw new Error('Category axis with name ' + name + ' is already defined');\n }\n plotArea.namedCategoryAxes[name] = categoryAxis;\n }\n categoryAxis.axisIndex = i;\n axes.push(categoryAxis);\n plotArea.appendAxis(categoryAxis);\n }\n }\n primaryAxis = plotArea.categoryAxis || axes[0];\n plotArea.categoryAxis = primaryAxis;\n if (invertAxes) {\n plotArea.axisY = primaryAxis;\n } else {\n plotArea.axisX = primaryAxis;\n }\n },\n isJustified: function () {\n var plotArea = this, series = plotArea.series, i, currentSeries;\n for (i = 0; i < series.length; i++) {\n currentSeries = series[i];\n if (!inArray(currentSeries.type, [\n AREA,\n VERTICAL_AREA\n ])) {\n return false;\n }\n }\n return true;\n },\n createValueAxes: function (panes) {\n var plotArea = this, tracker = plotArea.valueAxisRangeTracker, defaultRange = tracker.query(), definitions = [].concat(plotArea.options.valueAxis), invertAxes = plotArea.invertAxes, baseOptions = { vertical: !invertAxes }, axisOptions, axisPane, valueAxis, primaryAxis, axes = [], range, axisType, defaultAxisRange, name, i;\n if (plotArea.stack100) {\n baseOptions.roundToMajorUnit = false;\n baseOptions.labels = { format: 'P0' };\n }\n for (i = 0; i < definitions.length; i++) {\n axisOptions = definitions[i];\n axisPane = plotArea.findPane(axisOptions.pane);\n if (inArray(axisPane, panes)) {\n name = axisOptions.name;\n defaultAxisRange = equalsIgnoreCase(axisOptions.type, LOGARITHMIC) ? {\n min: 0.1,\n max: 1\n } : {\n min: 0,\n max: 1\n };\n range = tracker.query(name) || defaultRange || defaultAxisRange;\n if (i === 0 && range && defaultRange) {\n range.min = math.min(range.min, defaultRange.min);\n range.max = math.max(range.max, defaultRange.max);\n }\n if (equalsIgnoreCase(axisOptions.type, LOGARITHMIC)) {\n axisType = LogarithmicAxis;\n } else {\n axisType = NumericAxis;\n }\n valueAxis = new axisType(range.min, range.max, deepExtend({}, baseOptions, axisOptions));\n if (name) {\n if (plotArea.namedValueAxes[name]) {\n throw new Error('Value axis with name ' + name + ' is already defined');\n }\n plotArea.namedValueAxes[name] = valueAxis;\n }\n valueAxis.axisIndex = i;\n axes.push(valueAxis);\n plotArea.appendAxis(valueAxis);\n }\n }\n primaryAxis = plotArea.valueAxis || axes[0];\n plotArea.valueAxis = primaryAxis;\n if (invertAxes) {\n plotArea.axisX = primaryAxis;\n } else {\n plotArea.axisY = primaryAxis;\n }\n },\n _dispatchEvent: function (chart, e, eventType) {\n var plotArea = this, coords = chart._eventCoordinates(e), point = new Point2D(coords.x, coords.y), pane = plotArea.pointPane(point), allAxes, i, axis, categories = [], values = [];\n if (!pane) {\n return;\n }\n allAxes = pane.axes;\n for (i = 0; i < allAxes.length; i++) {\n axis = allAxes[i];\n if (axis.getValue) {\n appendIfNotNull(values, axis.getValue(point));\n } else {\n appendIfNotNull(categories, axis.getCategory(point));\n }\n }\n if (categories.length === 0) {\n appendIfNotNull(categories, plotArea.categoryAxis.getCategory(point));\n }\n if (categories.length > 0 && values.length > 0) {\n chart.trigger(eventType, {\n element: eventTargetElement(e),\n originalEvent: e,\n category: singleItemOrArray(categories),\n value: singleItemOrArray(values)\n });\n }\n },\n pointPane: function (point) {\n var plotArea = this, panes = plotArea.panes, currentPane, i;\n for (i = 0; i < panes.length; i++) {\n currentPane = panes[i];\n if (currentPane.contentBox.containsPoint(point)) {\n return currentPane;\n }\n }\n },\n updateAxisOptions: function (axis, options) {\n var axesOptions = axis instanceof CategoryAxis ? [].concat(this.options.categoryAxis) : [].concat(this.options.valueAxis);\n deepExtend(axesOptions[axis.axisIndex], options);\n }\n });\n deepExtend(CategoricalPlotArea.fn, PlotAreaEventsMixin);\n var AxisGroupRangeTracker = Class.extend({\n init: function () {\n var tracker = this;\n tracker.axisRanges = {};\n },\n update: function (chartAxisRanges) {\n var tracker = this, axisRanges = tracker.axisRanges, range, chartRange, axisName;\n for (axisName in chartAxisRanges) {\n range = axisRanges[axisName];\n chartRange = chartAxisRanges[axisName];\n axisRanges[axisName] = range = range || {\n min: MAX_VALUE,\n max: MIN_VALUE\n };\n range.min = math.min(range.min, chartRange.min);\n range.max = math.max(range.max, chartRange.max);\n }\n },\n reset: function (axisName) {\n this.axisRanges[axisName] = undefined;\n },\n query: function (axisName) {\n return this.axisRanges[axisName];\n }\n });\n var XYPlotArea = PlotAreaBase.extend({\n init: function (series, options) {\n var plotArea = this;\n plotArea.namedXAxes = {};\n plotArea.namedYAxes = {};\n plotArea.xAxisRangeTracker = new AxisGroupRangeTracker();\n plotArea.yAxisRangeTracker = new AxisGroupRangeTracker();\n PlotAreaBase.fn.init.call(plotArea, series, options);\n },\n options: {\n xAxis: {},\n yAxis: {}\n },\n render: function (panes) {\n var plotArea = this, seriesByPane = plotArea.groupSeriesByPane(), i, pane, paneSeries, filteredSeries;\n panes = panes || plotArea.panes;\n for (i = 0; i < panes.length; i++) {\n pane = panes[i];\n paneSeries = seriesByPane[pane.options.name || 'default'] || [];\n plotArea.addToLegend(paneSeries);\n filteredSeries = plotArea.filterVisibleSeries(paneSeries);\n if (!filteredSeries) {\n continue;\n }\n plotArea.createScatterChart(filterSeriesByType(filteredSeries, SCATTER), pane);\n plotArea.createScatterLineChart(filterSeriesByType(filteredSeries, SCATTER_LINE), pane);\n plotArea.createBubbleChart(filterSeriesByType(filteredSeries, BUBBLE), pane);\n }\n plotArea.createAxes(panes);\n },\n appendChart: function (chart, pane) {\n var plotArea = this;\n plotArea.xAxisRangeTracker.update(chart.xAxisRanges);\n plotArea.yAxisRangeTracker.update(chart.yAxisRanges);\n PlotAreaBase.fn.appendChart.call(plotArea, chart, pane);\n },\n removeAxis: function (axis) {\n var plotArea = this, axisName = axis.options.name;\n PlotAreaBase.fn.removeAxis.call(plotArea, axis);\n if (axis.options.vertical) {\n plotArea.yAxisRangeTracker.reset(axisName);\n delete plotArea.namedYAxes[axisName];\n } else {\n plotArea.xAxisRangeTracker.reset(axisName);\n delete plotArea.namedXAxes[axisName];\n }\n if (axis === plotArea.axisX) {\n delete plotArea.axisX;\n }\n if (axis === plotArea.axisY) {\n delete plotArea.axisY;\n }\n },\n seriesPaneName: function (series) {\n var plotArea = this, options = plotArea.options, xAxisName = series.xAxis, xAxisOptions = [].concat(options.xAxis), xAxis = $.grep(xAxisOptions, function (a) {\n return a.name === xAxisName;\n })[0], yAxisName = series.yAxis, yAxisOptions = [].concat(options.yAxis), yAxis = $.grep(yAxisOptions, function (a) {\n return a.name === yAxisName;\n })[0], panes = options.panes || [{}], defaultPaneName = panes[0].name || 'default', paneName = (xAxis || {}).pane || (yAxis || {}).pane || defaultPaneName;\n return paneName;\n },\n createScatterChart: function (series, pane) {\n var plotArea = this;\n if (series.length > 0) {\n plotArea.appendChart(new ScatterChart(plotArea, {\n series: series,\n clip: pane.options.clip\n }), pane);\n }\n },\n createScatterLineChart: function (series, pane) {\n var plotArea = this;\n if (series.length > 0) {\n plotArea.appendChart(new ScatterLineChart(plotArea, {\n series: series,\n clip: pane.options.clip\n }), pane);\n }\n },\n createBubbleChart: function (series, pane) {\n var plotArea = this;\n if (series.length > 0) {\n plotArea.appendChart(new BubbleChart(plotArea, {\n series: series,\n clip: pane.options.clip\n }), pane);\n }\n },\n createXYAxis: function (options, vertical, axisIndex) {\n var plotArea = this, axisName = options.name, namedAxes = vertical ? plotArea.namedYAxes : plotArea.namedXAxes, tracker = vertical ? plotArea.yAxisRangeTracker : plotArea.xAxisRangeTracker, axisOptions = deepExtend({}, options, { vertical: vertical }), isLog = equalsIgnoreCase(axisOptions.type, LOGARITHMIC), defaultRange = tracker.query(), defaultAxisRange = isLog ? {\n min: 0.1,\n max: 1\n } : {\n min: 0,\n max: 1\n }, range = tracker.query(axisName) || defaultRange || defaultAxisRange, axis, axisType, seriesIx, series = plotArea.series, currentSeries, seriesAxisName, firstPointValue, typeSamples = [\n axisOptions.min,\n axisOptions.max\n ], inferredDate, i;\n for (seriesIx = 0; seriesIx < series.length; seriesIx++) {\n currentSeries = series[seriesIx];\n seriesAxisName = currentSeries[vertical ? 'yAxis' : 'xAxis'];\n if (seriesAxisName == axisOptions.name || axisIndex === 0 && !seriesAxisName) {\n firstPointValue = SeriesBinder.current.bindPoint(currentSeries, 0).valueFields;\n typeSamples.push(firstPointValue[vertical ? 'y' : 'x']);\n break;\n }\n }\n if (axisIndex === 0 && defaultRange) {\n range.min = math.min(range.min, defaultRange.min);\n range.max = math.max(range.max, defaultRange.max);\n }\n for (i = 0; i < typeSamples.length; i++) {\n if (typeSamples[i] instanceof Date) {\n inferredDate = true;\n break;\n }\n }\n if (equalsIgnoreCase(axisOptions.type, DATE) || !axisOptions.type && inferredDate) {\n axisType = DateValueAxis;\n } else if (isLog) {\n axisType = LogarithmicAxis;\n } else {\n axisType = NumericAxis;\n }\n axis = new axisType(range.min, range.max, axisOptions);\n if (axisName) {\n if (namedAxes[axisName]) {\n throw new Error((vertical ? 'Y' : 'X') + ' axis with name ' + axisName + ' is already defined');\n }\n namedAxes[axisName] = axis;\n }\n plotArea.appendAxis(axis);\n return axis;\n },\n createAxes: function (panes) {\n var plotArea = this, options = plotArea.options, axisPane, xAxesOptions = [].concat(options.xAxis), xAxes = [], yAxesOptions = [].concat(options.yAxis), yAxes = [];\n each(xAxesOptions, function (i) {\n axisPane = plotArea.findPane(this.pane);\n if (inArray(axisPane, panes)) {\n xAxes.push(plotArea.createXYAxis(this, false, i));\n }\n });\n each(yAxesOptions, function (i) {\n axisPane = plotArea.findPane(this.pane);\n if (inArray(axisPane, panes)) {\n yAxes.push(plotArea.createXYAxis(this, true, i));\n }\n });\n plotArea.axisX = plotArea.axisX || xAxes[0];\n plotArea.axisY = plotArea.axisY || yAxes[0];\n },\n _dispatchEvent: function (chart, e, eventType) {\n var plotArea = this, coords = chart._eventCoordinates(e), point = new Point2D(coords.x, coords.y), allAxes = plotArea.axes, i, length = allAxes.length, axis, xValues = [], yValues = [], currentValue, values;\n for (i = 0; i < length; i++) {\n axis = allAxes[i];\n values = axis.options.vertical ? yValues : xValues;\n currentValue = axis.getValue(point);\n if (currentValue !== null) {\n values.push(currentValue);\n }\n }\n if (xValues.length > 0 && yValues.length > 0) {\n chart.trigger(eventType, {\n element: eventTargetElement(e),\n originalEvent: e,\n x: singleItemOrArray(xValues),\n y: singleItemOrArray(yValues)\n });\n }\n },\n updateAxisOptions: function (axis, options) {\n var vertical = axis.options.vertical;\n var axes = this.groupAxes(this.panes);\n var index = indexOf(axis, vertical ? axes.y : axes.x);\n var axisOptions = [].concat(vertical ? this.options.yAxis : this.options.xAxis)[index];\n deepExtend(axisOptions, options);\n }\n });\n deepExtend(XYPlotArea.fn, PlotAreaEventsMixin);\n var PiePlotArea = PlotAreaBase.extend({\n render: function () {\n var plotArea = this, series = plotArea.series;\n plotArea.createPieChart(series);\n },\n createPieChart: function (series) {\n var plotArea = this, firstSeries = series[0], pieChart = new PieChart(plotArea, {\n series: series,\n padding: firstSeries.padding,\n startAngle: firstSeries.startAngle,\n connectors: firstSeries.connectors,\n legend: plotArea.options.legend\n });\n plotArea.appendChart(pieChart);\n },\n appendChart: function (chart, pane) {\n PlotAreaBase.fn.appendChart.call(this, chart, pane);\n append(this.options.legend.items, chart.legendItems);\n }\n });\n var DonutPlotArea = PiePlotArea.extend({\n render: function () {\n var plotArea = this, series = plotArea.series;\n plotArea.createDonutChart(series);\n },\n createDonutChart: function (series) {\n var plotArea = this, firstSeries = series[0], donutChart = new DonutChart(plotArea, {\n series: series,\n padding: firstSeries.padding,\n connectors: firstSeries.connectors,\n legend: plotArea.options.legend\n });\n plotArea.appendChart(donutChart);\n }\n });\n var PieAnimation = draw.Animation.extend({\n options: {\n easing: 'easeOutElastic',\n duration: INITIAL_ANIMATION_DURATION\n },\n setup: function () {\n this.element.transform(geom.transform().scale(START_SCALE, START_SCALE, this.options.center));\n },\n step: function (pos) {\n this.element.transform(geom.transform().scale(pos, pos, this.options.center));\n }\n });\n draw.AnimationFactory.current.register(PIE, PieAnimation);\n var BubbleAnimation = draw.Animation.extend({\n options: { easing: 'easeOutElastic' },\n setup: function () {\n var center = this.center = this.element.bbox().center();\n this.element.transform(geom.transform().scale(START_SCALE, START_SCALE, center));\n },\n step: function (pos) {\n this.element.transform(geom.transform().scale(pos, pos, this.center));\n }\n });\n draw.AnimationFactory.current.register(BUBBLE, BubbleAnimation);\n var Highlight = Class.extend({\n init: function () {\n this._points = [];\n },\n destroy: function () {\n this._points = [];\n },\n show: function (points) {\n points = [].concat(points);\n this.hide();\n for (var i = 0; i < points.length; i++) {\n var point = points[i];\n if (point && point.toggleHighlight && point.hasHighlight()) {\n this.togglePointHighlight(point, true);\n this._points.push(point);\n }\n }\n },\n togglePointHighlight: function (point, show) {\n var toggleHandler = (point.options.highlight || {}).toggle;\n if (toggleHandler) {\n var eventArgs = {\n category: point.category,\n series: point.series,\n dataItem: point.dataItem,\n value: point.value,\n stackValue: point.stackValue,\n preventDefault: preventDefault,\n visual: point.highlightVisual(),\n show: show\n };\n toggleHandler(eventArgs);\n if (!eventArgs._defaultPrevented) {\n point.toggleHighlight(show);\n }\n } else {\n point.toggleHighlight(show);\n }\n },\n hide: function () {\n var points = this._points;\n while (points.length) {\n this.togglePointHighlight(points.pop(), false);\n }\n },\n isHighlighted: function (element) {\n var points = this._points;\n for (var i = 0; i < points.length; i++) {\n var point = points[i];\n if (element == point) {\n return true;\n }\n }\n return false;\n }\n });\n var BaseTooltip = Observable.extend({\n init: function (chartElement, options) {\n var tooltip = this;\n Observable.fn.init.call(tooltip);\n tooltip.options = deepExtend({}, tooltip.options, options);\n tooltip.chartElement = chartElement;\n tooltip.template = BaseTooltip.template;\n if (!tooltip.template) {\n tooltip.template = BaseTooltip.template = renderTemplate('' + '
');\n }\n var padding = getSpacing(tooltip.options.padding || {}, 'auto');\n tooltip.element = $(tooltip.template(tooltip.options)).css({\n 'padding-top': padding.top,\n 'padding-right': padding.right,\n 'padding-bottom': padding.bottom,\n 'padding-left': padding.left\n });\n tooltip.move = proxy(tooltip.move, tooltip);\n tooltip._mouseleave = proxy(tooltip._mouseleave, tooltip);\n var mobileScrollerSelector = kendo.format('[{0}=\\'content\\'],[{0}=\\'scroller\\']', kendo.attr('role'));\n tooltip._mobileScroller = chartElement.closest(mobileScrollerSelector).data('kendoMobileScroller');\n },\n destroy: function () {\n this._clearShowTimeout();\n if (this.element) {\n this.element.off(MOUSELEAVE_NS).remove();\n this.element = null;\n }\n },\n options: {\n border: { width: 1 },\n opacity: 1,\n animation: { duration: TOOLTIP_ANIMATION_DURATION }\n },\n move: function () {\n var tooltip = this, options = tooltip.options, element = tooltip.element, offset;\n if (!tooltip.anchor || !tooltip.element) {\n return;\n }\n offset = tooltip._offset();\n if (!tooltip.visible) {\n element.css({\n top: offset.top,\n left: offset.left\n });\n }\n tooltip.visible = true;\n tooltip._ensureElement(document.body);\n element.stop(true, true).show().animate({\n left: offset.left,\n top: offset.top\n }, options.animation.duration);\n },\n _clearShowTimeout: function () {\n if (this.showTimeout) {\n clearTimeout(this.showTimeout);\n this.showTimeout = null;\n }\n },\n _padding: function () {\n if (!this._chartPadding) {\n var chartElement = this.chartElement;\n this._chartPadding = {\n top: parseInt(chartElement.css('paddingTop'), 10),\n left: parseInt(chartElement.css('paddingLeft'), 10)\n };\n }\n return this._chartPadding;\n },\n _offset: function () {\n var tooltip = this, size = tooltip._measure(), anchor = tooltip.anchor, chartPadding = tooltip._padding(), chartOffset = tooltip.chartElement.offset(), top = round(anchor.y + chartPadding.top + chartOffset.top), left = round(anchor.x + chartPadding.left + chartOffset.left), zoomLevel = kendo.support.zoomLevel(), viewport = $(window), scrollTop = window.pageYOffset || document.documentElement.scrollTop || 0, scrollLeft = window.pageXOffset || document.documentElement.scrollLeft || 0, movable = (this._mobileScroller || {}).movable;\n if (!movable || movable.scale === 1) {\n top += tooltip._fit(top - scrollTop, size.height, outerHeight(viewport) / zoomLevel);\n left += tooltip._fit(left - scrollLeft, size.width, outerWidth(viewport) / zoomLevel);\n } else {\n var transform = geom.transform().scale(movable.scale, movable.scale, [\n movable.x,\n movable.y\n ]);\n var point = new geom.Point(left, top).transform(transform);\n left = point.x;\n top = point.y;\n }\n return {\n top: top,\n left: left\n };\n },\n setStyle: function (options, point) {\n var background = options.background;\n var border = options.border.color;\n if (point) {\n var pointColor = point.color || point.options.color;\n background = valueOrDefault(background, pointColor);\n border = valueOrDefault(border, pointColor);\n }\n if (!defined(options.color)) {\n var brightness = new Color(background).percBrightness();\n this.element.toggleClass(CSS_PREFIX + TOOLTIP_INVERSE, brightness > 180);\n }\n this.element.css({\n backgroundColor: background,\n borderColor: border,\n font: options.font,\n color: options.color,\n opacity: options.opacity,\n borderWidth: options.border.width\n });\n },\n show: function () {\n this._clearShowTimeout();\n this.showTimeout = setTimeout(this.move, TOOLTIP_SHOW_DELAY);\n },\n hide: function () {\n var tooltip = this;\n clearTimeout(tooltip.showTimeout);\n tooltip._hideElement();\n if (tooltip.visible) {\n tooltip.point = null;\n tooltip.visible = false;\n tooltip.index = null;\n }\n },\n _measure: function () {\n this._ensureElement();\n var size = {\n width: outerWidth(this.element),\n height: outerHeight(this.element)\n };\n return size;\n },\n _ensureElement: function () {\n if (this.element) {\n this.element.appendTo(document.body).on(MOUSELEAVE_NS, this._mouseleave);\n }\n },\n _mouseleave: function (e) {\n var target = e.relatedTarget;\n var chart = this.chartElement[0];\n if (target && target !== chart && !$.contains(chart, target)) {\n this.trigger(LEAVE);\n this.hide();\n }\n },\n _hideElement: function () {\n var tooltip = this;\n var element = this.element;\n if (element) {\n element.fadeOut({\n always: function () {\n if (!tooltip.visible) {\n element.off(MOUSELEAVE_NS).remove();\n }\n }\n });\n }\n },\n _pointContent: function (point) {\n var tooltip = this, options = deepExtend({}, tooltip.options, point.options.tooltip), content, tooltipTemplate;\n if (defined(point.value)) {\n content = point.value.toString();\n }\n if (options.template) {\n tooltipTemplate = template(options.template);\n content = tooltipTemplate({\n value: point.value,\n category: point.category,\n series: point.series,\n dataItem: point.dataItem,\n percentage: point.percentage,\n runningTotal: point.runningTotal,\n total: point.total,\n low: point.low,\n high: point.high,\n xLow: point.xLow,\n xHigh: point.xHigh,\n yLow: point.yLow,\n yHigh: point.yHigh\n });\n } else if (options.format) {\n content = point.formatValue(options.format);\n }\n return content;\n },\n _pointAnchor: function (point) {\n var size = this._measure();\n return point.tooltipAnchor(size.width, size.height);\n },\n _fit: function (offset, size, viewPortSize) {\n var output = 0;\n if (offset + size > viewPortSize) {\n output = viewPortSize - (offset + size);\n }\n if (offset < 0) {\n output = -offset;\n }\n return output;\n }\n });\n var Tooltip = BaseTooltip.extend({\n show: function (point) {\n var tooltip = this, options = deepExtend({}, tooltip.options, point.options.tooltip);\n if (!point || !point.tooltipAnchor || !tooltip.element) {\n return;\n }\n tooltip.element.html(tooltip._pointContent(point));\n tooltip.anchor = tooltip._pointAnchor(point);\n if (tooltip.anchor) {\n tooltip.setStyle(options, point);\n BaseTooltip.fn.show.call(tooltip, point);\n } else {\n tooltip.hide();\n }\n }\n });\n var SharedTooltip = BaseTooltip.extend({\n init: function (element, plotArea, options) {\n var tooltip = this;\n BaseTooltip.fn.init.call(tooltip, element, options);\n tooltip.plotArea = plotArea;\n },\n options: {\n sharedTemplate: '' + '#= categoryText # | ' + '# for(var i = 0; i < points.length; i++) { #' + '# var point = points[i]; #' + '' + '# if(point.series.name) { # ' + ' #= point.series.name #: | ' + '# } #' + '#= content(point) # | ' + '
' + '# } #' + '
',\n categoryFormat: '{0:d}'\n },\n showAt: function (points, coords) {\n points = $.grep(points, function (p) {\n var tooltip = p.series.tooltip, excluded = tooltip && tooltip.visible === false;\n return !excluded;\n });\n if (points.length > 0) {\n var point = points[0];\n var slot = this.plotArea.categoryAxis.getSlot(point.categoryIx);\n var content = this._content(points, point.category);\n this.element.html(content);\n this.anchor = coords ? this._slotAnchor(coords, slot) : this._defaultAnchor(point, slot);\n this.setStyle(this.options, point);\n BaseTooltip.fn.show.call(this);\n }\n },\n _slotAnchor: function (point, slot) {\n var tooltip = this, plotArea = tooltip.plotArea, axis = plotArea.categoryAxis, anchor, size = this._measure(), hCenter = point.y - size.height / 2;\n if (axis.options.vertical) {\n anchor = Point2D(point.x, hCenter);\n } else {\n anchor = Point2D(slot.center().x, hCenter);\n }\n return anchor;\n },\n _defaultAnchor: function (point, slot) {\n var box = point.owner.pane.chartsBox();\n var vertical = this.plotArea.categoryAxis.options.vertical;\n var center = box.center();\n var slotCenter = slot.center();\n var size = this._measure();\n var anchor;\n if (vertical) {\n anchor = new Point2D(center.x, slotCenter.y);\n } else {\n anchor = new Point2D(slotCenter.x, center.y);\n }\n anchor.x -= size.width / 2;\n anchor.y -= size.height / 2;\n return anchor;\n },\n _content: function (points, category) {\n var tooltip = this, template, content;\n template = kendo.template(tooltip.options.sharedTemplate);\n content = template({\n points: points,\n category: category,\n categoryText: autoFormat(tooltip.options.categoryFormat, category),\n content: tooltip._pointContent\n });\n return content;\n }\n });\n var Crosshair = ChartElement.extend({\n init: function (axis, options) {\n ChartElement.fn.init.call(this, options);\n this.axis = axis;\n this.stickyMode = axis instanceof CategoryAxis;\n },\n options: {\n color: BLACK,\n width: 1,\n zIndex: -1,\n tooltip: { visible: false }\n },\n showAt: function (point) {\n this.point = point;\n this.moveLine();\n this.line.visible(true);\n var tooltipOptions = this.options.tooltip;\n if (tooltipOptions.visible) {\n if (!this.tooltip) {\n this.tooltip = new CrosshairTooltip(this, deepExtend({}, tooltipOptions, { stickyMode: this.stickyMode }));\n }\n this.tooltip.showAt(point);\n }\n },\n hide: function () {\n this.line.visible(false);\n if (this.tooltip) {\n this.tooltip.hide();\n }\n },\n moveLine: function () {\n var crosshair = this, axis = crosshair.axis, vertical = axis.options.vertical, box = crosshair.getBox(), point = crosshair.point, dim = vertical ? Y : X, slot, lineStart, lineEnd;\n lineStart = new geom.Point(box.x1, box.y1);\n if (vertical) {\n lineEnd = new geom.Point(box.x2, box.y1);\n } else {\n lineEnd = new geom.Point(box.x1, box.y2);\n }\n if (point) {\n if (crosshair.stickyMode) {\n slot = axis.getSlot(axis.pointCategoryIndex(point));\n lineStart[dim] = lineEnd[dim] = slot.center()[dim];\n } else {\n lineStart[dim] = lineEnd[dim] = point[dim];\n }\n }\n crosshair.box = box;\n this.line.moveTo(lineStart).lineTo(lineEnd);\n },\n getBox: function () {\n var crosshair = this, axis = crosshair.axis, axes = axis.pane.axes, length = axes.length, vertical = axis.options.vertical, box = axis.lineBox().clone(), dim = vertical ? X : Y, axisLineBox, currentAxis, i;\n for (i = 0; i < length; i++) {\n currentAxis = axes[i];\n if (currentAxis.options.vertical != vertical) {\n if (!axisLineBox) {\n axisLineBox = currentAxis.lineBox().clone();\n } else {\n axisLineBox.wrap(currentAxis.lineBox());\n }\n }\n }\n box[dim + 1] = axisLineBox[dim + 1];\n box[dim + 2] = axisLineBox[dim + 2];\n return box;\n },\n createVisual: function () {\n ChartElement.fn.createVisual.call(this);\n var options = this.options;\n this.line = new draw.Path({\n stroke: {\n color: options.color,\n width: options.width,\n opacity: options.opacity,\n dashType: options.dashType\n },\n visible: false\n });\n this.moveLine();\n this.visual.append(this.line);\n },\n destroy: function () {\n var crosshair = this;\n if (crosshair.tooltip) {\n crosshair.tooltip.destroy();\n }\n ChartElement.fn.destroy.call(crosshair);\n }\n });\n var CrosshairTooltip = BaseTooltip.extend({\n init: function (crosshair, options) {\n var tooltip = this, chartElement = crosshair.axis.getRoot().chart.element;\n tooltip.crosshair = crosshair;\n BaseTooltip.fn.init.call(tooltip, chartElement, deepExtend({}, tooltip.options, { background: crosshair.axis.plotArea.options.seriesColors[0] }, options));\n tooltip.setStyle(tooltip.options);\n },\n options: { padding: 10 },\n showAt: function (point) {\n var tooltip = this, element = tooltip.element;\n if (element) {\n tooltip.point = point;\n tooltip.element.html(tooltip.content(point));\n tooltip.anchor = tooltip.getAnchor();\n tooltip.move();\n }\n },\n move: function () {\n var tooltip = this, element = tooltip.element, offset = tooltip._offset();\n tooltip._ensureElement();\n element.css({\n top: offset.top,\n left: offset.left\n }).show();\n },\n content: function (point) {\n var tooltip = this, options = tooltip.options, axis = tooltip.crosshair.axis, axisOptions = axis.options, content, value, tooltipTemplate;\n value = content = axis[options.stickyMode ? 'getCategory' : 'getValue'](point);\n if (options.template) {\n tooltipTemplate = template(options.template);\n content = tooltipTemplate({ value: value });\n } else if (options.format) {\n content = autoFormat(options.format, value);\n } else {\n if (axisOptions.type === DATE) {\n content = autoFormat(axisOptions.labels.dateFormats[axisOptions.baseUnit], value);\n }\n }\n return content;\n },\n getAnchor: function () {\n var tooltip = this, options = tooltip.options, position = options.position, crosshair = this.crosshair, vertical = !crosshair.axis.options.vertical, lineBox = crosshair.line.bbox(), size = this._measure(), halfWidth = size.width / 2, halfHeight = size.height / 2, padding = options.padding, anchor;\n if (vertical) {\n if (position === BOTTOM) {\n anchor = lineBox.bottomLeft().translate(-halfWidth, padding);\n } else {\n anchor = lineBox.topLeft().translate(-halfWidth, -size.height - padding);\n }\n } else {\n if (position === LEFT) {\n anchor = lineBox.topLeft().translate(-size.width - padding, -halfHeight);\n } else {\n anchor = lineBox.topRight().translate(padding, -halfHeight);\n }\n }\n return anchor;\n },\n hide: function () {\n this.element.hide();\n this.point = null;\n },\n destroy: function () {\n BaseTooltip.fn.destroy.call(this);\n this.point = null;\n }\n });\n var Aggregates = {\n min: function (values) {\n var min = MAX_VALUE, length = values.length, i, n;\n for (i = 0; i < length; i++) {\n n = values[i];\n if (isNumber(n)) {\n min = math.min(min, n);\n }\n }\n return min === MAX_VALUE ? values[0] : min;\n },\n max: function (values) {\n var max = MIN_VALUE, length = values.length, i, n;\n for (i = 0; i < length; i++) {\n n = values[i];\n if (isNumber(n)) {\n max = math.max(max, n);\n }\n }\n return max === MIN_VALUE ? values[0] : max;\n },\n sum: function (values) {\n var length = values.length, sum = 0, i, n;\n for (i = 0; i < length; i++) {\n n = values[i];\n if (isNumber(n)) {\n sum += n;\n }\n }\n return sum;\n },\n sumOrNull: function (values) {\n var result = null;\n if (countNumbers(values)) {\n result = Aggregates.sum(values);\n }\n return result;\n },\n count: function (values) {\n var length = values.length, count = 0, i, val;\n for (i = 0; i < length; i++) {\n val = values[i];\n if (val !== null && defined(val)) {\n count++;\n }\n }\n return count;\n },\n avg: function (values) {\n var result = values[0], count = countNumbers(values);\n if (count > 0) {\n result = Aggregates.sum(values) / count;\n }\n return result;\n },\n first: function (values) {\n var length = values.length, i, val;\n for (i = 0; i < length; i++) {\n val = values[i];\n if (val !== null && defined(val)) {\n return val;\n }\n }\n return values[0];\n }\n };\n function DefaultAggregates() {\n this._defaults = {};\n }\n DefaultAggregates.prototype = {\n register: function (seriesTypes, aggregates) {\n for (var i = 0; i < seriesTypes.length; i++) {\n this._defaults[seriesTypes[i]] = aggregates;\n }\n },\n query: function (seriesType) {\n return this._defaults[seriesType];\n }\n };\n DefaultAggregates.current = new DefaultAggregates();\n var Selection = Observable.extend({\n init: function (chart, categoryAxis, options) {\n var that = this, chartElement = chart.element, categoryAxisLineBox = categoryAxis.lineBox(), valueAxis = that.getValueAxis(categoryAxis), valueAxisLineBox = valueAxis.lineBox(), selectorPrefix = '.' + CSS_PREFIX, wrapper, padding;\n Observable.fn.init.call(that);\n that.options = deepExtend({}, that.options, options);\n options = that.options;\n that.chart = chart;\n that.chartElement = chartElement;\n that.categoryAxis = categoryAxis;\n that._dateAxis = that.categoryAxis instanceof DateCategoryAxis;\n that.valueAxis = valueAxis;\n if (that._dateAxis) {\n deepExtend(options, {\n min: toDate(options.min),\n max: toDate(options.max),\n from: toDate(options.from),\n to: toDate(options.to)\n });\n }\n that.template = Selection.template;\n if (!that.template) {\n that.template = Selection.template = renderTemplate('');\n }\n padding = {\n left: parseInt(chartElement.css('paddingLeft'), 10),\n right: parseInt(chartElement.css('paddingTop'), 10)\n };\n that.options = deepExtend({}, {\n width: categoryAxisLineBox.width(),\n height: valueAxisLineBox.height(),\n padding: padding,\n offset: {\n left: valueAxisLineBox.x2 + padding.left,\n top: valueAxisLineBox.y1 + padding.right\n },\n from: options.min,\n to: options.max\n }, options);\n if (that.options.visible) {\n that.wrapper = wrapper = $(that.template(that.options)).appendTo(chartElement);\n that.selection = wrapper.find(selectorPrefix + 'selection');\n that.leftMask = wrapper.find(selectorPrefix + 'mask').first();\n that.rightMask = wrapper.find(selectorPrefix + 'mask').last();\n that.leftHandle = wrapper.find(selectorPrefix + 'leftHandle');\n that.rightHandle = wrapper.find(selectorPrefix + 'rightHandle');\n that.options.selection = {\n border: {\n left: parseFloat(that.selection.css('border-left-width'), 10),\n right: parseFloat(that.selection.css('border-right-width'), 10)\n }\n };\n that.leftHandle.css('top', (that.selection.height() - that.leftHandle.height()) / 2);\n that.rightHandle.css('top', (that.selection.height() - that.rightHandle.height()) / 2);\n that.set(that._index(options.from), that._index(options.to));\n that.bind(that.events, that.options);\n that.wrapper[0].style.cssText = that.wrapper[0].style.cssText;\n if (that.options.mousewheel !== false) {\n that.wrapper.on(MOUSEWHEEL_NS, proxy(that._mousewheel, that));\n } else {\n that.wrapper.on(MOUSEWHEEL_NS, function (e) {\n e.stopPropagation();\n });\n }\n if (kendo.UserEvents) {\n that.userEvents = new kendo.UserEvents(that.wrapper, {\n global: true,\n stopPropagation: true,\n multiTouch: true,\n fastTap: true,\n press: proxy(that._press, that),\n start: proxy(that._start, that),\n move: proxy(that._move, that),\n end: proxy(that._end, that),\n tap: proxy(that._tap, that),\n gesturestart: proxy(that._gesturechange, that),\n gesturechange: proxy(that._gesturechange, that)\n });\n } else {\n that.leftHandle.add(that.rightHandle).removeClass(CSS_PREFIX + 'handle');\n }\n }\n },\n events: [\n SELECT_START,\n SELECT,\n SELECT_END\n ],\n options: {\n visible: true,\n mousewheel: { zoom: BOTH },\n min: MIN_VALUE,\n max: MAX_VALUE\n },\n destroy: function () {\n var that = this, userEvents = that.userEvents;\n if (userEvents) {\n userEvents.destroy();\n }\n clearTimeout(that._mwTimeout);\n that._state = null;\n if (that.wrapper) {\n that.wrapper.remove();\n }\n },\n _rangeEventArgs: function (range) {\n var that = this;\n return {\n axis: that.categoryAxis.options,\n from: that._value(range.from),\n to: that._value(range.to)\n };\n },\n _start: function (e) {\n var that = this, options = that.options, target = $(e.event.target), args;\n if (that._state || !target) {\n return;\n }\n that.chart._unsetActivePoint();\n that._state = {\n moveTarget: target.parents('.k-handle').add(target).first(),\n startLocation: e.x ? e.x.location : 0,\n range: {\n from: that._index(options.from),\n to: that._index(options.to)\n }\n };\n args = that._rangeEventArgs({\n from: that._index(options.from),\n to: that._index(options.to)\n });\n if (that.trigger(SELECT_START, args)) {\n that.userEvents.cancel();\n that._state = null;\n }\n },\n _press: function (e) {\n var handle;\n if (this._state) {\n handle = this._state.moveTarget;\n } else {\n var target = $(e.event.target);\n handle = target.parents('.k-handle').add(target).first();\n }\n handle.addClass('k-handle-active');\n },\n _move: function (e) {\n if (!this._state) {\n return;\n }\n var that = this, state = that._state, options = that.options, categories = that.categoryAxis.options.categories, from = that._index(options.from), to = that._index(options.to), min = that._index(options.min), max = that._index(options.max), delta = state.startLocation - e.x.location, range = state.range, oldRange = {\n from: range.from,\n to: range.to\n }, span = range.to - range.from, target = state.moveTarget, scale = that.wrapper.width() / (categories.length - 1), offset = math.round(delta / scale);\n if (!target) {\n return;\n }\n e.preventDefault();\n if (target.is('.k-selection, .k-selection-bg')) {\n range.from = math.min(math.max(min, from - offset), max - span);\n range.to = math.min(range.from + span, max);\n } else if (target.is('.k-leftHandle')) {\n range.from = math.min(math.max(min, from - offset), max - 1);\n range.to = math.max(range.from + 1, range.to);\n } else if (target.is('.k-rightHandle')) {\n range.to = math.min(math.max(min + 1, to - offset), max);\n range.from = math.min(range.to - 1, range.from);\n }\n if (range.from !== oldRange.from || range.to !== oldRange.to) {\n that.move(range.from, range.to);\n that.trigger(SELECT, that._rangeEventArgs(range));\n }\n },\n _end: function () {\n var range = this._state.range;\n if (this._state) {\n var moveTarget = this._state.moveTarget;\n if (moveTarget) {\n moveTarget.removeClass('k-handle-active');\n }\n delete this._state;\n }\n this.set(range.from, range.to);\n this.trigger(SELECT_END, this._rangeEventArgs(range));\n },\n _gesturechange: function (e) {\n if (!this._state) {\n return;\n }\n var that = this, chart = that.chart, state = that._state, options = that.options, categoryAxis = that.categoryAxis, range = state.range, p0 = chart._toModelCoordinates(e.touches[0].x.location).x, p1 = chart._toModelCoordinates(e.touches[1].x.location).x, left = math.min(p0, p1), right = math.max(p0, p1);\n e.preventDefault();\n state.moveTarget = null;\n range.from = categoryAxis.pointCategoryIndex(new dataviz.Point2D(left)) || options.min;\n range.to = categoryAxis.pointCategoryIndex(new dataviz.Point2D(right)) || options.max;\n that.move(range.from, range.to);\n },\n _tap: function (e) {\n var that = this, options = that.options, coords = that.chart._eventCoordinates(e), categoryAxis = that.categoryAxis, categoryIx = categoryAxis.pointCategoryIndex(new dataviz.Point2D(coords.x, categoryAxis.box.y1)), from = that._index(options.from), to = that._index(options.to), min = that._index(options.min), max = that._index(options.max), span = to - from, mid = from + span / 2, offset = math.round(mid - categoryIx), range = {}, rightClick = e.event.which === 3;\n if (that._state || rightClick) {\n return;\n }\n e.preventDefault();\n that.chart._unsetActivePoint();\n if (!categoryAxis.options.justified) {\n offset--;\n }\n range.from = math.min(math.max(min, from - offset), max - span);\n range.to = math.min(range.from + span, max);\n that._start(e);\n if (that._state) {\n that._state.range = range;\n that.trigger(SELECT, that._rangeEventArgs(range));\n that._end();\n }\n },\n _mousewheel: function (e) {\n var that = this, options = that.options, delta = mwDelta(e);\n that._start({ event: { target: that.selection } });\n if (that._state) {\n var range = that._state.range;\n e.preventDefault();\n e.stopPropagation();\n if (math.abs(delta) > 1) {\n delta *= ZOOM_ACCELERATION;\n }\n if (options.mousewheel.reverse) {\n delta *= -1;\n }\n if (that.expand(delta)) {\n that.trigger(SELECT, {\n axis: that.categoryAxis.options,\n delta: delta,\n originalEvent: e,\n from: that._value(range.from),\n to: that._value(range.to)\n });\n }\n if (that._mwTimeout) {\n clearTimeout(that._mwTimeout);\n }\n that._mwTimeout = setTimeout(function () {\n that._end();\n }, MOUSEWHEEL_DELAY);\n }\n },\n _index: function (value) {\n var index = value;\n if (value instanceof Date) {\n index = this.categoryAxis.categoryIndex(value);\n }\n return index;\n },\n _value: function (index) {\n var categories = this.categoryAxis.options.categories;\n var value = index;\n if (this._dateAxis) {\n if (index > categories.length - 1) {\n value = this.options.max;\n } else {\n value = categories[math.ceil(index)];\n }\n }\n return value;\n },\n _slot: function (value) {\n var categoryAxis = this.categoryAxis;\n var index = this._index(value);\n return categoryAxis.getSlot(index, index, true);\n },\n move: function (from, to) {\n var that = this, options = that.options, offset = options.offset, padding = options.padding, border = options.selection.border, leftMaskWidth, rightMaskWidth, box, distance;\n box = that._slot(from);\n leftMaskWidth = round(box.x1 - offset.left + padding.left);\n that.leftMask.width(leftMaskWidth);\n that.selection.css('left', leftMaskWidth);\n box = that._slot(to);\n rightMaskWidth = round(options.width - (box.x1 - offset.left + padding.left));\n that.rightMask.width(rightMaskWidth);\n distance = options.width - rightMaskWidth;\n if (distance != options.width) {\n distance += border.right;\n }\n that.rightMask.css('left', distance);\n that.selection.width(math.max(options.width - (leftMaskWidth + rightMaskWidth) - border.right, 0));\n },\n set: function (from, to) {\n var that = this, options = that.options, min = that._index(options.min), max = that._index(options.max);\n from = limitValue(that._index(from), min, max);\n to = limitValue(that._index(to), from + 1, max);\n if (options.visible) {\n that.move(from, to);\n }\n options.from = that._value(from);\n options.to = that._value(to);\n },\n expand: function (delta) {\n var that = this, options = that.options, min = that._index(options.min), max = that._index(options.max), zDir = options.mousewheel.zoom, from = that._index(options.from), to = that._index(options.to), range = {\n from: from,\n to: to\n }, oldRange = deepExtend({}, range);\n if (that._state) {\n range = that._state.range;\n }\n if (zDir !== RIGHT) {\n range.from = limitValue(limitValue(from - delta, 0, to - 1), min, max);\n }\n if (zDir !== LEFT) {\n range.to = limitValue(limitValue(to + delta, range.from + 1, max), min, max);\n }\n if (range.from !== oldRange.from || range.to !== oldRange.to) {\n that.set(range.from, range.to);\n return true;\n }\n },\n getValueAxis: function (categoryAxis) {\n var axes = categoryAxis.pane.axes, axesCount = axes.length, i, axis;\n for (i = 0; i < axesCount; i++) {\n axis = axes[i];\n if (axis.options.vertical !== categoryAxis.options.vertical) {\n return axis;\n }\n }\n }\n });\n var Pannable = Class.extend({\n init: function (plotArea, options) {\n this.plotArea = plotArea;\n this.options = deepExtend({}, this.options, options);\n },\n options: {\n key: 'none',\n lock: 'none'\n },\n start: function (e) {\n this._active = acceptKey(e.event, this.options.key);\n return this._active;\n },\n move: function (e) {\n if (this._active) {\n var axisRanges = this.axisRanges = this._panAxes(e, X).concat(this._panAxes(e, Y));\n if (axisRanges.length) {\n this.axisRanges = axisRanges;\n return toChartAxisRanges(axisRanges);\n }\n }\n },\n end: function () {\n var active = this._active;\n this._active = false;\n return active;\n },\n pan: function () {\n var plotArea = this.plotArea;\n var axisRanges = this.axisRanges;\n var range;\n if (axisRanges.length) {\n for (var idx = 0; idx < axisRanges.length; idx++) {\n range = axisRanges[idx];\n plotArea.updateAxisOptions(range.axis, range.range);\n }\n plotArea.redraw(plotArea.panes);\n }\n },\n destroy: function () {\n delete this.plotArea;\n },\n _panAxes: function (e, position) {\n var plotArea = this.plotArea;\n var delta = -e[position].delta;\n var lock = (this.options.lock || '').toLowerCase();\n var updatedAxes = [];\n if (delta !== 0 && (lock || '').toLowerCase() != position) {\n var axes = plotArea.axes;\n var axis;\n var range;\n for (var idx = 0; idx < axes.length; idx++) {\n axis = axes[idx];\n if (position == X && !axis.options.vertical || position == Y && axis.options.vertical) {\n range = axis.pan(delta);\n if (range) {\n range.limitRange = true;\n updatedAxes.push({\n axis: axis,\n range: range\n });\n }\n }\n }\n }\n return updatedAxes;\n }\n });\n var ZoomSelection = Class.extend({\n init: function (chart, options) {\n this.chart = chart;\n this.options = deepExtend({}, this.options, options);\n this._marquee = $('');\n },\n options: {\n key: 'shift',\n lock: 'none'\n },\n start: function (e) {\n if (acceptKey(e.event, this.options.key)) {\n var chart = this.chart;\n var point = chart._toModelCoordinates(e.x.client, e.y.client);\n var zoomPane = this._zoomPane = chart._plotArea.paneByPoint(point);\n if (zoomPane && zoomPane.clipBox()) {\n var clipBox = zoomPane.clipBox().clone();\n var elementOffset = this._elementOffset();\n clipBox.translate(elementOffset.left, elementOffset.top);\n this._zoomPaneClipBox = clipBox;\n this._marquee.appendTo(document.body).css({\n left: e.x.client + 1,\n top: e.y.client + 1,\n width: 0,\n height: 0\n });\n return true;\n }\n }\n return false;\n },\n _elementOffset: function () {\n var chartElement = this.chart.element;\n var chartOffset = chartElement.offset();\n return {\n left: parseInt(chartElement.css('paddingTop'), 10) + chartOffset.left,\n top: parseInt(chartElement.css('paddingLeft'), 10) + chartOffset.top\n };\n },\n move: function (e) {\n var zoomPane = this._zoomPane;\n if (zoomPane) {\n var selectionPosition = this._selectionPosition(e);\n this._marquee.css(selectionPosition);\n }\n },\n end: function (e) {\n var zoomPane = this._zoomPane;\n if (zoomPane) {\n var elementOffset = this._elementOffset();\n var selectionPosition = this._selectionPosition(e);\n selectionPosition.left -= elementOffset.left;\n selectionPosition.top -= elementOffset.top;\n var start = {\n x: selectionPosition.left,\n y: selectionPosition.top\n };\n var end = {\n x: selectionPosition.left + selectionPosition.width,\n y: selectionPosition.top + selectionPosition.height\n };\n this._updateAxisRanges(start, end);\n this._marquee.remove();\n delete this._zoomPane;\n return toChartAxisRanges(this.axisRanges);\n }\n },\n zoom: function () {\n var axisRanges = this.axisRanges;\n if (axisRanges && axisRanges.length) {\n var plotArea = this.chart._plotArea;\n var axisRange;\n for (var idx = 0; idx < axisRanges.length; idx++) {\n axisRange = axisRanges[idx];\n plotArea.updateAxisOptions(axisRange.axis, axisRange.range);\n }\n plotArea.redraw(plotArea.panes);\n }\n },\n destroy: function () {\n this._marquee.remove();\n delete this._marquee;\n delete this.chart;\n },\n _updateAxisRanges: function (start, end) {\n var lock = (this.options.lock || '').toLowerCase();\n var axisRanges = [];\n var axes = this._zoomPane.axes;\n var axis, vertical;\n for (var idx = 0; idx < axes.length; idx++) {\n axis = axes[idx];\n vertical = axis.options.vertical;\n if (!(lock == X && !vertical) && !(lock === Y && vertical)) {\n var range = axis.pointsRange(start, end);\n if (range) {\n axisRanges.push({\n axis: axis,\n range: range\n });\n }\n }\n }\n this.axisRanges = axisRanges;\n },\n _selectionPosition: function (e) {\n var lock = (this.options.lock || '').toLowerCase();\n var left = math.min(e.x.startLocation, e.x.location);\n var top = math.min(e.y.startLocation, e.y.location);\n var width = math.abs(e.x.initialDelta);\n var height = math.abs(e.y.initialDelta);\n var clipBox = this._zoomPaneClipBox;\n if (lock == X) {\n left = clipBox.x1;\n width = clipBox.width();\n }\n if (lock == Y) {\n top = clipBox.y1;\n height = clipBox.height();\n }\n if (e.x.location > clipBox.x2) {\n width = clipBox.x2 - e.x.startLocation;\n }\n if (e.x.location < clipBox.x1) {\n width = e.x.startLocation - clipBox.x1;\n }\n if (e.y.location > clipBox.y2) {\n height = clipBox.y2 - e.y.startLocation;\n }\n if (e.y.location < clipBox.y1) {\n height = e.y.startLocation - clipBox.y1;\n }\n return {\n left: math.max(left, clipBox.x1),\n top: math.max(top, clipBox.y1),\n width: width,\n height: height\n };\n }\n });\n var MousewheelZoom = Class.extend({\n init: function (chart, options) {\n this.chart = chart;\n this.options = deepExtend({}, this.options, options);\n },\n updateRanges: function (delta) {\n var lock = (this.options.lock || '').toLowerCase();\n var axisRanges = [];\n var axes = this.chart._plotArea.axes;\n var axis, vertical;\n for (var idx = 0; idx < axes.length; idx++) {\n axis = axes[idx];\n vertical = axis.options.vertical;\n if (!(lock == X && !vertical) && !(lock === Y && vertical)) {\n var range = axis.zoomRange(-delta);\n if (range) {\n axisRanges.push({\n axis: axis,\n range: range\n });\n }\n }\n }\n this.axisRanges = axisRanges;\n return toChartAxisRanges(axisRanges);\n },\n zoom: function () {\n var axisRanges = this.axisRanges;\n if (axisRanges && axisRanges.length) {\n var plotArea = this.chart._plotArea;\n var axisRange;\n for (var idx = 0; idx < axisRanges.length; idx++) {\n axisRange = axisRanges[idx];\n plotArea.updateAxisOptions(axisRange.axis, axisRange.range);\n }\n plotArea.redraw(plotArea.panes);\n }\n },\n destroy: function () {\n delete this.chart;\n }\n });\n var SeriesAggregator = function (series, binder, defaultAggregates) {\n var sa = this, canonicalFields = binder.canonicalFields(series), valueFields = binder.valueFields(series), sourceFields = binder.sourceFields(series, canonicalFields), seriesFields = sa._seriesFields = [], defaults = defaultAggregates.query(series.type), rootAggregate = series.aggregate || defaults, i;\n sa._series = series;\n sa._binder = binder;\n for (i = 0; i < canonicalFields.length; i++) {\n var field = canonicalFields[i], fieldAggregate;\n if (typeof rootAggregate === OBJECT) {\n fieldAggregate = rootAggregate[field];\n } else if (i === 0 || inArray(field, valueFields)) {\n fieldAggregate = rootAggregate;\n } else {\n break;\n }\n if (fieldAggregate) {\n seriesFields.push({\n canonicalName: field,\n name: sourceFields[i],\n transform: isFn(fieldAggregate) ? fieldAggregate : Aggregates[fieldAggregate]\n });\n }\n }\n };\n SeriesAggregator.prototype = {\n aggregatePoints: function (srcPoints, group) {\n var sa = this, data = sa._bindPoints(srcPoints || []), series = sa._series, seriesFields = sa._seriesFields, i, field, srcValues, value, firstDataItem = data.dataItems[0], result = {};\n if (firstDataItem && !isNumber(firstDataItem) && !isArray(firstDataItem)) {\n var fn = function () {\n };\n fn.prototype = firstDataItem;\n result = new fn();\n }\n for (i = 0; i < seriesFields.length; i++) {\n field = seriesFields[i];\n srcValues = sa._bindField(data.values, field.canonicalName);\n value = field.transform(srcValues, series, data.dataItems, group);\n if (value !== null && typeof value === OBJECT && !defined(value.length) && !(value instanceof Date)) {\n result = value;\n break;\n } else {\n if (defined(value)) {\n ensureTree(field.name, result);\n kendo.setter(field.name)(result, value);\n }\n }\n }\n return result;\n },\n _bindPoints: function (points) {\n var sa = this, binder = sa._binder, series = sa._series, values = [], dataItems = [], i, pointIx;\n for (i = 0; i < points.length; i++) {\n pointIx = points[i];\n values.push(binder.bindPoint(series, pointIx));\n dataItems.push(series.data[pointIx]);\n }\n return {\n values: values,\n dataItems: dataItems\n };\n },\n _bindField: function (data, field) {\n var values = [], count = data.length, i, item, value, valueFields;\n for (i = 0; i < count; i++) {\n item = data[i];\n valueFields = item.valueFields;\n if (defined(valueFields[field])) {\n value = valueFields[field];\n } else {\n value = item.fields[field];\n }\n values.push(value);\n }\n return values;\n }\n };\n var ChartPlotArea = Class.extend({\n init: function (plotArea) {\n this._plotArea = plotArea;\n this.visual = plotArea.visual;\n this.backgroundVisual = plotArea._bgVisual;\n }\n });\n var ChartPane = Class.extend({\n init: function (chart, pane) {\n this._chart = chart;\n this._pane = pane;\n this.visual = pane.visual;\n this.chartsVisual = pane.chartContainer.visual;\n this.name = pane.options.name;\n },\n series: function () {\n var chart = this._chart;\n var seriesByPane = chart._plotArea.groupSeriesByPane();\n var series = seriesByPane[this.name || 'default'];\n var result = [];\n if (series) {\n for (var idx = 0; idx < series.length; idx++) {\n result.push(new ChartSeries(chart, series[idx]));\n }\n }\n return result;\n }\n });\n var ChartAxis = Class.extend({\n init: function (axis) {\n this._axis = axis;\n this.options = axis.options;\n },\n value: function (point) {\n var axis = this._axis;\n var value = axis.getCategory ? axis.getCategory(point) : axis.getValue(point);\n return value;\n },\n slot: function (from, to, limit) {\n if (!defined(limit)) {\n limit = true;\n }\n return this._axis.slot(from, to, limit);\n },\n range: function () {\n return this._axis.range();\n },\n valueRange: function () {\n return this._axis.valueRange();\n }\n });\n var ChartSeries = Class.extend({\n init: function (chart, options) {\n this._chart = chart;\n this._options = options;\n },\n points: function (filter) {\n var points = this._points;\n if (!points) {\n var series = this._seriesOptions();\n var plotArea = this._chart._plotArea;\n this._points = points = plotArea.pointsBySeriesIndex(series.index);\n }\n if (kendo.isFunction(filter)) {\n points = this._filterPoints(points, filter);\n }\n return points;\n },\n data: function (data) {\n var series = this._seriesOptions();\n if (data) {\n var chart = this._chart;\n var plotArea = chart._plotArea;\n series.data = data;\n if (series.categoryField) {\n var axis = plotArea.seriesCategoryAxis(series);\n var options = [].concat(chart.options.categoryAxis);\n chart._bindCategoryAxisFromSeries(options[axis.axisIndex], axis.axisIndex);\n }\n chart._noTransitionsRedraw();\n this._clearFields();\n }\n return series.data;\n },\n findPoint: function (filter) {\n var points = this.points();\n for (var idx = 0; idx < points.length; idx++) {\n if (filter(points[idx])) {\n return points[idx];\n }\n }\n },\n toggleHighlight: function (show, elements) {\n if (!elements) {\n elements = this.points();\n } else if (kendo.isFunction(elements)) {\n elements = this.points(elements);\n } else {\n elements = isArray(elements) ? elements : [elements];\n }\n this._chart._togglePointsHighlight(show, elements);\n },\n toggleVisibility: function (visible, filter) {\n var chart = this._chart;\n var seriesOptions = this._seriesOptions();\n var hasFilter = kendo.isFunction(filter);\n if (!hasFilter) {\n seriesOptions.visible = visible;\n chart._saveGroupVisibleState(seriesOptions);\n } else {\n if (inArray(seriesOptions.type, [\n PIE,\n DONUT,\n FUNNEL\n ])) {\n var data = this._filterData(filter);\n for (var idx = 0; idx < data.length; idx++) {\n data[idx].visible = visible;\n }\n } else {\n seriesOptions.visible = function (data) {\n return filter(data.dataItem) ? visible : true;\n };\n }\n }\n chart._noTransitionsRedraw();\n this._clearFields();\n },\n _filterData: function (filter) {\n var data = this._seriesOptions().data;\n var length = data.length;\n var result = [];\n for (var idx = 0; idx < length; idx++) {\n if (filter(data[idx])) {\n result.push(data[idx]);\n }\n }\n return result;\n },\n _filterPoints: function (points, filter) {\n var result = [];\n var length = points.length;\n for (var idx = 0; idx < length; idx++) {\n if (filter(points[idx])) {\n result.push(points[idx]);\n }\n }\n return result;\n },\n _seriesOptions: function () {\n var series = this._series;\n if (!series) {\n series = this._series = this._chart._seriesOptions(this._options);\n }\n return series;\n },\n _clearFields: function () {\n delete this._points;\n delete this._series;\n }\n });\n function intersection(a1, a2, b1, b2) {\n var result, ua_t = (b2.x - b1.x) * (a1.y - b1.y) - (b2.y - b1.y) * (a1.x - b1.x), u_b = (b2.y - b1.y) * (a2.x - a1.x) - (b2.x - b1.x) * (a2.y - a1.y), ua;\n if (u_b !== 0) {\n ua = ua_t / u_b;\n result = new Point2D(a1.x + ua * (a2.x - a1.x), a1.y + ua * (a2.y - a1.y));\n }\n return result;\n }\n function applySeriesDefaults(options, themeOptions) {\n var series = options.series, i, seriesLength = series.length, seriesType, seriesDefaults = options.seriesDefaults, commonDefaults = deepExtend({}, options.seriesDefaults), themeSeriesDefaults = themeOptions ? deepExtend({}, themeOptions.seriesDefaults) : {}, commonThemeDefaults = deepExtend({}, themeSeriesDefaults);\n cleanupNestedSeriesDefaults(commonDefaults);\n cleanupNestedSeriesDefaults(commonThemeDefaults);\n for (i = 0; i < seriesLength; i++) {\n seriesType = series[i].type || options.seriesDefaults.type;\n var baseOptions = deepExtend({ data: [] }, commonThemeDefaults, themeSeriesDefaults[seriesType], { tooltip: options.tooltip }, commonDefaults, seriesDefaults[seriesType]);\n series[i]._defaults = baseOptions;\n series[i] = deepExtend({}, baseOptions, series[i]);\n }\n }\n function cleanupNestedSeriesDefaults(seriesDefaults) {\n delete seriesDefaults.bar;\n delete seriesDefaults.column;\n delete seriesDefaults.rangeColumn;\n delete seriesDefaults.line;\n delete seriesDefaults.verticalLine;\n delete seriesDefaults.pie;\n delete seriesDefaults.donut;\n delete seriesDefaults.area;\n delete seriesDefaults.verticalArea;\n delete seriesDefaults.scatter;\n delete seriesDefaults.scatterLine;\n delete seriesDefaults.bubble;\n delete seriesDefaults.candlestick;\n delete seriesDefaults.ohlc;\n delete seriesDefaults.boxPlot;\n delete seriesDefaults.bullet;\n delete seriesDefaults.verticalBullet;\n delete seriesDefaults.polarArea;\n delete seriesDefaults.polarLine;\n delete seriesDefaults.radarArea;\n delete seriesDefaults.radarLine;\n delete seriesDefaults.waterfall;\n }\n function applySeriesColors(options) {\n var series = options.series, colors = options.seriesColors || [], i, currentSeries, seriesColor, defaults;\n for (i = 0; i < series.length; i++) {\n currentSeries = series[i];\n seriesColor = colors[i % colors.length];\n currentSeries.color = currentSeries.color || seriesColor;\n defaults = currentSeries._defaults;\n if (defaults) {\n defaults.color = defaults.color || seriesColor;\n }\n }\n }\n function resolveAxisAliases(options) {\n var alias;\n each([\n CATEGORY,\n VALUE,\n X,\n Y\n ], function () {\n alias = this + 'Axes';\n if (options[alias]) {\n options[this + 'Axis'] = options[alias];\n delete options[alias];\n }\n });\n }\n function applyAxisDefaults(options, themeOptions) {\n var themeAxisDefaults = (themeOptions || {}).axisDefaults || {};\n each([\n CATEGORY,\n VALUE,\n X,\n Y\n ], function () {\n var axisName = this + 'Axis', axes = [].concat(options[axisName]), axisDefaults = options.axisDefaults || {};\n axes = $.map(axes, function (axisOptions) {\n var axisColor = (axisOptions || {}).color;\n var result = deepExtend({}, themeAxisDefaults, themeAxisDefaults[axisName], axisDefaults, axisDefaults[axisName], {\n line: { color: axisColor },\n labels: { color: axisColor },\n title: { color: axisColor }\n }, axisOptions);\n delete result[axisName];\n return result;\n });\n options[axisName] = axes.length > 1 ? axes : axes[0];\n });\n }\n function categoriesCount(series) {\n var seriesCount = series.length, categories = 0, i;\n for (i = 0; i < seriesCount; i++) {\n categories = math.max(categories, series[i].data.length);\n }\n return categories;\n }\n function sqr(value) {\n return value * value;\n }\n extend($.easing, {\n easeOutElastic: function (n, d, first, diff) {\n var s = 1.70158, p = 0, a = diff;\n if (n === 0) {\n return first;\n }\n if (n === 1) {\n return first + diff;\n }\n if (!p) {\n p = 0.5;\n }\n if (a < math.abs(diff)) {\n a = diff;\n s = p / 4;\n } else {\n s = p / (2 * math.PI) * math.asin(diff / a);\n }\n return a * math.pow(2, -10 * n) * math.sin((n * 1 - s) * (1.1 * math.PI) / p) + diff + first;\n }\n });\n function getField(field, row) {\n if (row === null) {\n return row;\n }\n var get = getter(field, true);\n return get(row);\n }\n function getDateField(field, row) {\n if (row === null) {\n return row;\n }\n var key = '_date_' + field, value = row[key];\n if (!value) {\n value = toDate(getter(field, true)(row));\n row[key] = value;\n }\n return value;\n }\n function toDate(value) {\n var result, i;\n if (value instanceof Date) {\n result = value;\n } else if (typeof value === STRING) {\n result = kendo.parseDate(value) || new Date(value);\n } else if (value) {\n if (isArray(value)) {\n result = [];\n for (i = 0; i < value.length; i++) {\n result.push(toDate(value[i]));\n }\n } else {\n result = new Date(value);\n }\n }\n return result;\n }\n function toTime(value) {\n if (isArray(value)) {\n return map(value, toTime);\n } else if (value) {\n return toDate(value).getTime();\n }\n }\n function addDuration(date, value, unit, weekStartDay) {\n var result = date, hours;\n if (date) {\n date = toDate(date);\n hours = date.getHours();\n if (unit === YEARS) {\n result = new Date(date.getFullYear() + value, 0, 1);\n kendo.date.adjustDST(result, 0);\n } else if (unit === MONTHS) {\n result = new Date(date.getFullYear(), date.getMonth() + value, 1);\n kendo.date.adjustDST(result, hours);\n } else if (unit === WEEKS) {\n result = addDuration(startOfWeek(date, weekStartDay), value * 7, DAYS);\n kendo.date.adjustDST(result, hours);\n } else if (unit === DAYS) {\n result = new Date(date.getFullYear(), date.getMonth(), date.getDate() + value);\n kendo.date.adjustDST(result, hours);\n } else if (unit === HOURS) {\n date = new Date(date);\n date.setUTCMinutes(0, 0, 0);\n result = addTicks(date, value * TIME_PER_HOUR);\n } else if (unit === MINUTES) {\n result = addTicks(date, value * TIME_PER_MINUTE);\n if (result.getSeconds() > 0) {\n result.setSeconds(0);\n }\n } else if (unit === SECONDS) {\n result = addTicks(date, value * TIME_PER_SECOND);\n } else if (unit === MILLISECONDS) {\n result = addTicks(date, value);\n }\n if (unit !== MILLISECONDS && result.getMilliseconds() > 0) {\n result.setMilliseconds(0);\n }\n }\n return result;\n }\n function startOfWeek(date, weekStartDay) {\n var day = date.getDay(), daysToSubtract = 0;\n if (!isNaN(day)) {\n weekStartDay = weekStartDay || 0;\n while (day !== weekStartDay) {\n if (day === 0) {\n day = 6;\n } else {\n day--;\n }\n daysToSubtract++;\n }\n }\n return addTicks(date, -daysToSubtract * TIME_PER_DAY);\n }\n function floorDate(date, unit, weekStartDay) {\n date = toDate(date);\n return addDuration(date, 0, unit, weekStartDay);\n }\n function ceilDate(date, unit, weekStartDay) {\n date = toDate(date);\n if (date && floorDate(date, unit, weekStartDay).getTime() === date.getTime()) {\n return date;\n }\n return addDuration(date, 1, unit, weekStartDay);\n }\n function dateDiff(a, b) {\n return a.getTime() - b;\n }\n function absoluteDateDiff(a, b) {\n var diff = a.getTime() - b, offsetDiff = a.getTimezoneOffset() - b.getTimezoneOffset();\n return diff - offsetDiff * TIME_PER_MINUTE;\n }\n function addTicks(date, ticks) {\n return new Date(date.getTime() + ticks);\n }\n function duration(a, b, unit) {\n var diff;\n if (unit === YEARS) {\n diff = b.getFullYear() - a.getFullYear();\n } else if (unit === MONTHS) {\n diff = duration(a, b, YEARS) * 12 + b.getMonth() - a.getMonth();\n } else if (unit === DAYS) {\n diff = math.floor(dateDiff(b, a) / TIME_PER_DAY);\n } else {\n diff = math.floor(dateDiff(b, a) / TIME_PER_UNIT[unit]);\n }\n return diff;\n }\n function dateIndex(value, start, baseUnit, baseUnitStep) {\n var index;\n var date = toDate(value);\n var startDate = toDate(start);\n if (baseUnit == MONTHS) {\n index = date.getMonth() - startDate.getMonth() + (date.getFullYear() - startDate.getFullYear()) * 12 + timeIndex(date, new Date(date.getFullYear(), date.getMonth()), DAYS) / new Date(date.getFullYear(), date.getMonth() + 1, 0).getDate();\n } else if (baseUnit == YEARS) {\n index = date.getFullYear() - startDate.getFullYear() + dateIndex(date, new Date(date.getFullYear(), 0), MONTHS, 1) / 12;\n } else if (baseUnit == DAYS || baseUnit == WEEKS) {\n index = timeIndex(date, startDate, baseUnit);\n } else {\n index = dateDiff(date, start) / TIME_PER_UNIT[baseUnit];\n }\n return index / baseUnitStep;\n }\n function timeIndex(date, start, baseUnit) {\n return absoluteDateDiff(date, start) / TIME_PER_UNIT[baseUnit];\n }\n function singleItemOrArray(array) {\n return array.length === 1 ? array[0] : array;\n }\n function axisGroupBox(axes) {\n var length = axes.length, box, i, axisBox;\n if (length > 0) {\n for (i = 0; i < length; i++) {\n axisBox = axes[i].contentBox();\n if (!box) {\n box = axisBox.clone();\n } else {\n box.wrap(axisBox);\n }\n }\n }\n return box || Box2D();\n }\n function equalsIgnoreCase(a, b) {\n if (a && b) {\n return a.toLowerCase() === b.toLowerCase();\n }\n return a === b;\n }\n function dateEquals(a, b) {\n if (a && b) {\n return toTime(a) === toTime(b);\n }\n return a === b;\n }\n function appendIfNotNull(array, element) {\n if (element !== null) {\n array.push(element);\n }\n }\n function lteDateIndex(date, sortedDates) {\n var low = 0, high = sortedDates.length - 1, i, currentDate;\n while (low <= high) {\n i = math.floor((low + high) / 2);\n currentDate = sortedDates[i];\n if (currentDate < date) {\n low = i + 1;\n continue;\n }\n if (currentDate > date) {\n high = i - 1;\n continue;\n }\n while (dateEquals(sortedDates[i - 1], date)) {\n i--;\n }\n return i;\n }\n if (sortedDates[i] <= date) {\n return i;\n } else {\n return i - 1;\n }\n }\n function isNumber(val) {\n return typeof val === 'number' && !isNaN(val);\n }\n function countNumbers(values) {\n var length = values.length, count = 0, i, num;\n for (i = 0; i < length; i++) {\n num = values[i];\n if (isNumber(num)) {\n count++;\n }\n }\n return count;\n }\n function areNumbers(values) {\n return countNumbers(values) === values.length;\n }\n function axisRanges(axes) {\n var i, axis, axisName, ranges = {};\n for (i = 0; i < axes.length; i++) {\n axis = axes[i];\n axisName = axis.options.name;\n if (axisName) {\n ranges[axisName] = axis.range();\n }\n }\n return ranges;\n }\n function evalOptions(options, context, state, dryRun) {\n var property, propValue, excluded, defaults, depth, needsEval = false;\n state = state || {};\n excluded = state.excluded = state.excluded || [];\n defaults = state.defaults = state.defaults || {};\n depth = state.depth = state.depth || 0;\n if (depth > MAX_EXPAND_DEPTH) {\n return;\n }\n for (property in options) {\n if (!inArray(property, state.excluded) && options.hasOwnProperty(property)) {\n propValue = options[property];\n if (isFn(propValue)) {\n needsEval = true;\n if (!dryRun) {\n options[property] = valueOrDefault(propValue(context), defaults[property]);\n }\n } else if (typeof propValue === OBJECT) {\n if (!dryRun) {\n state.defaults = defaults[property];\n }\n state.depth++;\n needsEval = evalOptions(propValue, context, state, dryRun) || needsEval;\n state.depth--;\n }\n }\n }\n return needsEval;\n }\n function groupSeries(series, data) {\n var result = [], nameTemplate, legacyTemplate = series.groupNameTemplate, groupIx, dataLength = data.length, seriesClone;\n if (dataLength === 0) {\n seriesClone = deepExtend({}, series);\n seriesClone.visibleInLegend = false;\n return [seriesClone];\n }\n if (defined(legacyTemplate)) {\n kendo.logToConsole('\\'groupNameTemplate\\' is obsolete and will be removed in future versions. ' + 'Specify the group name template as \\'series.name\\'');\n if (legacyTemplate) {\n nameTemplate = template(legacyTemplate);\n }\n } else {\n nameTemplate = template(series.name || '');\n if (nameTemplate._slotCount === 0) {\n nameTemplate = template(defined(series.name) ? '#= group.value #: #= series.name #' : '#= group.value #');\n }\n }\n for (groupIx = 0; groupIx < dataLength; groupIx++) {\n seriesClone = deepExtend({}, series);\n if (!isFn(seriesClone.color)) {\n seriesClone.color = undefined;\n }\n seriesClone._groupIx = groupIx;\n seriesClone._groupValue = data[groupIx].value;\n result.push(seriesClone);\n if (nameTemplate) {\n seriesClone.name = nameTemplate({\n series: seriesClone,\n group: data[groupIx]\n });\n }\n }\n return result;\n }\n function filterSeriesByType(series, types) {\n var i, currentSeries, result = [];\n types = [].concat(types);\n for (i = 0; i < series.length; i++) {\n currentSeries = series[i];\n if (inArray(currentSeries.type, types)) {\n result.push(currentSeries);\n }\n }\n return result;\n }\n function indexOf(item, arr) {\n if (item instanceof Date) {\n for (var i = 0, length = arr.length; i < length; i++) {\n if (dateEquals(arr[i], item)) {\n return i;\n }\n }\n return -1;\n } else {\n return $.inArray(item, arr);\n }\n }\n function sortDates(dates, comparer) {\n comparer = comparer || dateComparer;\n for (var i = 1, length = dates.length; i < length; i++) {\n if (comparer(dates[i], dates[i - 1]) < 0) {\n dates.sort(comparer);\n break;\n }\n }\n return dates;\n }\n function uniqueDates(srcDates, comparer) {\n var i, dates = sortDates(srcDates, comparer), length = dates.length, result = length > 0 ? [dates[0]] : [];\n comparer = comparer || dateComparer;\n for (i = 1; i < length; i++) {\n if (comparer(dates[i], last(result)) !== 0) {\n result.push(dates[i]);\n }\n }\n return result;\n }\n function isDateAxis(axisOptions, sampleCategory) {\n var type = axisOptions.type, dateCategory = sampleCategory instanceof Date;\n return !type && dateCategory || equalsIgnoreCase(type, DATE);\n }\n function transpose(rows) {\n var result = [], rowCount = rows.length, rowIx, row, colIx, colCount;\n for (rowIx = 0; rowIx < rowCount; rowIx++) {\n row = rows[rowIx];\n colCount = row.length;\n for (colIx = 0; colIx < colCount; colIx++) {\n result[colIx] = result[colIx] || [];\n result[colIx].push(row[colIx]);\n }\n }\n return result;\n }\n function ensureTree(fieldName, target) {\n if (fieldName.indexOf('.') > -1) {\n var parts = fieldName.split('.'), path = '', val;\n while (parts.length > 1) {\n path += parts.shift();\n val = kendo.getter(path)(target) || {};\n kendo.setter(path)(target, val);\n path += '.';\n }\n }\n }\n function seriesTotal(series) {\n var data = series.data;\n var sum = 0;\n for (var i = 0; i < data.length; i++) {\n var pointData = SeriesBinder.current.bindPoint(series, i);\n var value = pointData.valueFields.value;\n if (typeof value === STRING) {\n value = parseFloat(value);\n }\n if (isNumber(value) && pointData.fields.visible !== false) {\n sum += math.abs(value);\n }\n }\n return sum;\n }\n function hasGradientOverlay(options) {\n var overlay = options.overlay;\n return overlay && overlay.gradient && overlay.gradient != 'none';\n }\n function anyHasZIndex(elements) {\n for (var idx = 0; idx < elements.length; idx++) {\n if (defined(elements[idx].zIndex)) {\n return true;\n }\n }\n }\n function preventDefault() {\n this._defaultPrevented = true;\n }\n function pointByCategoryName(points, name) {\n if (points) {\n for (var idx = 0; idx < points.length; idx++) {\n if (points[idx].category === name) {\n return [points[idx]];\n }\n }\n }\n }\n function hasValue(value) {\n return defined(value) && value !== null;\n }\n function toChartAxisRanges(axisRanges) {\n var ranges = {};\n var axisRange;\n for (var idx = 0; idx < axisRanges.length; idx++) {\n axisRange = axisRanges[idx];\n if (axisRange.axis.options.name) {\n ranges[axisRange.axis.options.name] = {\n min: axisRange.range.min,\n max: axisRange.range.max\n };\n }\n }\n return ranges;\n }\n function acceptKey(e, mouseKey) {\n var key = (mouseKey || '').toLowerCase();\n var accept = key == 'none' && !(e.ctrlKey || e.shiftKey || e.altKey) || e[key + 'Key'];\n return accept;\n }\n function preloadFonts(options, callback) {\n var fonts = [];\n fetchFonts(options, fonts);\n kendo.util.loadFonts(fonts, callback);\n }\n function fetchFonts(options, fonts, state) {\n var MAX_DEPTH = 5;\n state = state || { depth: 0 };\n if (!options || state.depth > MAX_DEPTH || !document.fonts) {\n return;\n }\n Object.keys(options).forEach(function (key) {\n var value = options[key];\n if (key === 'dataSource' || key[0] === '$' || !value) {\n return;\n }\n if (key === 'font') {\n fonts.push(value);\n } else if (typeof value === 'object') {\n state.depth++;\n fetchFonts(value, fonts, state);\n state.depth--;\n }\n });\n }\n function clearMissingValues(originalOptions, options) {\n var fieldValue, originalValue, field, nullValue;\n for (field in options) {\n fieldValue = options[field];\n originalValue = originalOptions[field];\n if (defined(originalValue)) {\n nullValue = fieldValue === null;\n if (nullValue || !defined(fieldValue)) {\n delete originalOptions[field];\n if (nullValue) {\n delete options[field];\n }\n } else if (originalValue && isPlainObject(fieldValue)) {\n if (isPlainObject(fieldValue)) {\n clearMissingValues(originalValue, fieldValue);\n }\n }\n }\n }\n }\n function paneAnchor(axes, pane) {\n for (var i = 0; i < axes.length; i++) {\n var anchor = axes[i];\n if (anchor && anchor.pane === pane) {\n return anchor;\n }\n }\n }\n dataviz.ui.plugin(Chart);\n PlotAreaFactory.current.register(CategoricalPlotArea, [\n BAR,\n COLUMN,\n LINE,\n VERTICAL_LINE,\n AREA,\n VERTICAL_AREA,\n CANDLESTICK,\n OHLC,\n BULLET,\n VERTICAL_BULLET,\n BOX_PLOT,\n VERTICAL_BOX_PLOT,\n RANGE_COLUMN,\n RANGE_BAR,\n WATERFALL,\n HORIZONTAL_WATERFALL\n ]);\n PlotAreaFactory.current.register(XYPlotArea, [\n SCATTER,\n SCATTER_LINE,\n BUBBLE\n ]);\n PlotAreaFactory.current.register(PiePlotArea, [PIE]);\n PlotAreaFactory.current.register(DonutPlotArea, [DONUT]);\n SeriesBinder.current.register([\n BAR,\n COLUMN,\n LINE,\n VERTICAL_LINE,\n AREA,\n VERTICAL_AREA\n ], [VALUE], [\n CATEGORY,\n COLOR,\n NOTE_TEXT,\n ERROR_LOW_FIELD,\n ERROR_HIGH_FIELD\n ]);\n SeriesBinder.current.register([\n RANGE_COLUMN,\n RANGE_BAR\n ], [\n FROM,\n TO\n ], [\n CATEGORY,\n COLOR,\n NOTE_TEXT\n ]);\n SeriesBinder.current.register([\n WATERFALL,\n HORIZONTAL_WATERFALL\n ], [VALUE], [\n CATEGORY,\n COLOR,\n NOTE_TEXT,\n SUMMARY_FIELD\n ]);\n DefaultAggregates.current.register([\n BAR,\n COLUMN,\n LINE,\n VERTICAL_LINE,\n AREA,\n VERTICAL_AREA,\n WATERFALL,\n HORIZONTAL_WATERFALL\n ], {\n value: MAX,\n color: FIRST,\n noteText: FIRST,\n errorLow: MIN,\n errorHigh: MAX\n });\n DefaultAggregates.current.register([\n RANGE_COLUMN,\n RANGE_BAR\n ], {\n from: MIN,\n to: MAX,\n color: FIRST,\n noteText: FIRST\n });\n SeriesBinder.current.register([\n SCATTER,\n SCATTER_LINE,\n BUBBLE\n ], [\n X,\n Y\n ], [\n COLOR,\n NOTE_TEXT,\n X_ERROR_LOW_FIELD,\n X_ERROR_HIGH_FIELD,\n Y_ERROR_LOW_FIELD,\n Y_ERROR_HIGH_FIELD\n ]);\n SeriesBinder.current.register([BUBBLE], [\n X,\n Y,\n 'size'\n ], [\n COLOR,\n CATEGORY,\n NOTE_TEXT\n ]);\n SeriesBinder.current.register([\n CANDLESTICK,\n OHLC\n ], [\n 'open',\n 'high',\n 'low',\n 'close'\n ], [\n CATEGORY,\n COLOR,\n 'downColor',\n NOTE_TEXT\n ]);\n DefaultAggregates.current.register([\n CANDLESTICK,\n OHLC\n ], {\n open: MAX,\n high: MAX,\n low: MIN,\n close: MAX,\n color: FIRST,\n downColor: FIRST,\n noteText: FIRST\n });\n SeriesBinder.current.register([\n BOX_PLOT,\n VERTICAL_BOX_PLOT\n ], [\n 'lower',\n 'q1',\n 'median',\n 'q3',\n 'upper',\n 'mean',\n 'outliers'\n ], [\n CATEGORY,\n COLOR,\n NOTE_TEXT\n ]);\n DefaultAggregates.current.register([\n BOX_PLOT,\n VERTICAL_BOX_PLOT\n ], {\n lower: MAX,\n q1: MAX,\n median: MAX,\n q3: MAX,\n upper: MAX,\n mean: MAX,\n outliers: FIRST,\n color: FIRST,\n noteText: FIRST\n });\n SeriesBinder.current.register([\n BULLET,\n VERTICAL_BULLET\n ], [\n 'current',\n 'target'\n ], [\n CATEGORY,\n COLOR,\n 'visibleInLegend',\n NOTE_TEXT\n ]);\n DefaultAggregates.current.register([\n BULLET,\n VERTICAL_BULLET\n ], {\n current: MAX,\n target: MAX,\n color: FIRST,\n noteText: FIRST\n });\n SeriesBinder.current.register([\n PIE,\n DONUT\n ], [VALUE], [\n CATEGORY,\n COLOR,\n 'explode',\n 'visibleInLegend',\n 'visible'\n ]);\n deepExtend(dataviz, {\n EQUALLY_SPACED_SERIES: EQUALLY_SPACED_SERIES,\n Aggregates: Aggregates,\n AreaChart: AreaChart,\n AreaSegment: AreaSegment,\n AxisGroupRangeTracker: AxisGroupRangeTracker,\n Bar: Bar,\n BarChart: BarChart,\n BarLabel: BarLabel,\n BubbleChart: BubbleChart,\n Bullet: Bullet,\n BulletChart: BulletChart,\n CandlestickChart: CandlestickChart,\n Candlestick: Candlestick,\n CategoricalChart: CategoricalChart,\n CategoricalErrorBar: CategoricalErrorBar,\n CategoricalPlotArea: CategoricalPlotArea,\n CategoryAxis: CategoryAxis,\n ChartAxis: ChartAxis,\n ChartContainer: ChartContainer,\n ChartPane: ChartPane,\n ChartPlotArea: ChartPlotArea,\n ChartSeries: ChartSeries,\n ClipAnimation: ClipAnimation,\n ClusterLayout: ClusterLayout,\n Crosshair: Crosshair,\n CrosshairTooltip: CrosshairTooltip,\n DateCategoryAxis: DateCategoryAxis,\n DateValueAxis: DateValueAxis,\n DefaultAggregates: DefaultAggregates,\n DonutChart: DonutChart,\n DonutPlotArea: DonutPlotArea,\n DonutSegment: DonutSegment,\n ErrorBarBase: ErrorBarBase,\n ErrorRangeCalculator: ErrorRangeCalculator,\n Highlight: Highlight,\n SharedTooltip: SharedTooltip,\n Legend: Legend,\n LegendItem: LegendItem,\n LegendLayout: LegendLayout,\n LineChart: LineChart,\n LinePoint: LinePoint,\n LineSegment: LineSegment,\n Pane: Pane,\n PieAnimation: PieAnimation,\n PieChart: PieChart,\n PieChartMixin: PieChartMixin,\n PiePlotArea: PiePlotArea,\n PieSegment: PieSegment,\n PlotAreaBase: PlotAreaBase,\n PlotAreaEventsMixin: PlotAreaEventsMixin,\n PlotAreaFactory: PlotAreaFactory,\n PointEventsMixin: PointEventsMixin,\n RangeBar: RangeBar,\n RangeBarChart: RangeBarChart,\n ScatterChart: ScatterChart,\n ScatterErrorBar: ScatterErrorBar,\n ScatterLineChart: ScatterLineChart,\n Selection: Selection,\n SeriesAggregator: SeriesAggregator,\n SeriesBinder: SeriesBinder,\n ShapeElement: ShapeElement,\n SplineSegment: SplineSegment,\n SplineAreaSegment: SplineAreaSegment,\n StackWrap: StackWrap,\n Tooltip: Tooltip,\n OHLCChart: OHLCChart,\n OHLCPoint: OHLCPoint,\n WaterfallChart: WaterfallChart,\n WaterfallSegment: WaterfallSegment,\n XYPlotArea: XYPlotArea,\n MousewheelZoom: MousewheelZoom,\n ZoomSelection: ZoomSelection,\n Pannable: Pannable,\n addDuration: addDuration,\n areNumbers: areNumbers,\n axisGroupBox: axisGroupBox,\n categoriesCount: categoriesCount,\n ceilDate: ceilDate,\n countNumbers: countNumbers,\n duration: duration,\n ensureTree: ensureTree,\n indexOf: indexOf,\n isNumber: isNumber,\n floorDate: floorDate,\n filterSeriesByType: filterSeriesByType,\n hasValue: hasValue,\n lteDateIndex: lteDateIndex,\n evalOptions: evalOptions,\n seriesTotal: seriesTotal,\n singleItemOrArray: singleItemOrArray,\n sortDates: sortDates,\n startOfWeek: startOfWeek,\n transpose: transpose,\n toDate: toDate,\n toTime: toTime,\n uniqueDates: uniqueDates\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/"}