{"version":3,"sources":["kendo.dataviz.chart.js"],"names":["f","define","$","objectKey","object","key","parts","push","sort","join","hashKey","str","i","hash","length","charCodeAt","zeroSize","width","height","baseline","measureText","text","style","measureBox","TextMetrics","current","measure","LRUCache","DEFAULT_OPTIONS","defaultMeasureBox","window","kendo","util","Class","extend","init","size","this","_size","_length","_map","put","value","map","entry","_head","_tail","newer","older","get","baselineMarkerSize","document","createElement","cssText","options","_cache","box","styleKey","cacheKey","cachedResult","baselineMarker","_baselineMarker","cloneNode","textContent","appendChild","body","String","offsetWidth","offsetHeight","offsetTop","parentNode","removeChild","marker","deepExtend","jQuery","amd","a1","a2","a3","countNumbers","values","num","count","isNumber","getField","field","row","getter","evalOptions","context","state","dryRun","defaults","depth","needsEval","property","propValue","excluded","MAX_EXPAND_DEPTH","inArray","hasOwnProperty","isFunction","valueOrDefault","isObject","categoriesCount","series","seriesCount","categories","Math","max","data","anyHasZIndex","elements","idx","defined","zIndex","hasGradientOverlay","overlay","gradient","areNumbers","hasValue","wrapData","seriesItem","isArray","paneID","ID","axisGroupBox","axes","axisBox","contentBox","wrap","clone","Box","paneAnchor","pane","anchor","isTransparent","color","setValue","fieldName","target","parentObj","indexOf","split","shift","filterSeriesByType","types","currentSeries","result","seriesTypes","concat","type","equalsIgnoreCase","a","b","toLowerCase","isDateAxis","axisOptions","sampleCategory","dateCategory","Date","DATE","appendIfNotNull","array","element","singleItemOrArray","getDateField","intlService","parseDate","groupSeries","axis","axisIx","grep","s","categoryAxis","preventDefault","_defaultPrevented","acceptKey","e","mouseKey","event","accept","ctrlKey","shiftKey","altKey","toChartAxisRanges","axisRanges","axisRange","ranges","name","min","range","createDiv","className","closestHandle","hasClasses","stopPropagation","tooltipAlignment","angle","horizontal","vertical","radians","dataviz","rad","sine","round","sin","DEFAULT_PRECISION","cosine","cos","abs","RAD_60","CENTER","RIGHT","LEFT","RAD_30","BOTTOM","TOP","segmentVisible","fields","index","pointVisibility","visible","bindSegments","pointData","points","sum","SeriesBinder","bindPoint","valueFields","isString","parseFloat","total","intersection","b1","b2","ua","uat","x","y","ub","Point","xComparer","resolveAxisAliases","alias","aliases","AXIS_NAMES","pointByCategoryName","category","applyAxisDefaults","themeOptions","mapAxisOptions","axisColor","axisDefaults","themeAxisDefaults","axisName","line","labels","title","applySeriesDefaults","seriesType","baseOptions","seriesLength","seriesDefaults","commonDefaults","themeSeriesDefaults","commonThemeDefaults","cleanupNestedSeriesDefaults","tooltip","_defaults","bar","column","rangeColumn","verticalLine","pie","donut","area","verticalArea","scatter","scatterLine","bubble","candlestick","ohlc","boxPlot","bullet","verticalBullet","polarArea","polarLine","radarArea","radarLine","waterfall","sortDates","dates","comparer","dateComparer","uniqueDates","srcDates","last","transpose","rows","rowIx","colCount","colIx","rowCount","clearMissingValues","originalOptions","fieldValue","originalValue","nullValue","datavizConstants","MAX_VALUE","MIN_VALUE","VALUE","WHITE","CIRCLE","Y","X","BLACK","ARC","ChartElement","alignPathToPixel","setDefaultOptions","eventElement","getTemplate","TextBox","ShapeElement","getSpacing","limitValue","append","styleValue","CategoryAxis","BoxElement","DateCategoryAxis","elementStyles","bindEvents","services","unbindEvents","support","drawing","Path","Animation","AnimationFactory","Group","Color","geometry","GeometryPoint","transform","ChartAxis","ChartPlotArea","Aggregates","STD_ERR","STD_DEV","percentRegex","standardDeviationRegex","ErrorRangeCalculator","browser","INITIAL_ANIMATION_DURATION","FADEIN","GLASS","BORDER_BRIGHTNESS","TOOLTIP_OFFSET","START_SCALE","ERROR_LOW_FIELD","ERROR_HIGH_FIELD","X_ERROR_LOW_FIELD","X_ERROR_HIGH_FIELD","Y_ERROR_LOW_FIELD","Y_ERROR_HIGH_FIELD","LINE_MARKER_SIZE","ZERO","INTERPOLATE","GAP","SMOOTH","STEP","AREA","BAR","BOX_PLOT","BUBBLE","BULLET","CANDLESTICK","COLUMN","DONUT","FUNNEL","HORIZONTAL_WATERFALL","LINE","OHLC","PIE","POLAR_AREA","POLAR_LINE","POLAR_SCATTER","RADAR_AREA","RADAR_COLUMN","RADAR_LINE","RANGE_BAR","RANGE_COLUMN","SCATTER","SCATTER_LINE","VERTICAL_AREA","VERTICAL_BOX_PLOT","VERTICAL_BULLET","VERTICAL_LINE","WATERFALL","EQUALLY_SPACED_SERIES","LEGEND_ITEM_CLICK","LEGEND_ITEM_HOVER","SERIES_CLICK","SERIES_HOVER","PLOT_AREA_CLICK","PLOT_AREA_HOVER","DRAG","DRAG_END","DRAG_START","ZOOM_START","ZOOM","ZOOM_END","SELECT_START","SELECT","SELECT_END","RENDER","SHOW_TOOLTIP","HIDE_TOOLTIP","LOGARITHMIC","CATEGORY","INSIDE_END","INSIDE_BASE","OUTSIDE_END","MOUSEWHEEL","MOUSEWHEEL_DELAY","constants","DEFAULT_ERROR_BAR_WIDTH","ErrorBarBase","CategoricalErrorBar","CategoricalChart","PointEventsMixin","NoteMixin","ABOVE","BELOW","LinePoint","LineSegment","StepLineSegment","SplineSegment","LineChartMixin","ClipAnimation","ClipAnimationMixin","LineChart","AreaSegmentMixin","AreaSegment","StepAreaSegment","SplineAreaSegment","AreaChart","AxisGroupRangeTracker","BarLabel","BAR_ALIGN_MIN_WIDTH","Bar","ClusterLayout","StackWrap","BarChart","Candlestick","CandlestickChart","BoxPlot","VerticalBoxPlot","BoxPlotChart","ScatterErrorBar","ScatterChart","Bubble","BubbleChart","Target","Bullet","BulletChart","BaseTooltip","CrosshairTooltip","Crosshair","ChartContainer","Pane","PlotAreaBase","PlotAreaEventsMixin","SeriesAggregator","DefaultAggregates","RangeBar","RangeBarChart","OHLCPoint","OHLCChart","WaterfallSegment","WaterfallChart","CategoricalPlotArea","Highlight","Pannable","ZoomSelection","MousewheelZoom","LegendLayout","LegendItem","HORIZONTAL","POINTER","CUSTOM","Legend","PlotAreaFactory","ZOOM_ACCELERATION","SELECTOR_HEIGHT_ADJUST","Selection","Tooltip","SharedTooltip","BarChartAnimation","BubbleAnimation","FadeInAnimation","PieAnimation","ScatterLineChart","XYPlotArea","PieSegment","PieChartMixin","PIE_SECTOR_ANIM_DELAY","PieChart","PiePlotArea","DonutSegment","DONUT_SECTOR_ANIM_DELAY","DonutChart","DonutPlotArea","DEFAULT_PADDING","PolarPlotAreaBase","PolarScatterChart","PolarLineChart","SplinePolarAreaSegment","PolarAreaSegment","PolarAreaChart","PolarPlotArea","RadarLineChart","SplineRadarAreaSegment","RadarAreaSegment","RadarAreaChart","RadarSegment","RadarClusterLayout","RadarStackLayout","RadarBarChart","RadarPlotArea","FunnelSegment","FunnelChart","FunnelPlotArea","COLOR","FIRST","FROM","MAX","MIN","NOTE_TEXT","SUMMARY_FIELD","TO","MOUSEMOVE","CONTEXTMENU","MOUSEMOVE_DELAY","Chart","_axis","point","getCategory","getValue","slot","from","to","limit","valueRange","plotArea","_plotArea","visual","backgroundVisual","_bgVisual","sumOrNull","avg","first","_valueFields","_otherFields","_nullValue","_undefinedValue","register","otherFields","this$1","_makeValue","undefined","canonicalFields","pointIx","item","fieldData","srcValueFields","srcPointFields","Array","slice","_bindFromArray","sourceFields","_bindFromObject","initialValue","srcFields","srcFieldName","sourceFieldName","RegExp","errorValue","initGlobalRanges","average","deviation","multiple","errorRange","standardError","deviationMatch","exec","valueGetter","createValueGetter","getAverage","getStandardDeviation","low","high","globalRange","getStandardError","binder","OBJECT","getErrorRange","pointValue","percentValue","Error","sqrt","isSample","squareDifferenceSum","pow","msie","isVertical","chart","fn","call","reflow","targetBox","linePoints","endCaps","getAxis","valueBox","getSlot","centerBox","center","capsWidth","getCapsWidth","capValue","capStart","capEnd","y1","y2","x1","x2","boxSize","floor","createVisual","rect","toRect","sender","getSender","createDefaultVisual","defaultVisual","ref","lineOptions","stroke","dashType","moveTo","lineTo","animation","delay","seriesValueAxis","chartService","seriesCategoryAxis","valueAxisRanges","categoryPoints","seriesPoints","seriesOptions","_evalSeries","render","traverseDataPoints","addValue","bind","pointOptions","seriesIx","pointType","prototype","invertAxes","plotValue","categoryIx","otherValues","categorySum","other","stack","otherStack","isStacked100","group","plotRange","startValue","positive","prevValue","isStackedBar","otherValue","valueAxis","axisCrossingValue","isStacked","STRING","categoryAxisCrossingValue","stackLimits","stackName","pIx","isFinite","updateStackRange","limits","errorTotals","chartSeries","limitsCache","negative","sparseArrayLimits","addErrorBar","errorBars","lowValue","highValue","seriesErrorRanges","addPointErrorBar","stackedErrorRange","errorBar","updateRange","createPoint","owner","noteText","dataItem","evalPointOptions","doEval","namedValueAxes","categorySlots","chartPoints","valueSlot","pointSlot","categorySlot","clip","aboveAxis","stackValue","percentage","reflowPoint","reflowCategories","reverse","crossingValues","axisCrossingValues","axisIndex","slotX","slotY","callback","seriesIx$1","currentCategory","seriesIx$2","_outOfRangeCallback","_bindPoint","outOfRangePoint","bindCache","_bindCache","formatPointValue","format","auto","click","trigger","eventArgs","hover","runningTotal","originalEvent","createNote","notes","label","note","Note","tooltipTracking","labelTemplate","labelText","markers","_rendered","createMarker","formatValue","align","vAlign","margin","left","right","markerBorder","background","border","brightness","toHex","rotation","opacity","markerBox","_childBox","childBox","noteTargetBox","reflowLabel","position","alignTo","createHighlight","highlight","defaultColor","shadow","getElement","highlightVisual","highlightVisualArgs","halfSize","paddingBox","Rect","tooltipAnchor","horizontalAlign","verticalAlign","clipBox","showTooltip","overlaps","overlapsBox","padding","visualPoints","fromPoints","closed","close","aliasFor","coords","parent","getNearestPoint","calculateStepPoints","prevPoint","prevMarkerBoxCenter","markerBoxCenter","isInterpolate","seriesMissingValues","dir","revDir","justified","curveProcessor","segments","curve","CurveProcessor","process","apply","renderSegments","lastSegment","sortedPoints","pointCount","_segments","sortPoints","createSegment","_addSegment","children","unshift","segment","missingValues","assumeZero","nearestPoint","pointBox","pointDistance","allPoints","nearestPointDistance","distanceTo","setup","_setEnd","step","pos","interpolateValue","topRight","bottomRight","suspend","setX","resume","duration","createAnimation","clipPath","root","getRoot","transitions","fromRect","_setChildrenAnimation","animationPoints","firstPoint","lastPoint","valueAxisLineBox","lineBox","categoryAxisLineBox","stackPoints","_linePoints","end","createArea","createLine","lineCap","fill","prevSegment","strokeSegments","_strokeSegments","createFill","createStroke","prevStrokeSegments","prevAnchor","stackSegments","firstAnchor","fillSegments","Segment","controlOut","controlIn","closeFill","fillPath","_gapStackPoints","stackPoint","_stackPoints","endIdx","pointOffset","currentSeriesIx","gapStackPoint","startIdx","_outOfRangeMinPoint","_previousSegmentPoint","_createGapStackPoint","segmentIx","seriesIdx","update","chartAxisRanges","chartRange","reset","query","content","textBox","noclip","textOptions","labelBox","top","bottom","alignToClipBox","start","parentBox","createLabel","customVisual","rectVisual","createRect","path","strokeOpacity","getBorderColor","lineJoin","createGradientOverlay","baseColor","_brightness","borderColor","gap","spacing","slots","slotSize","currentChild","positionAxis","childrenCount","snapTo","clusterType","stackType","cluster","stackWrap","labelOptions","negativeColor","getStackWrap","stackGroup","wraps","_stackGroup","zeroSlot","stackAxis","childrenLength","_setAnimationOptions","pointVisual","origin","mid","ocSlot","open","lhSlot","realBody","lines","reflowNote","_mainVisual","mainVisual","createOverlay","createBody","createLines","container","set","drawLines","lineStyle","normalColor","valueParts","splitValue","downColor","whiskerSlot","boxSlot","medianSlot","meanSlot","q1","q3","reflowBoxSlot","lower","upper","reflowWhiskerSlot","median","mean","meanPoints","calcMeanPoints","whiskerPoints","calcWhiskerPoints","medianPoints","calcMedianPoints","renderOutliers","outlierValue","markersBorder","shape","outliers","outerFence","extremes","reflowOutliers","move","whiskers","CROSS","filterOutliers","items","seriesAxes","_initFields","xAxisRanges","yAxisRanges","valueErrorField","lowField","highField","createMissingValue","intl","xAxisName","xAxis","yAxisName","yAxis","xAxisRange","yAxisRange","namedXAxes","axisX","namedYAxes","axisY","currentSeriesPoints","ref$1","radius","highlightGroup","Circle","createGradient","stops","offset","_maxSize","negativeValues","updateBubblesSize","pointsCount","animationOptions","minSize","maxSize","minR","maxR","minArea","maxArea","areaRange","areaRatio","baseZIndex","PI","targetValueSlot","targetSlotX","targetSlotY","targetSlot","bodyVisual","create","bulletOptions","isNaN","getStyle","pointColor","backgroundColor","font","borderWidth","paddingTop","paddingBottom","paddingLeft","paddingRight","show","tooltipOptions","percBrightness","notify","hide","destroy","crosshair","formatService","initAxisName","showAt","stickyMode","formattedValue","dateFormats","baseUnit","getAnchor","ref_options","bbox","bottomLeft","translate","topLeft","moveLine","lineEnd","getBox","dim","lineStart","pointCategoryIndex","axisLineBox","currentAxis","shouldClip","_clipBox","chartsBox","clipRect","unclipLabels","stackRoot","j","charts","isStackRoot","id","createTitle","chartContainer","titleOptions","Title","buildTitle","appendAxis","appendChart","empty","i$1","removeAxis","removeChart","pop","visualStyle","renderComplete","createGridLines","clipRoot","gridLines","altAxis","allAxes","vGridLines","hGridLines","refresh","clear","renderVisual","axisValueField","length$1","idx$1","axis$1","lineBox$1","shrinkToFit","initFields","initSeries","legend","crosshairs","createPanes","createCrosshairs","setTitle","currentPane","panes","paneOptions","panesLength","paneIndex","currentCrosshair","removeCrosshairs","splice","hideCrosshairs","findPane","matchingPane","findPointPane","containsPoint","axisToRemove","filteredAxes","chartToRemove","filteredCharts","addToLegend","seriesVisible","itemLabelOptions","markerColor","inactiveItems","inactiveItemsLabels","visibleInLegend","active","groupAxes","paneIx","paneAxes","xAxes","yAxes","any","groupSeriesByPane","seriesByPane","seriesPaneName","filterVisibleSeries","unpad","reflowPanes","reflowAxes","reflowCharts","redraw","panesArray","crossingAxes","valuesToAdd","defaultValue","alignAxisTo","targetAxis","crossingValue","targetCrossingValue","slotEdge","targetEdge","alignAxes","paneId","anchorCrossings","pane$1","paneId$1","visible$1","anchor$1","anchorCrossings$1","xAnchor","yAnchor","xAnchorCrossings","yAnchorCrossings","leftAnchors","rightAnchors","topAnchors","bottomAnchors","_overlap","_mirrored","mirror","COORD_PRECISION","shrinkAxisWidth","overflowX","shrink","shrinkAxisHeight","shrinked","overflowY","fitAxes","paneBox","offsetY","currentAxis$1","offsetX","reflowPaneAxes","autoRotateAxisLabels","groupedAxes","rotated","autoRotateLabels","chartPane","percents","currentPane$1","i$2","currentPane$2","remainingHeight","remainingPanes","autoHeightPanes","parseInt","backgroundBox","axisA","axisB","axesCount","chartsBoxes","boxes","addBackgroundPaths","multipath","paths","backgroundContainsPoint","bg","MultiPath","appendVisual","pointsByCategoryIndex","categoryIndex","pointsBySeriesIndex","seriesIndex","filterPoints","pointsBySeriesName","findPoint","paneByPoint","_dispatchEvent","defaultAggregates","fieldAggregate","seriesFields","_seriesFields","rootAggregate","aggregate","_series","_binder","canonicalName","aggregatePoints","srcPoints","srcValues","_bindPoints","firstDataItem","dataItems","_bindField","aggregates","fromOptions","toOptions","labelFrom","_createLabel","labelTo","plotLimits","oPoints","cPoints","lhPoints","oSlot","cSlot","fromBox","toBox","createSegments","summary","totalCategories","namedCategoryAxes","valueAxisRangeTracker","stack100","createCategoryAxes","aggregateCategories","createCategoryAxesLabels","createCharts","createValueAxes","paneSeries","visibleSeries","groups","groupIx","groupSeriesByCategoryAxis","createChartGroup","createAreaChart","createBarChart","createRangeBarChart","createBulletChart","createCandlestickChart","createBoxPlotChart","createOHLCChart","createWaterfallChart","createLineChart","axisPane","dateAxis","srcSeries","processedSeries","categoryField","aggregateSeries","filterSeries","minCategory","srcCategories","totalRangeIndices","outOfRangePoints","ceil","_outOfRangeMaxPoint","_seriesMax","aggregatorSeries","srcData","outOfRangeMinIdx","outOfRangeMaxIdx","getFn","outOfRangeMinCategory","outOfRangeMaxCategory","aggregator","categoriesToAdd","defaultPaneName","paneName","stackableChartOptions","firstSeries","axisSeries","categoryAxes","unique","barChart","rangeColumnChart","bulletChart","lineChart","areaChart","waterfallChart","axisRequiresRounding","categoryAxisName","categoryAxisIndex","seriesAxis","centeredSeries","aggregatedAxis","createLabels","primaryAxis","definitions","isJustified","defaultAxisRange","axisType","tracker","defaultRange","roundToMajorUnit","LogarithmicAxis","NumericAxis","eventType","_eventCoordinates","pointPane","updateAxisOptions","axesOptions","_points","arrayPoints","toggleHighlight","hasHighlight","togglePointHighlight","toggleHandler","toggle","isHighlighted","_active","_panAxes","pan","delta","lock","updatedAxes","limitRange","marqueeColor","marquee","_marquee","removeElement","setStyles","styles","zoomPane","_zoomPane","_elementOffset","_zoomPaneClipBox","pageX","pageY","chartElement","elementOffset","_selectionPosition","elementOffset$$1","selectionPosition","_updateAxisRanges","zoom","pointsRange","startLocation","location","updateRanges","zoomRange","legendItem","Layout","lineSpacing","orientation","clippedBBox","rectToBox","addVisual","createContainer","FloatElement","markerOptions","cursor","eventSink","_itemOverlay","widget","args","_legendItemHover","pointIndex","leave","_unsetActivePoint","renderChildren","createItems","userAlign","getService","innerElement","hasItems","legendBox","containerCustomReflow","containerReflow","alignTarget","containerBox","_registry","registry","match","observer","_dateAxis","initOptions","createElements","_index","selection","leftHandle","rightHandle","selectionStyles","leftHandleHeight","rightHandleHeight","wrapper","direction","leftMask","rightMask","borderLeftWidth","borderRightWidth","_mousewheelHandler","mousewheel","_mousewheel","obj","_domEvents","DomEventsBuilder","_start","_move","_end","tap","_tap","press","_press","gesturestart","_gesturestart","gesturechange","_gesturechange","gestureend","_gestureend","clearTimeout","_mwTimeout","_state","_rangeEventArgs","_value","moveTarget","handle","addClass","oldRange","span","scale","removeClass","rightClick","which","mousewheelDelta","expand","setTimeout","p0","_toModelCoordinates","touches","p1","_slot","rightMaskWidth","distance","edge","leftMaskWidth","fromValue","toValue","zDir","_current","tooltipPoints","_slotAnchor","_defaultAnchor","shared","categoryText","categoryFormat","centerPoint","slotCenter","fromScale","abort","scaleX","scaleY","easing","fadeTo","missingValue","xAxisRangeTracker","yAxisRangeTracker","filteredSeries","createScatterChart","createScatterLineChart","createBubbleChart","createAxes","xAxisOptions","yAxisOptions","createXYAxis","seriesAxisName","firstPointValue","inferredDate","namedAxes","isLog","typeSamples","DateValueAxis","axisPane$1","xAxesOptions","yAxesOptions","currentValue","xValues","yValues","sector","brightnessValue","themeLabels","theme","animationDelay","labelHeight","labelWidth","lp","labelsOptions","labelsDistance","middle","startAngle","innerRadius","endAngle","createSegmentVisual","borderOptions","fallbackFill","userSpace","singleSegment","ShapeBuilder","createRing","midAndle","midPoint","DEFAULT_FONT","createLegendItem","pointVisible","legendOptions","legendItems","colorsCount","anglePerValue","constantAngle","currentAngle","explode","seriesColors","Ring","evalSegmentOptions","segmentOptions","space","minWidth","halfMinWidth","defaultPadding","newBox","newBoxCenter","boxCenter","leftSideLabels","rightSideLabels","seriesConfig","seriesConfigs","setRadius","labelComparator","leftLabelsReflow","rightLabelsReflow","distances","distanceBetweenLabels","distributeLabels","secondBox","lr","firstBox","remaining","_takeDistance","reflowLabels","amount","available","boxX","labelsCount","labelDistance","boxY","hAlignLabel","connectorsColor","connectorLine","sr","crossing","connectors","_connectorLines","pointInCircle","reverseValue","second","originalX","sector_center","cx","cy","t","createPieChart","pieChart","totalSize","seriesWithoutSize","holeSize","currentSize","currentSeries$1","createDonutChart","donutChart","createPolarAxis","createValueAxis","polarAxis","axisDefaultRange","valueAxisOptions","RadarLogarithmicAxis","RadarNumericAxis","valueAxisBox","heightDiff","valueRadius","onCircle","_polarAxisCenter","_hasMissingValuesGap","PolarAxis","majorGridLines","minorGridLines","scatterChart","xValue","yValue","slotSector","slotAngle","childSector","RadarCategoryAxis","_hasBarCharts","_isStacked100","chartOptions","chartBox","createPath","labelPadding","dynamicSlopeReflow","totalHeight","lastUpperSide","previousOffset","previousHeight","nextSegment","nextPercentage","firstSegment","maxSegment","dynamicHeight","segmentSpacing","constantSlopeReflow","decreasingWidth","neckRatio","topMostWidth","finalNarrow","dynamicSlope","createFunnelChart","funnelChart","errorLow","errorHigh","userOptions","observers","addObserver","ChartService","_initElement","_originalOptions","_theme","_initTheme","_initSurface","_initHandlers","bindCategories","FontLoader","preloadFonts","_destroyed","_redraw","_attachEvents","_setElementClass","firstChild","seriesCopies","applyDefaults","applySeriesColors","getSize","resize","force","_resize","_noTransitionsRedraw","_model","findAxisByName","filter","seriesName","categoryName","togglePointsHighlight","_highlight","_sharedTooltip","_tooltip","hideTooltip","surface","_surfaceWrap","chartArea","elementSize","renderAs","Surface","model","_getModel","_destroyView","traverse","draw","play","_createTooltip","_setupSelection","_createPannable","_createZoomSelection","_createMousewheelZoom","_navState","_cancelDomEvents","exportVisual","originalChartArea","pannable","_pannable","zoomable","_zoomSelection","_mousewheelZoom","_createSharedTooltip","seriesColor","colors","_createPlotArea","RootElement","_modelOptions","DEFAULT_WIDTH","DEFAULT_HEIGHT","skipSeries","_hasSelection","_selections","selections","select","addDuration","weekStartDay","_selectStart","_select","_selectEnd","_clickHandler","_click","_surfaceMouseenterHandler","_mouseover","_surfaceMouseleaveHandler","_mouseout","_mousemove","throttle","removeObserver","requiresHandlers","eventNames","isDefaultPrevented","_toDocumentCoordinates","obj$1","_shouldAttachMouseMove","domEvents","cancel","_stopDragEvent","_gestureDistance","suspendTracking","_zooming","resumeTracking","previousGestureDistance","scaleDelta","mousewheelZoom","_drawingChartElement","_startNavigation","_suppressHover","ranges$1","translateRange","_endNavigation","prevented","totalDelta","scaleRange","chartEvent","_getChartElement","eventTarget","closest","coordinates","eventCoordinates","_elementPadding","_padding","clientX","clientY","drawingElement","_activePoint","_propagateClick","_startHover","handlingTap","_mouseMoveTrackHandler","_mouseMoveTracking","seriesPoint","_trackCrosshairs","_trackSharedTooltip","pointArgs","hoverArgs","_tooltipCategoryIx","hideElements","_deferRedraw","_clearRedrawTimeout","_redrawTimeout","clearInterval","autoBind","bindCategoryAxisFromSeries","onAxis","dataLength","dataIx","dataRow","uniqueCategories","_isBindable","transitionsState","updateMouseMoveHandler","applyOptions","setOptions","createProxyMember","instance","_instance","arguments","nameTemplate","seriesClone","legacyTemplate","groupNameTemplate","logToConsole","template","_slotCount","_groupIx","_groupValue","ChartInstanceObserver","proxyMembers","SeriesVisibilityState","geom","ChartPane","ChartSeries","NS","outerWidth","_outerWidth","outerHeight","_outerHeight","KendoChart","Widget","ui","DataSource","InstanceObserver","proxy","MOUSELEAVE_NS","AXIS_LABEL_CLICK","NOTE_CLICK","NOTE_HOVER","CHANGE","DATABOUND","LEAVE","Observable","TOOLTIP_ANIMATION_DURATION","TOOLTIP_SHOW_DELAY","TOOLTIP_INVERSE","SHARED_TOOLTIP_CLASS","events","UserEvents","global","multiTouch","fastTap","handlerMap","legendItemClick","dataSource","_seriesVisibility","_initDataSource","_bindSeries","_bindCategories","dimensions","_setEvents","_getThemeOptions","_sourceSeries","setDataSource","_hasDataSource","_onDataChanged","unbind","_dataChangeHandler","_hasData","fetch","off","_destroyCrosshairTooltips","findPaneByName","findPaneByIndex","findSeries","findSeriesByName","_createSeries","findSeriesByIndex","_seriesOptions","on","_mouseleave","relatedTarget","themes","themeName","autoTheme","_initChart","_createChart","_onInit","_initTooltip","tooltips","_crosshairTooltips","_getCrosshairTooltip","_showTooltip","_hideTooltip","_onRender","_copyMembers","names","_events","_tooltipleave","_onLegendItemClick","_legendItemClick","save","_bindData","groupedSeries","view","grouped","seriesVisibility","applyByGroup","applyByIndex","seriesData","categoriesData","_bindCategoryAxis","ExportMixin","PDFMixin","plugin","action","mobileScrollerSelector","useWithBlock","paramName","attr","_mobileScroller","_clearShowTimeout","remove","sharedTemplate","_offset","css","_ensureElement","stop","animate","showTimeout","_measure","zoomLevel","viewport","scrollTop","pageYOffset","documentElement","scrollLeft","pageXOffset","movable","_fit","toggleClass","_sharedContent","_pointContent","html","_hideElement","nameColumn","colorMarker","colspan","appendTo","contains","fadeOut","always","tooltipTemplate","xLow","xHigh","yLow","yHigh","viewPortSize","output","_chart","_pane","chartsVisual","_options","_filterPoints","_clearFields","toggleVisibility","hasFilter","_filterData"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;CAwBC,SAAUA,EAAGC,QACVA,OAAO,qBAAsB,cAAeD,IAC9C,YACG,SAAUE,GAmDP,QAASC,GAAUC,GAAnB,GAEaC,GADLC,IACJ,KAASD,IAAOD,GACZE,EAAMC,KAAKF,EAAMD,EAAOC,GAE5B,OAAOC,GAAME,OAAOC,KAAK,IAE7B,QAASC,GAAQC,GAAjB,GAEaC,GADLC,EAAO,UACX,KAASD,EAAI,EAAGA,EAAID,EAAIG,SAAUF,EAC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GACA9D,GACAiK,GACAC,GACAC,GACA9H,GACAjC,GACAgK,GACAC,GACA1I,GACA2I,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GAuBAC,GAkBAC,GA8EA1H,GA+GA2H,GACAC,GACAC,GACAC,GACAC,GA2GAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GAaAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GA0EAC,GACAC,GAqGAC,GAMA7U,GA2CA8U,GA6bAC,GAuBAC,GAgBAC,GACAC,GACAC,GAiQAC,GA6CAC,GAuDAC,GAuBAC,GAiEAC,GA4BAC,GAuBAC,GA8EAC,GAqEAC,GAOAC,GAOAC,GA2FAC,GAuGAC,GAwBAC,GAoGAC,GACAC,GAiOAC,GA6BAC,GAsBAC,GA4IAC,GAiMAC,GA2GAC,GAkOAC,GA2EAC,GA0FAC,GAUAC,GAiRAC,GA+DAC,GA2GAC,GAEAC,GAiHAC,GAsGAC,GAiDAC,GAmFAC,GAmGAC,GA8DAC,GA4IA5V,GAWA6V,GA2sBAC,GAQAC,GA2GAC,GAeAC,GAwDAC,GA4CAC,GAmDAC,GAKAC,GAuDAC,GA8HAC,GA2nBAC,GAgFAC,GAkEAC,GAoKAC,GAwCAC,GAqCAC,GAoGAC,GACAC,GACAC,GACAC,GA2LAC,GA0BAC,GACAC,G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min.js","sourcesContent":["/*!\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n*/\n(function (f, define) {\n define('util/text-metrics', ['kendo.core'], f);\n}(function () {\n (function ($) {\n window.kendo.util = window.kendo.util || {};\n var LRUCache = kendo.Class.extend({\n init: function (size) {\n this._size = size;\n this._length = 0;\n this._map = {};\n },\n put: function (key, value) {\n var map = this._map;\n var entry = {\n key: key,\n value: value\n };\n map[key] = entry;\n if (!this._head) {\n this._head = this._tail = entry;\n } else {\n this._tail.newer = entry;\n entry.older = this._tail;\n this._tail = entry;\n }\n if (this._length >= this._size) {\n map[this._head.key] = null;\n this._head = this._head.newer;\n this._head.older = null;\n } else {\n this._length++;\n }\n },\n get: function (key) {\n var entry = this._map[key];\n if (entry) {\n if (entry === this._head && entry !== this._tail) {\n this._head = entry.newer;\n this._head.older = null;\n }\n if (entry !== this._tail) {\n if (entry.older) {\n entry.older.newer = entry.newer;\n entry.newer.older = entry.older;\n }\n entry.older = this._tail;\n entry.newer = null;\n this._tail.newer = entry;\n this._tail = entry;\n }\n return entry.value;\n }\n }\n });\n function objectKey(object) {\n var parts = [];\n for (var key in object) {\n parts.push(key + object[key]);\n }\n return parts.sort().join('');\n }\n function hashKey(str) {\n var hash = 2166136261;\n for (var i = 0; i < str.length; ++i) {\n hash += (hash << 1) + (hash << 4) + (hash << 7) + (hash << 8) + (hash << 24);\n hash ^= str.charCodeAt(i);\n }\n return hash >>> 0;\n }\n function zeroSize() {\n return {\n width: 0,\n height: 0,\n baseline: 0\n };\n }\n var DEFAULT_OPTIONS = { baselineMarkerSize: 1 };\n var defaultMeasureBox;\n if (typeof document !== 'undefined') {\n defaultMeasureBox = document.createElement('div');\n defaultMeasureBox.style.cssText = 'position: absolute !important; top: -4000px !important; width: auto !important; height: auto !important;' + 'padding: 0 !important; margin: 0 !important; border: 0 !important;' + 'line-height: normal !important; visibility: hidden !important; white-space: nowrap!important;';\n }\n var TextMetrics = kendo.Class.extend({\n init: function (options) {\n this._cache = new LRUCache(1000);\n this.options = $.extend({}, DEFAULT_OPTIONS, options);\n },\n measure: function (text, style, box) {\n if (!text) {\n return zeroSize();\n }\n var styleKey = objectKey(style);\n var cacheKey = hashKey(text + styleKey);\n var cachedResult = this._cache.get(cacheKey);\n if (cachedResult) {\n return cachedResult;\n }\n var size = zeroSize();\n var measureBox = box || defaultMeasureBox;\n var baselineMarker = this._baselineMarker().cloneNode(false);\n for (var key in style) {\n var value = style[key];\n if (typeof value !== 'undefined') {\n measureBox.style[key] = value;\n }\n }\n measureBox.textContent = text;\n measureBox.appendChild(baselineMarker);\n document.body.appendChild(measureBox);\n if (String(text).length) {\n size.width = measureBox.offsetWidth - this.options.baselineMarkerSize;\n size.height = measureBox.offsetHeight;\n size.baseline = baselineMarker.offsetTop + this.options.baselineMarkerSize;\n }\n if (size.width > 0 && size.height > 0) {\n this._cache.put(cacheKey, size);\n }\n measureBox.parentNode.removeChild(measureBox);\n return size;\n },\n _baselineMarker: function () {\n var marker = document.createElement('div');\n marker.style.cssText = 'display: inline-block; vertical-align: baseline;width: ' + this.options.baselineMarkerSize + 'px; height: ' + this.options.baselineMarkerSize + 'px;overflow: hidden;';\n return marker;\n }\n });\n TextMetrics.current = new TextMetrics();\n function measureText(text, style, measureBox) {\n return TextMetrics.current.measure(text, style, measureBox);\n }\n kendo.deepExtend(kendo.util, {\n LRUCache: LRUCache,\n TextMetrics: TextMetrics,\n measureText: measureText,\n objectKey: objectKey,\n hashKey: hashKey\n });\n }(window.kendo.jQuery));\n}, typeof define == 'function' && define.amd ? define : function (a1, a2, a3) {\n (a3 || a2)();\n}));\n(function (f, define) {\n define('dataviz/chart/kendo-chart', [\n 'kendo.core',\n 'kendo.color',\n 'kendo.drawing',\n 'kendo.dataviz.core'\n ], f);\n}(function () {\n (function ($) {\n window.kendo.dataviz = window.kendo.dataviz || {};\n var dataviz = kendo.dataviz;\n var Class = dataviz.Class;\n var isNumber = dataviz.isNumber;\n var datavizConstants = dataviz.constants;\n var MAX_VALUE = datavizConstants.MAX_VALUE;\n var MIN_VALUE = datavizConstants.MIN_VALUE;\n var VALUE = datavizConstants.VALUE;\n var CENTER = datavizConstants.CENTER;\n var TOP = datavizConstants.TOP;\n var BOTTOM = datavizConstants.BOTTOM;\n var LEFT = datavizConstants.LEFT;\n var WHITE = datavizConstants.WHITE;\n var CIRCLE = datavizConstants.CIRCLE;\n var Y = datavizConstants.Y;\n var X = datavizConstants.X;\n var RIGHT = datavizConstants.RIGHT;\n var BLACK = datavizConstants.BLACK;\n var DATE = datavizConstants.DATE;\n var DEFAULT_PRECISION = datavizConstants.DEFAULT_PRECISION;\n var ARC = datavizConstants.ARC;\n var defined = dataviz.defined;\n var getter = dataviz.getter;\n var isArray = dataviz.isArray;\n var ChartElement = dataviz.ChartElement;\n var Point = dataviz.Point;\n var Box = dataviz.Box;\n var alignPathToPixel = dataviz.alignPathToPixel;\n var setDefaultOptions = dataviz.setDefaultOptions;\n var inArray = dataviz.inArray;\n var isFunction = dataviz.isFunction;\n var valueOrDefault = dataviz.valueOrDefault;\n var isObject = dataviz.isObject;\n var deepExtend = dataviz.deepExtend;\n var eventElement = dataviz.eventElement;\n var getTemplate = dataviz.getTemplate;\n var TextBox = dataviz.TextBox;\n var ShapeElement = dataviz.ShapeElement;\n var getSpacing = dataviz.getSpacing;\n var limitValue = dataviz.limitValue;\n var last = dataviz.last;\n var append = dataviz.append;\n var isString = dataviz.isString;\n var parseDate = dataviz.parseDate;\n var styleValue = dataviz.styleValue;\n var CategoryAxis = dataviz.CategoryAxis;\n var BoxElement = dataviz.BoxElement;\n var round = dataviz.round;\n var grep = dataviz.grep;\n var DateCategoryAxis = dataviz.DateCategoryAxis;\n var elementStyles = dataviz.elementStyles;\n var hasClasses = dataviz.hasClasses;\n var bindEvents = dataviz.bindEvents;\n var services = dataviz.services;\n var unbindEvents = dataviz.unbindEvents;\n var support = kendo.support;\n var drawing = kendo.drawing;\n var Path = drawing.Path;\n var Animation = drawing.Animation;\n var AnimationFactory = drawing.AnimationFactory;\n var Group = drawing.Group;\n var Color = kendo.Color;\n var geometry = kendo.geometry;\n var GeometryPoint = geometry.Point;\n var transform = geometry.transform;\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 (limit === void 0) {\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 ChartPlotArea = Class.extend({\n init: function (plotArea) {\n this._plotArea = plotArea;\n this.visual = plotArea.visual;\n this.backgroundVisual = plotArea._bgVisual;\n }\n });\n function countNumbers(values) {\n var length = values.length;\n var count = 0;\n for (var i = 0; i < length; i++) {\n var num = values[i];\n if (isNumber(num)) {\n count++;\n }\n }\n return count;\n }\n var Aggregates = {\n min: function (values) {\n var length = values.length;\n var min = MAX_VALUE;\n for (var i = 0; i < length; i++) {\n var value = values[i];\n if (isNumber(value)) {\n min = Math.min(min, value);\n }\n }\n return min === MAX_VALUE ? values[0] : min;\n },\n max: function (values) {\n var length = values.length;\n var max = MIN_VALUE;\n for (var i = 0; i < length; i++) {\n var value = values[i];\n if (isNumber(value)) {\n max = Math.max(max, value);\n }\n }\n return max === MIN_VALUE ? values[0] : max;\n },\n sum: function (values) {\n var length = values.length;\n var sum = 0;\n for (var i = 0; i < length; i++) {\n var value = values[i];\n if (isNumber(value)) {\n sum += value;\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;\n var count = 0;\n for (var i = 0; i < length; i++) {\n var value = values[i];\n if (value !== null && defined(value)) {\n count++;\n }\n }\n return count;\n },\n avg: function (values) {\n var count = countNumbers(values);\n var result = values[0];\n if (count > 0) {\n result = Aggregates.sum(values) / count;\n }\n return result;\n },\n first: function (values) {\n var length = values.length;\n for (var i = 0; i < length; i++) {\n var value = values[i];\n if (value !== null && defined(value)) {\n return value;\n }\n }\n return values[0];\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 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 this$1 = this;\n if (valueFields === void 0) {\n valueFields = [VALUE];\n }\n if (otherFields === void 0) {\n otherFields = {};\n }\n for (var i = 0; i < seriesTypes.length; i++) {\n var type = seriesTypes[i];\n this$1._valueFields[type] = valueFields;\n this$1._otherFields[type] = otherFields;\n this$1._nullValue[type] = this$1._makeValue(valueFields, null);\n this$1._undefinedValue[type] = this$1._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 data = series.data;\n var pointData = defined(item) ? item : data[pointIx];\n var result = { valueFields: { value: pointData } };\n var valueFields = this.valueFields(series);\n var otherFields = this._otherFields[series.type];\n var fields, value;\n if (pointData === null) {\n value = this._nullValue[series.type];\n } else if (!defined(pointData)) {\n value = this._undefinedValue[series.type];\n } else if (Array.isArray(pointData)) {\n var fieldData = pointData.slice(valueFields.length);\n value = this._bindFromArray(pointData, valueFields);\n fields = this._bindFromArray(fieldData, otherFields);\n } else if (typeof pointData === 'object') {\n var srcValueFields = this.sourceFields(series, valueFields);\n var srcPointFields = this.sourceFields(series, otherFields);\n value = this._bindFromObject(pointData, valueFields, srcValueFields);\n fields = this._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 = {};\n var length = fields.length;\n for (var i = 0; i < length; i++) {\n var fieldName = fields[i];\n value[fieldName] = initialValue;\n }\n return value;\n },\n _bindFromArray: function (array, fields) {\n var value = {};\n if (fields) {\n var length = Math.min(fields.length, array.length);\n for (var i = 0; i < length; i++) {\n value[fields[i]] = array[i];\n }\n }\n return value;\n },\n _bindFromObject: function (object, fields, srcFields) {\n if (srcFields === void 0) {\n srcFields = fields;\n }\n var value = {};\n if (fields) {\n var length = fields.length;\n for (var i = 0; i < length; i++) {\n var fieldName = fields[i];\n var srcFieldName = srcFields[i];\n value[fieldName] = getField(srcFieldName, object);\n }\n }\n return value;\n },\n sourceFields: function (series, canonicalFields) {\n var sourceFields = [];\n if (canonicalFields) {\n var length = canonicalFields.length;\n for (var i = 0; i < length; i++) {\n var fieldName = canonicalFields[i];\n var 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 STD_ERR = 'stderr';\n var STD_DEV = 'stddev';\n var percentRegex = /percent(?:\\w*)\\((\\d+)\\)/;\n var standardDeviationRegex = new RegExp('^' + STD_DEV + '(?:\\\\((\\\\d+(?:\\\\.\\\\d+)?)\\\\))?$');\n var ErrorRangeCalculator = Class.extend({\n init: function (errorValue, series, field) {\n this.initGlobalRanges(errorValue, series, field);\n },\n initGlobalRanges: function (errorValue, series, field) {\n var data = series.data;\n var deviationMatch = standardDeviationRegex.exec(errorValue);\n if (deviationMatch) {\n this.valueGetter = this.createValueGetter(series, field);\n var average = this.getAverage(data);\n var deviation = this.getStandardDeviation(data, average, false);\n var multiple = deviationMatch[1] ? parseFloat(deviationMatch[1]) : 1;\n var errorRange = {\n low: average.value - deviation * multiple,\n high: average.value + deviation * multiple\n };\n this.globalRange = function () {\n return errorRange;\n };\n } else if (errorValue.indexOf && errorValue.indexOf(STD_ERR) >= 0) {\n this.valueGetter = this.createValueGetter(series, field);\n var standardError = this.getStandardError(data, this.getAverage(data));\n this.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;\n var binder = SeriesBinder.current;\n var valueFields = binder.valueFields(series);\n var item = defined(data[0]) ? data[0] : {};\n var valueGetter;\n if (isArray(item)) {\n var index = field ? valueFields.indexOf(field) : 0;\n valueGetter = getter('[' + index + ']');\n } else if (isNumber(item)) {\n valueGetter = getter();\n } else if (typeof item === datavizConstants.OBJECT) {\n var srcValueFields = binder.sourceFields(series, valueFields);\n valueGetter = getter(srcValueFields[valueFields.indexOf(field)]);\n }\n return valueGetter;\n },\n getErrorRange: function (pointValue, errorValue) {\n var low, high, value;\n if (!defined(errorValue)) {\n return null;\n }\n if (this.globalRange) {\n return this.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 = 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 this$1 = this;\n var length = data.length;\n var total = isSample ? average.count - 1 : average.count;\n var squareDifferenceSum = 0;\n for (var idx = 0; idx < length; idx++) {\n var value = this$1.valueGetter(data[idx]);\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 this$1 = this;\n var length = data.length;\n var sum = 0;\n var count = 0;\n for (var idx = 0; idx < length; idx++) {\n var value = this$1.valueGetter(data[idx]);\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 browser = support.browser || {};\n var INITIAL_ANIMATION_DURATION = 600;\n var FADEIN = 'fadeIn';\n var GLASS = 'glass';\n var BORDER_BRIGHTNESS = 0.8;\n var TOOLTIP_OFFSET = 5;\n var START_SCALE = browser.msie ? 0.001 : 0;\n var ERROR_LOW_FIELD = 'errorLow';\n var ERROR_HIGH_FIELD = 'errorHigh';\n var X_ERROR_LOW_FIELD = 'xErrorLow';\n var X_ERROR_HIGH_FIELD = 'xErrorHigh';\n var Y_ERROR_LOW_FIELD = 'yErrorLow';\n var Y_ERROR_HIGH_FIELD = 'yErrorHigh';\n var LINE_MARKER_SIZE = 8;\n var ZERO = 'zero';\n var INTERPOLATE = 'interpolate';\n var GAP = 'gap';\n var SMOOTH = 'smooth';\n var STEP = 'step';\n var AREA = 'area';\n var BAR = 'bar';\n var BOX_PLOT = 'boxPlot';\n var BUBBLE = 'bubble';\n var BULLET = 'bullet';\n var CANDLESTICK = 'candlestick';\n var COLUMN = 'column';\n var DONUT = 'donut';\n var FUNNEL = 'funnel';\n var HORIZONTAL_WATERFALL = 'horizontalWaterfall';\n var LINE = 'line';\n var OHLC = 'ohlc';\n var PIE = 'pie';\n var POLAR_AREA = 'polarArea';\n var POLAR_LINE = 'polarLine';\n var POLAR_SCATTER = 'polarScatter';\n var RADAR_AREA = 'radarArea';\n var RADAR_COLUMN = 'radarColumn';\n var RADAR_LINE = 'radarLine';\n var RANGE_BAR = 'rangeBar';\n var RANGE_COLUMN = 'rangeColumn';\n var SCATTER = 'scatter';\n var SCATTER_LINE = 'scatterLine';\n var VERTICAL_AREA = 'verticalArea';\n var VERTICAL_BOX_PLOT = 'verticalBoxPlot';\n var VERTICAL_BULLET = 'verticalBullet';\n var VERTICAL_LINE = 'verticalLine';\n var WATERFALL = 'waterfall';\n var 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 LEGEND_ITEM_CLICK = 'legendItemClick';\n var LEGEND_ITEM_HOVER = 'legendItemHover';\n var SERIES_CLICK = 'seriesClick';\n var SERIES_HOVER = 'seriesHover';\n var PLOT_AREA_CLICK = 'plotAreaClick';\n var PLOT_AREA_HOVER = 'plotAreaHover';\n var DRAG = 'drag';\n var DRAG_END = 'dragEnd';\n var DRAG_START = 'dragStart';\n var ZOOM_START = 'zoomStart';\n var ZOOM = 'zoom';\n var ZOOM_END = 'zoomEnd';\n var SELECT_START = 'selectStart';\n var SELECT = 'select';\n var SELECT_END = 'selectEnd';\n var RENDER = 'render';\n var SHOW_TOOLTIP = 'showTooltip';\n var HIDE_TOOLTIP = 'hideTooltip';\n var LOGARITHMIC = 'log';\n var CATEGORY = 'category';\n var INSIDE_END = 'insideEnd';\n var INSIDE_BASE = 'insideBase';\n var OUTSIDE_END = 'outsideEnd';\n var MOUSEWHEEL = 'DOMMouseScroll mousewheel';\n var MOUSEWHEEL_DELAY = 150;\n var constants = {\n INITIAL_ANIMATION_DURATION: INITIAL_ANIMATION_DURATION,\n FADEIN: FADEIN,\n LEGEND_ITEM_CLICK: LEGEND_ITEM_CLICK,\n LEGEND_ITEM_HOVER: LEGEND_ITEM_HOVER,\n SERIES_CLICK: SERIES_CLICK,\n SERIES_HOVER: SERIES_HOVER,\n GLASS: GLASS,\n BORDER_BRIGHTNESS: BORDER_BRIGHTNESS,\n TOOLTIP_OFFSET: TOOLTIP_OFFSET,\n START_SCALE: START_SCALE,\n ERROR_LOW_FIELD: ERROR_LOW_FIELD,\n ERROR_HIGH_FIELD: ERROR_HIGH_FIELD,\n X_ERROR_LOW_FIELD: X_ERROR_LOW_FIELD,\n X_ERROR_HIGH_FIELD: X_ERROR_HIGH_FIELD,\n Y_ERROR_LOW_FIELD: Y_ERROR_LOW_FIELD,\n Y_ERROR_HIGH_FIELD: Y_ERROR_HIGH_FIELD,\n LINE_MARKER_SIZE: LINE_MARKER_SIZE,\n INTERPOLATE: INTERPOLATE,\n ZERO: ZERO,\n SMOOTH: SMOOTH,\n STEP: STEP,\n CATEGORY: CATEGORY,\n FUNNEL: FUNNEL,\n BAR: BAR,\n CANDLESTICK: CANDLESTICK,\n PIE: PIE,\n COLUMN: COLUMN,\n AREA: AREA,\n VERTICAL_BULLET: VERTICAL_BULLET,\n BOX_PLOT: BOX_PLOT,\n OHLC: OHLC,\n WATERFALL: WATERFALL,\n LINE: LINE,\n BULLET: BULLET,\n VERTICAL_LINE: VERTICAL_LINE,\n VERTICAL_AREA: VERTICAL_AREA,\n RANGE_COLUMN: RANGE_COLUMN,\n VERTICAL_BOX_PLOT: VERTICAL_BOX_PLOT,\n RANGE_BAR: RANGE_BAR,\n HORIZONTAL_WATERFALL: HORIZONTAL_WATERFALL,\n SCATTER: SCATTER,\n SCATTER_LINE: SCATTER_LINE,\n BUBBLE: BUBBLE,\n RADAR_AREA: RADAR_AREA,\n RADAR_LINE: RADAR_LINE,\n RADAR_COLUMN: RADAR_COLUMN,\n POLAR_LINE: POLAR_LINE,\n POLAR_AREA: POLAR_AREA,\n POLAR_SCATTER: POLAR_SCATTER,\n RENDER: RENDER,\n PLOT_AREA_CLICK: PLOT_AREA_CLICK,\n PLOT_AREA_HOVER: PLOT_AREA_HOVER,\n LOGARITHMIC: LOGARITHMIC,\n DRAG: DRAG,\n DRAG_START: DRAG_START,\n DRAG_END: DRAG_END,\n ZOOM_START: ZOOM_START,\n ZOOM: ZOOM,\n ZOOM_END: ZOOM_END,\n SELECT_START: SELECT_START,\n SELECT: SELECT,\n SELECT_END: SELECT_END,\n GAP: GAP,\n DONUT: DONUT,\n INSIDE_END: INSIDE_END,\n INSIDE_BASE: INSIDE_BASE,\n OUTSIDE_END: OUTSIDE_END,\n MOUSEWHEEL: MOUSEWHEEL,\n MOUSEWHEEL_DELAY: MOUSEWHEEL_DELAY,\n SHOW_TOOLTIP: SHOW_TOOLTIP,\n HIDE_TOOLTIP: HIDE_TOOLTIP,\n EQUALLY_SPACED_SERIES: EQUALLY_SPACED_SERIES\n };\n var DEFAULT_ERROR_BAR_WIDTH = 4;\n var ErrorBarBase = ChartElement.extend({\n init: function (low, high, isVertical, chart, series, options) {\n ChartElement.fn.init.call(this, options);\n this.low = low;\n this.high = high;\n this.isVertical = isVertical;\n this.chart = chart;\n this.series = series;\n },\n reflow: function (targetBox) {\n var endCaps = this.options.endCaps;\n var isVertical = this.isVertical;\n var axis = this.getAxis();\n var valueBox = axis.getSlot(this.low, this.high);\n var centerBox = targetBox.center();\n var capsWidth = this.getCapsWidth(targetBox, isVertical);\n var capValue = isVertical ? centerBox.x : centerBox.y;\n var capStart = capValue - capsWidth;\n var capEnd = capValue + capsWidth;\n var linePoints;\n if (isVertical) {\n linePoints = [\n new Point(centerBox.x, valueBox.y1),\n new Point(centerBox.x, valueBox.y2)\n ];\n if (endCaps) {\n linePoints.push(new Point(capStart, valueBox.y1), new Point(capEnd, valueBox.y1), new Point(capStart, valueBox.y2), new Point(capEnd, valueBox.y2));\n }\n this.box = new Box(capStart, valueBox.y1, capEnd, valueBox.y2);\n } else {\n linePoints = [\n new Point(valueBox.x1, centerBox.y),\n new Point(valueBox.x2, centerBox.y)\n ];\n if (endCaps) {\n linePoints.push(new Point(valueBox.x1, capStart), new Point(valueBox.x1, capEnd), new Point(valueBox.x2, capStart), new Point(valueBox.x2, capEnd));\n }\n this.box = new Box(valueBox.x1, capStart, valueBox.x2, capEnd);\n }\n this.linePoints = linePoints;\n },\n getCapsWidth: function (box, isVertical) {\n var boxSize = isVertical ? box.width() : box.height();\n var capsWidth = Math.min(Math.floor(boxSize / 2), DEFAULT_ERROR_BAR_WIDTH) || DEFAULT_ERROR_BAR_WIDTH;\n return capsWidth;\n },\n createVisual: function () {\n var this$1 = this;\n var options = this.options;\n var visual = options.visual;\n if (visual) {\n this.visual = visual({\n low: this.low,\n high: this.high,\n rect: this.box.toRect(),\n sender: this.getSender(),\n options: {\n endCaps: options.endCaps,\n color: options.color,\n line: options.line\n },\n createVisual: function () {\n this$1.createDefaultVisual();\n var defaultVisual = this$1.visual;\n delete this$1.visual;\n return defaultVisual;\n }\n });\n } else {\n this.createDefaultVisual();\n }\n },\n createDefaultVisual: function () {\n var this$1 = this;\n var ref = this;\n var options = ref.options;\n var linePoints = ref.linePoints;\n var lineOptions = {\n stroke: {\n color: options.color,\n width: options.line.width,\n dashType: options.line.dashType\n }\n };\n ChartElement.fn.createVisual.call(this);\n for (var idx = 0; idx < linePoints.length; idx += 2) {\n var line = new Path(lineOptions).moveTo(linePoints[idx].x, linePoints[idx].y).lineTo(linePoints[idx + 1].x, linePoints[idx + 1].y);\n alignPathToPixel(line);\n this$1.visual.append(line);\n }\n }\n });\n setDefaultOptions(ErrorBarBase, {\n animation: {\n type: FADEIN,\n delay: INITIAL_ANIMATION_DURATION\n },\n endCaps: true,\n line: { width: 2 },\n zIndex: 1\n });\n var CategoricalErrorBar = ErrorBarBase.extend({\n getAxis: function () {\n var axis = this.chart.seriesValueAxis(this.series);\n return axis;\n }\n });\n var MAX_EXPAND_DEPTH = 5;\n function evalOptions(options, context, state, dryRun) {\n if (state === void 0) {\n state = {};\n }\n if (dryRun === void 0) {\n dryRun = false;\n }\n var defaults = state.defaults = state.defaults || {};\n var depth = state.depth = state.depth || 0;\n var needsEval = false;\n state.excluded = state.excluded || [];\n if (depth > MAX_EXPAND_DEPTH) {\n return null;\n }\n for (var property in options) {\n if (!inArray(property, state.excluded) && options.hasOwnProperty(property)) {\n var propValue = options[property];\n if (isFunction(propValue)) {\n needsEval = true;\n if (!dryRun) {\n options[property] = valueOrDefault(propValue(context), defaults[property]);\n }\n } else if (isObject(propValue)) {\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 categoriesCount(series) {\n var seriesCount = series.length;\n var categories = 0;\n for (var i = 0; i < seriesCount; i++) {\n categories = Math.max(categories, series[i].data.length);\n }\n return categories;\n }\n var CategoricalChart = ChartElement.extend({\n init: function (plotArea, options) {\n ChartElement.fn.init.call(this, options);\n this.plotArea = plotArea;\n this.chartService = plotArea.chartService;\n this.categoryAxis = plotArea.seriesCategoryAxis(options.series[0]);\n this.valueAxisRanges = {};\n this.points = [];\n this.categoryPoints = [];\n this.seriesPoints = [];\n this.seriesOptions = [];\n this._evalSeries = [];\n this.render();\n },\n render: function () {\n this.traverseDataPoints(this.addValue.bind(this));\n },\n pointOptions: function (series, seriesIx) {\n var options = this.seriesOptions[seriesIx];\n if (!options) {\n var defaults = this.pointType().prototype.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 categoryPoints = this.categoryPoints[categoryIx];\n var otherValues = [];\n var categorySum = 0;\n for (var i = 0; i < categoryPoints.length; i++) {\n var other = categoryPoints[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 this$1 = this;\n if (startValue === void 0) {\n startValue = 0;\n }\n var categoryPoints = this.categoryPoints[point.categoryIx];\n if (this.options.isStacked) {\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 < categoryPoints.length; i++) {\n var other = categoryPoints[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 === datavizConstants.STRING && stack !== otherStack) {\n continue;\n }\n if (stack.group && stack.group !== otherStack.group) {\n continue;\n }\n }\n var otherValue = this$1.plotValue(other);\n if (otherValue >= 0 && positive || otherValue < 0 && !positive) {\n prevValue += otherValue;\n plotValue += otherValue;\n isStackedBar = true;\n if (this$1.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 this$1 = this;\n var min = MAX_VALUE;\n var max = MIN_VALUE;\n for (var i = 0; i < this.categoryPoints.length; i++) {\n var categoryPoints = this$1.categoryPoints[i];\n if (!categoryPoints) {\n continue;\n }\n for (var pIx = 0; pIx < categoryPoints.length; pIx++) {\n var point = categoryPoints[pIx];\n if (point) {\n if (point.series.stack === stackName || point.series.axis === axisName) {\n var to = this$1.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 this$1 = this;\n var ref = this.options;\n var isStacked = ref.isStacked;\n var chartSeries = ref.series;\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 var limits = limitsCache[key];\n if (!limits) {\n limits = this$1.stackLimits(axisName, series.stack);\n var errorTotals = this$1.errorTotals;\n if (errorTotals) {\n if (errorTotals.negative.length) {\n limits.min = Math.min(limits.min, dataviz.sparseArrayLimits(errorTotals.negative).min);\n }\n if (errorTotals.positive.length) {\n limits.max = Math.max(limits.max, dataviz.sparseArrayLimits(errorTotals.positive).max);\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 this$1.valueAxisRanges[axisName] = limits;\n }\n }\n }\n },\n addErrorBar: function (point, data, categoryIx) {\n var value = point.value;\n var series = point.series;\n var seriesIx = point.seriesIx;\n var errorBars = point.options.errorBars;\n var lowValue = data.fields[ERROR_LOW_FIELD];\n var highValue = data.fields[ERROR_HIGH_FIELD];\n var errorRange;\n if (isNumber(lowValue) && isNumber(highValue)) {\n errorRange = {\n low: lowValue,\n high: highValue\n };\n } else if (errorBars && defined(errorBars.value)) {\n this.seriesErrorRanges = this.seriesErrorRanges || [];\n this.seriesErrorRanges[seriesIx] = this.seriesErrorRanges[seriesIx] || new ErrorRangeCalculator(errorBars.value, series, VALUE);\n errorRange = this.seriesErrorRanges[seriesIx].getErrorRange(value, errorBars.value);\n }\n if (errorRange) {\n point.low = errorRange.low;\n point.high = errorRange.high;\n this.addPointErrorBar(point, categoryIx);\n }\n },\n addPointErrorBar: function (point, categoryIx) {\n var isVertical = !this.options.invertAxes;\n var options = point.options.errorBars;\n var series = point.series;\n var low = point.low;\n var high = point.high;\n if (this.options.isStacked) {\n var stackedErrorRange = this.stackedErrorRange(point, categoryIx);\n low = stackedErrorRange.low;\n high = stackedErrorRange.high;\n } else {\n var fields = {\n categoryIx: categoryIx,\n series: series\n };\n this.updateRange({ value: low }, fields);\n this.updateRange({ value: high }, fields);\n }\n var errorBar = new CategoricalErrorBar(low, high, isVertical, this, series, options);\n point.errorBars = [errorBar];\n point.append(errorBar);\n },\n stackedErrorRange: function (point, categoryIx) {\n var plotValue = this.plotRange(point, 0)[1] - point.value;\n var low = point.low + plotValue;\n var high = point.high + plotValue;\n this.errorTotals = this.errorTotals || {\n positive: [],\n negative: []\n };\n if (low < 0) {\n this.errorTotals.negative[categoryIx] = Math.min(this.errorTotals.negative[categoryIx] || 0, low);\n }\n if (high > 0) {\n this.errorTotals.positive[categoryIx] = Math.max(this.errorTotals.positive[categoryIx] || 0, high);\n }\n return {\n low: low,\n high: high\n };\n },\n addValue: function (data, fields) {\n var categoryIx = fields.categoryIx;\n var series = fields.series;\n var seriesIx = fields.seriesIx;\n var categoryPoints = this.categoryPoints[categoryIx];\n if (!categoryPoints) {\n this.categoryPoints[categoryIx] = categoryPoints = [];\n }\n var seriesPoints = this.seriesPoints[seriesIx];\n if (!seriesPoints) {\n this.seriesPoints[seriesIx] = seriesPoints = [];\n }\n var point = this.createPoint(data, fields);\n if (point) {\n $.extend(point, fields);\n point.owner = this;\n point.noteText = data.fields.noteText;\n if (!defined(point.dataItem)) {\n point.dataItem = series.data[categoryIx];\n }\n this.addErrorBar(point, data, categoryIx);\n }\n this.points.push(point);\n seriesPoints.push(point);\n categoryPoints.push(point);\n this.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 'content',\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 var pointOptions = options;\n if (doEval) {\n pointOptions = deepExtend({}, pointOptions);\n evalOptions(pointOptions, {\n value: value,\n category: category,\n index: categoryIx,\n series: series,\n dataItem: series.data[categoryIx]\n }, state);\n }\n return pointOptions;\n },\n updateRange: function (data, fields) {\n var axisName = fields.series.axis;\n var value = data.value;\n var axisRange = this.valueAxisRanges[axisName];\n if (isFinite(value) && value !== null) {\n axisRange = this.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;\n var axisName = series.axis;\n var 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 this$1 = this;\n var categorySlots = this.categorySlots = [];\n var chartPoints = this.points;\n var categoryAxis = this.categoryAxis;\n var pointIx = 0;\n this.traverseDataPoints(function (data, fields) {\n var categoryIx = fields.categoryIx;\n var currentSeries = fields.series;\n var valueAxis = this$1.seriesValueAxis(currentSeries);\n var point = chartPoints[pointIx++];\n var categorySlot = categorySlots[categoryIx];\n if (!categorySlot) {\n categorySlots[categoryIx] = categorySlot = this$1.categorySlot(categoryAxis, categoryIx, valueAxis);\n }\n if (point) {\n var plotRange = this$1.plotRange(point, valueAxis.startValue());\n var valueSlot = valueAxis.getSlot(plotRange[0], plotRange[1], !this$1.options.clip);\n if (valueSlot) {\n var pointSlot = this$1.pointSlot(categorySlot, valueSlot);\n point.aboveAxis = this$1.aboveAxis(point, valueAxis);\n point.stackValue = plotRange[1];\n if (this$1.options.isStacked100) {\n point.percentage = this$1.plotValue(point);\n }\n this$1.reflowPoint(point, pointSlot);\n } else {\n point.visible = false;\n }\n }\n });\n this.reflowCategories(categorySlots);\n this.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;\n var options = valueAxis.options;\n var 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 options = this.options;\n var invertAxes = options.invertAxes;\n var slotX = invertAxes ? valueSlot : categorySlot;\n var slotY = invertAxes ? categorySlot : valueSlot;\n return new Box(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 this$1 = this;\n var series = this.options.series;\n var categories = this.categoryAxis.options.categories || [];\n var count = categoriesCount(series);\n var seriesCount = series.length;\n for (var seriesIx = 0; seriesIx < seriesCount; seriesIx++) {\n this$1._outOfRangeCallback(series[seriesIx], '_outOfRangeMinPoint', seriesIx, callback);\n }\n for (var categoryIx = 0; categoryIx < count; categoryIx++) {\n for (var seriesIx$1 = 0; seriesIx$1 < seriesCount; seriesIx$1++) {\n var currentSeries = series[seriesIx$1];\n var currentCategory = categories[categoryIx];\n var pointData = this$1._bindPoint(currentSeries, seriesIx$1, categoryIx);\n callback(pointData, {\n category: currentCategory,\n categoryIx: categoryIx,\n series: currentSeries,\n seriesIx: seriesIx$1\n });\n }\n }\n for (var seriesIx$2 = 0; seriesIx$2 < seriesCount; seriesIx$2++) {\n this$1._outOfRangeCallback(series[seriesIx$2], '_outOfRangeMaxPoint', seriesIx$2, 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 dataItem: outOfRangePoint.item\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 this.chartService.format.auto(format, point.value);\n },\n pointValue: function (data) {\n return data.valueFields.value;\n }\n });\n setDefaultOptions(CategoricalChart, {\n series: [],\n invertAxes: false,\n isStacked: false,\n clip: true\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: eventElement(e),\n originalEvent: e,\n point: this\n };\n }\n };\n var NoteMixin = {\n createNote: function () {\n var options = this.options.notes;\n var text = this.noteText || options.label.text;\n if (options.visible !== false && defined(text) && text !== null) {\n this.note = new dataviz.Note({\n value: this.value,\n text: text,\n dataItem: this.dataItem,\n category: this.category,\n series: this.series\n }, this.options.notes, this.owner.chartService);\n this.append(this.note);\n }\n }\n };\n var ABOVE = 'above';\n var BELOW = 'below';\n var LinePoint = ChartElement.extend({\n init: function (value, options) {\n ChartElement.fn.init.call(this);\n this.value = value;\n this.options = options;\n this.aboveAxis = valueOrDefault(this.options.aboveAxis, true);\n this.tooltipTracking = true;\n },\n render: function () {\n var ref = this.options;\n var markers = ref.markers;\n var labels = ref.labels;\n if (this._rendered) {\n return;\n }\n this._rendered = true;\n if (markers.visible && markers.size) {\n this.marker = this.createMarker();\n this.append(this.marker);\n }\n if (labels.visible) {\n var labelTemplate = getTemplate(labels);\n var labelText = this.value;\n if (labelTemplate) {\n labelText = labelTemplate({\n dataItem: this.dataItem,\n category: this.category,\n value: this.value,\n percentage: this.percentage,\n stackValue: this.stackValue,\n series: this.series\n });\n } else if (labels.format) {\n labelText = this.formatValue(labels.format);\n }\n this.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 this.append(this.label);\n }\n this.createNote();\n if (this.errorBar) {\n this.append(this.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(BORDER_BRIGHTNESS).toHex();\n }\n return border;\n },\n createVisual: function () {\n },\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 this$1 = this;\n var ref = this;\n var options = ref.options;\n var aboveAxis = ref.aboveAxis;\n var vertical = options.vertical;\n this.render();\n this.box = targetBox;\n var 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 this._childBox = childBox;\n if (this.marker) {\n this.marker.reflow(childBox);\n }\n this.reflowLabel(childBox);\n if (this.errorBars) {\n for (var i = 0; i < this.errorBars.length; i++) {\n this$1.errorBars[i].reflow(childBox);\n }\n }\n if (this.note) {\n var noteTargetBox = this.markerBox();\n if (!(options.markers.visible && options.markers.size)) {\n var center = noteTargetBox.center();\n noteTargetBox = new Box(center.x, center.y, center.x, center.y);\n }\n this.note.reflow(noteTargetBox);\n }\n },\n reflowLabel: function (box) {\n var ref = this;\n var options = ref.options;\n var label = ref.label;\n var 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(this.markerBox(), anchor);\n label.reflow(label.box);\n }\n },\n createHighlight: function () {\n var markers = this.options.highlight.markers;\n var defaultColor = this.markerBorder().color;\n var options = this.options.markers;\n var size = options.size + (options.border.width || 0) + (markers.border.width || 0);\n var shadow = new ShapeElement({\n type: options.type,\n width: size,\n height: 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, 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 geometry.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 () {\n var markerBox = this.markerBox();\n var clipBox = this.owner.pane.clipBox();\n var showTooltip = !clipBox || clipBox.overlaps(markerBox);\n if (showTooltip) {\n var x = markerBox.x2 + TOOLTIP_OFFSET;\n var horizontalAlign = LEFT;\n var y, verticalAlign;\n if (this.aboveAxis) {\n y = markerBox.y1;\n verticalAlign = BOTTOM;\n } else {\n y = markerBox.y2;\n verticalAlign = TOP;\n }\n return {\n point: new Point(x, y),\n align: {\n horizontal: horizontalAlign,\n vertical: verticalAlign\n }\n };\n }\n },\n formatValue: function (format) {\n return this.owner.formatPointValue(this, format);\n },\n overlapsBox: function (box) {\n var markerBox = this.markerBox();\n return markerBox.overlaps(box);\n }\n });\n LinePoint.prototype.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: {\n markers: {\n border: {\n color: '#fff',\n width: 2\n }\n }\n },\n errorBars: { line: { width: 1 } }\n };\n deepExtend(LinePoint.prototype, PointEventsMixin);\n deepExtend(LinePoint.prototype, NoteMixin);\n var LineSegment = ChartElement.extend({\n init: function (linePoints, series, seriesIx) {\n ChartElement.fn.init.call(this);\n this.linePoints = linePoints;\n this.series = series;\n this.seriesIx = seriesIx;\n },\n points: function (visualPoints) {\n var linePoints = this.linePoints.concat(visualPoints || []);\n var 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 ref = this;\n var options = ref.options;\n var series = ref.series;\n var color = series.color;\n var defaults = series._defaults;\n if (isFunction(color) && defaults) {\n color = defaults.color;\n }\n var line = 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 return this.parent.getNearestPoint(coords.x, coords.y, this.seriesIx);\n }\n });\n setDefaultOptions(LineSegment, { closed: false });\n var StepLineSegment = LineSegment.extend({\n points: function (visualPoints) {\n var points = this.calculateStepPoints(this.linePoints);\n if (visualPoints && visualPoints.length) {\n points = points.concat(this.calculateStepPoints(visualPoints).reverse());\n }\n return points;\n },\n calculateStepPoints: function (points) {\n var chart = this.parent;\n var plotArea = chart.plotArea;\n var categoryAxis = plotArea.seriesCategoryAxis(this.series);\n var isInterpolate = chart.seriesMissingValues(this.series) === INTERPOLATE;\n var reverse = categoryAxis.options.reverse;\n var vertical = categoryAxis.options.vertical;\n var dir = reverse ? 2 : 1;\n var revDir = reverse ? 1 : 2;\n var length = points.length;\n var result = [];\n for (var i = 1; i < length; i++) {\n var prevPoint = points[i - 1];\n var point = points[i];\n var prevMarkerBoxCenter = prevPoint.markerBox().center();\n var markerBoxCenter = point.markerBox().center();\n if (categoryAxis.options.justified) {\n result.push(new GeometryPoint(prevMarkerBoxCenter.x, prevMarkerBoxCenter.y));\n if (vertical) {\n result.push(new GeometryPoint(prevMarkerBoxCenter.x, markerBoxCenter.y));\n } else {\n result.push(new GeometryPoint(markerBoxCenter.x, prevMarkerBoxCenter.y));\n }\n result.push(new GeometryPoint(markerBoxCenter.x, markerBoxCenter.y));\n } else {\n if (vertical) {\n result.push(new GeometryPoint(prevMarkerBoxCenter.x, prevPoint.box[Y + dir]));\n result.push(new GeometryPoint(prevMarkerBoxCenter.x, prevPoint.box[Y + revDir]));\n if (isInterpolate) {\n result.push(new GeometryPoint(prevMarkerBoxCenter.x, point.box[Y + dir]));\n }\n result.push(new GeometryPoint(markerBoxCenter.x, point.box[Y + dir]));\n result.push(new GeometryPoint(markerBoxCenter.x, point.box[Y + revDir]));\n } else {\n result.push(new GeometryPoint(prevPoint.box[X + dir], prevMarkerBoxCenter.y));\n result.push(new GeometryPoint(prevPoint.box[X + revDir], prevMarkerBoxCenter.y));\n if (isInterpolate) {\n result.push(new GeometryPoint(point.box[X + dir], prevMarkerBoxCenter.y));\n }\n result.push(new GeometryPoint(point.box[X + dir], markerBoxCenter.y));\n result.push(new GeometryPoint(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 (isFunction(color) && defaults) {\n color = defaults.color;\n }\n var curveProcessor = new dataviz.CurveProcessor(this.options.closed);\n var segments = curveProcessor.process(this.points());\n var curve = new 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 LineChartMixin = {\n renderSegments: function () {\n var this$1 = this;\n var ref = this;\n var options = ref.options;\n var seriesPoints = ref.seriesPoints;\n var series = options.series;\n var seriesCount = seriesPoints.length;\n var lastSegment;\n this._segments = [];\n for (var seriesIx = 0; seriesIx < seriesCount; seriesIx++) {\n var currentSeries = series[seriesIx];\n var sortedPoints = this$1.sortPoints(seriesPoints[seriesIx]);\n var pointCount = sortedPoints.length;\n var linePoints = [];\n for (var pointIx = 0; pointIx < pointCount; pointIx++) {\n var point = sortedPoints[pointIx];\n if (point) {\n linePoints.push(point);\n } else if (this$1.seriesMissingValues(currentSeries) !== INTERPOLATE) {\n if (linePoints.length > 1) {\n lastSegment = this$1.createSegment(linePoints, currentSeries, seriesIx, lastSegment);\n this$1._addSegment(lastSegment);\n }\n linePoints = [];\n }\n }\n if (linePoints.length > 1) {\n lastSegment = this$1.createSegment(linePoints, currentSeries, seriesIx, lastSegment);\n this$1._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;\n var assumeZero = !missingValues && this.options.isStacked;\n return assumeZero ? ZERO : missingValues || INTERPOLATE;\n },\n getNearestPoint: function (x, y, seriesIx) {\n var target = new Point(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 ClipAnimation = Animation.extend({\n setup: function () {\n this._setEnd(this.options.box.x1);\n },\n step: function (pos) {\n var box = this.options.box;\n this._setEnd(dataviz.interpolateValue(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 setDefaultOptions(ClipAnimation, { duration: INITIAL_ANIMATION_DURATION });\n AnimationFactory.current.register('clip', ClipAnimation);\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 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 = 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 for (var idx = 0; idx < points.length; idx++) {\n var 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 CategoricalChart.fn.render.call(this);\n this.updateStackRange();\n this.renderSegments();\n },\n pointType: function () {\n return LinePoint;\n },\n createPoint: function (data, fields) {\n var categoryIx = fields.categoryIx;\n var category = fields.category;\n var series = fields.series;\n var seriesIx = fields.seriesIx;\n var missingValues = this.seriesMissingValues(series);\n var value = data.valueFields.value;\n if (!defined(value) || value === null) {\n if (missingValues === ZERO) {\n value = 0;\n } else {\n return null;\n }\n }\n var pointOptions = this.pointOptions(series, seriesIx);\n pointOptions = this.evalPointOptions(pointOptions, value, category, categoryIx, series, seriesIx);\n var color = data.fields.color || series.color;\n if (isFunction(series.color)) {\n color = pointOptions.color;\n }\n var point = new LinePoint(value, pointOptions);\n point.color = color;\n this.append(point);\n return point;\n },\n plotRange: function (point) {\n var this$1 = this;\n var plotValue = this.plotValue(point);\n if (this.options.isStacked) {\n var categoryIx = point.categoryIx;\n var categoryPoints = this.categoryPoints[categoryIx];\n for (var i = 0; i < categoryPoints.length; i++) {\n var other = categoryPoints[i];\n if (point === other) {\n break;\n }\n plotValue += this$1.plotValue(other);\n if (this$1.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 style = currentSeries.style;\n var pointType;\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.prototype, LineChartMixin, ClipAnimationMixin);\n var AreaSegmentMixin = {\n points: function () {\n var chart = this.parent;\n var plotArea = chart.plotArea;\n var invertAxes = chart.options.invertAxes;\n var valueAxis = chart.seriesValueAxis(this.series);\n var valueAxisLineBox = valueAxis.lineBox();\n var categoryAxis = plotArea.seriesCategoryAxis(this.series);\n var categoryAxisLineBox = categoryAxis.lineBox();\n var stackPoints = this.stackPoints;\n var points = this._linePoints(stackPoints);\n var pos = invertAxes ? X : Y;\n var end = invertAxes ? categoryAxisLineBox.x1 : categoryAxisLineBox.y1;\n end = limitValue(end, valueAxisLineBox[pos + 1], valueAxisLineBox[pos + 2]);\n if (!this.stackPoints && points.length > 1) {\n var firstPoint = points[0];\n var lastPoint = last(points);\n if (invertAxes) {\n points.unshift(new GeometryPoint(end, firstPoint.y));\n points.push(new GeometryPoint(end, lastPoint.y));\n } else {\n points.unshift(new GeometryPoint(firstPoint.x, end));\n points.push(new GeometryPoint(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 (isFunction(color) && defaults) {\n color = defaults.color;\n }\n this.visual = new 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 = 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 = 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 LineSegment.fn.init.call(this, linePoints, currentSeries, seriesIx);\n this.stackPoints = stackPoints;\n }\n });\n deepExtend(AreaSegment.prototype, AreaSegmentMixin, { _linePoints: LineSegment.prototype.points });\n var StepAreaSegment = StepLineSegment.extend({\n init: function (linePoints, stackPoints, currentSeries, seriesIx) {\n StepLineSegment.fn.init.call(this, linePoints, currentSeries, seriesIx);\n this.stackPoints = stackPoints;\n }\n });\n deepExtend(StepAreaSegment.prototype, AreaSegmentMixin, { _linePoints: StepLineSegment.prototype.points });\n var SplineAreaSegment = AreaSegment.extend({\n init: function (linePoints, prevSegment, isStacked, currentSeries, seriesIx) {\n AreaSegment.fn.init.call(this, linePoints, [], currentSeries, seriesIx);\n this.prevSegment = prevSegment;\n this.isStacked = isStacked;\n },\n strokeSegments: function () {\n var segments = this._strokeSegments;\n if (!segments) {\n var curveProcessor = new dataviz.CurveProcessor(this.options.closed);\n var linePoints = LineSegment.prototype.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 (isFunction(color) && defaults) {\n color = defaults.color;\n }\n this.visual = new 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 geometry.Segment(prevAnchor, prevAnchor, last(strokeSegments).anchor()));\n var stackSegments = [];\n for (var idx = prevStrokeSegments.length - 1; idx >= 0; idx--) {\n var segment = prevStrokeSegments[idx];\n stackSegments.push(new geometry.Segment(segment.anchor(), segment.controlOut(), segment.controlIn()));\n }\n append(fillSegments, stackSegments);\n var firstAnchor = fillSegments[0].anchor();\n fillSegments.push(new geometry.Segment(firstAnchor, firstAnchor, last(stackSegments).anchor()));\n }\n var fill = new 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 chart = this.parent;\n var prevSegment = this.prevSegment;\n var plotArea = chart.plotArea;\n var invertAxes = chart.options.invertAxes;\n var valueAxis = chart.seriesValueAxis(this.series);\n var valueAxisLineBox = valueAxis.lineBox();\n var categoryAxis = plotArea.seriesCategoryAxis(this.series);\n var categoryAxisLineBox = categoryAxis.lineBox();\n var pos = invertAxes ? X : Y;\n var segments = this.strokeSegments();\n var firstPoint = segments[0].anchor();\n var lastPoint = last(segments).anchor();\n var end = invertAxes ? categoryAxisLineBox.x1 : categoryAxisLineBox.y1;\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 Path(style);\n stroke.segments.push.apply(stroke.segments, this.strokeSegments());\n this.visual.append(stroke);\n }\n }\n });\n var AreaChart = LineChart.extend({\n createSegment: function (linePoints, currentSeries, seriesIx, prevSegment) {\n var isStacked = this.options.isStacked;\n var style = (currentSeries.line || {}).style;\n var stackPoints;\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 var pointType;\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 var this$1 = this;\n LineChart.fn.reflow.call(this, targetBox);\n var stackPoints = this._stackPoints;\n if (stackPoints) {\n for (var idx = 0; idx < stackPoints.length; idx++) {\n var stackPoint = stackPoints[idx];\n var pointSlot = this$1.categoryAxis.getSlot(stackPoint.categoryIx);\n stackPoint.reflow(pointSlot);\n }\n }\n },\n _gapStackPoints: function (linePoints, seriesIx, style) {\n var this$1 = this;\n var seriesPoints = this.seriesPoints;\n var startIdx = linePoints[0].categoryIx;\n var length = linePoints.length;\n if (startIdx < 0) {\n startIdx = 0;\n length--;\n }\n var endIdx = startIdx + length;\n var pointOffset = this.seriesOptions[0]._outOfRangeMinPoint ? 1 : 0;\n var stackPoints = [];\n this._stackPoints = this._stackPoints || [];\n for (var categoryIx = startIdx; categoryIx < endIdx; categoryIx++) {\n var pointIx = categoryIx + pointOffset;\n var currentSeriesIx = seriesIx;\n var point = void 0;\n do {\n currentSeriesIx--;\n point = seriesPoints[currentSeriesIx][pointIx];\n } while (currentSeriesIx > 0 && !point);\n if (point) {\n if (style !== STEP && categoryIx > startIdx && !seriesPoints[currentSeriesIx][pointIx - 1]) {\n stackPoints.push(this$1._previousSegmentPoint(categoryIx, pointIx, pointIx - 1, currentSeriesIx));\n }\n stackPoints.push(point);\n if (style !== STEP && categoryIx + 1 < endIdx && !seriesPoints[currentSeriesIx][pointIx + 1]) {\n stackPoints.push(this$1._previousSegmentPoint(categoryIx, pointIx, pointIx + 1, currentSeriesIx));\n }\n } else {\n var gapStackPoint = this$1._createGapStackPoint(categoryIx);\n this$1._stackPoints.push(gapStackPoint);\n stackPoints.push(gapStackPoint);\n }\n }\n return stackPoints;\n },\n _previousSegmentPoint: function (categoryIx, pointIx, segmentIx, seriesIdx) {\n var seriesPoints = this.seriesPoints;\n var index = seriesIdx;\n var point;\n while (index > 0 && !point) {\n index--;\n point = seriesPoints[index][segmentIx];\n }\n if (!point) {\n point = this._createGapStackPoint(categoryIx);\n this._stackPoints.push(point);\n } else {\n point = seriesPoints[index][pointIx];\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 AxisGroupRangeTracker = Class.extend({\n init: function () {\n this.axisRanges = {};\n },\n update: function (chartAxisRanges) {\n var axisRanges = this.axisRanges;\n for (var axisName in chartAxisRanges) {\n var chartRange = chartAxisRanges[axisName];\n var range = axisRanges[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 BarLabel = ChartElement.extend({\n init: function (content, options) {\n ChartElement.fn.init.call(this, options);\n this.textBox = new TextBox(content, this.options);\n this.append(this.textBox);\n },\n createVisual: function () {\n this.textBox.options.noclip = this.options.noclip;\n },\n reflow: function (targetBox) {\n var options = this.options;\n var vertical = options.vertical;\n var aboveAxis = options.aboveAxis;\n var text = this.children[0];\n var textOptions = text.options;\n var box = text.box;\n var padding = text.options.padding;\n var labelBox = targetBox;\n textOptions.align = vertical ? CENTER : LEFT;\n textOptions.vAlign = vertical ? TOP : CENTER;\n if (options.position === INSIDE_END) {\n if (vertical) {\n textOptions.vAlign = TOP;\n if (!aboveAxis && box.height() < targetBox.height()) {\n textOptions.vAlign = BOTTOM;\n }\n } else {\n textOptions.align = aboveAxis ? RIGHT : LEFT;\n }\n } else if (options.position === CENTER) {\n textOptions.vAlign = CENTER;\n textOptions.align = CENTER;\n } else if (options.position === INSIDE_BASE) {\n if (vertical) {\n textOptions.vAlign = aboveAxis ? BOTTOM : TOP;\n } else {\n textOptions.align = aboveAxis ? LEFT : RIGHT;\n }\n } else if (options.position === OUTSIDE_END) {\n if (vertical) {\n if (aboveAxis) {\n labelBox = new Box(targetBox.x1, targetBox.y1 - box.height(), targetBox.x2, targetBox.y1);\n } else {\n labelBox = new Box(targetBox.x1, targetBox.y2, targetBox.x2, targetBox.y2 + box.height());\n }\n } else {\n textOptions.align = CENTER;\n if (aboveAxis) {\n labelBox = new Box(targetBox.x2, targetBox.y1, targetBox.x2 + box.width(), targetBox.y2);\n } else {\n labelBox = new Box(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 = (labelBox.width() - text.contentBox.width()) / 2;\n } else {\n padding.top = padding.bottom = (labelBox.height() - text.contentBox.height()) / 2;\n }\n }\n text.reflow(labelBox);\n },\n alignToClipBox: function (clipBox) {\n var vertical = this.options.vertical;\n var field = vertical ? Y : X;\n var start = field + '1';\n var end = field + '2';\n var text = this.children[0];\n var parentBox = this.parent.box;\n if (parentBox[start] < clipBox[start] || clipBox[end] < parentBox[end]) {\n var 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 setDefaultOptions(BarLabel, {\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 function hasGradientOverlay(options) {\n var overlay = options.overlay;\n return overlay && overlay.gradient && overlay.gradient !== 'none';\n }\n var BAR_ALIGN_MIN_WIDTH = 6;\n var Bar = ChartElement.extend({\n init: function (value, options) {\n ChartElement.fn.init.call(this);\n this.options = options;\n this.color = options.color || WHITE;\n this.aboveAxis = valueOrDefault(this.options.aboveAxis, true);\n this.value = value;\n },\n render: function () {\n if (this._rendered) {\n return;\n }\n this._rendered = true;\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 if (labels.visible) {\n var labelTemplate = getTemplate(labels);\n var labelText;\n if (labelTemplate) {\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 }, 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 var this$1 = this;\n this.render();\n var label = this.label;\n this.box = targetBox;\n if (label) {\n label.options.aboveAxis = this.aboveAxis;\n label.reflow(targetBox);\n }\n if (this.note) {\n this.note.reflow(targetBox);\n }\n if (this.errorBars) {\n for (var i = 0; i < this.errorBars.length; i++) {\n this$1.errorBars[i].reflow(targetBox);\n }\n }\n },\n createVisual: function () {\n var this$1 = this;\n var ref = this;\n var box = ref.box;\n var options = ref.options;\n var customVisual = options.visual;\n if (this.visible !== false) {\n ChartElement.fn.createVisual.call(this);\n if (customVisual) {\n var visual = this.rectVisual = customVisual({\n category: this.category,\n dataItem: this.dataItem,\n value: this.value,\n sender: this.getSender(),\n series: this.series,\n percentage: this.percentage,\n stackValue: this.stackValue,\n runningTotal: this.runningTotal,\n total: this.total,\n rect: box.toRect(),\n createVisual: function () {\n var group = new Group();\n this$1.createRect(group);\n return group;\n },\n options: options\n });\n if (visual) {\n this.visual.append(visual);\n }\n } else if (box.width() > 0 && box.height() > 0) {\n this.createRect(this.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 = 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 var overlay = this.createGradientOverlay(path, { baseColor: this.color }, deepExtend({\n end: !options.vertical ? [\n 0,\n 1\n ] : undefined\n }, options.overlay));\n visual.append(overlay);\n }\n },\n createHighlight: function (style) {\n var highlight = 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 color = this.color;\n var border = this.options.border;\n var brightness = border._brightness || BORDER_BRIGHTNESS;\n var borderColor = border.color;\n if (!defined(borderColor)) {\n borderColor = new Color(color).brightness(brightness).toHex();\n }\n return borderColor;\n },\n tooltipAnchor: function () {\n var ref = this;\n var options = ref.options;\n var box = ref.box;\n var aboveAxis = ref.aboveAxis;\n var clipBox = this.owner.pane.clipBox() || box;\n var horizontalAlign = LEFT;\n var verticalAlign = TOP;\n var x, y;\n if (options.vertical) {\n x = Math.min(box.x2, clipBox.x2) + TOOLTIP_OFFSET;\n if (aboveAxis) {\n y = Math.max(box.y1, clipBox.y1);\n } else {\n y = Math.min(box.y2, clipBox.y2);\n verticalAlign = BOTTOM;\n }\n } else {\n var x1 = Math.max(box.x1, clipBox.x1);\n var x2 = Math.min(box.x2, clipBox.x2);\n if (options.isStacked) {\n verticalAlign = BOTTOM;\n if (aboveAxis) {\n horizontalAlign = RIGHT;\n x = x2;\n } else {\n x = x1;\n }\n y = Math.max(box.y1, clipBox.y1) - TOOLTIP_OFFSET;\n } else {\n if (aboveAxis) {\n x = x2 + TOOLTIP_OFFSET;\n } else {\n x = x1 - TOOLTIP_OFFSET;\n horizontalAlign = RIGHT;\n }\n y = Math.max(box.y1, clipBox.y1);\n }\n }\n return {\n point: new Point(x, y),\n align: {\n horizontal: horizontalAlign,\n vertical: verticalAlign\n }\n };\n },\n overlapsBox: function (box) {\n return this.box.overlaps(box);\n }\n });\n deepExtend(Bar.prototype, PointEventsMixin);\n deepExtend(Bar.prototype, NoteMixin);\n Bar.prototype.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 var ClusterLayout = ChartElement.extend({\n reflow: function (box) {\n var ref = this.options;\n var vertical = ref.vertical;\n var gap = ref.gap;\n var spacing = ref.spacing;\n var children = this.children;\n var count = children.length;\n var axis = vertical ? Y : X;\n var slots = count + gap + spacing * (count - 1);\n var slotSize = (vertical ? box.height() : box.width()) / slots;\n var position = box[axis + 1] + slotSize * (gap / 2);\n for (var i = 0; i < count; i++) {\n var 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 setDefaultOptions(ClusterLayout, {\n vertical: false,\n gap: 0,\n spacing: 0\n });\n var StackWrap = ChartElement.extend({\n reflow: function (targetBox) {\n var this$1 = this;\n var positionAxis = this.options.vertical ? X : Y;\n var children = this.children;\n var childrenCount = children.length;\n var box = this.box = new Box();\n for (var i = 0; i < childrenCount; i++) {\n var currentChild = children[i];\n if (currentChild.visible !== false) {\n var childBox = currentChild.box.clone();\n childBox.snapTo(targetBox, positionAxis);\n if (i === 0) {\n box = this$1.box = childBox.clone();\n }\n currentChild.reflow(childBox);\n box.wrap(childBox);\n }\n }\n }\n });\n setDefaultOptions(StackWrap, { vertical: true });\n var BarChart = CategoricalChart.extend({\n render: function () {\n CategoricalChart.fn.render.call(this);\n this.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 categoryIx = fields.categoryIx;\n var category = fields.category;\n var series = fields.series;\n var seriesIx = fields.seriesIx;\n var ref = this;\n var options = ref.options;\n var children = ref.children;\n var isStacked = options.isStacked;\n var value = this.pointValue(data);\n var 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 = this.evalPointOptions(pointOptions, value, category, categoryIx, series, seriesIx);\n if (isFunction(series.color)) {\n color = pointOptions.color;\n }\n var pointType = this.pointType();\n var point = new pointType(value, pointOptions);\n point.color = color;\n var cluster = children[categoryIx];\n if (!cluster) {\n var clusterType = this.clusterType();\n cluster = new clusterType({\n vertical: options.invertAxes,\n gap: options.gap,\n spacing: options.spacing\n });\n this.append(cluster);\n }\n if (isStacked) {\n var stackWrap = this.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 === datavizConstants.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 options = this.options;\n var categorySlot = categoryAxis.getSlot(categoryIx);\n var startValue = valueAxis.startValue();\n if (options.isStacked) {\n var zeroSlot = valueAxis.getSlot(startValue, startValue, true);\n var 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 children = this.children;\n var childrenLength = children.length;\n for (var i = 0; i < childrenLength; i++) {\n children[i].reflow(categorySlots[i]);\n }\n },\n createAnimation: function () {\n this._setAnimationOptions();\n CategoricalChart.fn.createAnimation.call(this);\n if (anyHasZIndex(this.options.series)) {\n this._setChildrenAnimation();\n }\n },\n _setChildrenAnimation: function () {\n var this$1 = this;\n var points = this.points;\n for (var idx = 0; idx < points.length; idx++) {\n var point = points[idx];\n var pointVisual = point.visual;\n if (pointVisual && defined(pointVisual.options.zIndex)) {\n point.options.animation = this$1.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 (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 GeometryPoint(origin.x1, origin.y1);\n animation.vertical = !options.invertAxes;\n }\n });\n setDefaultOptions(BarChart, { animation: { type: BAR } });\n var Candlestick = ChartElement.extend({\n init: function (value, options) {\n ChartElement.fn.init.call(this, options);\n this.value = value;\n },\n reflow: function (box) {\n var ref = this;\n var options = ref.options;\n var value = ref.value;\n var chart = ref.owner;\n var valueAxis = chart.seriesValueAxis(options);\n var ocSlot = valueAxis.getSlot(value.open, value.close);\n var lhSlot = valueAxis.getSlot(value.low, value.high);\n ocSlot.x1 = lhSlot.x1 = box.x1;\n ocSlot.x2 = lhSlot.x2 = box.x2;\n this.realBody = ocSlot;\n var mid = lhSlot.center().x;\n var points = [];\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 this.lines = points;\n this.box = lhSlot.clone().wrap(ocSlot);\n if (!this._rendered) {\n this._rendered = true;\n this.createNote();\n }\n this.reflowNote();\n },\n reflowNote: function () {\n if (this.note) {\n this.note.reflow(this.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 Group();\n this.createBody(group, options);\n this.createLines(group, options);\n return group;\n },\n createBody: function (container, options) {\n var body = 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 = Path.fromPoints(lines[i], lineStyle);\n alignPathToPixel(line);\n container.append(line);\n }\n },\n getBorderColor: function () {\n var border = this.options.border;\n var borderColor = border.color;\n if (!defined(borderColor)) {\n borderColor = new Color(this.color).brightness(border._brightness).toHex();\n }\n return borderColor;\n },\n createOverlay: function () {\n var overlay = 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 box = this.box;\n var clipBox = this.owner.pane.clipBox() || box;\n return {\n point: new Point(box.x2 + TOOLTIP_OFFSET, Math.max(box.y1, clipBox.y1) + TOOLTIP_OFFSET),\n align: {\n horizontal: LEFT,\n vertical: TOP\n }\n };\n },\n formatValue: function (format) {\n return this.owner.formatPointValue(this, format);\n },\n overlapsBox: function (box) {\n return this.box.overlaps(box);\n }\n });\n setDefaultOptions(Candlestick, {\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 deepExtend(Candlestick.prototype, PointEventsMixin);\n deepExtend(Candlestick.prototype, NoteMixin);\n function areNumbers(values) {\n return countNumbers(values) === values.length;\n }\n var CandlestickChart = CategoricalChart.extend({\n reflowCategories: function (categorySlots) {\n var children = this.children;\n var childrenLength = children.length;\n for (var i = 0; i < childrenLength; i++) {\n children[i].reflow(categorySlots[i]);\n }\n },\n addValue: function (data, fields) {\n var categoryIx = fields.categoryIx;\n var category = fields.category;\n var series = fields.series;\n var seriesIx = fields.seriesIx;\n var ref = this;\n var children = ref.children;\n var options = ref.options;\n var value = data.valueFields;\n var valueParts = this.splitValue(value);\n var hasValue = areNumbers(valueParts);\n var dataItem = series.data[categoryIx];\n var categoryPoints = this.categoryPoints[categoryIx];\n var point;\n if (!categoryPoints) {\n this.categoryPoints[categoryIx] = categoryPoints = [];\n }\n if (hasValue) {\n point = this.createPoint(data, fields);\n }\n var cluster = children[categoryIx];\n if (!cluster) {\n cluster = new ClusterLayout({\n vertical: options.invertAxes,\n gap: options.gap,\n spacing: options.spacing\n });\n this.append(cluster);\n }\n if (point) {\n this.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 = this;\n point.dataItem = dataItem;\n point.noteText = data.fields.noteText;\n }\n this.points.push(point);\n categoryPoints.push(point);\n },\n pointType: function () {\n return Candlestick;\n },\n createPoint: function (data, fields) {\n var categoryIx = fields.categoryIx;\n var category = fields.category;\n var series = fields.series;\n var seriesIx = fields.seriesIx;\n var pointType = this.pointType();\n var value = data.valueFields;\n var pointOptions = deepExtend({}, series);\n var color = data.fields.color || series.color;\n pointOptions = this.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 (isFunction(series.color)) {\n color = pointOptions.color;\n }\n pointOptions.vertical = !this.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 axisName = fields.series.axis;\n var parts = this.splitValue(value);\n var axisRange = this.valueAxisRanges[axisName];\n axisRange = this.valueAxisRanges[axisName] = axisRange || {\n min: MAX_VALUE,\n max: MIN_VALUE\n };\n axisRange = this.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 this.chartService.format.auto(format, value.open, value.high, value.low, value.close, point.category);\n },\n animationPoints: function () {\n return this.points;\n }\n });\n deepExtend(CandlestickChart.prototype, ClipAnimationMixin);\n var BoxPlot = Candlestick.extend({\n init: function (value, options) {\n Candlestick.fn.init.call(this, value, options);\n this.createNote();\n },\n reflow: function (box) {\n var ref = this;\n var options = ref.options;\n var value = ref.value;\n var chart = ref.owner;\n var valueAxis = chart.seriesValueAxis(options);\n var whiskerSlot, boxSlot;\n this.boxSlot = boxSlot = valueAxis.getSlot(value.q1, value.q3);\n this.realBody = boxSlot;\n this.reflowBoxSlot(box);\n this.whiskerSlot = whiskerSlot = valueAxis.getSlot(value.lower, value.upper);\n this.reflowWhiskerSlot(box);\n var medianSlot = valueAxis.getSlot(value.median);\n if (value.mean) {\n var meanSlot = valueAxis.getSlot(value.mean);\n this.meanPoints = this.calcMeanPoints(box, meanSlot);\n }\n this.whiskerPoints = this.calcWhiskerPoints(boxSlot, whiskerSlot);\n this.medianPoints = this.calcMedianPoints(box, medianSlot);\n this.box = whiskerSlot.clone().wrap(boxSlot);\n this.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 this$1 = this;\n var value = this.value;\n var outliers = value.outliers || [];\n var outerFence = Math.abs(value.q3 - value.q1) * 3;\n var elements = [];\n var markers = options.markers || {};\n for (var i = 0; i < outliers.length; i++) {\n var 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 var markersBorder = deepExtend({}, markers.border);\n if (!defined(markersBorder.color)) {\n if (defined(this$1.color)) {\n markersBorder.color = this$1.color;\n } else {\n markersBorder.color = new Color(markers.background).brightness(BORDER_BRIGHTNESS).toHex();\n }\n }\n var 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 this$1 = this;\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$1.options.vertical) {\n markerBox.move(center.x);\n } else {\n markerBox.move(undefined, center.y);\n }\n this$1.box = this$1.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.whiskers);\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.fn.getBorderColor.call(this);\n }\n });\n setDefaultOptions(BoxPlot, {\n border: { _brightness: 0.8 },\n line: { width: 2 },\n median: { color: '#f6f6f6' },\n mean: {\n width: 2,\n dashType: 'dash',\n color: '#f6f6f6'\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: datavizConstants.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 deepExtend(BoxPlot.prototype, 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 BoxPlotChart = CandlestickChart.extend({\n addValue: function (data, fields) {\n var categoryIx = fields.categoryIx;\n var category = fields.category;\n var series = fields.series;\n var seriesIx = fields.seriesIx;\n var ref = this;\n var children = ref.children;\n var options = ref.options;\n var value = data.valueFields;\n var valueParts = this.splitValue(value);\n var hasValue = areNumbers(valueParts);\n var dataItem = series.data[categoryIx];\n var categoryPoints = this.categoryPoints[categoryIx];\n var point;\n if (!categoryPoints) {\n this.categoryPoints[categoryIx] = categoryPoints = [];\n }\n if (hasValue) {\n point = this.createPoint(data, fields);\n }\n var cluster = children[categoryIx];\n if (!cluster) {\n cluster = new ClusterLayout({\n vertical: options.invertAxes,\n gap: options.gap,\n spacing: options.spacing\n });\n this.append(cluster);\n }\n if (point) {\n this.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 = this;\n point.dataItem = dataItem;\n }\n this.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 axisName = fields.series.axis;\n var axisRange = this.valueAxisRanges[axisName];\n var parts = this.splitValue(value).concat(this.filterOutliers(value.outliers));\n if (defined(value.mean)) {\n parts = parts.concat(value.mean);\n }\n axisRange = this.valueAxisRanges[axisName] = axisRange || {\n min: MAX_VALUE,\n max: MIN_VALUE\n };\n axisRange = this.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 this.chartService.format.auto(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;\n var result = [];\n for (var i = 0; i < length; i++) {\n var item = items[i];\n if (defined(item) && item !== null) {\n result.push(item);\n }\n }\n return result;\n }\n });\n var ScatterErrorBar = ErrorBarBase.extend({\n getAxis: function () {\n var axes = this.chart.seriesAxes(this.series);\n var axis = this.isVertical ? axes.y : axes.x;\n return axis;\n }\n });\n function hasValue(value) {\n return defined(value) && value !== null;\n }\n var ScatterChart = ChartElement.extend({\n init: function (plotArea, options) {\n ChartElement.fn.init.call(this, options);\n this.plotArea = plotArea;\n this.chartService = plotArea.chartService;\n this._initFields();\n this.render();\n },\n _initFields: function () {\n this.xAxisRanges = {};\n this.yAxisRanges = {};\n this.points = [];\n this.seriesPoints = [];\n this.seriesOptions = [];\n this._evalSeries = [];\n },\n render: function () {\n this.traverseDataPoints(this.addValue.bind(this));\n },\n addErrorBar: function (point, field, fields) {\n var value = point.value[field];\n var valueErrorField = field + 'Value';\n var lowField = field + 'ErrorLow';\n var highField = field + 'ErrorHigh';\n var seriesIx = fields.seriesIx;\n var series = fields.series;\n var errorBars = point.options.errorBars;\n var lowValue = fields[lowField];\n var highValue = fields[highField];\n if (isNumber(value)) {\n var errorRange;\n if (isNumber(lowValue) && isNumber(highValue)) {\n errorRange = {\n low: lowValue,\n high: highValue\n };\n }\n if (errorBars && defined(errorBars[valueErrorField])) {\n this.seriesErrorRanges = this.seriesErrorRanges || {\n x: [],\n y: []\n };\n this.seriesErrorRanges[field][seriesIx] = this.seriesErrorRanges[field][seriesIx] || new ErrorRangeCalculator(errorBars[valueErrorField], series, field);\n errorRange = this.seriesErrorRanges[field][seriesIx].getErrorRange(value, errorBars[valueErrorField]);\n }\n if (errorRange) {\n this.addPointErrorBar(errorRange, point, field);\n }\n }\n },\n addPointErrorBar: function (errorRange, point, field) {\n var low = errorRange.low;\n var high = errorRange.high;\n var series = point.series;\n var options = point.options.errorBars;\n var isVertical = field === Y;\n var item = {};\n point[field + 'Low'] = low;\n point[field + 'High'] = high;\n point.errorBars = point.errorBars || [];\n var errorBar = new ScatterErrorBar(low, high, isVertical, this, series, options);\n point.errorBars.push(errorBar);\n point.append(errorBar);\n item[field] = low;\n this.updateRange(item, series);\n item[field] = high;\n this.updateRange(item, series);\n },\n addValue: function (value, fields) {\n var x = value.x;\n var y = value.y;\n var seriesIx = fields.seriesIx;\n var series = this.options.series[seriesIx];\n var missingValues = this.seriesMissingValues(series);\n var seriesPoints = this.seriesPoints[seriesIx];\n var pointValue = value;\n if (!(hasValue(x) && hasValue(y))) {\n pointValue = this.createMissingValue(pointValue, missingValues);\n }\n var point;\n if (pointValue) {\n point = this.createPoint(pointValue, fields);\n if (point) {\n $.extend(point, fields);\n this.addErrorBar(point, X, fields);\n this.addErrorBar(point, Y, fields);\n }\n this.updateRange(pointValue, fields.series);\n }\n this.points.push(point);\n seriesPoints.push(point);\n },\n seriesMissingValues: function (series) {\n return series.missingValues;\n },\n createMissingValue: function () {\n },\n updateRange: function (value, series) {\n var intlService = this.chartService.intl;\n var xAxisName = series.xAxis;\n var yAxisName = series.yAxis;\n var x = value.x;\n var y = value.y;\n var xAxisRange = this.xAxisRanges[xAxisName];\n var yAxisRange = this.yAxisRanges[yAxisName];\n if (hasValue(x)) {\n xAxisRange = this.xAxisRanges[xAxisName] = xAxisRange || {\n min: MAX_VALUE,\n max: MIN_VALUE\n };\n if (isString(x)) {\n x = parseDate(intlService, 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 = this.yAxisRanges[yAxisName] = yAxisRange || {\n min: MAX_VALUE,\n max: MIN_VALUE\n };\n if (isString(y)) {\n y = parseDate(intlService, 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 'content',\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 var pointOptions = options;\n if (doEval) {\n pointOptions = deepExtend({}, options);\n evalOptions(pointOptions, {\n value: value,\n series: series,\n dataItem: fields.dataItem\n }, state);\n }\n return pointOptions;\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().prototype.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 series = fields.series;\n var pointOptions = this.pointOptions(series, fields.seriesIx);\n var color = fields.color || series.color;\n pointOptions = this.evalPointOptions(pointOptions, value, fields);\n if (isFunction(series.color)) {\n color = pointOptions.color;\n }\n var point = new LinePoint(value, pointOptions);\n point.color = color;\n this.append(point);\n return point;\n },\n seriesAxes: function (series) {\n var xAxisName = series.xAxis;\n var yAxisName = series.yAxis;\n var plotArea = this.plotArea;\n var xAxis = xAxisName ? plotArea.namedXAxes[xAxisName] : plotArea.axisX;\n var 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 this$1 = this;\n var chartPoints = this.points;\n var limit = !this.options.clip;\n var pointIx = 0;\n this.traverseDataPoints(function (value, fields) {\n var point = chartPoints[pointIx++];\n var seriesAxes = this$1.seriesAxes(fields.series);\n var slotX = seriesAxes.x.getSlot(value.x, value.x, limit);\n var slotY = seriesAxes.y.getSlot(value.y, value.y, limit);\n if (point) {\n if (slotX && slotY) {\n var pointSlot = this$1.pointSlot(slotX, slotY);\n point.reflow(pointSlot);\n } else {\n point.visible = false;\n }\n }\n });\n this.box = targetBox;\n },\n pointSlot: function (slotX, slotY) {\n return new Box(slotX.x1, slotY.y1, slotX.x2, slotY.y2);\n },\n traverseDataPoints: function (callback) {\n var this$1 = this;\n var ref = this;\n var series = ref.options.series;\n var seriesPoints = ref.seriesPoints;\n for (var seriesIx = 0; seriesIx < series.length; seriesIx++) {\n var currentSeries = series[seriesIx];\n var currentSeriesPoints = seriesPoints[seriesIx];\n if (!currentSeriesPoints) {\n seriesPoints[seriesIx] = [];\n }\n for (var pointIx = 0; pointIx < currentSeries.data.length; pointIx++) {\n var ref$1 = this$1._bindPoint(currentSeries, seriesIx, pointIx);\n var value = ref$1.valueFields;\n var fields = ref$1.fields;\n callback(value, deepExtend({\n pointIx: pointIx,\n series: currentSeries,\n seriesIx: seriesIx,\n dataItem: currentSeries.data[pointIx],\n owner: this$1\n }, fields));\n }\n }\n },\n formatPointValue: function (point, format) {\n var value = point.value;\n return this.chartService.format.auto(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 setDefaultOptions(ScatterChart, {\n series: [],\n tooltip: { format: '{0}, {1}' },\n labels: { format: '{0}, {1}' },\n clip: true\n });\n deepExtend(ScatterChart.prototype, ClipAnimationMixin, { _bindPoint: CategoricalChart.prototype._bindPoint });\n var Bubble = LinePoint.extend({\n init: function (value, options) {\n LinePoint.fn.init.call(this, value, options);\n this.category = value.category;\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 + markers.border.width + border.width) / 2;\n var highlightGroup = new Group();\n var shadow = new drawing.Circle(new geometry.Circle([\n center.x,\n center.y + radius / 5 + border.width / 2\n ], radius + border.width / 2), {\n stroke: { color: 'none' },\n fill: this.createGradient({\n gradient: 'bubbleShadow',\n color: markers.background,\n stops: [\n {\n offset: 0,\n color: markers.background,\n opacity: 0.3\n },\n {\n offset: 1,\n color: markers.background,\n opacity: 0\n }\n ]\n })\n });\n var overlay = new drawing.Circle(new geometry.Circle([\n center.x,\n center.y\n ], radius), {\n stroke: {\n color: border.color || new Color(markers.background).brightness(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 highlightGroup.append(shadow, overlay);\n return highlightGroup;\n }\n });\n Bubble.prototype.defaults = deepExtend({}, Bubble.prototype.defaults, {\n labels: { position: CENTER },\n highlight: {\n opacity: 1,\n border: {\n color: '#fff',\n width: 2,\n opacity: 1\n }\n }\n });\n var BubbleChart = ScatterChart.extend({\n _initFields: function () {\n this._maxSize = MIN_VALUE;\n ScatterChart.fn._initFields.call(this);\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 this.updateBubblesSize(box);\n ScatterChart.fn.reflow.call(this, box);\n },\n pointType: function () {\n return Bubble;\n },\n createPoint: function (value, fields) {\n var series = fields.series;\n var pointsCount = series.data.length;\n var delay = fields.pointIx * (INITIAL_ANIMATION_DURATION / pointsCount);\n var animationOptions = {\n delay: delay,\n duration: INITIAL_ANIMATION_DURATION - delay,\n type: BUBBLE\n };\n var color = fields.color || series.color;\n if (value.size < 0 && series.negativeValues.visible) {\n color = valueOrDefault(series.negativeValues.color, color);\n }\n var 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 = this.evalPointOptions(pointOptions, value, fields);\n if (isFunction(series.color)) {\n color = pointOptions.color;\n }\n pointOptions.markers.background = color;\n var point = new Bubble(value, pointOptions);\n point.color = color;\n this.append(point);\n return point;\n },\n updateBubblesSize: function (box) {\n var this$1 = this;\n var ref = this;\n var series = ref.options.series;\n var boxSize = Math.min(box.width(), box.height());\n for (var seriesIx = 0; seriesIx < series.length; seriesIx++) {\n var currentSeries = series[seriesIx];\n var seriesPoints = this$1.seriesPoints[seriesIx];\n var minSize = currentSeries.minSize || Math.max(boxSize * 0.02, 10);\n var maxSize = currentSeries.maxSize || boxSize * 0.2;\n var minR = minSize / 2;\n var maxR = maxSize / 2;\n var minArea = Math.PI * minR * minR;\n var maxArea = Math.PI * maxR * maxR;\n var areaRange = maxArea - minArea;\n var areaRatio = areaRange / this$1._maxSize;\n for (var pointIx = 0; pointIx < seriesPoints.length; pointIx++) {\n var point = seriesPoints[pointIx];\n if (point) {\n var area = Math.abs(point.value.size) * areaRatio;\n var radius = Math.sqrt((minArea + area) / Math.PI);\n var baseZIndex = valueOrDefault(point.options.zIndex, 0);\n var zIndex = baseZIndex + (1 - radius / maxR);\n deepExtend(point.options, {\n zIndex: zIndex,\n markers: {\n size: radius * 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 this.chartService.format.auto(format, value.x, value.y, value.size, point.category);\n },\n createAnimation: function () {\n },\n createVisual: function () {\n }\n });\n setDefaultOptions(BubbleChart, {\n tooltip: { format: '{3}' },\n labels: { format: '{3}' }\n });\n var Target = ShapeElement.extend({});\n deepExtend(Target.prototype, PointEventsMixin);\n var Bullet = ChartElement.extend({\n init: function (value, options) {\n ChartElement.fn.init.call(this, options);\n this.aboveAxis = this.options.aboveAxis;\n this.color = options.color || WHITE;\n this.value = value;\n },\n render: function () {\n var options = this.options;\n if (!this._rendered) {\n this._rendered = true;\n if (defined(this.value.target)) {\n this.target = new Target({\n type: options.target.shape,\n background: options.target.color || this.color,\n opacity: options.opacity,\n zIndex: options.zIndex,\n border: options.target.border,\n vAlign: TOP,\n align: RIGHT\n });\n this.target.value = this.value;\n this.target.dataItem = this.dataItem;\n this.target.series = this.series;\n this.append(this.target);\n }\n this.createNote();\n }\n },\n reflow: function (box) {\n this.render();\n var ref = this;\n var options = ref.options;\n var target = ref.target;\n var chart = ref.owner;\n var invertAxes = options.invertAxes;\n var valueAxis = chart.seriesValueAxis(this.options);\n var categorySlot = chart.categorySlot(chart.categoryAxis, options.categoryIx, valueAxis);\n var targetValueSlot = valueAxis.getSlot(this.value.target);\n var targetSlotX = invertAxes ? targetValueSlot : categorySlot;\n var targetSlotY = invertAxes ? categorySlot : targetValueSlot;\n if (target) {\n var targetSlot = new Box(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 (this.note) {\n this.note.reflow(box);\n }\n this.box = box;\n },\n createVisual: function () {\n ChartElement.fn.createVisual.call(this);\n var options = this.options;\n var body = 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 = Animation.create(this.bodyVisual, this.options.animation);\n }\n },\n createHighlight: function (style) {\n return 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 return this.owner.formatPointValue(this, format);\n }\n });\n Bullet.prototype.tooltipAnchor = Bar.prototype.tooltipAnchor;\n setDefaultOptions(Bullet, {\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 deepExtend(Bullet.prototype, PointEventsMixin);\n deepExtend(Bullet.prototype, NoteMixin);\n var BulletChart = CategoricalChart.extend({\n init: function (plotArea, options) {\n wrapData(options);\n CategoricalChart.fn.init.call(this, plotArea, options);\n },\n reflowCategories: function (categorySlots) {\n var children = this.children;\n var childrenLength = children.length;\n for (var 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 categoryIx = fields.categoryIx;\n var category = fields.category;\n var series = fields.series;\n var seriesIx = fields.seriesIx;\n var ref = this;\n var options = ref.options;\n var children = ref.children;\n var value = data.valueFields;\n var 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 = this.evalPointOptions(bulletOptions, value, category, categoryIx, series, seriesIx);\n if (isFunction(series.color)) {\n color = bulletOptions.color;\n }\n var bullet = new Bullet(value, bulletOptions);\n bullet.color = color;\n var cluster = children[categoryIx];\n if (!cluster) {\n cluster = new ClusterLayout({\n vertical: options.invertAxes,\n gap: options.gap,\n spacing: options.spacing\n });\n this.append(cluster);\n }\n cluster.append(bullet);\n return bullet;\n },\n updateRange: function (value, fields) {\n var current = value.current;\n var target = value.target;\n var axisName = fields.series.axis;\n var axisRange = this.valueAxisRanges[axisName];\n if (defined(current) && !isNaN(current) && defined(target && !isNaN(target))) {\n axisRange = this.valueAxisRanges[axisName] = axisRange || {\n min: MAX_VALUE,\n max: MIN_VALUE\n };\n axisRange.min = Math.min(axisRange.min, current, target);\n axisRange.max = Math.max(axisRange.max, current, target);\n }\n },\n formatPointValue: function (point, format) {\n return this.chartService.format.auto(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 this$1 = this;\n var points = this.points;\n this._setAnimationOptions();\n for (var idx = 0; idx < points.length; idx++) {\n var point = points[idx];\n point.options.animation = this$1.options.animation;\n point.createAnimation();\n }\n }\n });\n BulletChart.prototype._setAnimationOptions = BarChart.prototype._setAnimationOptions;\n setDefaultOptions(BulletChart, { animation: { type: BAR } });\n function wrapData(options) {\n var series = options.series;\n for (var i = 0; i < series.length; i++) {\n var seriesItem = series[i];\n var data = seriesItem.data;\n if (data && !isArray(data[0]) && !isObject(data[0])) {\n seriesItem.data = [data];\n }\n }\n }\n var BaseTooltip = Class.extend({\n init: function (chartService, options) {\n this.chartService = chartService;\n this.options = deepExtend({}, this.options, options);\n },\n getStyle: 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 var padding = getSpacing(options.padding || {}, 'auto');\n return {\n backgroundColor: background,\n borderColor: border,\n font: options.font,\n color: options.color,\n opacity: options.opacity,\n borderWidth: styleValue(options.border.width),\n paddingTop: styleValue(padding.top),\n paddingBottom: styleValue(padding.bottom),\n paddingLeft: styleValue(padding.left),\n paddingRight: styleValue(padding.right)\n };\n },\n show: function (options, tooltipOptions, point) {\n options.format = tooltipOptions.format;\n var style = this.getStyle(tooltipOptions, point);\n options.style = style;\n if (!defined(tooltipOptions.color) && new Color(style.backgroundColor).percBrightness() > 180) {\n options.className = 'k-chart-tooltip-inverse';\n }\n this.chartService.notify(SHOW_TOOLTIP, options);\n },\n hide: function () {\n if (this.chartService) {\n this.chartService.notify(HIDE_TOOLTIP);\n }\n },\n destroy: function () {\n delete this.chartService;\n }\n });\n setDefaultOptions(BaseTooltip, {\n border: { width: 1 },\n opacity: 1\n });\n var CrosshairTooltip = BaseTooltip.extend({\n init: function (chartService, crosshair, options) {\n BaseTooltip.fn.init.call(this, chartService, options);\n this.crosshair = crosshair;\n this.formatService = chartService.format;\n this.initAxisName();\n },\n initAxisName: function () {\n var axis = this.crosshair.axis;\n var plotArea = axis.plotArea;\n var name;\n if (plotArea.categoryAxis) {\n name = axis.getCategory ? 'categoryAxis' : 'valueAxis';\n } else {\n name = axis.options.vertical ? 'yAxis' : 'xAxis';\n }\n this.axisName = name;\n },\n showAt: function (point) {\n var ref = this;\n var axis = ref.crosshair.axis;\n var options = ref.options;\n var value = axis[options.stickyMode ? 'getCategory' : 'getValue'](point);\n var formattedValue = value;\n if (options.format) {\n formattedValue = this.formatService.auto(options.format, value);\n } else if (axis.options.type === DATE) {\n formattedValue = this.formatService.auto(axis.options.labels.dateFormats[axis.options.baseUnit], value);\n }\n this.show({\n point: point,\n anchor: this.getAnchor(),\n crosshair: this.crosshair,\n value: formattedValue,\n axisName: this.axisName,\n axisIndex: this.crosshair.axis.axisIndex\n }, this.options);\n },\n hide: function () {\n this.chartService.notify(HIDE_TOOLTIP, {\n crosshair: this.crosshair,\n axisName: this.axisName,\n axisIndex: this.crosshair.axis.axisIndex\n });\n },\n getAnchor: function () {\n var ref = this;\n var crosshair = ref.crosshair;\n var ref_options = ref.options;\n var position = ref_options.position;\n var padding = ref_options.padding;\n var vertical = !crosshair.axis.options.vertical;\n var lineBox = crosshair.line.bbox();\n var horizontalAlign, verticalAlign, point;\n if (vertical) {\n horizontalAlign = CENTER;\n if (position === BOTTOM) {\n verticalAlign = TOP;\n point = lineBox.bottomLeft().translate(0, padding);\n } else {\n verticalAlign = BOTTOM;\n point = lineBox.topLeft().translate(0, -padding);\n }\n } else {\n verticalAlign = CENTER;\n if (position === LEFT) {\n horizontalAlign = RIGHT;\n point = lineBox.topLeft().translate(-padding, 0);\n } else {\n horizontalAlign = LEFT;\n point = lineBox.topRight().translate(padding, 0);\n }\n }\n return {\n point: point,\n align: {\n horizontal: horizontalAlign,\n vertical: verticalAlign\n }\n };\n }\n });\n setDefaultOptions(CrosshairTooltip, { padding: 10 });\n var Crosshair = ChartElement.extend({\n init: function (chartService, axis, options) {\n ChartElement.fn.init.call(this, options);\n this.axis = axis;\n this.stickyMode = axis instanceof CategoryAxis;\n var tooltipOptions = this.options.tooltip;\n if (tooltipOptions.visible) {\n this.tooltip = new CrosshairTooltip(chartService, this, deepExtend({}, tooltipOptions, { stickyMode: this.stickyMode }));\n }\n },\n showAt: function (point) {\n this.point = point;\n this.moveLine();\n this.line.visible(true);\n if (this.tooltip) {\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 ref = this;\n var axis = ref.axis;\n var point = ref.point;\n var vertical = axis.options.vertical;\n var box = this.getBox();\n var dim = vertical ? Y : X;\n var lineStart = new GeometryPoint(box.x1, box.y1);\n var lineEnd;\n if (vertical) {\n lineEnd = new GeometryPoint(box.x2, box.y1);\n } else {\n lineEnd = new GeometryPoint(box.x1, box.y2);\n }\n if (point) {\n if (this.stickyMode) {\n var 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 this.box = box;\n this.line.moveTo(lineStart).lineTo(lineEnd);\n },\n getBox: function () {\n var axis = this.axis;\n var axes = axis.pane.axes;\n var length = axes.length;\n var vertical = axis.options.vertical;\n var box = axis.lineBox().clone();\n var dim = vertical ? X : Y;\n var axisLineBox;\n for (var i = 0; i < length; i++) {\n var 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 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 if (this.tooltip) {\n this.tooltip.destroy();\n }\n ChartElement.fn.destroy.call(this);\n }\n });\n setDefaultOptions(Crosshair, {\n color: BLACK,\n width: 2,\n zIndex: -1,\n tooltip: { visible: false }\n });\n var ChartContainer = ChartElement.extend({\n init: function (options, pane) {\n ChartElement.fn.init.call(this, options);\n this.pane = pane;\n },\n shouldClip: function () {\n var children = this.children;\n var length = children.length;\n for (var 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 Group({ zIndex: 0 });\n if (this.shouldClip()) {\n var clipBox = this.clipBox = this._clipBox();\n var clipRect = clipBox.toRect();\n var clipPath = Path.fromRect(clipRect);\n this.visual.clip(clipPath);\n this.unclipLabels();\n }\n },\n stackRoot: function () {\n return this;\n },\n unclipLabels: function () {\n var ref = this;\n var charts = ref.children;\n var clipBox = ref.clipBox;\n for (var i = 0; i < charts.length; i++) {\n var points = charts[i].points || {};\n var length = points.length;\n for (var j = 0; j < length; j++) {\n var point = points[j];\n if (point && point.visible !== false && point.overlapsBox && point.overlapsBox(clipBox)) {\n var label = point.label;\n var 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 ChartContainer.prototype.isStackRoot = true;\n var Pane = BoxElement.extend({\n init: function (options) {\n BoxElement.fn.init.call(this, options);\n this.id = paneID();\n this.createTitle();\n this.content = new ChartElement();\n this.chartContainer = new ChartContainer({}, this);\n this.append(this.content);\n this.axes = [];\n this.charts = [];\n },\n createTitle: function () {\n var titleOptions = this.options.title;\n if (isObject(titleOptions)) {\n titleOptions = deepExtend({}, titleOptions, {\n align: titleOptions.position,\n position: TOP\n });\n }\n this.title = dataviz.Title.buildTitle(titleOptions, this, Pane.prototype.options.title);\n },\n appendAxis: function (axis) {\n this.content.append(axis);\n this.axes.push(axis);\n axis.pane = this;\n },\n appendChart: function (chart) {\n if (this.chartContainer.parent !== this.content) {\n this.content.append(this.chartContainer);\n }\n this.charts.push(chart);\n this.chartContainer.append(chart);\n chart.pane = this;\n },\n empty: function () {\n var this$1 = this;\n var plotArea = this.parent;\n if (plotArea) {\n for (var i = 0; i < this.axes.length; i++) {\n plotArea.removeAxis(this$1.axes[i]);\n }\n for (var i$1 = 0; i$1 < this.charts.length; i$1++) {\n plotArea.removeChart(this$1.charts[i$1]);\n }\n }\n this.axes = [];\n this.charts = [];\n this.content.destroy();\n this.content.children = [];\n this.chartContainer.children = [];\n },\n reflow: function (targetBox) {\n var content;\n if (last(this.children) === this.content) {\n content = this.children.pop();\n }\n BoxElement.fn.reflow.call(this, targetBox);\n if (content) {\n this.children.push(content);\n }\n if (this.title) {\n this.contentBox.y1 += this.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: function () {\n return this;\n },\n clipRoot: function () {\n return this;\n },\n createGridLines: function () {\n var axes = this.axes;\n var allAxes = axes.concat(this.parent.axes);\n var vGridLines = [];\n var hGridLines = [];\n for (var i = 0; i < axes.length; i++) {\n var axis = axes[i];\n var vertical = axis.options.vertical;\n var gridLines = vertical ? vGridLines : hGridLines;\n for (var j = 0; j < allAxes.length; j++) {\n if (gridLines.length === 0) {\n var 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 = this.createGradient.bind(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;\n var length = axes.length;\n var chartsBox = new Box();\n for (var idx = 0; idx < length; idx++) {\n var axis = axes[idx];\n var axisValueField = axis.options.vertical ? Y : X;\n var 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 var length$1 = allAxes.length;\n for (var idx$1 = 0; idx$1 < length$1; idx$1++) {\n var axis$1 = allAxes[idx$1];\n if (!axis$1.options.vertical) {\n var lineBox$1 = axis$1.lineBox();\n chartsBox.x1 = lineBox$1.x1;\n chartsBox.x2 = lineBox$1.x2;\n }\n }\n }\n return chartsBox;\n },\n clipBox: function () {\n return this.chartContainer.clipBox;\n }\n });\n var ID = 1;\n function paneID() {\n return 'pane' + ID++;\n }\n Pane.prototype.isStackRoot = true;\n setDefaultOptions(Pane, {\n zIndex: -1,\n shrinkToFit: true,\n title: { align: LEFT },\n visible: true\n });\n var PlotAreaBase = ChartElement.extend({\n init: function (series, options, chartService) {\n ChartElement.fn.init.call(this, options);\n this.initFields(series, options);\n this.series = series;\n this.initSeries();\n this.charts = [];\n this.options.legend.items = [];\n this.axes = [];\n this.crosshairs = [];\n this.chartService = chartService;\n this.createPanes();\n this.render();\n this.createCrosshairs();\n },\n initFields: function () {\n },\n initSeries: function () {\n var series = this.series;\n for (var i = 0; i < series.length; i++) {\n series[i].index = i;\n }\n },\n createPanes: function () {\n var this$1 = this;\n var defaults = { title: { color: (this.options.title || {}).color } };\n var panes = [];\n var paneOptions = this.options.panes || [];\n var panesLength = Math.max(paneOptions.length, 1);\n function setTitle(options, defaults) {\n if (isString(options.title)) {\n options.title = { text: options.title };\n }\n options.title = deepExtend({}, defaults.title, options.title);\n }\n for (var i = 0; i < panesLength; i++) {\n var options = paneOptions[i] || {};\n setTitle(options, defaults);\n var currentPane = new Pane(options);\n currentPane.paneIndex = i;\n panes.push(currentPane);\n this$1.append(currentPane);\n }\n this.panes = panes;\n },\n createCrosshairs: function (panes) {\n var this$1 = this;\n if (panes === void 0) {\n panes = this.panes;\n }\n for (var i = 0; i < panes.length; i++) {\n var pane = panes[i];\n for (var j = 0; j < pane.axes.length; j++) {\n var axis = pane.axes[j];\n if (axis.options.crosshair && axis.options.crosshair.visible) {\n var currentCrosshair = new Crosshair(this$1.chartService, axis, axis.options.crosshair);\n this$1.crosshairs.push(currentCrosshair);\n pane.content.append(currentCrosshair);\n }\n }\n }\n },\n removeCrosshairs: function (pane) {\n var crosshairs = this.crosshairs;\n var axes = pane.axes;\n for (var i = crosshairs.length - 1; i >= 0; i--) {\n for (var 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 panes = this.panes;\n var matchingPane;\n for (var 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 panes = this.panes;\n var matchingPane;\n for (var 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 pane = this.findPane(axis.options.pane);\n pane.appendAxis(axis);\n this.axes.push(axis);\n axis.plotArea = this;\n },\n removeAxis: function (axisToRemove) {\n var this$1 = this;\n var filteredAxes = [];\n for (var i = 0; i < this.axes.length; i++) {\n var axis = this$1.axes[i];\n if (axisToRemove !== axis) {\n filteredAxes.push(axis);\n } else {\n axis.destroy();\n }\n }\n this.axes = filteredAxes;\n },\n appendChart: function (chart, pane) {\n this.charts.push(chart);\n if (pane) {\n pane.appendChart(chart);\n } else {\n this.append(chart);\n }\n },\n removeChart: function (chartToRemove) {\n var this$1 = this;\n var filteredCharts = [];\n for (var i = 0; i < this.charts.length; i++) {\n var chart = this$1.charts[i];\n if (chart !== chartToRemove) {\n filteredCharts.push(chart);\n } else {\n chart.destroy();\n }\n }\n this.charts = filteredCharts;\n },\n addToLegend: function (series) {\n var count = series.length;\n var legend = this.options.legend;\n var labels = legend.labels || {};\n var inactiveItems = legend.inactiveItems || {};\n var inactiveItemsLabels = inactiveItems.labels || {};\n var data = [];\n for (var i = 0; i < count; i++) {\n var currentSeries = series[i];\n var seriesVisible = currentSeries.visible !== false;\n if (currentSeries.visibleInLegend === false) {\n continue;\n }\n var text = currentSeries.name || '';\n var labelTemplate = seriesVisible ? getTemplate(labels) : getTemplate(inactiveItemsLabels) || getTemplate(labels);\n if (labelTemplate) {\n text = labelTemplate({\n text: text,\n series: currentSeries\n });\n }\n var defaults = currentSeries._defaults;\n var color = currentSeries.color;\n if (isFunction(color) && defaults) {\n color = defaults.color;\n }\n var itemLabelOptions = void 0, markerColor = void 0;\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 = [];\n var yAxes = [];\n for (var paneIx = 0; paneIx < panes.length; paneIx++) {\n var paneAxes = panes[paneIx].axes;\n for (var axisIx = 0; axisIx < paneAxes.length; axisIx++) {\n var 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 this$1 = this;\n var series = this.series;\n var seriesByPane = {};\n for (var i = 0; i < series.length; i++) {\n var currentSeries = series[i];\n var pane = this$1.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 result = [];\n for (var i = 0; i < series.length; i++) {\n var currentSeries = series[i];\n if (currentSeries.visible !== false) {\n result.push(currentSeries);\n }\n }\n return result;\n },\n reflow: function (targetBox) {\n var options = this.options.plotArea;\n var panes = this.panes;\n var margin = getSpacing(options.margin);\n this.box = targetBox.clone().unpad(margin);\n this.reflowPanes();\n this.reflowAxes(panes);\n this.reflowCharts(panes);\n },\n redraw: function (panes) {\n var this$1 = this;\n var panesArray = [].concat(panes);\n this.initSeries();\n for (var i = 0; i < panesArray.length; i++) {\n this$1.removeCrosshairs(panesArray[i]);\n panesArray[i].empty();\n }\n this.render(panesArray);\n this.reflowAxes(this.panes);\n this.reflowCharts(panesArray);\n this.createCrosshairs(panesArray);\n for (var i$1 = 0; i$1 < panesArray.length; i$1++) {\n panesArray[i$1].refresh();\n }\n },\n axisCrossingValues: function (axis, crossingAxes) {\n var options = axis.options;\n var crossingValues = [].concat(options.axisCrossingValues || options.axisCrossingValue);\n var valuesToAdd = crossingAxes.length - crossingValues.length;\n var defaultValue = crossingValues[0] || 0;\n for (var 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);\n var slotEdge = axis.options.reverse ? 2 : 1;\n var targetSlot = targetAxis.getSlot(targetCrossingValue, targetCrossingValue, true);\n var targetEdge = targetAxis.options.reverse ? 2 : 1;\n var 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 this$1 = this;\n var xAnchor = xAxes[0];\n var yAnchor = yAxes[0];\n var xAnchorCrossings = this.axisCrossingValues(xAnchor, yAxes);\n var yAnchorCrossings = this.axisCrossingValues(yAnchor, xAxes);\n var leftAnchors = {};\n var rightAnchors = {};\n var topAnchors = {};\n var bottomAnchors = {};\n for (var i = 0; i < yAxes.length; i++) {\n var axis = yAxes[i];\n var pane = axis.pane;\n var paneId = pane.id;\n var visible = axis.options.visible !== false;\n var anchor = paneAnchor(xAxes, pane) || xAnchor;\n var anchorCrossings = xAnchorCrossings;\n if (anchor !== xAnchor) {\n anchorCrossings = this$1.axisCrossingValues(anchor, yAxes);\n }\n this$1.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 if (visible) {\n leftAnchors[paneId] = axis;\n }\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 this$1.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 if (visible) {\n rightAnchors[paneId] = axis;\n }\n }\n if (i !== 0 && yAnchor.pane === axis.pane) {\n axis.alignTo(yAnchor);\n axis.reflow(axis.box);\n }\n }\n for (var i$1 = 0; i$1 < xAxes.length; i$1++) {\n var axis$1 = xAxes[i$1];\n var pane$1 = axis$1.pane;\n var paneId$1 = pane$1.id;\n var visible$1 = axis$1.options.visible !== false;\n var anchor$1 = paneAnchor(yAxes, pane$1) || yAnchor;\n var anchorCrossings$1 = yAnchorCrossings;\n if (anchor$1 !== yAnchor) {\n anchorCrossings$1 = this$1.axisCrossingValues(anchor$1, xAxes);\n }\n this$1.alignAxisTo(axis$1, anchor$1, xAnchorCrossings[i$1], anchorCrossings$1[i$1]);\n if (axis$1.options._overlap) {\n continue;\n }\n if (round(axis$1.lineBox().y1) === round(anchor$1.lineBox().y1)) {\n if (!axis$1._mirrored) {\n axis$1.options.labels.mirror = !axis$1.options.labels.mirror;\n axis$1._mirrored = true;\n }\n this$1.alignAxisTo(axis$1, anchor$1, xAnchorCrossings[i$1], anchorCrossings$1[i$1]);\n if (topAnchors[paneId$1]) {\n axis$1.reflow(axis$1.box.alignTo(topAnchors[paneId$1].box, TOP).translate(0, -axis$1.options.margin));\n }\n if (visible$1) {\n topAnchors[paneId$1] = axis$1;\n }\n }\n if (round(axis$1.lineBox().y2, datavizConstants.COORD_PRECISION) === round(anchor$1.lineBox().y2, datavizConstants.COORD_PRECISION)) {\n if (bottomAnchors[paneId$1]) {\n axis$1.reflow(axis$1.box.alignTo(bottomAnchors[paneId$1].box, BOTTOM).translate(0, axis$1.options.margin));\n }\n if (visible$1) {\n bottomAnchors[paneId$1] = axis$1;\n }\n }\n if (i$1 !== 0) {\n axis$1.alignTo(xAnchor);\n axis$1.reflow(axis$1.box);\n }\n }\n },\n shrinkAxisWidth: function (panes) {\n var axes = this.groupAxes(panes).any;\n var axisBox = axisGroupBox(axes);\n var overflowX = 0;\n for (var i = 0; i < panes.length; i++) {\n var 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 (var i$1 = 0; i$1 < axes.length; i$1++) {\n var currentAxis = axes[i$1];\n if (!currentAxis.options.vertical) {\n currentAxis.reflow(currentAxis.box.shrink(overflowX, 0));\n }\n }\n }\n },\n shrinkAxisHeight: function (panes) {\n var shrinked;\n for (var i = 0; i < panes.length; i++) {\n var currentPane = panes[i];\n var axes = currentPane.axes;\n var overflowY = Math.max(0, axisGroupBox(axes).height() - currentPane.contentBox.height());\n if (overflowY !== 0) {\n for (var j = 0; j < axes.length; j++) {\n var 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 axes = this.groupAxes(panes).any;\n var offsetX = 0;\n for (var i = 0; i < panes.length; i++) {\n var currentPane = panes[i];\n var paneAxes = currentPane.axes;\n var paneBox = currentPane.contentBox;\n if (paneAxes.length > 0) {\n var axisBox = axisGroupBox(paneAxes);\n var offsetY = Math.max(paneBox.y1 - axisBox.y1, paneBox.y2 - axisBox.y2);\n offsetX = Math.max(offsetX, paneBox.x1 - axisBox.x1);\n for (var j = 0; j < paneAxes.length; j++) {\n var currentAxis = paneAxes[j];\n currentAxis.reflow(currentAxis.box.translate(0, offsetY));\n }\n }\n }\n for (var i$1 = 0; i$1 < axes.length; i$1++) {\n var currentAxis$1 = axes[i$1];\n currentAxis$1.reflow(currentAxis$1.box.translate(offsetX, 0));\n }\n },\n reflowAxes: function (panes) {\n var this$1 = this;\n var axes = this.groupAxes(panes);\n for (var i = 0; i < panes.length; i++) {\n this$1.reflowPaneAxes(panes[i]);\n }\n if (axes.x.length > 0 && axes.y.length > 0) {\n this.alignAxes(axes.x, axes.y);\n this.shrinkAxisWidth(panes);\n this.autoRotateAxisLabels(axes);\n this.alignAxes(axes.x, axes.y);\n if (this.shrinkAxisWidth(panes)) {\n this.alignAxes(axes.x, axes.y);\n }\n this.shrinkAxisHeight(panes);\n this.alignAxes(axes.x, axes.y);\n if (this.shrinkAxisHeight(panes)) {\n this.alignAxes(axes.x, axes.y);\n }\n this.fitAxes(panes);\n }\n },\n autoRotateAxisLabels: function (groupedAxes) {\n var this$1 = this;\n var ref = this;\n var axes = ref.axes;\n var panes = ref.panes;\n var rotated;\n for (var idx = 0; idx < axes.length; idx++) {\n var axis = axes[idx];\n if (axis.autoRotateLabels()) {\n rotated = true;\n }\n }\n if (rotated) {\n for (var idx$1 = 0; idx$1 < panes.length; idx$1++) {\n this$1.reflowPaneAxes(panes[idx$1]);\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;\n var length = axes.length;\n if (length > 0) {\n for (var i = 0; i < length; i++) {\n axes[i].reflow(pane.contentBox);\n }\n }\n },\n reflowCharts: function (panes) {\n var charts = this.charts;\n var count = charts.length;\n var box = this.box;\n for (var i = 0; i < count; i++) {\n var chartPane = charts[i].pane;\n if (!chartPane || inArray(chartPane, panes)) {\n charts[i].reflow(box);\n }\n }\n },\n reflowPanes: function () {\n var ref = this;\n var box = ref.box;\n var panes = ref.panes;\n var panesLength = panes.length;\n var remainingHeight = box.height();\n var remainingPanes = panesLength;\n var autoHeightPanes = 0;\n var top = box.y1;\n for (var i = 0; i < panesLength; i++) {\n var currentPane = panes[i];\n var 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 var 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 (var i$1 = 0; i$1 < panesLength; i$1++) {\n var currentPane$1 = panes[i$1];\n if (!currentPane$1.options.height) {\n currentPane$1.options.height = remainingHeight / autoHeightPanes;\n }\n }\n for (var i$2 = 0; i$2 < panesLength; i$2++) {\n var currentPane$2 = panes[i$2];\n var paneBox = box.clone().move(box.x1, top);\n currentPane$2.reflow(paneBox);\n remainingPanes--;\n top += currentPane$2.options.height;\n }\n },\n backgroundBox: function () {\n var axes = this.axes;\n var axesCount = axes.length;\n var box;\n for (var i = 0; i < axesCount; i++) {\n var axisA = axes[i];\n for (var j = 0; j < axesCount; j++) {\n var axisB = axes[j];\n if (axisA.options.vertical !== axisB.options.vertical) {\n var 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 || this.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(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 opacity = options.opacity;\n var background = options.background;\n var border = options.border;\n if (border === void 0) {\n border = {};\n }\n if (isTransparent(background)) {\n background = WHITE;\n opacity = 0;\n }\n var bg = this._bgVisual = new drawing.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;\n var result = [];\n if (categoryIndex !== null) {\n for (var i = 0; i < charts.length; i++) {\n var chart = charts[i];\n if (chart.pane.options.name === '_navigator') {\n continue;\n }\n var points = charts[i].categoryPoints[categoryIndex];\n if (points && points.length) {\n for (var j = 0; j < points.length; j++) {\n var 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;\n var result = [];\n for (var i = 0; i < charts.length; i++) {\n var chart = charts[i];\n var points = chart.points;\n for (var j = 0; j < points.length; j++) {\n var 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;\n for (var i = 0; i < charts.length; i++) {\n var chart = charts[i];\n var points = chart.points;\n for (var j = 0; j < points.length; j++) {\n var point = points[j];\n if (point && callback(point)) {\n return point;\n }\n }\n }\n },\n paneByPoint: function (point) {\n var panes = this.panes;\n for (var i = 0; i < panes.length; i++) {\n var pane = panes[i];\n if (pane.box.containsPoint(point)) {\n return pane;\n }\n }\n }\n });\n function axisGroupBox(axes) {\n var length = axes.length;\n var box;\n if (length > 0) {\n for (var i = 0; i < length; i++) {\n var axisBox = axes[i].contentBox();\n if (!box) {\n box = axisBox.clone();\n } else {\n box.wrap(axisBox);\n }\n }\n }\n return box || new Box();\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 function isTransparent(color) {\n return color === '' || color === null || color === 'none' || color === 'transparent' || !defined(color);\n }\n setDefaultOptions(PlotAreaBase, {\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 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 SeriesAggregator = Class.extend({\n init: function (series, binder, defaultAggregates) {\n var canonicalFields = binder.canonicalFields(series);\n var valueFields = binder.valueFields(series);\n var sourceFields = binder.sourceFields(series, canonicalFields);\n var seriesFields = this._seriesFields = [];\n var defaults = defaultAggregates.query(series.type);\n var rootAggregate = series.aggregate || defaults;\n this._series = series;\n this._binder = binder;\n for (var i = 0; i < canonicalFields.length; i++) {\n var field = canonicalFields[i];\n var fieldAggregate = void 0;\n if (isObject(rootAggregate)) {\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: isFunction(fieldAggregate) ? fieldAggregate : Aggregates[fieldAggregate]\n });\n }\n }\n },\n aggregatePoints: function (srcPoints, group) {\n var this$1 = this;\n var ref = this;\n var series = ref._series;\n var seriesFields = ref._seriesFields;\n var data = this._bindPoints(srcPoints || []);\n var firstDataItem = data.dataItems[0];\n var result = {};\n if (firstDataItem && !isNumber(firstDataItem) && !isArray(firstDataItem)) {\n var fn = function () {\n };\n fn.prototype = firstDataItem;\n result = new fn();\n }\n for (var i = 0; i < seriesFields.length; i++) {\n var field = seriesFields[i];\n var srcValues = this$1._bindField(data.values, field.canonicalName);\n var value = field.transform(srcValues, series, data.dataItems, group);\n if (value !== null && isObject(value) && !defined(value.length) && !(value instanceof Date)) {\n result = value;\n break;\n } else {\n if (defined(value)) {\n setValue(field.name, result, value);\n }\n }\n }\n return result;\n },\n _bindPoints: function (points) {\n var ref = this;\n var binder = ref._binder;\n var series = ref._series;\n var values = [];\n var dataItems = [];\n for (var i = 0; i < points.length; i++) {\n var 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 = [];\n var count = data.length;\n for (var i = 0; i < count; i++) {\n var item = data[i];\n var valueFields = item.valueFields;\n var value = void 0;\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 function setValue(fieldName, target, value) {\n var parentObj = target;\n var field = fieldName;\n if (fieldName.indexOf('.') > -1) {\n var parts = fieldName.split('.');\n while (parts.length > 1) {\n field = parts.shift();\n if (!defined(parentObj[field])) {\n parentObj[field] = {};\n }\n parentObj = parentObj[field];\n }\n field = parts.shift();\n }\n parentObj[field] = value;\n }\n var DefaultAggregates = Class.extend({\n init: function () {\n this._defaults = {};\n },\n register: function (seriesTypes, aggregates) {\n var this$1 = this;\n for (var i = 0; i < seriesTypes.length; i++) {\n this$1._defaults[seriesTypes[i]] = aggregates;\n }\n },\n query: function (seriesType) {\n return this._defaults[seriesType];\n }\n });\n DefaultAggregates.current = new DefaultAggregates();\n var RangeBar = Bar.extend({\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 labelTemplate = getTemplate(options);\n var labelText;\n if (labelTemplate) {\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 ref = this;\n var labelFrom = ref.labelFrom;\n var labelTo = ref.labelTo;\n var value = ref.value;\n this.box = targetBox;\n if (labelFrom) {\n labelFrom.options.aboveAxis = value.from > value.to;\n labelFrom.reflow(targetBox);\n }\n if (labelTo) {\n labelTo.options.aboveAxis = value.to > value.from;\n labelTo.reflow(targetBox);\n }\n if (this.note) {\n this.note.reflow(targetBox);\n }\n }\n });\n RangeBar.prototype.defaults = deepExtend({}, RangeBar.prototype.defaults, {\n labels: { format: '{0} - {1}' },\n tooltip: { format: '{1}' }\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 this.chartService.format.auto(format, point.value.from, point.value.to);\n },\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 axisName = fields.series.axis;\n var from = value.from;\n var to = value.to;\n var axisRange = this.valueAxisRanges[axisName];\n if (value !== null && isNumber(from) && isNumber(to)) {\n axisRange = this.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 RangeBarChart.prototype.plotLimits = CategoricalChart.prototype.plotLimits;\n var OHLCPoint = Candlestick.extend({\n reflow: function (box) {\n var ref = this;\n var options = ref.options;\n var value = ref.value;\n var chart = ref.owner;\n var valueAxis = chart.seriesValueAxis(options);\n var oPoints = [];\n var cPoints = [];\n var lhPoints = [];\n var lhSlot = valueAxis.getSlot(value.low, value.high);\n var oSlot = valueAxis.getSlot(value.open, value.open);\n var 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 var 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 this.lines = [\n oPoints,\n cPoints,\n lhPoints\n ];\n this.box = lhSlot.clone().wrap(oSlot.clone().wrap(cSlot));\n this.reflowNote();\n },\n createBody: function () {\n }\n });\n var OHLCChart = CandlestickChart.extend({\n pointType: function () {\n return OHLCPoint;\n }\n });\n var WaterfallSegment = ChartElement.extend({\n init: function (from, to, series) {\n ChartElement.fn.init.call(this);\n this.from = from;\n this.to = to;\n this.series = series;\n },\n linePoints: function () {\n var from = this.from;\n var ref = this;\n var fromBox = ref.from.box;\n var toBox = ref.to.box;\n var points = [];\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 = 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 setDefaultOptions(WaterfallSegment, {\n animation: {\n type: FADEIN,\n delay: INITIAL_ANIMATION_DURATION\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 = void 0;\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 this$1 = this;\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 = void 0;\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$1.append(segment);\n }\n prevPoint = point;\n }\n }\n }\n }\n });\n function filterSeriesByType(series, types) {\n var result = [];\n var seriesTypes = [].concat(types);\n for (var idx = 0; idx < series.length; idx++) {\n var currentSeries = series[idx];\n if (inArray(currentSeries.type, seriesTypes)) {\n result.push(currentSeries);\n }\n }\n return result;\n }\n function equalsIgnoreCase(a, b) {\n if (a && b) {\n return a.toLowerCase() === b.toLowerCase();\n }\n return a === b;\n }\n function isDateAxis(axisOptions, sampleCategory) {\n var type = axisOptions.type;\n var dateCategory = sampleCategory instanceof Date;\n return !type && dateCategory || equalsIgnoreCase(type, DATE);\n }\n function appendIfNotNull(array, element) {\n if (element !== null) {\n array.push(element);\n }\n }\n function singleItemOrArray(array) {\n return array.length === 1 ? array[0] : array;\n }\n function getDateField(field, row, intlService) {\n if (row === null) {\n return row;\n }\n var key = '_date_' + field;\n var value = row[key];\n if (!value) {\n value = parseDate(intlService, getter(field, true)(row));\n row[key] = value;\n }\n return value;\n }\n var CategoricalPlotArea = PlotAreaBase.extend({\n initFields: function (series) {\n var this$1 = this;\n this.namedCategoryAxes = {};\n this.namedValueAxes = {};\n this.valueAxisRangeTracker = new AxisGroupRangeTracker();\n if (series.length > 0) {\n this.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 this$1.stack100 = true;\n break;\n }\n }\n }\n },\n render: function (panes) {\n if (panes === void 0) {\n panes = this.panes;\n }\n this.createCategoryAxes(panes);\n this.aggregateCategories(panes);\n this.createCategoryAxesLabels(panes);\n this.createCharts(panes);\n this.createValueAxes(panes);\n },\n removeAxis: function (axis) {\n var axisName = axis.options.name;\n PlotAreaBase.fn.removeAxis.call(this, axis);\n if (axis instanceof CategoryAxis) {\n delete this.namedCategoryAxes[axisName];\n } else {\n this.valueAxisRangeTracker.reset(axisName);\n delete this.namedValueAxes[axisName];\n }\n if (axis === this.categoryAxis) {\n delete this.categoryAxis;\n }\n if (axis === this.valueAxis) {\n delete this.valueAxis;\n }\n },\n createCharts: function (panes) {\n var this$1 = this;\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$1.addToLegend(paneSeries);\n var visibleSeries = this$1.filterVisibleSeries(paneSeries);\n if (!visibleSeries) {\n continue;\n }\n var groups = this$1.groupSeriesByCategoryAxis(visibleSeries);\n for (var groupIx = 0; groupIx < groups.length; groupIx++) {\n this$1.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 this$1 = this;\n var series = this.srcSeries || this.series;\n var processedSeries = [];\n for (var i = 0; i < series.length; i++) {\n var currentSeries = series[i];\n var categoryAxis = this$1.seriesCategoryAxis(currentSeries);\n var axisPane = this$1.findPane(categoryAxis.options.pane);\n var dateAxis = equalsIgnoreCase(categoryAxis.options.type, DATE);\n if ((dateAxis || currentSeries.categoryField) && inArray(axisPane, panes)) {\n currentSeries = this$1.aggregateSeries(currentSeries, categoryAxis);\n } else if (isNumber(categoryAxis.options.min) || isNumber(categoryAxis.options.max)) {\n currentSeries = this$1.filterSeries(currentSeries, categoryAxis);\n }\n processedSeries.push(currentSeries);\n }\n this.srcSeries = series;\n this.series = processedSeries;\n },\n filterSeries: function (series, categoryAxis) {\n var range = categoryAxis.totalRangeIndices();\n var justified = categoryAxis.options.justified;\n var outOfRangePoints = inArray(series.type, [\n LINE,\n VERTICAL_LINE,\n AREA,\n VERTICAL_AREA\n ]);\n range.min = isNumber(categoryAxis.options.min) ? Math.floor(range.min) : 0;\n if (isNumber(categoryAxis.options.max)) {\n range.max = justified ? Math.floor(range.max) + 1 : Math.ceil(range.max);\n } else {\n range.max = series.data.length;\n }\n var currentSeries = deepExtend({}, series);\n if (outOfRangePoints) {\n var minCategory = range.min - 1;\n var srcCategories = categoryAxis.options.srcCategories || [];\n if (minCategory >= 0 && minCategory < currentSeries.data.length) {\n currentSeries._outOfRangeMinPoint = {\n item: currentSeries.data[minCategory],\n category: srcCategories[minCategory],\n categoryIx: -1\n };\n }\n if (range.max < currentSeries.data.length) {\n currentSeries._outOfRangeMaxPoint = {\n item: currentSeries.data[range.max],\n category: srcCategories[range.max],\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 this$1 = this;\n var outOfRangePoints = inArray(series.type, [\n LINE,\n VERTICAL_LINE,\n AREA,\n VERTICAL_AREA\n ]);\n var ref = categoryAxis.options;\n var categories = ref.categories;\n var srcCategories = ref.srcCategories;\n if (srcCategories === void 0) {\n srcCategories = categories;\n }\n var dataItems = ref.dataItems;\n if (dataItems === void 0) {\n dataItems = [];\n }\n var dateAxis = equalsIgnoreCase(categoryAxis.options.type, DATE);\n var aggregatorSeries = deepExtend({}, series);\n var result = deepExtend({}, series);\n var srcData = series.data;\n var srcPoints = [];\n var outOfRangeMinIdx = MIN_VALUE;\n var outOfRangeMaxIdx = MAX_VALUE;\n var getFn = getField;\n var outOfRangeMinCategory, outOfRangeMaxCategory;\n if (dateAxis) {\n getFn = getDateField;\n }\n for (var i = 0; i < srcData.length; i++) {\n var category = void 0;\n if (series.categoryField) {\n category = getFn(series.categoryField, srcData[i], this$1.chartService.intl);\n } else {\n category = srcCategories[i];\n }\n if (defined(category)) {\n var 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 var aggregator = new SeriesAggregator(aggregatorSeries, SeriesBinder.current, DefaultAggregates.current);\n var data = result.data = [];\n for (var i$1 = 0; i$1 < categories.length; i$1++) {\n data[i$1] = aggregator.aggregatePoints(srcPoints[i$1], categories[i$1]);\n if (srcPoints[i$1]) {\n dataItems[i$1] = data[i$1];\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 series = chart.options.series;\n var categoryAxis = this.seriesCategoryAxis(series[0]);\n var categories = categoryAxis.options.categories;\n var categoriesToAdd = Math.max(0, categoriesCount(series) - categories.length);\n while (categoriesToAdd--) {\n categories.push('');\n }\n this.valueAxisRangeTracker.update(chart.valueAxisRanges);\n PlotAreaBase.fn.appendChart.call(this, chart, pane);\n },\n seriesPaneName: function (series) {\n var options = this.options;\n var axisName = series.axis;\n var axisOptions = [].concat(options.valueAxis);\n var axis = grep(axisOptions, function (a) {\n return a.name === axisName;\n })[0];\n var panes = options.panes || [{}];\n var defaultPaneName = (panes[0] || {}).name || 'default';\n var paneName = (axis || {}).pane || defaultPaneName;\n return paneName;\n },\n seriesCategoryAxis: function (series) {\n var axisName = series.categoryAxis;\n var axis = axisName ? this.namedCategoryAxes[axisName] : this.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 categoryAxes = [];\n var unique = {};\n for (var idx = 0; idx < series.length; idx++) {\n var name = series[idx].categoryAxis || '$$default$$';\n if (!unique.hasOwnProperty(name)) {\n unique[name] = true;\n categoryAxes.push(name);\n }\n }\n var groups = [];\n for (var axisIx = 0; axisIx < categoryAxes.length; axisIx++) {\n var axis = categoryAxes[axisIx];\n var axisSeries = groupSeries(series, 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 firstSeries = series[0];\n var barChart = new BarChart(this, $.extend({\n series: series,\n invertAxes: this.invertAxes,\n gap: firstSeries.gap,\n spacing: firstSeries.spacing\n }, this.stackableChartOptions(firstSeries, pane)));\n this.appendChart(barChart, pane);\n },\n createRangeBarChart: function (series, pane) {\n if (series.length === 0) {\n return;\n }\n var firstSeries = series[0];\n var rangeColumnChart = new RangeBarChart(this, {\n series: series,\n invertAxes: this.invertAxes,\n gap: firstSeries.gap,\n spacing: firstSeries.spacing\n });\n this.appendChart(rangeColumnChart, pane);\n },\n createBulletChart: function (series, pane) {\n if (series.length === 0) {\n return;\n }\n var firstSeries = series[0];\n var bulletChart = new BulletChart(this, {\n series: series,\n invertAxes: this.invertAxes,\n gap: firstSeries.gap,\n spacing: firstSeries.spacing,\n clip: pane.options.clip\n });\n this.appendChart(bulletChart, pane);\n },\n createLineChart: function (series, pane) {\n if (series.length === 0) {\n return;\n }\n var firstSeries = series[0];\n var lineChart = new LineChart(this, $.extend({\n invertAxes: this.invertAxes,\n series: series\n }, this.stackableChartOptions(firstSeries, pane)));\n this.appendChart(lineChart, pane);\n },\n createAreaChart: function (series, pane) {\n if (series.length === 0) {\n return;\n }\n var firstSeries = series[0];\n var areaChart = new AreaChart(this, $.extend({\n invertAxes: this.invertAxes,\n series: series\n }, this.stackableChartOptions(firstSeries, pane)));\n this.appendChart(areaChart, pane);\n },\n createOHLCChart: function (series, pane) {\n if (series.length === 0) {\n return;\n }\n var firstSeries = series[0];\n var chart = new OHLCChart(this, {\n invertAxes: this.invertAxes,\n gap: firstSeries.gap,\n series: series,\n spacing: firstSeries.spacing,\n clip: pane.options.clip\n });\n this.appendChart(chart, pane);\n },\n createCandlestickChart: function (series, pane) {\n if (series.length === 0) {\n return;\n }\n var firstSeries = series[0];\n var chart = new CandlestickChart(this, {\n invertAxes: this.invertAxes,\n gap: firstSeries.gap,\n series: series,\n spacing: firstSeries.spacing,\n clip: pane.options.clip\n });\n this.appendChart(chart, pane);\n },\n createBoxPlotChart: function (series, pane) {\n if (series.length === 0) {\n return;\n }\n var firstSeries = series[0];\n var chart = new BoxPlotChart(this, {\n invertAxes: this.invertAxes,\n gap: firstSeries.gap,\n series: series,\n spacing: firstSeries.spacing,\n clip: pane.options.clip\n });\n this.appendChart(chart, pane);\n },\n createWaterfallChart: function (series, pane) {\n if (series.length === 0) {\n return;\n }\n var firstSeries = series[0];\n var waterfallChart = new WaterfallChart(this, {\n series: series,\n invertAxes: this.invertAxes,\n gap: firstSeries.gap,\n spacing: firstSeries.spacing\n });\n this.appendChart(waterfallChart, pane);\n },\n axisRequiresRounding: function (categoryAxisName, categoryAxisIndex) {\n var this$1 = this;\n var centeredSeries = filterSeriesByType(this.series, EQUALLY_SPACED_SERIES);\n for (var seriesIx = 0; seriesIx < this.series.length; seriesIx++) {\n var currentSeries = this$1.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 (var seriesIx$1 = 0; seriesIx$1 < centeredSeries.length; seriesIx$1++) {\n var seriesAxis = centeredSeries[seriesIx$1].categoryAxis || '';\n if (seriesAxis === categoryAxisName || !seriesAxis && categoryAxisIndex === 0) {\n return true;\n }\n }\n },\n aggregatedAxis: function (categoryAxisName, categoryAxisIndex) {\n var series = this.series;\n for (var seriesIx = 0; seriesIx < series.length; seriesIx++) {\n var 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 this$1 = this;\n var invertAxes = this.invertAxes;\n var definitions = [].concat(this.options.categoryAxis);\n var axes = [];\n for (var i = 0; i < definitions.length; i++) {\n var axisOptions = definitions[i];\n var axisPane = this$1.findPane(axisOptions.pane);\n if (inArray(axisPane, panes)) {\n var name = axisOptions.name;\n var categories = axisOptions.categories;\n if (categories === void 0) {\n categories = [];\n }\n axisOptions = deepExtend({\n vertical: invertAxes,\n axisCrossingValue: invertAxes ? MAX_VALUE : 0\n }, axisOptions);\n if (!defined(axisOptions.justified)) {\n axisOptions.justified = this$1.isJustified();\n }\n if (this$1.axisRequiresRounding(name, i)) {\n axisOptions.justified = false;\n }\n var categoryAxis = void 0;\n if (isDateAxis(axisOptions, categories[0])) {\n categoryAxis = new DateCategoryAxis(axisOptions, this$1.chartService);\n } else {\n categoryAxis = new CategoryAxis(axisOptions, this$1.chartService);\n }\n if (name) {\n if (this$1.namedCategoryAxes[name]) {\n throw new Error('Category axis with name ' + name + ' is already defined');\n }\n this$1.namedCategoryAxes[name] = categoryAxis;\n }\n categoryAxis.axisIndex = i;\n axes.push(categoryAxis);\n this$1.appendAxis(categoryAxis);\n }\n }\n var primaryAxis = this.categoryAxis || axes[0];\n this.categoryAxis = primaryAxis;\n if (invertAxes) {\n this.axisY = primaryAxis;\n } else {\n this.axisX = primaryAxis;\n }\n },\n isJustified: function () {\n var series = this.series;\n for (var i = 0; i < series.length; i++) {\n var 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 this$1 = this;\n var tracker = this.valueAxisRangeTracker;\n var defaultRange = tracker.query();\n var definitions = [].concat(this.options.valueAxis);\n var invertAxes = this.invertAxes;\n var baseOptions = { vertical: !invertAxes };\n var axes = [];\n if (this.stack100) {\n baseOptions.roundToMajorUnit = false;\n baseOptions.labels = { format: 'P0' };\n }\n for (var i = 0; i < definitions.length; i++) {\n var axisOptions = definitions[i];\n var axisPane = this$1.findPane(axisOptions.pane);\n if (inArray(axisPane, panes)) {\n var name = axisOptions.name;\n var defaultAxisRange = equalsIgnoreCase(axisOptions.type, LOGARITHMIC) ? {\n min: 0.1,\n max: 1\n } : {\n min: 0,\n max: 1\n };\n var 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 var axisType = void 0;\n if (equalsIgnoreCase(axisOptions.type, LOGARITHMIC)) {\n axisType = dataviz.LogarithmicAxis;\n } else {\n axisType = dataviz.NumericAxis;\n }\n var valueAxis = new axisType(range.min, range.max, deepExtend({}, baseOptions, axisOptions), this$1.chartService);\n if (name) {\n if (this$1.namedValueAxes[name]) {\n throw new Error('Value axis with name ' + name + ' is already defined');\n }\n this$1.namedValueAxes[name] = valueAxis;\n }\n valueAxis.axisIndex = i;\n axes.push(valueAxis);\n this$1.appendAxis(valueAxis);\n }\n }\n var primaryAxis = this.valueAxis || axes[0];\n this.valueAxis = primaryAxis;\n if (invertAxes) {\n this.axisX = primaryAxis;\n } else {\n this.axisY = primaryAxis;\n }\n },\n _dispatchEvent: function (chart, e, eventType) {\n var coords = chart._eventCoordinates(e);\n var point = new Point(coords.x, coords.y);\n var pane = this.pointPane(point);\n var categories = [];\n var values = [];\n if (!pane) {\n return;\n }\n var allAxes = pane.axes;\n for (var i = 0; i < allAxes.length; i++) {\n var 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, this.categoryAxis.getCategory(point));\n }\n if (categories.length > 0 && values.length > 0) {\n chart.trigger(eventType, {\n element: eventElement(e),\n originalEvent: e,\n category: singleItemOrArray(categories),\n value: singleItemOrArray(values)\n });\n }\n },\n pointPane: function (point) {\n var panes = this.panes;\n for (var i = 0; i < panes.length; i++) {\n var 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 function groupSeries(series, axis, axisIx) {\n return grep(series, function (s) {\n return axisIx === 0 && !s.categoryAxis || s.categoryAxis === axis;\n });\n }\n setDefaultOptions(CategoricalPlotArea, {\n categoryAxis: { categories: [] },\n valueAxis: {}\n });\n deepExtend(CategoricalPlotArea.prototype, PlotAreaEventsMixin);\n var Highlight = Class.extend({\n init: function () {\n this._points = [];\n },\n destroy: function () {\n this._points = [];\n },\n show: function (points) {\n var this$1 = this;\n var arrayPoints = [].concat(points);\n this.hide();\n for (var i = 0; i < arrayPoints.length; i++) {\n var point = arrayPoints[i];\n if (point && point.toggleHighlight && point.hasHighlight()) {\n this$1.togglePointHighlight(point, true);\n this$1._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 this$1 = this;\n var points = this._points;\n while (points.length) {\n this$1.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 function preventDefault() {\n this._defaultPrevented = true;\n }\n function acceptKey(e, mouseKey) {\n var key = (mouseKey || '').toLowerCase();\n var event = e.event;\n var accept = key === 'none' && !(event.ctrlKey || event.shiftKey || event.altKey) || event[key + 'Key'];\n return accept;\n }\n function toChartAxisRanges(axisRanges) {\n var ranges = {};\n for (var idx = 0; idx < axisRanges.length; idx++) {\n var 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 var Pannable = Class.extend({\n init: function (plotArea, options) {\n this.plotArea = plotArea;\n this.options = deepExtend({}, this.options, options);\n },\n start: function (e) {\n this._active = acceptKey(e, 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 ref = this;\n var plotArea = ref.plotArea;\n var axisRanges = ref.axisRanges;\n if (axisRanges.length) {\n for (var idx = 0; idx < axisRanges.length; idx++) {\n var 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 for (var idx = 0; idx < axes.length; idx++) {\n var axis = axes[idx];\n if (position === X && !axis.options.vertical || position === Y && axis.options.vertical) {\n var 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 Pannable.prototype.options = {\n key: 'none',\n lock: 'none'\n };\n var ZoomSelection = Class.extend({\n init: function (chart, options) {\n this.chart = chart;\n this.options = deepExtend({}, this.options, options);\n this.createElement();\n },\n createElement: function () {\n var marquee = this._marquee = document.createElement('div');\n marquee.className = 'k-marquee';\n var marqueeColor = document.createElement('div');\n marqueeColor.className = 'k-marquee-color';\n marquee.appendChild(marqueeColor);\n },\n removeElement: function () {\n if (this._marquee.parentNode) {\n this._marquee.parentNode.removeChild(this._marquee);\n }\n },\n setStyles: function (styles) {\n elementStyles(this._marquee, styles);\n },\n start: function (e) {\n if (acceptKey(e, this.options.key)) {\n var chart = this.chart;\n var point = chart._eventCoordinates(e);\n var zoomPane = this._zoomPane = chart._plotArea.paneByPoint(point);\n if (zoomPane && zoomPane.clipBox()) {\n var clipBox = zoomPane.clipBox().clone();\n var offset = this._elementOffset();\n clipBox.translate(offset.left, offset.top);\n this._zoomPaneClipBox = clipBox;\n document.body.appendChild(this._marquee);\n this.setStyles({\n left: e.pageX + 1,\n top: e.pageY + 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 ref = elementStyles(chartElement, [\n 'paddingLeft',\n 'paddingTop'\n ]);\n var paddingLeft = ref.paddingLeft;\n var paddingTop = ref.paddingTop;\n var offset = dataviz.elementOffset(chartElement);\n return {\n left: paddingLeft + offset.left,\n top: paddingTop + offset.top\n };\n },\n move: function (e) {\n var zoomPane = this._zoomPane;\n if (zoomPane) {\n this.setStyles(this._selectionPosition(e));\n }\n },\n end: function (e) {\n var zoomPane = this._zoomPane;\n if (zoomPane) {\n var elementOffset$$1 = this._elementOffset();\n var selectionPosition = this._selectionPosition(e);\n selectionPosition.left -= elementOffset$$1.left;\n selectionPosition.top -= elementOffset$$1.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.removeElement();\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 for (var idx = 0; idx < axisRanges.length; idx++) {\n var axisRange = axisRanges[idx];\n plotArea.updateAxisOptions(axisRange.axis, axisRange.range);\n }\n plotArea.redraw(plotArea.panes);\n }\n },\n destroy: function () {\n this.removeElement();\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 for (var idx = 0; idx < axes.length; idx++) {\n var axis = axes[idx];\n var 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 clipBox = this._zoomPaneClipBox;\n var startLocation = {\n x: e.x.startLocation,\n y: e.y.startLocation\n };\n var pageX = e.x.location;\n var pageY = e.y.location;\n var lock = (this.options.lock || '').toLowerCase();\n var left = Math.min(startLocation.x, pageX);\n var top = Math.min(startLocation.y, pageY);\n var width = Math.abs(startLocation.x - pageX);\n var height = Math.abs(startLocation.y - pageY);\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 (pageX > clipBox.x2) {\n width = clipBox.x2 - startLocation.x;\n }\n if (pageX < clipBox.x1) {\n width = startLocation.x - clipBox.x1;\n }\n if (pageY > clipBox.y2) {\n height = clipBox.y2 - startLocation.y;\n }\n if (pageY < clipBox.y1) {\n height = startLocation.y - 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 ZoomSelection.prototype.options = {\n key: 'shift',\n lock: 'none'\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 for (var idx = 0; idx < axes.length; idx++) {\n var axis = axes[idx];\n var 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 for (var idx = 0; idx < axisRanges.length; idx++) {\n var 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 LegendLayout = ChartElement.extend({\n init: function (options, chartService) {\n ChartElement.fn.init.call(this, options);\n this.chartService = chartService;\n },\n render: function () {\n var ref = this;\n var children = ref.children;\n var options = ref.options;\n var vertical = options.vertical;\n this.visual = new drawing.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 < children.length; idx++) {\n var legendItem = children[idx];\n legendItem.reflow(new Box());\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 Box();\n }\n },\n renderVisual: function () {\n this.addVisual();\n },\n createVisual: function () {\n }\n });\n var LegendItem = BoxElement.extend({\n init: function (options) {\n BoxElement.fn.init.call(this, options);\n this.createContainer();\n this.createMarker();\n this.createLabel();\n },\n createContainer: function () {\n this.container = new dataviz.FloatElement({\n vertical: false,\n wrap: false,\n align: CENTER\n });\n this.append(this.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 options = this.options;\n var labelOptions = deepExtend({}, options.labels);\n this.container.append(new TextBox(options.text, labelOptions));\n },\n renderComplete: function () {\n BoxElement.fn.renderComplete.call(this);\n var cursor = this.options.cursor || {};\n var eventSink = this._itemOverlay = 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 }\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: eventElement(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 this$1 = this;\n var options = this.options;\n var customVisual = options.visual;\n if (customVisual) {\n this.visual = customVisual({\n active: options.active,\n series: options.series,\n sender: this.getSender(),\n pointIndex: options.pointIndex,\n options: {\n markers: this.markerOptions(),\n labels: options.labels\n },\n createVisual: function () {\n this$1.createVisual();\n this$1.renderChildren();\n this$1.renderComplete();\n var defaultVisual = this$1.visual;\n delete this$1.visual;\n return defaultVisual;\n }\n });\n this.addVisual();\n } else {\n BoxElement.fn.renderVisual.call(this);\n }\n }\n });\n var HORIZONTAL = 'horizontal';\n var POINTER = 'pointer';\n var CUSTOM = 'custom';\n var Legend = ChartElement.extend({\n init: function (options, chartService) {\n ChartElement.fn.init.call(this, options);\n this.chartService = chartService;\n if (!inArray(this.options.position, [\n TOP,\n RIGHT,\n BOTTOM,\n LEFT,\n CUSTOM\n ])) {\n this.options.position = RIGHT;\n }\n this.createContainer();\n this.createItems();\n },\n createContainer: function () {\n var options = this.options;\n var position = options.position;\n var userAlign = options.align;\n var align = position;\n var 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 this.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 this.append(this.container);\n },\n createItems: function () {\n var chartService = this.getService();\n var options = this.options;\n var vertical = this.isVertical();\n var innerElement = new LegendLayout({\n vertical: vertical,\n spacing: options.spacing\n }, chartService);\n var items = options.items;\n if (options.reverse) {\n items = items.slice(0).reverse();\n }\n var count = items.length;\n for (var i = 0; i < count; i++) {\n var 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 this.container.append(innerElement);\n },\n isVertical: function () {\n var ref = this.options;\n var orientation = ref.orientation;\n var position = ref.position;\n var 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 options = this.options;\n var legendBox = targetBox.clone();\n if (!this.hasItems()) {\n this.box = legendBox;\n return;\n }\n if (options.position === CUSTOM) {\n this.containerCustomReflow(legendBox);\n this.box = legendBox;\n } else {\n this.containerReflow(legendBox);\n }\n },\n containerReflow: function (targetBox) {\n var ref = this;\n var options = ref.options;\n var container = ref.container;\n var position = options.position;\n var width = options.width;\n var height = options.height;\n var pos = position === TOP || position === BOTTOM ? X : Y;\n var vertical = this.isVertical();\n var alignTarget = targetBox.clone();\n var containerBox = targetBox.clone();\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 var box = containerBox.clone();\n if (options.offsetX || options.offsetY) {\n containerBox.translate(options.offsetX, options.offsetY);\n this.container.reflow(containerBox);\n }\n box[pos + 1] = targetBox[pos + 1];\n box[pos + 2] = targetBox[pos + 2];\n this.box = box;\n },\n containerCustomReflow: function (targetBox) {\n var ref = this;\n var options = ref.options;\n var container = ref.container;\n var offsetX = options.offsetX;\n var offsetY = options.offsetY;\n var width = options.width;\n var height = options.height;\n var vertical = this.isVertical();\n var 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(new Box(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 setDefaultOptions(Legend, {\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: 0 },\n width: 15,\n height: 3,\n type: 'rect',\n align: LEFT,\n vAlign: CENTER\n }\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, chartService) {\n var registry = this._registry;\n var match = registry[0];\n var series;\n for (var idx = 0; idx < registry.length; idx++) {\n var entry = registry[idx];\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, chartService);\n }\n });\n PlotAreaFactory.current = new PlotAreaFactory();\n var ZOOM_ACCELERATION = 3;\n var SELECTOR_HEIGHT_ADJUST = 0.1;\n function createDiv(className) {\n var element = document.createElement('div');\n if (className) {\n element.className = className;\n }\n return element;\n }\n function closestHandle(element) {\n var current = element;\n while (current && !hasClasses(current, 'k-handle')) {\n current = current.parentNode;\n }\n return current;\n }\n var Selection = Class.extend({\n init: function (chart, categoryAxis, options, observer) {\n var chartElement = chart.element;\n this.options = deepExtend({}, this.options, options);\n this.chart = chart;\n this.observer = observer;\n this.chartElement = chartElement;\n this.categoryAxis = categoryAxis;\n this._dateAxis = this.categoryAxis instanceof DateCategoryAxis;\n this.initOptions();\n if (this.options.visible) {\n this.createElements();\n this.set(this._index(this.options.from), this._index(this.options.to));\n this.bindEvents();\n }\n },\n createElements: function () {\n var options = this.options;\n var wrapper = this.wrapper = createDiv('k-selector');\n elementStyles(wrapper, {\n top: options.offset.top,\n left: options.offset.left,\n width: options.width,\n height: options.height,\n direction: 'ltr'\n });\n var selection = this.selection = createDiv('k-selection');\n this.leftMask = createDiv('k-mask');\n this.rightMask = createDiv('k-mask');\n wrapper.appendChild(this.leftMask);\n wrapper.appendChild(this.rightMask);\n wrapper.appendChild(selection);\n selection.appendChild(createDiv('k-selection-bg'));\n var leftHandle = this.leftHandle = createDiv('k-handle k-left-handle');\n var rightHandle = this.rightHandle = createDiv('k-handle k-right-handle');\n leftHandle.appendChild(createDiv());\n rightHandle.appendChild(createDiv());\n selection.appendChild(leftHandle);\n selection.appendChild(rightHandle);\n this.chartElement.appendChild(wrapper);\n var selectionStyles = elementStyles(selection, [\n 'borderLeftWidth',\n 'borderRightWidth',\n 'height'\n ]);\n var leftHandleHeight = elementStyles(leftHandle, 'height').height;\n var rightHandleHeight = elementStyles(rightHandle, 'height').height;\n options.selection = {\n border: {\n left: selectionStyles.borderLeftWidth,\n right: selectionStyles.borderRightWidth\n }\n };\n elementStyles(leftHandle, { top: (selectionStyles.height - leftHandleHeight) / 2 });\n elementStyles(rightHandle, { top: (selectionStyles.height - rightHandleHeight) / 2 });\n wrapper.style.cssText = wrapper.style.cssText;\n },\n bindEvents: function () {\n this._mousewheelHandler = this.options.mousewheel !== false ? this._mousewheel.bind(this) : stopPropagation;\n var obj;\n bindEvents(this.wrapper, (obj = {}, obj[MOUSEWHEEL] = this._mousewheelHandler, obj));\n this._domEvents = services.DomEventsBuilder.create(this.wrapper, {\n start: this._start.bind(this),\n move: this._move.bind(this),\n end: this._end.bind(this),\n tap: this._tap.bind(this),\n press: this._press.bind(this),\n gesturestart: this._gesturestart.bind(this),\n gesturechange: this._gesturechange.bind(this),\n gestureend: this._gestureend.bind(this)\n });\n },\n initOptions: function () {\n var ref = this;\n var options = ref.options;\n var categoryAxis = ref.categoryAxis;\n var box = categoryAxis.pane.chartsBox();\n var intlService = this.chart.chartService.intl;\n if (this._dateAxis) {\n deepExtend(options, {\n min: parseDate(intlService, options.min),\n max: parseDate(intlService, options.max),\n from: parseDate(intlService, options.from),\n to: parseDate(intlService, options.to)\n });\n }\n var ref$1 = elementStyles(this.chartElement, [\n 'paddingLeft',\n 'paddingTop'\n ]);\n var paddingLeft = ref$1.paddingLeft;\n var paddingTop = ref$1.paddingTop;\n this.options = deepExtend({}, {\n width: box.width(),\n height: box.height() + SELECTOR_HEIGHT_ADJUST,\n padding: {\n left: paddingLeft,\n top: paddingTop\n },\n offset: {\n left: box.x1 + paddingLeft,\n top: box.y1 + paddingTop\n },\n from: options.min,\n to: options.max\n }, options);\n },\n destroy: function () {\n if (this._domEvents) {\n this._domEvents.destroy();\n delete this._domEvents;\n }\n clearTimeout(this._mwTimeout);\n this._state = null;\n if (this.wrapper) {\n var obj;\n unbindEvents(this.wrapper, (obj = {}, obj[MOUSEWHEEL] = this._mousewheelHandler, obj));\n this.chartElement.removeChild(this.wrapper);\n }\n },\n _rangeEventArgs: function (range) {\n return {\n axis: this.categoryAxis.options,\n from: this._value(range.from),\n to: this._value(range.to)\n };\n },\n _start: function (e) {\n var options = this.options;\n var target = eventElement(e);\n if (this._state || !target) {\n return;\n }\n this.chart._unsetActivePoint();\n this._state = {\n moveTarget: closestHandle(target) || target,\n startLocation: e.x ? e.x.location : 0,\n range: {\n from: this._index(options.from),\n to: this._index(options.to)\n }\n };\n var args = this._rangeEventArgs({\n from: this._index(options.from),\n to: this._index(options.to)\n });\n if (this.trigger(SELECT_START, args)) {\n this._state = null;\n }\n },\n _press: function (e) {\n var handle;\n if (this._state) {\n handle = this._state.moveTarget;\n } else {\n handle = closestHandle(eventElement(e));\n }\n if (handle) {\n dataviz.addClass(handle, 'k-handle-active');\n }\n },\n _move: function (e) {\n if (!this._state) {\n return;\n }\n var ref = this;\n var state = ref._state;\n var options = ref.options;\n var axisOptions = ref.categoryAxis.options;\n var range = state.range;\n var target = state.moveTarget;\n var reverse = axisOptions.reverse;\n var from = this._index(options.from);\n var to = this._index(options.to);\n var min = this._index(options.min);\n var max = this._index(options.max);\n var delta = state.startLocation - e.x.location;\n var oldRange = {\n from: range.from,\n to: range.to\n };\n var span = range.to - range.from;\n var scale = elementStyles(this.wrapper, 'width').width / (axisOptions.categories.length - 1);\n var offset = Math.round(delta / scale) * (reverse ? -1 : 1);\n if (!target) {\n return;\n }\n var leftHandle = hasClasses(target, 'k-left-handle');\n var rightHandle = hasClasses(target, 'k-right-handle');\n if (hasClasses(target, '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 (leftHandle && !reverse || rightHandle && reverse) {\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 (leftHandle && reverse || rightHandle && !reverse) {\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 this.move(range.from, range.to);\n this.trigger(SELECT, this._rangeEventArgs(range));\n }\n },\n _end: function () {\n if (this._state) {\n var moveTarget = this._state.moveTarget;\n if (moveTarget) {\n dataviz.removeClass(moveTarget, 'k-handle-active');\n }\n var range = this._state.range;\n this.set(range.from, range.to);\n this.trigger(SELECT_END, this._rangeEventArgs(range));\n delete this._state;\n }\n },\n _tap: function (e) {\n var ref = this;\n var options = ref.options;\n var categoryAxis = ref.categoryAxis;\n var coords = this.chart._eventCoordinates(e);\n var categoryIx = categoryAxis.pointCategoryIndex(new Point(coords.x, categoryAxis.box.y1));\n var from = this._index(options.from);\n var to = this._index(options.to);\n var min = this._index(options.min);\n var max = this._index(options.max);\n var span = to - from;\n var mid = from + span / 2;\n var range = {};\n var rightClick = e.event.which === 3;\n var offset = Math.round(mid - categoryIx);\n if (this._state || rightClick) {\n return;\n }\n this.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 this._start(e);\n if (this._state) {\n this._state.range = range;\n this.trigger(SELECT, this._rangeEventArgs(range));\n this._end();\n }\n },\n _mousewheel: function (e) {\n var this$1 = this;\n var delta = dataviz.mousewheelDelta(e);\n this._start({ target: this.selection });\n if (this._state) {\n var range = this._state.range;\n e.preventDefault();\n e.stopPropagation();\n if (Math.abs(delta) > 1) {\n delta *= ZOOM_ACCELERATION;\n }\n if (this.options.mousewheel.reverse) {\n delta *= -1;\n }\n if (this.expand(delta)) {\n this.trigger(SELECT, {\n axis: this.categoryAxis.options,\n delta: delta,\n originalEvent: e,\n from: this._value(range.from),\n to: this._value(range.to)\n });\n }\n if (this._mwTimeout) {\n clearTimeout(this._mwTimeout);\n }\n this._mwTimeout = setTimeout(function () {\n this$1._end();\n }, MOUSEWHEEL_DELAY);\n }\n },\n _gesturestart: function (e) {\n var options = this.options;\n this._state = {\n range: {\n from: this._index(options.from),\n to: this._index(options.to)\n }\n };\n var args = this._rangeEventArgs(this._state.range);\n if (this.trigger(SELECT_START, args)) {\n this._state = null;\n } else {\n e.preventDefault();\n }\n },\n _gestureend: function () {\n if (this._state) {\n this.trigger(SELECT_END, this._rangeEventArgs(this._state.range));\n delete this._state;\n }\n },\n _gesturechange: function (e) {\n var ref = this;\n var chart = ref.chart;\n var state = ref._state;\n var options = ref.options;\n var categoryAxis = ref.categoryAxis;\n var range = state.range;\n var p0 = chart._toModelCoordinates(e.touches[0].x.location).x;\n var p1 = chart._toModelCoordinates(e.touches[1].x.location).x;\n var left = Math.min(p0, p1);\n var right = Math.max(p0, p1);\n e.preventDefault();\n range.from = categoryAxis.pointCategoryIndex(new Point(left)) || options.min;\n range.to = categoryAxis.pointCategoryIndex(new Point(right)) || options.max;\n this.move(range.from, range.to);\n this.trigger(SELECT, this._rangeEventArgs(range));\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 options = this.options;\n var reverse = this.categoryAxis.options.reverse;\n var offset = options.offset;\n var padding = options.padding;\n var border = options.selection.border;\n var left = reverse ? to : from;\n var right = reverse ? from : to;\n var edge = 'x' + (reverse ? 2 : 1);\n var box = this._slot(left);\n var leftMaskWidth = round(box[edge] - offset.left + padding.left);\n elementStyles(this.leftMask, { width: leftMaskWidth });\n elementStyles(this.selection, { left: leftMaskWidth });\n box = this._slot(right);\n var rightMaskWidth = round(options.width - (box[edge] - offset.left + padding.left));\n elementStyles(this.rightMask, { width: rightMaskWidth });\n var distance = options.width - rightMaskWidth;\n if (distance !== options.width) {\n distance += border.right;\n }\n elementStyles(this.rightMask, { left: distance });\n elementStyles(this.selection, { width: Math.max(options.width - (leftMaskWidth + rightMaskWidth) - border.right, 0) });\n },\n set: function (from, to) {\n var options = this.options;\n var min = this._index(options.min);\n var max = this._index(options.max);\n var fromValue = limitValue(this._index(from), min, max);\n var toValue = limitValue(this._index(to), fromValue + 1, max);\n if (options.visible) {\n this.move(fromValue, toValue);\n }\n options.from = this._value(fromValue);\n options.to = this._value(toValue);\n },\n expand: function (delta) {\n var options = this.options;\n var min = this._index(options.min);\n var max = this._index(options.max);\n var zDir = options.mousewheel.zoom;\n var from = this._index(options.from);\n var to = this._index(options.to);\n var range = {\n from: from,\n to: to\n };\n var oldRange = deepExtend({}, range);\n if (this._state) {\n range = this._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 this.set(range.from, range.to);\n return true;\n }\n },\n trigger: function (name, args) {\n return (this.observer || this.chart).trigger(name, args);\n }\n });\n function stopPropagation(e) {\n e.stopPropagation();\n }\n setDefaultOptions(Selection, {\n visible: true,\n mousewheel: { zoom: 'both' },\n min: MIN_VALUE,\n max: MAX_VALUE\n });\n var Tooltip = BaseTooltip.extend({\n show: function (point) {\n if (!point || !point.tooltipAnchor || this._current && this._current === point) {\n return;\n }\n var options = deepExtend({}, this.options, point.options.tooltip);\n var anchor = point.tooltipAnchor();\n if (anchor) {\n this._current = point;\n BaseTooltip.fn.show.call(this, {\n point: point,\n anchor: anchor\n }, options, point);\n } else {\n this.hide();\n }\n },\n hide: function () {\n delete this._current;\n BaseTooltip.fn.hide.call(this);\n }\n });\n var SharedTooltip = BaseTooltip.extend({\n init: function (plotArea, options) {\n BaseTooltip.fn.init.call(this, plotArea.chartService, options);\n this.plotArea = plotArea;\n this.formatService = plotArea.chartService.format;\n },\n showAt: function (points, coords) {\n var tooltipPoints = grep(points, function (point) {\n var tooltip = point.series.tooltip;\n var excluded = tooltip && tooltip.visible === false;\n return !excluded;\n });\n if (tooltipPoints.length > 0) {\n var point = tooltipPoints[0];\n var slot = this.plotArea.categoryAxis.getSlot(point.categoryIx);\n var anchor = coords ? this._slotAnchor(coords, slot) : this._defaultAnchor(point, slot);\n this.show({\n anchor: anchor,\n shared: true,\n points: points,\n category: point.category,\n categoryText: this.formatService.auto(this.options.categoryFormat, point.category),\n series: this.plotArea.series\n }, this.options);\n }\n },\n _slotAnchor: function (point, slot) {\n var axis = this.plotArea.categoryAxis;\n var align = {\n horizontal: 'left',\n vertical: 'center'\n };\n if (!axis.options.vertical) {\n point.x = slot.center().x;\n }\n return {\n point: point,\n align: align\n };\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 align = {\n horizontal: 'center',\n vertical: 'center'\n };\n var centerPoint;\n if (vertical) {\n centerPoint = new Point(center.x, slotCenter.y);\n } else {\n centerPoint = new Point(slotCenter.x, center.y);\n }\n return {\n point: centerPoint,\n align: align\n };\n }\n });\n setDefaultOptions(SharedTooltip, { categoryFormat: '{0:d}' });\n var BarChartAnimation = Animation.extend({\n setup: function () {\n var ref = this;\n var element = ref.element;\n var options = ref.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 GeometryPoint(1, 1);\n fromScale[axis] = START_SCALE;\n element.transform(transform().scale(fromScale.x, fromScale.y));\n } else {\n this.abort();\n }\n },\n step: function (pos) {\n var scaleX = dataviz.interpolateValue(this.fromScale.x, 1, pos);\n var scaleY = dataviz.interpolateValue(this.fromScale.y, 1, pos);\n this.element.transform(transform().scale(scaleX, scaleY, this.origin));\n },\n abort: function () {\n Animation.fn.abort.call(this);\n this.element.transform(null);\n }\n });\n setDefaultOptions(BarChartAnimation, { duration: INITIAL_ANIMATION_DURATION });\n AnimationFactory.current.register(BAR, BarChartAnimation);\n var BubbleAnimation = Animation.extend({\n setup: function () {\n var center = this.center = this.element.bbox().center();\n this.element.transform(transform().scale(START_SCALE, START_SCALE, center));\n },\n step: function (pos) {\n this.element.transform(transform().scale(pos, pos, this.center));\n }\n });\n setDefaultOptions(BubbleAnimation, { easing: 'easeOutElastic' });\n AnimationFactory.current.register(BUBBLE, BubbleAnimation);\n var FadeInAnimation = Animation.extend({\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 setDefaultOptions(FadeInAnimation, {\n duration: 200,\n easing: 'linear'\n });\n AnimationFactory.current.register(FADEIN, FadeInAnimation);\n var PieAnimation = Animation.extend({\n setup: function () {\n this.element.transform(transform().scale(START_SCALE, START_SCALE, this.options.center));\n },\n step: function (pos) {\n this.element.transform(transform().scale(pos, pos, this.options.center));\n }\n });\n setDefaultOptions(PieAnimation, {\n easing: 'easeOutElastic',\n duration: INITIAL_ANIMATION_DURATION\n });\n AnimationFactory.current.register(PIE, PieAnimation);\n var ScatterLineChart = ScatterChart.extend({\n render: function () {\n ScatterChart.fn.render.call(this);\n this.renderSegments();\n },\n createSegment: function (linePoints, currentSeries, seriesIx) {\n var style = currentSeries.style;\n var pointType;\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.prototype, LineChartMixin);\n var XYPlotArea = PlotAreaBase.extend({\n initFields: function () {\n this.namedXAxes = {};\n this.namedYAxes = {};\n this.xAxisRangeTracker = new AxisGroupRangeTracker();\n this.yAxisRangeTracker = new AxisGroupRangeTracker();\n },\n render: function (panes) {\n var this$1 = this;\n if (panes === void 0) {\n panes = this.panes;\n }\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$1.addToLegend(paneSeries);\n var filteredSeries = this$1.filterVisibleSeries(paneSeries);\n if (!filteredSeries) {\n continue;\n }\n this$1.createScatterChart(filterSeriesByType(filteredSeries, SCATTER), pane);\n this$1.createScatterLineChart(filterSeriesByType(filteredSeries, SCATTER_LINE), pane);\n this$1.createBubbleChart(filterSeriesByType(filteredSeries, BUBBLE), pane);\n }\n this.createAxes(panes);\n },\n appendChart: function (chart, pane) {\n this.xAxisRangeTracker.update(chart.xAxisRanges);\n this.yAxisRangeTracker.update(chart.yAxisRanges);\n PlotAreaBase.fn.appendChart.call(this, chart, pane);\n },\n removeAxis: function (axis) {\n var axisName = axis.options.name;\n PlotAreaBase.fn.removeAxis.call(this, axis);\n if (axis.options.vertical) {\n this.yAxisRangeTracker.reset(axisName);\n delete this.namedYAxes[axisName];\n } else {\n this.xAxisRangeTracker.reset(axisName);\n delete this.namedXAxes[axisName];\n }\n if (axis === this.axisX) {\n delete this.axisX;\n }\n if (axis === this.axisY) {\n delete this.axisY;\n }\n },\n seriesPaneName: function (series) {\n var options = this.options;\n var xAxisName = series.xAxis;\n var xAxisOptions = [].concat(options.xAxis);\n var xAxis = grep(xAxisOptions, function (a) {\n return a.name === xAxisName;\n })[0];\n var yAxisName = series.yAxis;\n var yAxisOptions = [].concat(options.yAxis);\n var yAxis = grep(yAxisOptions, function (a) {\n return a.name === yAxisName;\n })[0];\n var panes = options.panes || [{}];\n var defaultPaneName = panes[0].name || 'default';\n var paneName = (xAxis || {}).pane || (yAxis || {}).pane || defaultPaneName;\n return paneName;\n },\n createScatterChart: function (series, pane) {\n if (series.length > 0) {\n this.appendChart(new ScatterChart(this, {\n series: series,\n clip: pane.options.clip\n }), pane);\n }\n },\n createScatterLineChart: function (series, pane) {\n if (series.length > 0) {\n this.appendChart(new ScatterLineChart(this, {\n series: series,\n clip: pane.options.clip\n }), pane);\n }\n },\n createBubbleChart: function (series, pane) {\n if (series.length > 0) {\n this.appendChart(new BubbleChart(this, {\n series: series,\n clip: pane.options.clip\n }), pane);\n }\n },\n createXYAxis: function (options, vertical, axisIndex) {\n var axisName = options.name;\n var namedAxes = vertical ? this.namedYAxes : this.namedXAxes;\n var tracker = vertical ? this.yAxisRangeTracker : this.xAxisRangeTracker;\n var axisOptions = deepExtend({}, options, { vertical: vertical });\n var isLog = equalsIgnoreCase(axisOptions.type, LOGARITHMIC);\n var defaultRange = tracker.query();\n var defaultAxisRange = isLog ? {\n min: 0.1,\n max: 1\n } : {\n min: 0,\n max: 1\n };\n var range = tracker.query(axisName) || defaultRange || defaultAxisRange;\n var typeSamples = [\n axisOptions.min,\n axisOptions.max\n ];\n var series = this.series;\n for (var seriesIx = 0; seriesIx < series.length; seriesIx++) {\n var currentSeries = series[seriesIx];\n var seriesAxisName = currentSeries[vertical ? 'yAxis' : 'xAxis'];\n if (seriesAxisName === axisOptions.name || axisIndex === 0 && !seriesAxisName) {\n var 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 var inferredDate;\n for (var i = 0; i < typeSamples.length; i++) {\n if (typeSamples[i] instanceof Date) {\n inferredDate = true;\n break;\n }\n }\n var axisType;\n if (equalsIgnoreCase(axisOptions.type, DATE) || !axisOptions.type && inferredDate) {\n axisType = dataviz.DateValueAxis;\n } else if (isLog) {\n axisType = dataviz.LogarithmicAxis;\n } else {\n axisType = dataviz.NumericAxis;\n }\n var axis = new axisType(range.min, range.max, axisOptions, this.chartService);\n axis.axisIndex = axisIndex;\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 this.appendAxis(axis);\n return axis;\n },\n createAxes: function (panes) {\n var this$1 = this;\n var options = this.options;\n var xAxesOptions = [].concat(options.xAxis);\n var xAxes = [];\n var yAxesOptions = [].concat(options.yAxis);\n var yAxes = [];\n for (var idx = 0; idx < xAxesOptions.length; idx++) {\n var axisPane = this$1.findPane(xAxesOptions[idx].pane);\n if (inArray(axisPane, panes)) {\n xAxes.push(this$1.createXYAxis(xAxesOptions[idx], false, idx));\n }\n }\n for (var idx$1 = 0; idx$1 < yAxesOptions.length; idx$1++) {\n var axisPane$1 = this$1.findPane(yAxesOptions[idx$1].pane);\n if (inArray(axisPane$1, panes)) {\n yAxes.push(this$1.createXYAxis(yAxesOptions[idx$1], true, idx$1));\n }\n }\n this.axisX = this.axisX || xAxes[0];\n this.axisY = this.axisY || yAxes[0];\n },\n _dispatchEvent: function (chart, e, eventType) {\n var coords = chart._eventCoordinates(e);\n var point = new Point(coords.x, coords.y);\n var allAxes = this.axes;\n var length = allAxes.length;\n var xValues = [];\n var yValues = [];\n for (var i = 0; i < length; i++) {\n var axis = allAxes[i];\n var values = axis.options.vertical ? yValues : xValues;\n var 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: eventElement(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 = (vertical ? axes.y : axes.x).indexOf(axis);\n var axisOptions = [].concat(vertical ? this.options.yAxis : this.options.xAxis)[index];\n deepExtend(axisOptions, options);\n }\n });\n setDefaultOptions(XYPlotArea, {\n xAxis: {},\n yAxis: {}\n });\n deepExtend(XYPlotArea.prototype, PlotAreaEventsMixin);\n var PieSegment = ChartElement.extend({\n init: function (value, sector, options) {\n ChartElement.fn.init.call(this, options);\n this.value = value;\n this.sector = sector;\n },\n render: function () {\n var labels = this.options.labels;\n var chartService = this.owner.chartService;\n var labelText = this.value;\n if (this._rendered || this.visible === false) {\n return;\n }\n this._rendered = true;\n var labelTemplate = getTemplate(labels);\n if (labelTemplate) {\n labelText = labelTemplate({\n dataItem: this.dataItem,\n category: this.category,\n value: this.value,\n series: this.series,\n percentage: this.percentage\n });\n } else if (labels.format) {\n labelText = chartService.format.auto(labels.format, labelText);\n }\n if (labels.visible && (labelText || labelText === 0)) {\n if (labels.position === CENTER || labels.position === INSIDE_END) {\n if (!labels.color) {\n var brightnessValue = new Color(this.options.color).percBrightness();\n if (brightnessValue > 180) {\n labels.color = BLACK;\n } else {\n labels.color = WHITE;\n }\n }\n if (!labels.background) {\n labels.background = this.options.color;\n }\n } else {\n var themeLabels = chartService.theme.seriesDefaults.labels;\n labels.color = labels.color || themeLabels.color;\n labels.background = labels.background || themeLabels.background;\n }\n this.label = new TextBox(labelText, deepExtend({}, labels, {\n align: CENTER,\n vAlign: '',\n animation: {\n type: FADEIN,\n delay: this.animationDelay\n }\n }));\n this.append(this.label);\n }\n },\n reflow: function (targetBox) {\n this.render();\n this.box = targetBox;\n this.reflowLabel();\n },\n reflowLabel: function () {\n var ref = this;\n var labelsOptions = ref.options.labels;\n var label = ref.label;\n var sector = this.sector.clone();\n var labelsDistance = labelsOptions.distance;\n var angle = sector.middle();\n if (label) {\n var labelHeight = label.box.height();\n var labelWidth = label.box.width();\n var lp;\n if (labelsOptions.position === CENTER) {\n sector.radius = Math.abs((sector.radius - labelHeight) / 2) + labelHeight;\n lp = sector.point(angle);\n label.reflow(new Box(lp.x, lp.y - labelHeight / 2, lp.x, lp.y));\n } else if (labelsOptions.position === INSIDE_END) {\n sector.radius = sector.radius - labelHeight / 2;\n lp = sector.point(angle);\n label.reflow(new Box(lp.x, lp.y - labelHeight / 2, lp.x, lp.y));\n } else {\n var x1;\n lp = sector.clone().expand(labelsDistance).point(angle);\n if (lp.x >= sector.center.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(new Box(x1, lp.y - labelHeight, lp.x, lp.y));\n }\n }\n },\n createVisual: function () {\n var this$1 = this;\n var ref = this;\n var sector = ref.sector;\n var options = ref.options;\n ChartElement.fn.createVisual.call(this);\n if (this.value) {\n if (options.visual) {\n var startAngle = (sector.startAngle + 180) % 360;\n var visual = options.visual({\n category: this.category,\n dataItem: this.dataItem,\n value: this.value,\n series: this.series,\n percentage: this.percentage,\n center: new GeometryPoint(sector.center.x, sector.center.y),\n radius: sector.radius,\n innerRadius: sector.innerRadius,\n startAngle: startAngle,\n endAngle: startAngle + sector.angle,\n options: options,\n sender: this.getSender(),\n createVisual: function () {\n var group = new Group();\n this$1.createSegmentVisual(group);\n return group;\n }\n });\n if (visual) {\n this.visual.append(visual);\n }\n } else {\n this.createSegmentVisual(this.visual);\n }\n }\n },\n createSegmentVisual: function (group) {\n var ref = this;\n var sector = ref.sector;\n var options = ref.options;\n var borderOptions = options.border || {};\n var border = borderOptions.width > 0 ? {\n stroke: {\n color: borderOptions.color,\n width: borderOptions.width,\n opacity: borderOptions.opacity,\n dashType: borderOptions.dashType\n }\n } : {};\n var color = options.color;\n var fill = {\n color: color,\n opacity: options.opacity\n };\n var visual = this.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.center.x,\n sector.center.y\n ],\n innerRadius: sector.innerRadius,\n radius: sector.radius,\n userSpace: true\n }, options.overlay)));\n }\n },\n createSegment: function (sector, options) {\n if (options.singleSegment) {\n return new drawing.Circle(new geometry.Circle(new GeometryPoint(sector.center.x, sector.center.y), sector.radius), options);\n }\n return dataviz.ShapeBuilder.current.createRing(sector, options);\n },\n createAnimation: function () {\n var ref = this;\n var options = ref.options;\n var center = ref.sector.center;\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 highlight = this.options.highlight || {};\n var border = highlight.border || {};\n return this.createSegment(this.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.radius,\n innerRadius: sector.innerRadius,\n center: new GeometryPoint(sector.center.x, sector.center.y),\n startAngle: sector.startAngle,\n endAngle: sector.angle + sector.startAngle,\n visual: this.visual\n };\n },\n tooltipAnchor: function () {\n var sector = this.sector.clone().expand(TOOLTIP_OFFSET);\n var midAndle = sector.middle();\n var midPoint = sector.point(midAndle);\n return {\n point: midPoint,\n align: tooltipAlignment(midAndle + 180)\n };\n },\n formatValue: function (format) {\n return this.owner.formatPointValue(this, format);\n }\n });\n var RAD_30 = round(dataviz.rad(30), DEFAULT_PRECISION);\n var RAD_60 = round(dataviz.rad(60), DEFAULT_PRECISION);\n function tooltipAlignment(angle) {\n var radians = dataviz.rad(angle);\n var sine = round(Math.sin(radians), DEFAULT_PRECISION);\n var cosine = round(Math.cos(radians), DEFAULT_PRECISION);\n var horizontal;\n if (Math.abs(sine) > RAD_60) {\n horizontal = CENTER;\n } else if (cosine < 0) {\n horizontal = RIGHT;\n } else {\n horizontal = LEFT;\n }\n var vertical;\n if (Math.abs(sine) < RAD_30) {\n vertical = CENTER;\n } else if (sine < 0) {\n vertical = BOTTOM;\n } else {\n vertical = TOP;\n }\n return {\n horizontal: horizontal,\n vertical: vertical\n };\n }\n setDefaultOptions(PieSegment, {\n color: WHITE,\n overlay: { gradient: 'roundedBevel' },\n border: { width: 0.5 },\n labels: {\n visible: false,\n distance: 35,\n font: datavizConstants.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 deepExtend(PieSegment.prototype, PointEventsMixin);\n var PieChartMixin = {\n createLegendItem: function (value, point, options) {\n var legendOptions = this.options.legend || {};\n var labelsOptions = legendOptions.labels || {};\n var inactiveItems = legendOptions.inactiveItems || {};\n var inactiveItemsLabels = inactiveItems.labels || {};\n if (options && options.visibleInLegend !== false) {\n var pointVisible = options.visible !== false;\n var labelTemplate = pointVisible ? getTemplate(labelsOptions) : getTemplate(inactiveItemsLabels) || getTemplate(labelsOptions);\n var text = options.category || '';\n if (labelTemplate) {\n text = labelTemplate({\n text: text,\n series: options.series,\n dataItem: options.dataItem,\n percentage: options.percentage,\n value: value\n });\n }\n var itemLabelOptions, markerColor;\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 this.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 function segmentVisible(series, fields, index) {\n var visible = fields.visible;\n if (defined(visible)) {\n return visible;\n }\n var pointVisibility = series.pointVisibility;\n if (pointVisibility) {\n return pointVisibility[index];\n }\n }\n function bindSegments(series) {\n var data = series.data;\n var points = [];\n var sum = 0;\n var count = 0;\n for (var idx = 0; idx < data.length; idx++) {\n var pointData = SeriesBinder.current.bindPoint(series, idx);\n var value = pointData.valueFields.value;\n if (isString(value)) {\n value = parseFloat(value);\n }\n if (isNumber(value)) {\n pointData.visible = segmentVisible(series, pointData.fields, idx) !== false;\n pointData.value = Math.abs(value);\n points.push(pointData);\n if (pointData.visible) {\n sum += pointData.value;\n }\n if (value !== 0) {\n count++;\n }\n } else {\n points.push(null);\n }\n }\n return {\n total: sum,\n points: points,\n count: count\n };\n }\n var PIE_SECTOR_ANIM_DELAY = 70;\n var PieChart = ChartElement.extend({\n init: function (plotArea, options) {\n ChartElement.fn.init.call(this, options);\n this.plotArea = plotArea;\n this.chartService = plotArea.chartService;\n this.points = [];\n this.legendItems = [];\n this.render();\n },\n render: function () {\n this.traverseDataPoints(this.addValue.bind(this));\n },\n traverseDataPoints: function (callback) {\n var this$1 = this;\n var ref = this;\n var options = ref.options;\n var seriesColors = ref.plotArea.options.seriesColors;\n if (seriesColors === void 0) {\n seriesColors = [];\n }\n var colorsCount = seriesColors.length;\n var series = options.series;\n var seriesCount = series.length;\n for (var seriesIx = 0; seriesIx < seriesCount; seriesIx++) {\n var currentSeries = series[seriesIx];\n var data = currentSeries.data;\n var ref$1 = bindSegments(currentSeries);\n var total = ref$1.total;\n var points = ref$1.points;\n var count = ref$1.count;\n var anglePerValue = 360 / total;\n var constantAngle = void 0;\n if (!isFinite(anglePerValue)) {\n constantAngle = 360 / count;\n }\n var currentAngle = void 0;\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 (var i = 0; i < points.length; i++) {\n var pointData = points[i];\n if (!pointData) {\n continue;\n }\n var fields = pointData.fields;\n var value = pointData.value;\n var visible = pointData.visible;\n var angle = value !== 0 ? constantAngle || value * anglePerValue : 0;\n var explode = data.length !== 1 && Boolean(fields.explode);\n if (!isFunction(currentSeries.color)) {\n currentSeries.color = fields.color || seriesColors[i % colorsCount];\n }\n callback(pointData.valueFields.value, new dataviz.Ring(null, 0, 0, currentAngle, angle), {\n owner: this$1,\n category: fields.category || '',\n index: i,\n series: currentSeries,\n seriesIx: seriesIx,\n dataItem: data[i],\n percentage: total !== 0 ? value / total : 0,\n explode: explode,\n visibleInLegend: fields.visibleInLegend,\n visible: visible,\n zIndex: seriesCount - seriesIx,\n animationDelay: this$1.animationDelay(i, seriesIx, seriesCount)\n });\n if (visible !== false) {\n currentAngle += angle;\n }\n }\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 'content',\n 'template',\n 'visual',\n 'toggle'\n ]\n });\n },\n addValue: function (value, sector, fields) {\n var segmentOptions = deepExtend({}, fields.series, { index: fields.index });\n this.evalSegmentOptions(segmentOptions, value, fields);\n this.createLegendItem(value, segmentOptions, fields);\n if (fields.visible === false) {\n return;\n }\n var segment = new PieSegment(value, sector, segmentOptions);\n $.extend(segment, fields);\n this.append(segment);\n this.points.push(segment);\n },\n reflow: function (targetBox) {\n var ref = this;\n var options = ref.options;\n var points = ref.points;\n var seriesConfigs = ref.seriesConfigs;\n if (seriesConfigs === void 0) {\n seriesConfigs = [];\n }\n var count = points.length;\n var box = targetBox.clone();\n var space = 5;\n var minWidth = Math.min(box.width(), box.height());\n var halfMinWidth = minWidth / 2;\n var defaultPadding = minWidth - minWidth * 0.85;\n var newBox = new Box(box.x1, box.y1, box.x1 + minWidth, box.y1 + minWidth);\n var newBoxCenter = newBox.center();\n var boxCenter = box.center();\n var seriesCount = options.series.length;\n var leftSideLabels = [];\n var rightSideLabels = [];\n var padding = valueOrDefault(options.padding, defaultPadding);\n padding = padding > halfMinWidth - space ? halfMinWidth - space : padding;\n newBox.translate(boxCenter.x - newBoxCenter.x, boxCenter.y - newBoxCenter.y);\n var radius = halfMinWidth - padding;\n var center = new Point(radius + newBox.x1 + padding, radius + newBox.y1 + padding);\n for (var i = 0; i < count; i++) {\n var segment = points[i];\n var sector = segment.sector;\n var seriesIndex = segment.seriesIx;\n sector.radius = radius;\n sector.center = center;\n if (seriesConfigs.length) {\n var seriesConfig = seriesConfigs[seriesIndex];\n sector.innerRadius = seriesConfig.innerRadius;\n sector.radius = seriesConfig.radius;\n }\n if (seriesIndex === seriesCount - 1 && segment.explode) {\n sector.center = sector.clone().setRadius(sector.radius * 0.15).point(sector.middle());\n }\n segment.reflow(newBox);\n var 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(this.labelComparator(true));\n this.leftLabelsReflow(leftSideLabels);\n }\n if (rightSideLabels.length > 0) {\n rightSideLabels.sort(this.labelComparator(false));\n this.rightLabelsReflow(rightSideLabels);\n }\n this.box = newBox;\n },\n leftLabelsReflow: function (labels) {\n var distances = this.distanceBetweenLabels(labels);\n this.distributeLabels(distances, labels);\n },\n rightLabelsReflow: function (labels) {\n var distances = this.distanceBetweenLabels(labels);\n this.distributeLabels(distances, labels);\n },\n distanceBetweenLabels: function (labels) {\n var segment = last(this.points);\n var sector = segment.sector;\n var count = labels.length - 1;\n var lr = sector.radius + segment.options.labels.distance;\n var distances = [];\n var firstBox = labels[0].box;\n var distance = round(firstBox.y1 - (sector.center.y - lr - firstBox.height() - firstBox.height() / 2));\n distances.push(distance);\n for (var i = 0; i < count; i++) {\n var secondBox = labels[i + 1].box;\n firstBox = labels[i].box;\n distance = round(secondBox.y1 - firstBox.y2);\n distances.push(distance);\n }\n distance = round(sector.center.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 this$1 = this;\n var count = distances.length;\n var left, right, remaining;\n for (var i = 0; i < count; i++) {\n remaining = -distances[i];\n left = right = i;\n while (remaining > 0 && (left >= 0 || right < count)) {\n remaining = this$1._takeDistance(distances, i, --left, remaining);\n remaining = this$1._takeDistance(distances, i, ++right, remaining);\n }\n }\n this.reflowLabels(distances, labels);\n },\n _takeDistance: function (distances, anchor, position, amount) {\n var result = amount;\n if (distances[position] > 0) {\n var available = Math.min(distances[position], result);\n result -= available;\n distances[position] -= available;\n distances[anchor] += available;\n }\n return result;\n },\n reflowLabels: function (distances, labels) {\n var this$1 = this;\n var segment = last(this.points);\n var sector = segment.sector;\n var labelOptions = segment.options.labels;\n var labelsCount = labels.length;\n var labelDistance = labelOptions.distance;\n var boxY = sector.center.y - (sector.radius + labelDistance) - labels[0].box.height();\n var boxX;\n distances[0] += 2;\n for (var i = 0; i < labelsCount; i++) {\n var label = labels[i];\n var box = label.box;\n boxY += distances[i];\n boxX = this$1.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.radius + sector.center.x + labelDistance;\n }\n label.reflow(new Box(boxX + box.width(), boxY, boxX, boxY));\n } else {\n if (labelOptions.align !== CIRCLE) {\n boxX = sector.center.x - sector.radius - labelDistance;\n }\n label.reflow(new Box(boxX - box.width(), boxY, boxX, boxY));\n }\n boxY += box.height();\n }\n },\n createVisual: function () {\n var this$1 = this;\n var ref = this;\n var connectors = ref.options.connectors;\n var points = ref.points;\n var count = points.length;\n var space = 4;\n ChartElement.fn.createVisual.call(this);\n this._connectorLines = [];\n for (var i = 0; i < count; i++) {\n var segment = points[i];\n var sector = segment.sector;\n var label = segment.label;\n var angle = sector.middle();\n var connectorsColor = (segment.options.connectors || {}).color || connectors.color;\n if (label) {\n var connectorLine = new 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) {\n var box = label.box;\n var centerPoint = sector.center;\n var start = sector.point(angle);\n var middle = new Point(box.x1, box.center().y);\n var sr = void 0, end = void 0, crossing = void 0;\n start = sector.clone().expand(connectors.padding).point(angle);\n connectorLine.moveTo(start.x, start.y);\n if (label.orientation === RIGHT) {\n end = new Point(box.x1 - connectors.padding, box.center().y);\n crossing = intersection(centerPoint, start, middle, end);\n middle = new Point(end.x - space, end.y);\n crossing = crossing || middle;\n crossing.x = Math.min(crossing.x, middle.x);\n if (this$1.pointInCircle(crossing, sector.center, sector.radius + space) || crossing.x < sector.center.x) {\n sr = sector.center.x + sector.radius + 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 = new Point(box.x2 + connectors.padding, box.center().y);\n crossing = intersection(centerPoint, start, middle, end);\n middle = new Point(end.x + space, end.y);\n crossing = crossing || middle;\n crossing.x = Math.max(crossing.x, middle.x);\n if (this$1.pointInCircle(crossing, sector.center, sector.radius + space) || crossing.x > sector.center.x) {\n sr = sector.center.x - sector.radius - 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$1._connectorLines.push(connectorLine);\n this$1.visual.append(connectorLine);\n }\n }\n }\n },\n labelComparator: function (reverse) {\n var reverseValue = reverse ? -1 : 1;\n return function (a, b) {\n var first = (a.parent.sector.middle() + 270) % 360;\n var second = (b.parent.sector.middle() + 270) % 360;\n return (first - second) * reverseValue;\n };\n },\n hAlignLabel: function (originalX, sector, y1, y2, direction) {\n var radius = sector.radius;\n var sector_center = sector.center;\n var cx = sector_center.x;\n var cy = sector_center.y;\n var t = Math.min(Math.abs(cy - y1), Math.abs(cy - y2));\n if (t > radius) {\n return originalX;\n }\n return cx + Math.sqrt(radius * radius - t * t) * (direction ? 1 : -1);\n },\n pointInCircle: function (point, center, radius) {\n return Math.pow(center.x - point.x, 2) + Math.pow(center.y - point.y, 2) < Math.pow(radius, 2);\n },\n formatPointValue: function (point, format) {\n return this.chartService.format.auto(format, point.value);\n },\n animationDelay: function (categoryIndex) {\n return categoryIndex * PIE_SECTOR_ANIM_DELAY;\n }\n });\n function intersection(a1, a2, b1, b2) {\n var uat = (b2.x - b1.x) * (a1.y - b1.y) - (b2.y - b1.y) * (a1.x - b1.x);\n var ub = (b2.y - b1.y) * (a2.x - a1.x) - (b2.x - b1.x) * (a2.y - a1.y);\n var result;\n if (ub !== 0) {\n var ua = uat / ub;\n result = new Point(a1.x + ua * (a2.x - a1.x), a1.y + ua * (a2.y - a1.y));\n }\n return result;\n }\n setDefaultOptions(PieChart, {\n startAngle: 90,\n connectors: {\n width: 2,\n color: '#939393',\n padding: 8\n },\n inactiveItems: {\n markers: {},\n labels: {}\n }\n });\n deepExtend(PieChart.prototype, PieChartMixin);\n var PiePlotArea = PlotAreaBase.extend({\n render: function () {\n this.createPieChart(this.series);\n },\n createPieChart: function (series) {\n var firstSeries = series[0];\n var pieChart = new PieChart(this, {\n series: series,\n padding: firstSeries.padding,\n startAngle: firstSeries.startAngle,\n connectors: firstSeries.connectors,\n legend: this.options.legend\n });\n this.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 DonutSegment = PieSegment.extend({\n reflowLabel: function () {\n var ref = this;\n var labelsOptions = ref.options.labels;\n var label = ref.label;\n var sector = this.sector.clone();\n var angle = sector.middle();\n if (label) {\n var labelHeight = label.box.height();\n if (labelsOptions.position === CENTER) {\n sector.radius -= (sector.radius - sector.innerRadius) / 2;\n var lp = sector.point(angle);\n label.reflow(new Box(lp.x, lp.y - labelHeight / 2, lp.x, lp.y));\n } else {\n PieSegment.fn.reflowLabel.call(this);\n }\n }\n },\n createSegment: function (sector, options) {\n return dataviz.ShapeBuilder.current.createRing(sector, options);\n }\n });\n setDefaultOptions(DonutSegment, {\n overlay: { gradient: 'roundedGlass' },\n labels: { position: CENTER },\n animation: { type: PIE }\n });\n deepExtend(DonutSegment.prototype, PointEventsMixin);\n var DONUT_SECTOR_ANIM_DELAY = 50;\n var DonutChart = PieChart.extend({\n addValue: function (value, sector, fields) {\n var segmentOptions = deepExtend({}, fields.series, { index: fields.index });\n this.evalSegmentOptions(segmentOptions, value, fields);\n this.createLegendItem(value, segmentOptions, fields);\n if (!value || fields.visible === false) {\n return;\n }\n var segment = new DonutSegment(value, sector, segmentOptions);\n $.extend(segment, fields);\n this.append(segment);\n this.points.push(segment);\n },\n reflow: function (targetBox) {\n var this$1 = this;\n var options = this.options;\n var box = targetBox.clone();\n var space = 5;\n var minWidth = Math.min(box.width(), box.height());\n var halfMinWidth = minWidth / 2;\n var defaultPadding = minWidth - minWidth * 0.85;\n var series = options.series;\n var seriesCount = series.length;\n var padding = valueOrDefault(options.padding, defaultPadding);\n padding = padding > halfMinWidth - space ? halfMinWidth - space : padding;\n var totalSize = halfMinWidth - padding;\n var seriesWithoutSize = 0;\n var holeSize;\n for (var i = 0; i < seriesCount; i++) {\n var 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 var currentSize = (halfMinWidth - padding) / (seriesCount + 0.75);\n holeSize = currentSize * 0.75;\n totalSize -= holeSize;\n }\n var innerRadius = holeSize;\n var margin = 0;\n var size, radius;\n this.seriesConfigs = [];\n for (var i$1 = 0; i$1 < seriesCount; i$1++) {\n var currentSeries$1 = series[i$1];\n size = valueOrDefault(currentSeries$1.size, totalSize / seriesWithoutSize);\n innerRadius += margin;\n radius = innerRadius + size;\n this$1.seriesConfigs.push({\n innerRadius: innerRadius,\n radius: radius\n });\n margin = currentSeries$1.margin || 0;\n innerRadius = radius;\n }\n PieChart.fn.reflow.call(this, 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 setDefaultOptions(DonutChart, {\n startAngle: 90,\n connectors: {\n width: 2,\n color: '#939393',\n padding: 8\n }\n });\n var DonutPlotArea = PiePlotArea.extend({\n render: function () {\n this.createDonutChart(this.series);\n },\n createDonutChart: function (series) {\n var firstSeries = series[0];\n var donutChart = new DonutChart(this, {\n series: series,\n padding: firstSeries.padding,\n connectors: firstSeries.connectors,\n legend: this.options.legend\n });\n this.appendChart(donutChart);\n }\n });\n var DEFAULT_PADDING = 0.15;\n var PolarPlotAreaBase = PlotAreaBase.extend({\n initFields: function () {\n this.valueAxisRangeTracker = new AxisGroupRangeTracker();\n },\n render: function () {\n this.addToLegend(this.series);\n this.createPolarAxis();\n this.createCharts();\n this.createValueAxis();\n },\n alignAxes: function () {\n var axis = this.valueAxis;\n var range = axis.range();\n var crossingValue = axis.options.reverse ? range.max : range.min;\n var slot = axis.getSlot(crossingValue);\n var center = this.polarAxis.getSlot(0).center;\n var axisBox = axis.box.translate(center.x - slot.x1, center.y - slot.y1);\n axis.reflow(axisBox);\n },\n createValueAxis: function () {\n var tracker = this.valueAxisRangeTracker;\n var defaultRange = tracker.query();\n var axisOptions = this.valueAxisOptions({\n roundToMajorUnit: false,\n zIndex: -1\n });\n var axisType, axisDefaultRange;\n if (axisOptions.type === LOGARITHMIC) {\n axisType = dataviz.RadarLogarithmicAxis;\n axisDefaultRange = {\n min: 0.1,\n max: 1\n };\n } else {\n axisType = dataviz.RadarNumericAxis;\n axisDefaultRange = {\n min: 0,\n max: 1\n };\n }\n var range = tracker.query(name) || defaultRange || axisDefaultRange;\n if (range && defaultRange) {\n range.min = Math.min(range.min, defaultRange.min);\n range.max = Math.max(range.max, defaultRange.max);\n }\n var valueAxis = new axisType(range.min, range.max, axisOptions, this.chartService);\n this.valueAxis = valueAxis;\n this.appendAxis(valueAxis);\n },\n reflowAxes: function () {\n var ref = this;\n var options = ref.options.plotArea;\n var valueAxis = ref.valueAxis;\n var polarAxis = ref.polarAxis;\n var box = ref.box;\n var defaultPadding = Math.min(box.width(), box.height()) * DEFAULT_PADDING;\n var padding = getSpacing(options.padding || {}, defaultPadding);\n var paddingBox = box.clone().unpad(padding);\n var axisBox = paddingBox.clone();\n axisBox.y2 = axisBox.y1 + Math.min(axisBox.width(), axisBox.height());\n axisBox.align(paddingBox, Y, CENTER);\n var valueAxisBox = axisBox.clone().shrink(0, axisBox.height() / 2);\n polarAxis.reflow(axisBox);\n valueAxis.reflow(valueAxisBox);\n var heightDiff = valueAxis.lineBox().height() - valueAxis.box.height();\n valueAxis.reflow(valueAxis.box.unpad({ top: heightDiff }));\n this.axisBox = axisBox;\n this.alignAxes(axisBox);\n },\n backgroundBox: function () {\n return this.box;\n }\n });\n var PolarScatterChart = ScatterChart.extend({\n pointSlot: function (slotX, slotY) {\n var valueRadius = slotX.center.y - slotY.y1;\n var slot = Point.onCircle(slotX.center, slotX.startAngle, valueRadius);\n return new Box(slot.x, slot.y, slot.x, slot.y);\n }\n });\n setDefaultOptions(PolarScatterChart, { clip: false });\n var PolarLineChart = ScatterLineChart.extend({});\n PolarLineChart.prototype.pointSlot = PolarScatterChart.prototype.pointSlot;\n setDefaultOptions(PolarLineChart, { clip: false });\n var SplinePolarAreaSegment = SplineAreaSegment.extend({\n closeFill: function (fillPath) {\n var center = this._polarAxisCenter();\n fillPath.lineTo(center.x, center.y);\n },\n _polarAxisCenter: function () {\n var polarAxis = this.parent.plotArea.polarAxis;\n var center = polarAxis.box.center();\n return center;\n },\n strokeSegments: function () {\n var segments = this._strokeSegments;\n if (!segments) {\n var center = this._polarAxisCenter();\n var curveProcessor = new dataviz.CurveProcessor(false);\n var linePoints = LineSegment.prototype.points.call(this);\n linePoints.push(center);\n segments = this._strokeSegments = curveProcessor.process(linePoints);\n segments.pop();\n }\n return segments;\n }\n });\n var PolarAreaSegment = AreaSegment.extend({\n points: function () {\n var ref = this;\n var polarAxis = ref.parent.plotArea.polarAxis;\n var stackPoints = ref.stackPoints;\n var center = polarAxis.box.center();\n var points = LineSegment.prototype.points.call(this, stackPoints);\n points.unshift([\n center.x,\n center.y\n ]);\n points.push([\n center.x,\n center.y\n ]);\n return points;\n }\n });\n var PolarAreaChart = PolarLineChart.extend({\n createSegment: function (linePoints, currentSeries, seriesIx) {\n var style = (currentSeries.line || {}).style;\n var segment;\n if (style === SMOOTH) {\n segment = new SplinePolarAreaSegment(linePoints, null, false, currentSeries, seriesIx);\n } else {\n segment = new PolarAreaSegment(linePoints, [], currentSeries, seriesIx);\n }\n return segment;\n },\n createMissingValue: function (value, missingValues) {\n var missingValue;\n if (hasValue(value.x) && missingValues !== INTERPOLATE) {\n missingValue = {\n x: value.x,\n y: value.y\n };\n if (missingValues === ZERO) {\n missingValue.y = 0;\n }\n }\n return missingValue;\n },\n seriesMissingValues: function (series) {\n return series.missingValues || ZERO;\n },\n _hasMissingValuesGap: function () {\n var this$1 = this;\n var series = this.options.series;\n for (var idx = 0; idx < series.length; idx++) {\n if (this$1.seriesMissingValues(series[idx]) === GAP) {\n return true;\n }\n }\n },\n sortPoints: function (points) {\n var this$1 = this;\n points.sort(xComparer);\n if (this._hasMissingValuesGap()) {\n for (var idx = 0; idx < points.length; idx++) {\n var point = points[idx];\n if (point) {\n var value = point.value;\n if (!hasValue(value.y) && this$1.seriesMissingValues(point.series) === GAP) {\n delete points[idx];\n }\n }\n }\n }\n return points;\n }\n });\n function xComparer(a, b) {\n return a.value.x - b.value.x;\n }\n var PolarPlotArea = PolarPlotAreaBase.extend({\n createPolarAxis: function () {\n var polarAxis = new dataviz.PolarAxis(this.options.xAxis, this.chartService);\n this.polarAxis = polarAxis;\n this.axisX = polarAxis;\n this.appendAxis(polarAxis);\n },\n valueAxisOptions: function (defaults) {\n return deepExtend(defaults, {\n majorGridLines: { type: ARC },\n minorGridLines: { type: ARC }\n }, this.options.yAxis);\n },\n createValueAxis: function () {\n PolarPlotAreaBase.fn.createValueAxis.call(this);\n this.axisY = this.valueAxis;\n },\n appendChart: function (chart, pane) {\n this.valueAxisRangeTracker.update(chart.yAxisRanges);\n PlotAreaBase.prototype.appendChart.call(this, chart, pane);\n },\n createCharts: function () {\n var series = this.filterVisibleSeries(this.series);\n var pane = this.panes[0];\n this.createLineChart(filterSeriesByType(series, [POLAR_LINE]), pane);\n this.createScatterChart(filterSeriesByType(series, [POLAR_SCATTER]), pane);\n this.createAreaChart(filterSeriesByType(series, [POLAR_AREA]), pane);\n },\n createLineChart: function (series, pane) {\n if (series.length === 0) {\n return;\n }\n var lineChart = new PolarLineChart(this, { series: series });\n this.appendChart(lineChart, pane);\n },\n createScatterChart: function (series, pane) {\n if (series.length === 0) {\n return;\n }\n var scatterChart = new PolarScatterChart(this, { series: series });\n this.appendChart(scatterChart, pane);\n },\n createAreaChart: function (series, pane) {\n if (series.length === 0) {\n return;\n }\n var areaChart = new PolarAreaChart(this, { series: series });\n this.appendChart(areaChart, pane);\n },\n _dispatchEvent: function (chart, e, eventType) {\n var coords = chart._eventCoordinates(e);\n var point = new Point(coords.x, coords.y);\n var xValue = this.axisX.getValue(point);\n var yValue = this.axisY.getValue(point);\n if (xValue !== null && yValue !== null) {\n chart.trigger(eventType, {\n element: eventElement(e),\n x: xValue,\n y: yValue\n });\n }\n },\n createCrosshairs: function () {\n }\n });\n setDefaultOptions(PolarPlotArea, {\n xAxis: {},\n yAxis: {}\n });\n deepExtend(PolarPlotArea.prototype, PlotAreaEventsMixin);\n var RadarLineChart = LineChart.extend({\n pointSlot: function (categorySlot, valueSlot) {\n var valueRadius = categorySlot.center.y - valueSlot.y1;\n var slot = Point.onCircle(categorySlot.center, categorySlot.middle(), valueRadius);\n return new Box(slot.x, slot.y, slot.x, slot.y);\n },\n createSegment: function (linePoints, currentSeries, seriesIx) {\n var style = currentSeries.style;\n var pointType;\n if (style === SMOOTH) {\n pointType = SplineSegment;\n } else {\n pointType = LineSegment;\n }\n var segment = new pointType(linePoints, currentSeries, seriesIx);\n if (linePoints.length === currentSeries.data.length) {\n segment.options.closed = true;\n }\n return segment;\n }\n });\n setDefaultOptions(RadarLineChart, { clip: false });\n var SplineRadarAreaSegment = SplineAreaSegment.extend({\n closeFill: function () {\n }\n });\n var RadarAreaSegment = AreaSegment.extend({\n points: function () {\n return LineSegment.prototype.points.call(this, this.stackPoints);\n }\n });\n var RadarAreaChart = RadarLineChart.extend({\n createSegment: function (linePoints, currentSeries, seriesIx, prevSegment) {\n var isStacked = this.options.isStacked;\n var style = (currentSeries.line || {}).style;\n var segment;\n if (style === SMOOTH) {\n segment = new SplineRadarAreaSegment(linePoints, prevSegment, isStacked, currentSeries, seriesIx);\n segment.options.closed = true;\n } else {\n var stackPoints;\n if (isStacked && seriesIx > 0 && prevSegment) {\n stackPoints = prevSegment.linePoints.slice(0).reverse();\n }\n linePoints.push(linePoints[0]);\n segment = new RadarAreaSegment(linePoints, stackPoints, currentSeries, seriesIx);\n }\n return segment;\n },\n seriesMissingValues: function (series) {\n return series.missingValues || ZERO;\n }\n });\n var RadarSegment = DonutSegment.extend({\n init: function (value, options) {\n DonutSegment.fn.init.call(this, value, null, options);\n }\n });\n setDefaultOptions(RadarSegment, {\n overlay: { gradient: 'none' },\n labels: { distance: 10 }\n });\n var RadarClusterLayout = ChartElement.extend({\n reflow: function (sector) {\n var ref = this;\n var options = ref.options;\n var children = ref.children;\n var gap = options.gap;\n var spacing = options.spacing;\n var count = children.length;\n var slots = count + gap + spacing * (count - 1);\n var slotAngle = sector.angle / slots;\n var angle = sector.startAngle + slotAngle * (gap / 2);\n for (var i = 0; i < count; i++) {\n var slotSector = sector.clone();\n slotSector.startAngle = angle;\n slotSector.angle = slotAngle;\n if (children[i].sector) {\n slotSector.radius = children[i].sector.radius;\n }\n children[i].reflow(slotSector);\n children[i].sector = slotSector;\n angle += slotAngle + slotAngle * spacing;\n }\n }\n });\n setDefaultOptions(RadarClusterLayout, {\n gap: 1,\n spacing: 0\n });\n var RadarStackLayout = ChartElement.extend({\n reflow: function (sector) {\n var ref = this;\n var reverse = ref.options.reverse;\n var children = ref.children;\n var childrenCount = children.length;\n var first = reverse ? childrenCount - 1 : 0;\n var step = reverse ? -1 : 1;\n this.box = new Box();\n for (var i = first; i >= 0 && i < childrenCount; i += step) {\n var childSector = children[i].sector;\n childSector.startAngle = sector.startAngle;\n childSector.angle = sector.angle;\n }\n }\n });\n var RadarBarChart = BarChart.extend({\n pointType: function () {\n return RadarSegment;\n },\n clusterType: function () {\n return RadarClusterLayout;\n },\n stackType: function () {\n return RadarStackLayout;\n },\n categorySlot: function (categoryAxis, categoryIx) {\n return categoryAxis.getSlot(categoryIx);\n },\n pointSlot: function (categorySlot, valueSlot) {\n var slot = categorySlot.clone();\n var y = categorySlot.center.y;\n slot.radius = y - valueSlot.y1;\n slot.innerRadius = y - valueSlot.y2;\n return slot;\n },\n reflowPoint: function (point, pointSlot) {\n point.sector = pointSlot;\n point.reflow();\n },\n createAnimation: function () {\n this.options.animation.center = this.box.toRect().center();\n BarChart.fn.createAnimation.call(this);\n }\n });\n RadarBarChart.prototype.reflow = CategoricalChart.prototype.reflow;\n setDefaultOptions(RadarBarChart, {\n clip: false,\n animation: { type: 'pie' }\n });\n var RadarPlotArea = PolarPlotAreaBase.extend({\n createPolarAxis: function () {\n var categoryAxis = new dataviz.RadarCategoryAxis(this.options.categoryAxis, this.chartService);\n this.polarAxis = categoryAxis;\n this.categoryAxis = categoryAxis;\n this.appendAxis(categoryAxis);\n this.aggregateCategories();\n this.createCategoryAxesLabels();\n },\n valueAxisOptions: function (defaults) {\n if (this._hasBarCharts) {\n deepExtend(defaults, {\n majorGridLines: { type: ARC },\n minorGridLines: { type: ARC }\n });\n }\n if (this._isStacked100) {\n deepExtend(defaults, {\n roundToMajorUnit: false,\n labels: { format: 'P0' }\n });\n }\n return deepExtend(defaults, this.options.valueAxis);\n },\n aggregateCategories: function () {\n CategoricalPlotArea.prototype.aggregateCategories.call(this, this.panes);\n },\n createCategoryAxesLabels: function () {\n CategoricalPlotArea.prototype.createCategoryAxesLabels.call(this, this.panes);\n },\n filterSeries: function (currentSeries) {\n return currentSeries;\n },\n createCharts: function () {\n var series = this.filterVisibleSeries(this.series);\n var pane = this.panes[0];\n this.createAreaChart(filterSeriesByType(series, [RADAR_AREA]), pane);\n this.createLineChart(filterSeriesByType(series, [RADAR_LINE]), pane);\n this.createBarChart(filterSeriesByType(series, [RADAR_COLUMN]), pane);\n },\n chartOptions: function (series) {\n var options = { series: series };\n var firstSeries = series[0];\n if (firstSeries) {\n var filteredSeries = this.filterVisibleSeries(series);\n var stack = firstSeries.stack;\n options.isStacked = stack && filteredSeries.length > 1;\n options.isStacked100 = stack && stack.type === '100%' && filteredSeries.length > 1;\n if (options.isStacked100) {\n this._isStacked100 = true;\n }\n }\n return options;\n },\n createAreaChart: function (series, pane) {\n if (series.length === 0) {\n return;\n }\n var areaChart = new RadarAreaChart(this, this.chartOptions(series));\n this.appendChart(areaChart, pane);\n },\n createLineChart: function (series, pane) {\n if (series.length === 0) {\n return;\n }\n var lineChart = new RadarLineChart(this, this.chartOptions(series));\n this.appendChart(lineChart, pane);\n },\n createBarChart: function (series, pane) {\n if (series.length === 0) {\n return;\n }\n var firstSeries = series[0];\n var options = this.chartOptions(series);\n options.gap = firstSeries.gap;\n options.spacing = firstSeries.spacing;\n var barChart = new RadarBarChart(this, options);\n this.appendChart(barChart, pane);\n this._hasBarCharts = true;\n },\n seriesCategoryAxis: function () {\n return this.categoryAxis;\n },\n _dispatchEvent: function (chart, e, eventType) {\n var coords = chart._eventCoordinates(e);\n var point = new Point(coords.x, coords.y);\n var category = this.categoryAxis.getCategory(point);\n var value = this.valueAxis.getValue(point);\n if (category !== null && value !== null) {\n chart.trigger(eventType, {\n element: eventElement(e),\n category: category,\n value: value\n });\n }\n },\n createCrosshairs: function () {\n }\n });\n deepExtend(RadarPlotArea.prototype, PlotAreaEventsMixin, {\n appendChart: CategoricalPlotArea.prototype.appendChart,\n aggregateSeries: CategoricalPlotArea.prototype.aggregateSeries\n });\n setDefaultOptions(RadarPlotArea, {\n categoryAxis: { categories: [] },\n valueAxis: {}\n });\n var FunnelSegment = ChartElement.extend({\n init: function (value, options, segmentOptions) {\n ChartElement.fn.init.call(this, options);\n this.value = value;\n this.options.index = segmentOptions.index;\n },\n reflow: function (chartBox) {\n var points = this.points;\n var label = this.children[0];\n this.box = new Box(points[0].x, points[0].y, points[1].x, points[2].y);\n if (label) {\n label.reflow(new Box(chartBox.x1, points[0].y, chartBox.x2, points[2].y));\n }\n },\n createVisual: function () {\n var this$1 = this;\n var options = this.options;\n var visual;\n ChartElement.fn.createVisual.call(this);\n if (options.visual) {\n visual = options.visual({\n category: this.category,\n dataItem: this.dataItem,\n value: this.value,\n series: this.series,\n percentage: this.percentage,\n points: this.points,\n options: options,\n sender: this.getSender(),\n createVisual: function () {\n return this$1.createPath();\n }\n });\n } else {\n visual = this.createPath();\n }\n if (visual) {\n this.visual.append(visual);\n }\n },\n createPath: function () {\n var options = this.options;\n var border = options.border;\n var path = Path.fromPoints(this.points, {\n fill: {\n color: options.color,\n opacity: options.opacity\n },\n stroke: {\n color: border.color,\n opacity: border.opacity,\n width: border.width\n }\n }).close();\n return path;\n },\n createHighlight: function (style) {\n return Path.fromPoints(this.points, style);\n },\n highlightVisual: function () {\n return this.visual.children[0];\n },\n highlightVisualArgs: function () {\n var path = Path.fromPoints(this.points).close();\n return {\n options: this.options,\n path: path\n };\n },\n tooltipAnchor: function () {\n var box = this.box;\n return {\n point: new Point(box.center().x, box.y1),\n align: {\n horizontal: 'center',\n vertical: 'top'\n }\n };\n },\n formatValue: function (format) {\n var point = this;\n return point.owner.formatPointValue(point, format);\n }\n });\n setDefaultOptions(FunnelSegment, {\n color: WHITE,\n border: { width: 1 }\n });\n deepExtend(FunnelSegment.prototype, PointEventsMixin);\n var FunnelChart = ChartElement.extend({\n init: function (plotArea, options) {\n ChartElement.fn.init.call(this, options);\n this.plotArea = plotArea;\n this.points = [];\n this.labels = [];\n this.legendItems = [];\n this.render();\n },\n formatPointValue: function (point, format) {\n return this.chartService.format.auto(format, point.value);\n },\n render: function () {\n var this$1 = this;\n var ref = this;\n var options = ref.options;\n var seriesColors = ref.plotArea.options.seriesColors;\n if (seriesColors === void 0) {\n seriesColors = [];\n }\n var series = options.series[0];\n var data = series.data;\n if (!data) {\n return;\n }\n var ref$1 = bindSegments(series);\n var total = ref$1.total;\n var points = ref$1.points;\n for (var i = 0; i < points.length; i++) {\n var pointData = points[i];\n if (!pointData) {\n continue;\n }\n var fields = pointData.fields;\n if (!isFunction(series.color)) {\n series.color = fields.color || seriesColors[i % seriesColors.length];\n }\n fields = deepExtend({\n index: i,\n owner: this$1,\n series: series,\n dataItem: data[i],\n percentage: pointData.value / total\n }, fields, { visible: pointData.visible });\n var value = pointData.valueFields.value;\n var segment = this$1.createSegment(value, fields);\n var label = this$1.createLabel(value, fields);\n if (segment && label) {\n segment.append(label);\n }\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 index: fields.index\n }, {\n defaults: series._defaults,\n excluded: [\n 'data',\n 'content',\n 'template',\n 'toggle',\n 'visual'\n ]\n });\n },\n createSegment: function (value, fields) {\n var seriesOptions = deepExtend({}, fields.series);\n this.evalSegmentOptions(seriesOptions, value, fields);\n this.createLegendItem(value, seriesOptions, fields);\n if (fields.visible !== false) {\n var segment = new FunnelSegment(value, seriesOptions, fields);\n $.extend(segment, fields);\n this.append(segment);\n this.points.push(segment);\n return segment;\n }\n },\n createLabel: function (value, fields) {\n var series = fields.series;\n var dataItem = fields.dataItem;\n var labels = deepExtend({}, this.options.labels, series.labels);\n var text = value;\n if (labels.visible) {\n var labelTemplate = getTemplate(labels);\n if (labelTemplate) {\n text = labelTemplate({\n dataItem: dataItem,\n value: value,\n percentage: fields.percentage,\n category: fields.category,\n series: series\n });\n } else if (labels.format) {\n text = this.plotArea.chartService.format.auto(labels.format, text);\n }\n if (!labels.color) {\n var brightnessValue = new Color(series.color).percBrightness();\n if (brightnessValue > 180) {\n labels.color = BLACK;\n } else {\n labels.color = WHITE;\n }\n if (!labels.background) {\n labels.background = series.color;\n }\n }\n this.evalSegmentOptions(labels, value, fields);\n var textBox = new TextBox(text, deepExtend({ vAlign: labels.position }, labels));\n this.labels.push(textBox);\n return textBox;\n }\n },\n labelPadding: function () {\n var labels = this.labels;\n var padding = {\n left: 0,\n right: 0\n };\n for (var i = 0; i < labels.length; i++) {\n var label = labels[i];\n var align = label.options.align;\n if (align !== CENTER) {\n var width = labels[i].box.width();\n if (align === LEFT) {\n padding.left = Math.max(padding.left, width);\n } else {\n padding.right = Math.max(padding.right, width);\n }\n }\n }\n return padding;\n },\n dynamicSlopeReflow: function (box, width, totalHeight) {\n var ref = this;\n var options = ref.options;\n var segments = ref.points;\n var count = segments.length;\n var firstSegment = segments[0];\n var maxSegment = firstSegment;\n for (var idx = 0; idx < segments.length; idx++) {\n if (segments[idx].percentage > maxSegment.percentage) {\n maxSegment = segments[idx];\n }\n }\n var lastUpperSide = firstSegment.percentage / maxSegment.percentage * width;\n var previousOffset = (width - lastUpperSide) / 2;\n var previousHeight = 0;\n for (var idx$1 = 0; idx$1 < count; idx$1++) {\n var percentage = segments[idx$1].percentage;\n var nextSegment = segments[idx$1 + 1];\n var nextPercentage = nextSegment ? nextSegment.percentage : percentage;\n var points = segments[idx$1].points = [];\n var height = options.dynamicHeight ? totalHeight * percentage : totalHeight / count;\n var offset = void 0;\n if (!percentage) {\n offset = nextPercentage ? 0 : width / 2;\n } else {\n offset = (width - lastUpperSide * (nextPercentage / percentage)) / 2;\n }\n offset = limitValue(offset, 0, width);\n points.push(new GeometryPoint(box.x1 + previousOffset, box.y1 + previousHeight));\n points.push(new GeometryPoint(box.x1 + width - previousOffset, box.y1 + previousHeight));\n points.push(new GeometryPoint(box.x1 + width - offset, box.y1 + height + previousHeight));\n points.push(new GeometryPoint(box.x1 + offset, box.y1 + height + previousHeight));\n previousOffset = offset;\n previousHeight += height + options.segmentSpacing;\n lastUpperSide = limitValue(width - 2 * offset, 0, width);\n }\n },\n constantSlopeReflow: function (box, width, totalHeight) {\n var ref = this;\n var options = ref.options;\n var segments = ref.points;\n var count = segments.length;\n var decreasingWidth = options.neckRatio <= 1;\n var neckRatio = decreasingWidth ? options.neckRatio * width : width;\n var previousOffset = decreasingWidth ? 0 : (width - width / options.neckRatio) / 2;\n var topMostWidth = decreasingWidth ? width : width - previousOffset * 2;\n var finalNarrow = (topMostWidth - neckRatio) / 2;\n var previousHeight = 0;\n for (var idx = 0; idx < count; idx++) {\n var points = segments[idx].points = [];\n var percentage = segments[idx].percentage;\n var offset = options.dynamicHeight ? finalNarrow * percentage : finalNarrow / count;\n var height = options.dynamicHeight ? totalHeight * percentage : totalHeight / count;\n points.push(new GeometryPoint(box.x1 + previousOffset, box.y1 + previousHeight));\n points.push(new GeometryPoint(box.x1 + width - previousOffset, box.y1 + previousHeight));\n points.push(new GeometryPoint(box.x1 + width - previousOffset - offset, box.y1 + height + previousHeight));\n points.push(new GeometryPoint(box.x1 + previousOffset + offset, box.y1 + height + previousHeight));\n previousOffset += offset;\n previousHeight += height + options.segmentSpacing;\n }\n },\n reflow: function (chartBox) {\n var points = this.points;\n var count = points.length;\n if (!count) {\n return;\n }\n var options = this.options;\n var box = chartBox.clone().unpad(this.labelPadding());\n var totalHeight = box.height() - options.segmentSpacing * (count - 1);\n var width = box.width();\n if (options.dynamicSlope) {\n this.dynamicSlopeReflow(box, width, totalHeight);\n } else {\n this.constantSlopeReflow(box, width, totalHeight);\n }\n for (var idx = 0; idx < count; idx++) {\n points[idx].reflow(chartBox);\n }\n }\n });\n setDefaultOptions(FunnelChart, {\n neckRatio: 0.3,\n width: 300,\n dynamicSlope: false,\n dynamicHeight: true,\n segmentSpacing: 0,\n labels: {\n visible: false,\n align: CENTER,\n position: CENTER,\n zIndex: 1\n }\n });\n deepExtend(FunnelChart.prototype, PieChartMixin);\n var FunnelPlotArea = PlotAreaBase.extend({\n render: function () {\n this.createFunnelChart(this.series);\n },\n createFunnelChart: function (series) {\n var firstSeries = series[0];\n var funnelChart = new FunnelChart(this, {\n series: series,\n legend: this.options.legend,\n neckRatio: firstSeries.neckRatio,\n dynamicHeight: firstSeries.dynamicHeight,\n dynamicSlope: firstSeries.dynamicSlope,\n segmentSpacing: firstSeries.segmentSpacing,\n highlight: firstSeries.highlight\n });\n this.appendChart(funnelChart);\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 COLOR = 'color';\n var FIRST = 'first';\n var FROM = 'from';\n var MAX = 'max';\n var MIN = 'min';\n var NOTE_TEXT = 'noteText';\n var SUMMARY_FIELD = 'summary';\n var TO = 'to';\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 PlotAreaFactory.current.register(FunnelPlotArea, [FUNNEL]);\n PlotAreaFactory.current.register(PolarPlotArea, [\n POLAR_AREA,\n POLAR_LINE,\n POLAR_SCATTER\n ]);\n PlotAreaFactory.current.register(RadarPlotArea, [\n RADAR_AREA,\n RADAR_COLUMN,\n RADAR_LINE\n ]);\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 SeriesBinder.current.register([\n POLAR_AREA,\n POLAR_LINE,\n POLAR_SCATTER\n ], [\n X,\n Y\n ], [COLOR]);\n SeriesBinder.current.register([\n RADAR_AREA,\n RADAR_COLUMN,\n RADAR_LINE\n ], [VALUE], [COLOR]);\n SeriesBinder.current.register([FUNNEL], [VALUE], [\n CATEGORY,\n COLOR,\n 'visibleInLegend',\n 'visible'\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 DefaultAggregates.current.register([\n RADAR_AREA,\n RADAR_COLUMN,\n RADAR_LINE\n ], {\n value: MAX,\n color: 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 var AXIS_NAMES = [\n CATEGORY,\n VALUE,\n X,\n Y\n ];\n var MOUSEMOVE = 'mousemove';\n var CONTEXTMENU = 'contextmenu';\n var MOUSEMOVE_DELAY = 20;\n var Chart = Class.extend({\n init: function (element, userOptions, themeOptions, context) {\n var this$1 = this;\n if (context === void 0) {\n context = {};\n }\n this.observers = [];\n this.addObserver(context.observer);\n this.chartService = new services.ChartService(this, context);\n this.chartService.theme = themeOptions;\n this._initElement(element);\n var options = deepExtend({}, this.options, userOptions);\n this._originalOptions = deepExtend({}, options);\n this._theme = themeOptions;\n this._initTheme(options, themeOptions);\n this._initSurface();\n this._initHandlers();\n this.bindCategories();\n dataviz.FontLoader.preloadFonts(userOptions, function () {\n if (!this$1._destroyed) {\n this$1.trigger('init');\n this$1._redraw();\n this$1._attachEvents();\n }\n });\n },\n _initElement: function (element) {\n this._setElementClass(element);\n element.style.position = 'relative';\n while (element.firstChild) {\n element.removeChild(element.firstChild);\n }\n this.element = element;\n },\n _setElementClass: function (element) {\n dataviz.addClass(element, 'k-chart');\n },\n _initTheme: function (options, themeOptions) {\n var seriesCopies = [];\n var series = options.series || [];\n for (var i = 0; i < series.length; i++) {\n seriesCopies.push($.extend({}, series[i]));\n }\n options.series = seriesCopies;\n resolveAxisAliases(options);\n this.applyDefaults(options, themeOptions);\n if (options.seriesColors === null) {\n delete options.seriesColors;\n }\n this.options = deepExtend({}, themeOptions, options);\n this.applySeriesColors();\n },\n getSize: function () {\n return {\n width: this.element.offsetWidth,\n height: this.element.offsetHeight\n };\n },\n resize: function (force) {\n var size = this.getSize();\n var currentSize = this._size;\n if (force || (size.width > 0 || size.height > 0) && (!currentSize || size.width !== currentSize.width || size.height !== currentSize.height)) {\n this._size = size;\n this._resize(size, force);\n this.trigger('resize', size);\n }\n },\n _resize: function () {\n this._noTransitionsRedraw();\n },\n redraw: function (paneName) {\n this.applyDefaults(this.options);\n this.applySeriesColors();\n if (paneName) {\n var plotArea = this._model._plotArea;\n var pane = plotArea.findPane(paneName);\n plotArea.redraw(pane);\n } else {\n this._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 toggleHighlight: function (show, filter) {\n var plotArea = this._plotArea;\n var firstSeries = (plotArea.srcSeries || plotArea.series || [])[0];\n var points;\n if (isFunction(filter)) {\n points = plotArea.filterPoints(filter);\n } else {\n var seriesName, categoryName;\n if (isObject(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 ref = this;\n var tooltip = ref._tooltip;\n var plotArea = ref._plotArea;\n var point, categoryIndex;\n if (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 dataviz.elementSize(wrap, { width: chartArea.width });\n }\n if (chartArea.height) {\n dataviz.elementSize(wrap, { height: chartArea.height });\n }\n if (!surface || surface.options.type !== this.options.renderAs) {\n if (surface) {\n surface.destroy();\n }\n this.surface = drawing.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 model = this._getModel();\n this._destroyView();\n this._model = model;\n this._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 this._initSurface();\n this.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 this._tooltip = this._createTooltip();\n this._highlight = new Highlight();\n this._setupSelection();\n this._createPannable();\n this._createZoomSelection();\n this._createMousewheelZoom();\n this.trigger(RENDER);\n if (!this._navState) {\n this._cancelDomEvents();\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 return this._plotArea instanceof CategoricalPlotArea && this.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 ref = this;\n var tooltipOptions = ref.options.tooltip;\n var tooltip;\n if (this._sharedTooltip()) {\n tooltip = this._createSharedTooltip(tooltipOptions);\n } else {\n tooltip = new Tooltip(this.chartService, tooltipOptions);\n }\n return tooltip;\n },\n _createSharedTooltip: function (options) {\n return new SharedTooltip(this._plotArea, options);\n },\n applyDefaults: function (options, themeOptions) {\n applyAxisDefaults(options, themeOptions);\n applySeriesDefaults(options, themeOptions);\n },\n applySeriesColors: function () {\n var options = this.options;\n var series = options.series;\n var colors = options.seriesColors || [];\n for (var i = 0; i < series.length; i++) {\n var currentSeries = series[i];\n var seriesColor = colors[i % colors.length];\n var defaults = currentSeries._defaults;\n currentSeries.color = currentSeries.color || seriesColor;\n if (defaults) {\n defaults.color = defaults.color || seriesColor;\n }\n }\n },\n _getModel: function () {\n var options = this.options;\n var plotArea = this._createPlotArea();\n var model = new dataviz.RootElement(this._modelOptions());\n model.chart = this;\n model._plotArea = plotArea;\n dataviz.Title.buildTitle(options.title, model);\n if (options.legend.visible) {\n model.append(new Legend(plotArea.options.legend, this.chartService));\n }\n model.append(plotArea);\n model.reflow();\n return model;\n },\n _modelOptions: function () {\n var ref = this;\n var options = ref.options;\n var element = ref.element;\n var size = dataviz.elementSize(element);\n this._size = null;\n return deepExtend({\n width: Math.floor(size.width) || datavizConstants.DEFAULT_WIDTH,\n height: Math.floor(size.height) || datavizConstants.DEFAULT_HEIGHT,\n transitions: options.transitions\n }, options.chartArea);\n },\n _createPlotArea: function (skipSeries) {\n var options = this.options;\n var plotArea = PlotAreaFactory.current.create(skipSeries ? [] : options.series, options, this.chartService);\n return plotArea;\n },\n _hasSelection: function () {\n return this._selections && this._selections.length;\n },\n _setupSelection: function () {\n var this$1 = this;\n var ref = this;\n var axes = ref._plotArea.axes;\n var selections = this._selections = [];\n for (var i = 0; i < axes.length; i++) {\n var axis = axes[i];\n var options = axis.options;\n if (axis instanceof CategoryAxis && options.select && !options.vertical) {\n var min = 0;\n var 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 = dataviz.addDuration(max, 1, options.baseUnit, options.weekStartDay);\n } else {\n max++;\n }\n }\n var selection = new Selection(this$1, axis, deepExtend({\n min: min,\n max: max\n }, options.select));\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 _initHandlers: function () {\n this._clickHandler = this._click.bind(this);\n this._mousewheelHandler = this._mousewheel.bind(this);\n this._surfaceMouseenterHandler = this._mouseover.bind(this);\n this._surfaceMouseleaveHandler = this._mouseout.bind(this);\n this._mousemove = kendo.throttle(this._mousemove.bind(this), MOUSEMOVE_DELAY);\n },\n addObserver: function (observer) {\n if (observer) {\n this.observers.push(observer);\n }\n },\n removeObserver: function (observer) {\n var index = this.observers.indexOf(observer);\n if (index >= 0) {\n this.observers.splice(index, 1);\n }\n },\n requiresHandlers: function (eventNames) {\n var observers = this.observers;\n for (var idx = 0; idx < observers.length; idx++) {\n if (observers[idx].requiresHandlers(eventNames)) {\n return true;\n }\n }\n },\n trigger: function (name, args) {\n if (args === void 0) {\n args = {};\n }\n if (name === SHOW_TOOLTIP) {\n args.anchor.point = this._toDocumentCoordinates(args.anchor.point);\n }\n args.sender = this;\n var observers = this.observers;\n var isDefaultPrevented = false;\n for (var idx = 0; idx < observers.length; idx++) {\n if (observers[idx].trigger(name, args)) {\n isDefaultPrevented = true;\n }\n }\n return isDefaultPrevented;\n },\n _attachEvents: function () {\n var ref = this;\n var element = ref.element;\n var surface = ref.surface;\n surface.bind('mouseenter', this._surfaceMouseenterHandler);\n surface.bind('mouseleave', this._surfaceMouseleaveHandler);\n var obj;\n bindEvents(element, (obj = {}, obj[CONTEXTMENU] = this._clickHandler, obj[MOUSEWHEEL] = this._mousewheelHandler, obj));\n if (this._shouldAttachMouseMove()) {\n var obj$1;\n bindEvents(element, (obj$1 = {}, obj$1[MOUSEMOVE] = this._mousemove, obj$1));\n }\n this.domEvents = services.DomEventsBuilder.create(this.element, {\n start: this._start.bind(this),\n move: this._move.bind(this),\n end: this._end.bind(this),\n tap: this._tap.bind(this),\n gesturestart: this._gesturestart.bind(this),\n gesturechange: this._gesturechange.bind(this),\n gestureend: this._gestureend.bind(this)\n });\n },\n _cancelDomEvents: function () {\n if (this.domEvents && this.domEvents.cancel) {\n this.domEvents.cancel();\n }\n },\n _gesturestart: function (e) {\n if (this._mousewheelZoom && !this._stopDragEvent(e)) {\n this._gestureDistance = e.distance;\n this._unsetActivePoint();\n this.surface.suspendTracking();\n }\n },\n _gestureend: function (e) {\n if (this._zooming && !this._stopDragEvent(e)) {\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 mousewheelZoom = this._mousewheelZoom;\n if (mousewheelZoom && !this._stopDragEvent(e)) {\n e.preventDefault();\n var previousGestureDistance = this._gestureDistance;\n var scaleDelta = -e.distance / previousGestureDistance + 1;\n if (Math.abs(scaleDelta) >= 0.1) {\n scaleDelta = Math.round(scaleDelta * 10);\n this._gestureDistance = e.distance;\n var args = {\n delta: scaleDelta,\n axisRanges: axisRanges(this._plotArea.axes),\n originalEvent: e\n };\n if (this._zooming || !this.trigger(ZOOM_START, args)) {\n if (!this._zooming) {\n this._zooming = true;\n }\n var ranges = args.axisRanges = mousewheelZoom.updateRanges(scaleDelta);\n if (ranges && !this.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 coords = this._eventCoordinates(e);\n if (this._stopDragEvent(e) || !this._plotArea.backgroundContainsPoint(coords)) {\n return;\n }\n if (this.requiresHandlers([\n DRAG_START,\n DRAG,\n DRAG_END\n ])) {\n this._startNavigation(e, coords, DRAG_START);\n }\n if (this._pannable && this._pannable.start(e)) {\n this.surface.suspendTracking();\n this._unsetActivePoint();\n this._suppressHover = true;\n }\n if (this._zoomSelection) {\n if (this._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 ref = this;\n var state = ref._navState;\n var pannable = ref._pannable;\n if (this._stopDragEvent(e)) {\n return;\n }\n if (pannable) {\n var ranges = pannable.move(e);\n if (ranges && !this.trigger(DRAG, {\n axisRanges: ranges,\n originalEvent: e\n })) {\n pannable.pan();\n }\n } else if (state) {\n var ranges$1 = {};\n var axes = state.axes;\n for (var i = 0; i < axes.length; i++) {\n var currentAxis = axes[i];\n var axisName = currentAxis.options.name;\n if (axisName) {\n var axis = currentAxis.options.vertical ? e.y : e.x;\n var delta = axis.startLocation - axis.location;\n if (delta !== 0) {\n ranges$1[currentAxis.options.name] = currentAxis.translateRange(delta);\n }\n }\n }\n state.axisRanges = ranges$1;\n this.trigger(DRAG, {\n axisRanges: ranges$1,\n originalEvent: e\n });\n }\n if (this._zoomSelection) {\n this._zoomSelection.move(e);\n }\n },\n _end: function (e) {\n if (this._stopDragEvent(e)) {\n return;\n }\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 this._suppressHover = false;\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 _stopDragEvent: function () {\n return this._hasSelection();\n },\n _mousewheel: function (e) {\n var this$1 = this;\n var delta = dataviz.mousewheelDelta(e);\n var mousewheelZoom = this._mousewheelZoom;\n var coords = this._eventCoordinates(e);\n if (!this._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 (this._zooming || !this.trigger(ZOOM_START, args)) {\n e.preventDefault();\n if (!this._zooming) {\n this._unsetActivePoint();\n this.surface.suspendTracking();\n this._zooming = true;\n }\n if (this._mwTimeout) {\n clearTimeout(this._mwTimeout);\n }\n args.axisRanges = mousewheelZoom.updateRanges(delta);\n if (args.axisRanges && !this.trigger(ZOOM, args)) {\n mousewheelZoom.zoom();\n }\n this._mwTimeout = setTimeout(function () {\n this$1.trigger(ZOOM_END, args);\n this$1._zooming = false;\n if (this$1.surface) {\n this$1.surface.resumeTracking();\n }\n }, MOUSEWHEEL_DELAY);\n }\n } else {\n var state = this._navState;\n if (!state) {\n var prevented = this._startNavigation(e, coords, ZOOM_START);\n if (!prevented) {\n state = this._navState;\n }\n }\n if (state) {\n var totalDelta = state.totalDelta || delta;\n state.totalDelta = totalDelta + delta;\n var axes = this._navState.axes;\n var ranges = {};\n for (var i = 0; i < axes.length; i++) {\n var currentAxis = axes[i];\n var axisName = currentAxis.options.name;\n if (axisName) {\n ranges[axisName] = currentAxis.scaleRange(-totalDelta);\n }\n }\n this.trigger(ZOOM, {\n delta: delta,\n axisRanges: ranges,\n originalEvent: e\n });\n if (this._mwTimeout) {\n clearTimeout(this._mwTimeout);\n }\n this._mwTimeout = setTimeout(function () {\n this$1._endNavigation(e, ZOOM_END);\n }, MOUSEWHEEL_DELAY);\n }\n }\n },\n _startNavigation: function (e, coords, chartEvent) {\n var plotArea = this._model._plotArea;\n var pane = plotArea.findPointPane(coords);\n var axes = plotArea.axes.slice(0);\n if (!pane) {\n return;\n }\n var ranges = axisRanges(axes);\n var prevented = this.trigger(chartEvent, {\n axisRanges: ranges,\n originalEvent: e\n });\n if (prevented) {\n this._cancelDomEvents();\n } else {\n this._suppressHover = true;\n this._unsetActivePoint();\n this._navState = {\n axisRanges: ranges,\n pane: pane,\n axes: axes\n };\n }\n },\n _endNavigation: function (e, chartEvent) {\n if (this._navState) {\n this.trigger(chartEvent, {\n axisRanges: this._navState.axisRanges,\n originalEvent: e\n });\n this._suppressHover = false;\n this._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 current = element;\n var chartElement;\n while (current && !chartElement) {\n chartElement = current.chartElement;\n current = current.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 coordinates = dataviz.eventCoordinates(e);\n return this._toModelCoordinates(coordinates.x, coordinates.y);\n },\n _elementPadding: function () {\n if (!this._padding) {\n var ref = elementStyles(this.element, [\n 'paddingLeft',\n 'paddingTop'\n ]);\n var paddingLeft = ref.paddingLeft;\n var paddingTop = ref.paddingTop;\n this._padding = {\n top: paddingTop,\n left: paddingLeft\n };\n }\n return this._padding;\n },\n _toDocumentCoordinates: function (point) {\n var padding = this._elementPadding();\n var offset = dataviz.elementOffset(this.element);\n return {\n left: round(point.x + padding.left + offset.left),\n top: round(point.y + padding.top + offset.top)\n };\n },\n _toModelCoordinates: function (clientX, clientY) {\n var element = this.element;\n var offset = dataviz.elementOffset(element);\n var padding = this._elementPadding();\n return new Point(clientX - offset.left - padding.left, clientY - offset.top - padding.top);\n },\n _tap: function (e) {\n var this$1 = this;\n var drawingElement = this.surface.eventTarget(e);\n var element = this._drawingChartElement(drawingElement, e);\n if (this._activePoint === element) {\n this._propagateClick(element, e);\n } else {\n if (!this._startHover(drawingElement, e)) {\n this._unsetActivePoint();\n }\n this._propagateClick(element, e);\n }\n this.handlingTap = true;\n setTimeout(function () {\n this$1.handlingTap = false;\n }, 0);\n },\n _click: function (e) {\n var element = this._getChartElement(e);\n this._propagateClick(element, e);\n },\n _propagateClick: function (element, e) {\n var this$1 = this;\n var current = element;\n while (current) {\n if (current.click) {\n current.click(this$1, e);\n }\n current = current.parent;\n }\n },\n _startHover: function (element, e) {\n var chartElement = this._drawingChartElement(element, e);\n var ref = this;\n var tooltip = ref._tooltip;\n var highlight = ref._highlight;\n if (this._suppressHover || !highlight || highlight.isHighlighted(chartElement) || this._sharedTooltip()) {\n return false;\n }\n var point = this._drawingChartElement(element, e, function (element) {\n return element.hover && !(element instanceof PlotAreaBase);\n });\n if (point && !point.hover(this, e)) {\n this._activePoint = point;\n var 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 point = this._startHover(e.element, e.originalEvent);\n if (point && point.tooltipTracking) {\n this._mouseMoveTrackHandler = this._mouseMoveTrackHandler || this._mouseMoveTracking.bind(this);\n var obj;\n bindEvents(document, (obj = {}, obj[MOUSEMOVE] = this._mouseMoveTrackHandler, obj));\n }\n },\n _mouseMoveTracking: function (e) {\n var ref = this;\n var options = ref.options;\n var tooltip = ref._tooltip;\n var highlight = ref._highlight;\n var point = ref._activePoint;\n var coords = this._eventCoordinates(e);\n if (this._plotArea.box.containsPoint(coords)) {\n if (point && point.tooltipTracking && point.series && point.parent.getNearestPoint) {\n var seriesPoint = point.parent.getNearestPoint(coords.x, coords.y, point.seriesIx);\n if (seriesPoint && seriesPoint !== point) {\n seriesPoint.hover(this, e);\n this._activePoint = seriesPoint;\n var 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 var obj;\n unbindEvents(document, (obj = {}, obj[MOUSEMOVE] = this._mouseMoveTrackHandler, obj));\n this._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;\n for (var i = 0; i < crosshairs.length; i++) {\n var 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 ref = this;\n var tooltipOptions = ref.options.tooltip;\n var plotArea = ref._plotArea;\n var categoryAxis = ref._plotArea.categoryAxis;\n var tooltip = ref._tooltip;\n var highlight = ref._highlight;\n if (plotArea.box.containsPoint(coords)) {\n var index = categoryAxis.pointCategoryIndex(coords);\n if (index !== this._tooltipCategoryIx) {\n var points = plotArea.pointsByCategoryIndex(index);\n var pointArgs = points.map(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 this._tooltipCategoryIx = index;\n }\n }\n },\n hideElements: function () {\n var ref = this;\n var plotArea = ref._plotArea;\n var tooltip = ref._tooltip;\n var highlight = ref._highlight;\n this._mousemove.cancel();\n plotArea.hideCrosshairs();\n highlight.hide();\n tooltip.hide();\n delete this._tooltipCategoryIx;\n },\n _unsetActivePoint: function () {\n var ref = this;\n var tooltip = ref._tooltip;\n var highlight = ref._highlight;\n this._activePoint = null;\n if (tooltip) {\n tooltip.hide();\n }\n if (highlight) {\n highlight.hide();\n }\n },\n _deferRedraw: function () {\n this._redraw();\n },\n _clearRedrawTimeout: function () {\n if (this._redrawTimeout) {\n clearInterval(this._redrawTimeout);\n this._redrawTimeout = null;\n }\n },\n bindCategories: function () {\n var this$1 = this;\n var options = this.options;\n var definitions = [].concat(options.categoryAxis);\n for (var axisIx = 0; axisIx < definitions.length; axisIx++) {\n var axis = definitions[axisIx];\n if (axis.autoBind !== false) {\n this$1.bindCategoryAxisFromSeries(axis, axisIx);\n }\n }\n },\n bindCategoryAxisFromSeries: function (axis, axisIx) {\n var this$1 = this;\n var series = this.options.series;\n var seriesLength = series.length;\n var uniqueCategories = {};\n var items = [];\n var dateAxis;\n for (var seriesIx = 0; seriesIx < seriesLength; seriesIx++) {\n var s = series[seriesIx];\n var onAxis = s.categoryAxis === axis.name || !s.categoryAxis && axisIx === 0;\n var data = s.data;\n var dataLength = data.length;\n if (s.categoryField && onAxis && dataLength > 0) {\n dateAxis = isDateAxis(axis, getField(s.categoryField, data[0]));\n var getFn = dateAxis ? getDateField : getField;\n for (var dataIx = 0; dataIx < dataLength; dataIx++) {\n var dataRow = data[dataIx];\n var category = getFn(s.categoryField, dataRow, this$1.chartService.intl);\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 dataviz.dateComparer(a[0], b[0]);\n });\n }\n var result = transpose(items);\n axis.categories = result[0];\n }\n },\n _isBindable: function (series) {\n var valueFields = SeriesBinder.current.valueFields(series);\n var result = true;\n for (var i = 0; i < valueFields.length; i++) {\n var 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 _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 ref = this;\n var plotArea = ref._plotArea;\n var highlight = ref._highlight;\n var currentSeries = (plotArea.srcSeries || plotArea.series)[seriesIndex];\n var 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 return this._plotArea.crosshairs.length || this._tooltip && this._sharedTooltip() || this.requiresHandlers([PLOT_AREA_HOVER]);\n },\n updateMouseMoveHandler: function () {\n var obj;\n unbindEvents(this.element, (obj = {}, obj[MOUSEMOVE] = this._mousemove, obj));\n if (this._shouldAttachMouseMove()) {\n var obj$1;\n bindEvents(this.element, (obj$1 = {}, obj$1[MOUSEMOVE] = this._mousemove, obj$1));\n }\n },\n applyOptions: function (options, theme) {\n clearMissingValues(this._originalOptions, options);\n this._originalOptions = deepExtend(this._originalOptions, options);\n this.options = deepExtend({}, this._originalOptions);\n if (theme) {\n this._theme = theme;\n this.chartService.theme = theme;\n }\n this._initTheme(this.options, this._theme);\n },\n setOptions: function (options, theme) {\n this.applyOptions(options, theme);\n this.bindCategories();\n this.redraw();\n this.updateMouseMoveHandler();\n },\n destroy: function () {\n this._destroyed = true;\n var obj;\n unbindEvents(this.element, (obj = {}, obj[CONTEXTMENU] = this._clickHandler, obj[MOUSEWHEEL] = this._mousewheelHandler, obj[MOUSEMOVE] = this._mousemove, obj));\n if (this.domEvents) {\n this.domEvents.destroy();\n delete this.domEvents;\n }\n var obj$1;\n unbindEvents(document, (obj$1 = {}, obj$1[MOUSEMOVE] = this._mouseMoveTrackHandler, obj$1));\n this._destroyView();\n if (this.surface) {\n this.surface.destroy();\n this.surface = null;\n }\n this._clearRedrawTimeout();\n },\n _destroyView: function () {\n var ref = this;\n var model = ref._model;\n var selections = ref._selections;\n if (model) {\n model.destroy();\n this._model = null;\n }\n if (selections) {\n while (selections.length > 0) {\n selections.shift().destroy();\n }\n }\n this._unsetActivePoint();\n if (this._tooltip) {\n this._tooltip.destroy();\n }\n if (this._highlight) {\n this._highlight.destroy();\n }\n if (this._zoomSelection) {\n this._zoomSelection.destroy();\n delete this._zoomSelection;\n }\n if (this._pannable) {\n this._pannable.destroy();\n delete this._pannable;\n }\n if (this._mousewheelZoom) {\n this._mousewheelZoom.destroy();\n delete this._mousewheelZoom;\n }\n }\n });\n function resolveAxisAliases(options) {\n var aliases = AXIS_NAMES;\n for (var idx = 0; idx < aliases.length; idx++) {\n var alias = aliases[idx] + 'Axes';\n if (options[alias]) {\n options[aliases[idx] + 'Axis'] = options[alias];\n delete options[alias];\n }\n }\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 applyAxisDefaults(options, themeOptions) {\n var themeAxisDefaults = (themeOptions || {}).axisDefaults || {};\n var axisName, axisDefaults, axes;\n function mapAxisOptions(axisOptions) {\n var axisColor = (axisOptions || {}).color || axisDefaults.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 for (var idx = 0; idx < AXIS_NAMES.length; idx++) {\n axisName = AXIS_NAMES[idx] + 'Axis';\n axisDefaults = options.axisDefaults || {};\n axes = [].concat(options[axisName]);\n axes = axes.map(mapAxisOptions);\n options[axisName] = axes.length > 1 ? axes : axes[0];\n }\n }\n function applySeriesDefaults(options, themeOptions) {\n var series = options.series;\n var seriesLength = series.length;\n var seriesDefaults = options.seriesDefaults;\n var commonDefaults = deepExtend({}, options.seriesDefaults);\n var themeSeriesDefaults = themeOptions ? deepExtend({}, themeOptions.seriesDefaults) : {};\n var commonThemeDefaults = deepExtend({}, themeSeriesDefaults);\n cleanupNestedSeriesDefaults(commonDefaults);\n cleanupNestedSeriesDefaults(commonThemeDefaults);\n for (var i = 0; i < seriesLength; i++) {\n var 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 axisRanges(axes) {\n var ranges = {};\n for (var i = 0; i < axes.length; i++) {\n var axis = axes[i];\n var axisName = axis.options.name;\n if (axisName) {\n ranges[axisName] = axis.range();\n }\n }\n return ranges;\n }\n function sortDates(dates, comparer) {\n if (comparer === void 0) {\n comparer = dataviz.dateComparer;\n }\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 if (comparer === void 0) {\n comparer = dataviz.dateComparer;\n }\n var dates = sortDates(srcDates, comparer);\n var length = dates.length;\n var result = length > 0 ? [dates[0]] : [];\n for (var 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 transpose(rows) {\n var rowCount = rows.length;\n var result = [];\n for (var rowIx = 0; rowIx < rowCount; rowIx++) {\n var row = rows[rowIx];\n var colCount = row.length;\n for (var colIx = 0; colIx < colCount; colIx++) {\n result[colIx] = result[colIx] || [];\n result[colIx].push(row[colIx]);\n }\n }\n return result;\n }\n function clearMissingValues(originalOptions, options) {\n for (var field in options) {\n var fieldValue = options[field];\n var originalValue = originalOptions[field];\n if (defined(originalValue)) {\n var nullValue = fieldValue === null;\n if (nullValue || !defined(fieldValue)) {\n delete originalOptions[field];\n if (nullValue) {\n delete options[field];\n }\n } else if (originalValue && isObject(fieldValue)) {\n if (isObject(originalValue)) {\n clearMissingValues(originalValue, fieldValue);\n }\n }\n }\n }\n }\n setDefaultOptions(Chart, {\n renderAs: '',\n chartArea: {},\n legend: {\n visible: true,\n labels: {}\n },\n categoryAxis: {},\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 kendo.deepExtend(kendo.dataviz, {\n constants: constants,\n Aggregates: Aggregates,\n AreaChart: AreaChart,\n AreaSegment: AreaSegment,\n AxisGroupRangeTracker: AxisGroupRangeTracker,\n Bar: Bar,\n BarChart: BarChart,\n BarLabel: BarLabel,\n BoxPlotChart: BoxPlotChart,\n BoxPlot: BoxPlot,\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 Chart: Chart,\n ChartContainer: ChartContainer,\n ClipAnimation: ClipAnimation,\n ClusterLayout: ClusterLayout,\n Crosshair: Crosshair,\n CrosshairTooltip: CrosshairTooltip,\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 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 ChartAxis: ChartAxis,\n ChartPlotArea: ChartPlotArea,\n anyHasZIndex: anyHasZIndex,\n appendIfNotNull: areNumbers,\n areNumbers: areNumbers,\n categoriesCount: categoriesCount,\n countNumbers: countNumbers,\n equalsIgnoreCase: equalsIgnoreCase,\n evalOptions: evalOptions,\n filterSeriesByType: filterSeriesByType,\n getDateField: getDateField,\n getField: getField,\n hasGradientOverlay: hasGradientOverlay,\n hasValue: hasValue,\n isDateAxis: isDateAxis,\n segmentVisible: segmentVisible,\n singleItemOrArray: singleItemOrArray\n });\n }(window.kendo.jQuery));\n}, typeof define == 'function' && define.amd ? define : function (a1, a2, a3) {\n (a3 || a2)();\n}));\n(function (f, define) {\n define('dataviz/chart/chart', [\n 'dataviz/chart/kendo-chart',\n 'kendo.data',\n 'kendo.dataviz.core',\n 'kendo.dataviz.themes',\n 'kendo.drawing',\n 'kendo.userevents'\n ], f);\n}(function () {\n (function ($, undefined) {\n var NS = '.kendoChart';\n var kendo = window.kendo;\n var Class = kendo.Class;\n var outerWidth = kendo._outerWidth;\n var outerHeight = kendo._outerHeight;\n var dataviz = kendo.dataviz;\n var constants = dataviz.constants;\n var KendoChart = dataviz.Chart;\n var SeriesBinder = dataviz.SeriesBinder;\n var Widget = kendo.ui.Widget;\n var DataSource = kendo.data.DataSource;\n var deepExtend = kendo.deepExtend;\n var defined = dataviz.defined;\n var getField = dataviz.getField;\n var InstanceObserver = dataviz.InstanceObserver;\n var inArray = dataviz.inArray;\n var services = dataviz.services;\n var proxy = $.proxy;\n var isArray = $.isArray;\n var extend = $.extend;\n var template = kendo.template;\n var MOUSELEAVE_NS = 'mouseleave' + NS;\n var AXIS_LABEL_CLICK = constants.AXIS_LABEL_CLICK;\n var LEGEND_ITEM_CLICK = constants.LEGEND_ITEM_CLICK;\n var LEGEND_ITEM_HOVER = constants.LEGEND_ITEM_HOVER;\n var SERIES_CLICK = constants.SERIES_CLICK;\n var SERIES_HOVER = constants.SERIES_HOVER;\n var PLOT_AREA_CLICK = constants.PLOT_AREA_CLICK;\n var PLOT_AREA_HOVER = constants.PLOT_AREA_HOVER;\n var DRAG = constants.DRAG;\n var DRAG_END = constants.DRAG_END;\n var DRAG_START = constants.DRAG_START;\n var ZOOM_START = constants.ZOOM_START;\n var ZOOM = constants.ZOOM;\n var ZOOM_END = constants.ZOOM_END;\n var SELECT_START = constants.SELECT_START;\n var SELECT = constants.SELECT;\n var SELECT_END = constants.SELECT_END;\n var RENDER = constants.RENDER;\n var NOTE_CLICK = constants.NOTE_CLICK;\n var NOTE_HOVER = constants.NOTE_HOVER;\n var CHANGE = 'change';\n var DATABOUND = 'dataBound';\n var LEAVE = 'leave';\n var VALUE = constants.VALUE;\n var PIE = constants.PIE;\n var DONUT = constants.DONUT;\n var FUNNEL = constants.FUNNEL;\n var Observable = kendo.Observable;\n var TOOLTIP_ANIMATION_DURATION = 150;\n var TOOLTIP_SHOW_DELAY = 100;\n var TOOLTIP_INVERSE = 'k-chart-tooltip-inverse';\n var SHARED_TOOLTIP_CLASS = 'k-chart-shared-tooltip';\n services.DomEventsBuilder.register({\n create: function (element, events) {\n return new kendo.UserEvents(element, deepExtend({\n global: true,\n multiTouch: true,\n fastTap: true\n }, events));\n }\n });\n var ChartInstanceObserver = InstanceObserver.extend({\n handlerMap: {\n showTooltip: '_showTooltip',\n hideTooltip: '_hideTooltip',\n legendItemClick: '_onLegendItemClick',\n render: '_onRender',\n init: '_onInit'\n }\n });\n var Chart = Widget.extend({\n init: function (element, userOptions) {\n var dataSource;\n kendo.destroy(element);\n Widget.fn.init.call(this, element);\n if (userOptions) {\n dataSource = userOptions.dataSource;\n delete userOptions.dataSource;\n }\n this.options = deepExtend({}, this.options, userOptions);\n this.wrapper = this.element;\n this._attachEvents();\n if (userOptions) {\n userOptions.dataSource = dataSource;\n }\n this._seriesVisibility = new SeriesVisibilityState();\n this.bind(this.events, this.options);\n this._initDataSource(userOptions);\n kendo.notify(this, dataviz.ui);\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 options: {\n name: 'Chart',\n renderAs: '',\n theme: 'default',\n axisDefaults: {},\n chartArea: {},\n legend: {},\n categoryAxis: {},\n autoBind: true,\n seriesDefaults: {},\n series: [],\n seriesColors: null,\n tooltip: {},\n transitions: true,\n valueAxis: {},\n plotArea: {},\n title: {},\n xAxis: {},\n yAxis: {},\n panes: [{}],\n pannable: false,\n zoomable: false\n },\n items: function () {\n return $();\n },\n refresh: function () {\n var chart = this;\n var instance = chart._instance;\n instance.applyDefaults(chart.options);\n instance.applySeriesColors();\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 redraw: function (paneName) {\n this._size = null;\n this._instance.redraw(paneName);\n },\n setOptions: function (options) {\n var chart = this, dataSource = options.dataSource;\n delete options.dataSource;\n Widget.fn._setEvents.call(chart, options);\n this._instance.applyOptions(options, this._getThemeOptions(options));\n this.options = this._instance.options;\n this._tooltip.setOptions(this.options.tooltip);\n this._sourceSeries = null;\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 chart._instance.updateMouseMoveHandler();\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 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 if (chart._instance) {\n chart._instance.destroy();\n delete this._instance;\n }\n if (this._tooltip) {\n this._tooltip.destroy();\n delete this._tooltip;\n }\n this._destroyCrosshairTooltips();\n Widget.fn.destroy.call(chart);\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 _attachEvents: function () {\n this.element.on(MOUSELEAVE_NS, proxy(this._mouseleave, this));\n },\n _mouseleave: function (e) {\n var instance = this._instance;\n var tooltip = this._tooltip;\n var target = e.relatedTarget;\n if (!(target && $(target).closest(tooltip.element).length) && instance && !instance.handlingTap) {\n instance.hideElements();\n }\n },\n _getThemeOptions: function (userOptions) {\n var themeName = (userOptions || {}).theme;\n if (themeName === 'sass' || themeName === 'default-v2' || themeName === 'bootstrap-v4') {\n return dataviz.autoTheme().chart;\n }\n if (defined(themeName)) {\n var themes = dataviz.ui.themes || {};\n var theme = themes[themeName] || themes[themeName.toLowerCase()] || {};\n return theme.chart || {};\n }\n },\n _initChart: function () {\n this._createChart(this.options, this._getThemeOptions(this.options));\n this.options = this._instance.options;\n },\n _createChart: function (options, themeOptions) {\n this._instance = new KendoChart(this.element[0], options, themeOptions, {\n observer: new ChartInstanceObserver(this),\n sender: this\n });\n },\n _onInit: function (e) {\n this._instance = e.sender;\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 this._initChart();\n this._initTooltip();\n if (dataSource) {\n if (chart.options.autoBind) {\n chart.dataSource.fetch();\n }\n }\n },\n _destroyCrosshairTooltips: function () {\n var tooltips = this._crosshairTooltips;\n if (tooltips) {\n for (var key in tooltips) {\n tooltips[key].destroy();\n }\n }\n this._crosshairTooltips = {};\n },\n _getCrosshairTooltip: function (name, index) {\n var tooltips = this._crosshairTooltips = this._crosshairTooltips || {};\n var key = name + index;\n var tooltip = tooltips[key];\n if (!tooltip) {\n tooltip = tooltips[key] = new CrosshairTooltip(this.element);\n }\n return tooltip;\n },\n _showTooltip: function (e) {\n if (e.crosshair) {\n var tooltip = this._getCrosshairTooltip(e.axisName, e.axisIndex);\n tooltip.show(e);\n } else if (this._tooltip) {\n this._tooltip.show(e);\n }\n },\n _hideTooltip: function (e) {\n if (e.crosshair) {\n var tooltip = this._getCrosshairTooltip(e.axisName, e.axisIndex);\n tooltip.hide();\n } else if (this._tooltip) {\n this._tooltip.hide(e);\n }\n },\n _onRender: function (e) {\n this._destroyCrosshairTooltips();\n this._copyMembers(e.sender);\n if (!this._hasDataSource || this._hasData || !this.options.autoBind) {\n this.trigger(RENDER);\n }\n },\n _copyMembers: function (instance) {\n this.options = instance.options;\n this._originalOptions = instance._originalOptions;\n this.surface = instance.surface;\n this._plotArea = instance._plotArea;\n this._model = instance._model;\n this._highlight = instance._highlight;\n this._selections = instance._selections;\n this._pannable = instance._pannable;\n this._zoomSelection = instance._zoomSelection;\n this._mousewheelZoom = instance._mousewheelZoom;\n },\n requiresHandlers: function (names) {\n var events = this._events;\n for (var idx = 0; idx < names.length; idx++) {\n if (defined(events[names[idx]])) {\n return true;\n }\n }\n },\n _initTooltip: function () {\n this._tooltip = this._createTooltip();\n this._tooltip.bind(LEAVE, proxy(this._tooltipleave, this));\n },\n _onLegendItemClick: function (e) {\n if (!this.trigger(LEGEND_ITEM_CLICK, e)) {\n this._legendItemClick(e.seriesIndex, e.pointIndex);\n }\n },\n _legendItemClick: function (seriesIndex, pointIndex) {\n var chart = this._instance, plotArea = chart._plotArea, currentSeries = (plotArea.srcSeries || plotArea.series)[seriesIndex];\n if ($.inArray(currentSeries.type, [\n PIE,\n DONUT,\n FUNNEL\n ]) >= 0) {\n var pointVisibility = currentSeries.pointVisibility = currentSeries.pointVisibility || {};\n var visible = pointVisibility[pointIndex];\n pointVisibility[pointIndex] = defined(visible) ? !visible : false;\n } else {\n currentSeries.visible = !currentSeries.visible;\n this._seriesVisibility.save(currentSeries);\n }\n chart._noTransitionsRedraw();\n },\n _createTooltip: function () {\n return new Tooltip(this.element, this.options.tooltip);\n },\n _tooltipleave: function () {\n var chart = this._instance, plotArea = chart._plotArea, highlight = chart._highlight;\n plotArea.hideCrosshairs();\n highlight.hide();\n },\n _bindData: 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 = [], seriesVisibility = this._seriesVisibility, currentSeries, groupedSeries;\n for (seriesIx = 0; seriesIx < seriesLength; seriesIx++) {\n currentSeries = series[seriesIx];\n if (chart._isBindable(currentSeries) && grouped) {\n groupedSeries = groupSeries(currentSeries, data);\n processedSeries = processedSeries.concat(groupedSeries);\n seriesVisibility.applyByGroup(groupedSeries, e);\n } else {\n currentSeries = extend({}, currentSeries);\n processedSeries.push(currentSeries);\n seriesVisibility.applyByIndex(currentSeries, e);\n }\n }\n chart._sourceSeries = series;\n options.series = processedSeries;\n this._instance.applySeriesColors();\n chart._bindSeries();\n chart._bindCategories();\n this._hasData = true;\n },\n _onDataChanged: function (e) {\n this._bindData(e);\n this.trigger(DATABOUND);\n this._redraw();\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 if (this._instance) {\n this._instance.bindCategoryAxisFromSeries(axis, axisIx);\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 });\n var proxyMembers = [\n 'getAxis',\n 'findAxisByName',\n 'plotArea',\n 'toggleHighlight',\n 'showTooltip',\n 'hideTooltip',\n 'exportVisual',\n '_resize',\n '_redraw',\n '_noTransitionsRedraw',\n '_legendItemHover',\n '_eventCoordinates'\n ];\n function createProxyMember(name) {\n Chart.fn[name] = function () {\n var instance = this._instance;\n if (instance) {\n return instance[name].apply(instance, arguments);\n }\n };\n }\n for (var idx = 0; idx < proxyMembers.length; idx++) {\n createProxyMember(proxyMembers[idx]);\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 (!kendo.isFunction(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 dataviz.ExportMixin.extend(Chart.fn);\n if (kendo.PDFMixin) {\n kendo.PDFMixin.extend(Chart.fn);\n }\n dataviz.ui.plugin(Chart);\n var SeriesVisibilityState = Class.extend({\n init: function () {\n this.groups = {};\n this.index = {};\n },\n applyByGroup: function (series, e) {\n if (e && e.action) {\n for (var idx = 0; idx < series.length; idx++) {\n if (this.groups[series[idx]._groupValue] === false) {\n series[idx].visible = false;\n }\n }\n } else {\n this.groups = {};\n }\n },\n applyByIndex: function (series, e) {\n if (e && e.action) {\n if (this.index[series.index] === false) {\n series.visible = false;\n }\n } else {\n this.index = {};\n }\n },\n save: function (series) {\n if (!series) {\n return;\n }\n if (defined(series._groupValue)) {\n this.groups[series._groupValue] = series.visible;\n } else {\n this.index[series.index] = series.visible;\n }\n }\n });\n var geom = kendo.geometry;\n var Tooltip = Observable.extend({\n init: function (chartElement, options) {\n var tooltip = this;\n Observable.fn.init.call(tooltip);\n this.setOptions(options);\n tooltip.chartElement = chartElement;\n tooltip.template = Tooltip.template;\n if (!tooltip.template) {\n tooltip.template = Tooltip.template = kendo.template('
' + '
', {\n useWithBlock: false,\n paramName: 'd'\n });\n }\n tooltip.element = $(tooltip.template(tooltip.options));\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 setOptions: function (options) {\n this.options = deepExtend({}, this.options, options);\n },\n options: {\n opacity: 1,\n animation: { duration: TOOLTIP_ANIMATION_DURATION },\n sharedTemplate: '' + '' + '# for(var i = 0; i < points.length; i++) { #' + '# var point = points[i]; #' + '' + '# if(colorMarker) { # ' + '' + '# } #' + '# if(nameColumn) { # ' + '' + '# } #' + '' + '' + '# } #' + '
#= categoryText #
#if (point.series.name) {# #: point.series.name #: #} else {#   #}##= content(point) #
',\n categoryFormat: '{0:d}'\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 getAnchor: function (size) {\n var anchor = this.anchor;\n var point = anchor.point;\n var align = anchor.align;\n var x = point.left;\n var y = point.top;\n if (align.horizontal === 'center') {\n x -= size.width / 2;\n } else if (align.horizontal === 'right') {\n x -= size.width;\n }\n if (align.vertical === 'center') {\n y -= size.height / 2;\n } else if (align.vertical === 'bottom') {\n y -= size.height;\n }\n return {\n x: x,\n y: y\n };\n },\n _offset: function () {\n var tooltip = this, size = tooltip._measure(), anchor = tooltip.getAnchor(size), top = anchor.y, left = anchor.x, 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 show: function (e) {\n this.anchor = e.anchor;\n this.element.css(e.style);\n this.element.toggleClass(TOOLTIP_INVERSE, !!e.className);\n this.element.toggleClass(SHARED_TOOLTIP_CLASS, !!e.shared);\n var content = e.shared ? this._sharedContent(e) : this._pointContent(e.point);\n this.element.html(content);\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 _sharedContent: function (e) {\n var points = e.points;\n var nameColumn = dataviz.grep(points, function (point) {\n return defined(point.series.name);\n }).length;\n var colorMarker = e.series.length > 1;\n var colspan = 1;\n if (nameColumn) {\n colspan++;\n }\n if (colorMarker) {\n colspan++;\n }\n var template = kendo.template(this.options.sharedTemplate);\n var content = template({\n points: points,\n category: e.category,\n categoryText: e.categoryText,\n content: this._pointContent,\n colorMarker: colorMarker,\n nameColumn: nameColumn,\n colspan: colspan\n });\n return content;\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 _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 CrosshairTooltip = Tooltip.extend({\n init: function (chartElement, options) {\n Tooltip.fn.init.call(this, chartElement, options);\n this.element.addClass('k-chart-crosshair-tooltip');\n },\n show: function (e) {\n var element = this.element;\n if (element) {\n this.anchor = e.anchor;\n this.element.css(e.style);\n this.element.html(this.content(e));\n this.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 (e) {\n var content = e.value, options = e.crosshair.options.tooltip;\n if (options.template) {\n content = template(options.template)({ value: content });\n }\n return content;\n },\n hide: function () {\n this.element.hide();\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 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._instance.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._instance.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._seriesVisibility.save(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 dataviz.Tooltip = Tooltip;\n dataviz.CrosshairTooltip = CrosshairTooltip;\n dataviz.ChartInstanceObserver = ChartInstanceObserver;\n dataviz.ChartPane = ChartPane;\n dataviz.ChartSeries = ChartSeries;\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 'dataviz/chart/kendo-chart',\n 'dataviz/chart/chart'\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 id: 'dataviz.chart-pdf-export',\n name: 'PDF export',\n description: 'Export Chart as PDF',\n depends: ['pdf']\n }]\n };\n}, typeof define == 'function' && define.amd ? define : function (a1, a2, a3) {\n (a3 || a2)();\n}));"]}