{"version":3,"sources":["webpack:///./node_modules/chart.js/dist/Chart.js","webpack:///./src/views/charts-and-maps/charts/chartjs/Chartjs.vue","webpack:///./src/views/charts-and-maps/charts/chartjs/ChartjsBarChart.vue","webpack:///./node_modules/vue-chartjs/es/mixins/index.js","webpack:///./node_modules/vue-chartjs/es/BaseCharts.js","webpack:///./src/views/charts-and-maps/charts/chartjs/charts-components/ChartjsComponentBarChart.vue","webpack:///./src/views/charts-and-maps/charts/chartjs/charts-components/ChartjsComponentLineChart.vue","webpack:///./src/views/charts-and-maps/charts/chartjs/charts-components/ChartjsComponentPieChart.vue","webpack:///./src/views/charts-and-maps/charts/chartjs/charts-components/ChartjsComponentRadarChart.vue","webpack:///./src/views/charts-and-maps/charts/chartjs/charts-components/ChartjsComponentPolarAreaChart.vue","webpack:///./src/views/charts-and-maps/charts/chartjs/charts-components/ChartjsComponentDoughnutChart.vue","webpack:///./src/views/charts-and-maps/charts/chartjs/charts-components/ChartjsComponentHorizontalBarChart.vue","webpack:///./src/views/charts-and-maps/charts/chartjs/charts-components/ChartjsComponentBubbleChart.vue","webpack:///./src/views/charts-and-maps/charts/chartjs/charts-components/ChartjsComponentScatterChart.vue","webpack:///src/views/charts-and-maps/charts/chartjs/charts-components/ChartjsComponentBarChart.vue","webpack:///./src/views/charts-and-maps/charts/chartjs/charts-components/ChartjsComponentBarChart.vue?e8b5","webpack:///src/views/charts-and-maps/charts/chartjs/ChartjsBarChart.vue","webpack:///./src/views/charts-and-maps/charts/chartjs/ChartjsBarChart.vue?c081","webpack:///./src/views/charts-and-maps/charts/chartjs/ChartjsBarChart.vue?7a66","webpack:///./src/views/charts-and-maps/charts/chartjs/ChartjsLineChart.vue","webpack:///src/views/charts-and-maps/charts/chartjs/charts-components/ChartjsComponentLineChart.vue","webpack:///./src/views/charts-and-maps/charts/chartjs/charts-components/ChartjsComponentLineChart.vue?7153","webpack:///src/views/charts-and-maps/charts/chartjs/ChartjsLineChart.vue","webpack:///./src/views/charts-and-maps/charts/chartjs/ChartjsLineChart.vue?7448","webpack:///./src/views/charts-and-maps/charts/chartjs/ChartjsLineChart.vue?205d","webpack:///./src/views/charts-and-maps/charts/chartjs/ChartjsPieChart.vue","webpack:///src/views/charts-and-maps/charts/chartjs/charts-components/ChartjsComponentPieChart.vue","webpack:///./src/views/charts-and-maps/charts/chartjs/charts-components/ChartjsComponentPieChart.vue?ceb8","webpack:///src/views/charts-and-maps/charts/chartjs/ChartjsPieChart.vue","webpack:///./src/views/charts-and-maps/charts/chartjs/ChartjsPieChart.vue?441f","webpack:///./src/views/charts-and-maps/charts/chartjs/ChartjsPieChart.vue?b4ec","webpack:///./src/views/charts-and-maps/charts/chartjs/ChartjsRadarChart.vue","webpack:///src/views/charts-and-maps/charts/chartjs/charts-components/ChartjsComponentRadarChart.vue","webpack:///./src/views/charts-and-maps/charts/chartjs/charts-components/ChartjsComponentRadarChart.vue?dc08","webpack:///src/views/charts-and-maps/charts/chartjs/ChartjsRadarChart.vue","webpack:///./src/views/charts-and-maps/charts/chartjs/ChartjsRadarChart.vue?5933","webpack:///./src/views/charts-and-maps/charts/chartjs/ChartjsRadarChart.vue?d698","webpack:///./src/views/charts-and-maps/charts/chartjs/ChartjsPolarAreaChart.vue","webpack:///src/views/charts-and-maps/charts/chartjs/charts-components/ChartjsComponentPolarAreaChart.vue","webpack:///./src/views/charts-and-maps/charts/chartjs/charts-components/ChartjsComponentPolarAreaChart.vue?3ca4","webpack:///src/views/charts-and-maps/charts/chartjs/ChartjsPolarAreaChart.vue","webpack:///./src/views/charts-and-maps/charts/chartjs/ChartjsPolarAreaChart.vue?0bc9","webpack:///./src/views/charts-and-maps/charts/chartjs/ChartjsPolarAreaChart.vue?0d9c","webpack:///./src/views/charts-and-maps/charts/chartjs/ChartjsDoughnutChart.vue","webpack:///src/views/charts-and-maps/charts/chartjs/charts-components/ChartjsComponentDoughnutChart.vue","webpack:///./src/views/charts-and-maps/charts/chartjs/charts-components/ChartjsComponentDoughnutChart.vue?5e6f","webpack:///src/views/charts-and-maps/charts/chartjs/ChartjsDoughnutChart.vue","webpack:///./src/views/charts-and-maps/charts/chartjs/ChartjsDoughnutChart.vue?4097","webpack:///./src/views/charts-and-maps/charts/chartjs/ChartjsDoughnutChart.vue?4b13","webpack:///./src/views/charts-and-maps/charts/chartjs/ChartjsHorizontalBarChart.vue","webpack:///src/views/charts-and-maps/charts/chartjs/charts-components/ChartjsComponentHorizontalBarChart.vue","webpack:///./src/views/charts-and-maps/charts/chartjs/charts-components/ChartjsComponentHorizontalBarChart.vue?85da","webpack:///src/views/charts-and-maps/charts/chartjs/ChartjsHorizontalBarChart.vue","webpack:///./src/views/charts-and-maps/charts/chartjs/ChartjsHorizontalBarChart.vue?9d3e","webpack:///./src/views/charts-and-maps/charts/chartjs/ChartjsHorizontalBarChart.vue?7029","webpack:///./src/views/charts-and-maps/charts/chartjs/ChartjsBubbleChart.vue","webpack:///src/views/charts-and-maps/charts/chartjs/charts-components/ChartjsComponentBubbleChart.vue","webpack:///./src/views/charts-and-maps/charts/chartjs/charts-components/ChartjsComponentBubbleChart.vue?9c45","webpack:///src/views/charts-and-maps/charts/chartjs/ChartjsBubbleChart.vue","webpack:///./src/views/charts-and-maps/charts/chartjs/ChartjsBubbleChart.vue?cfdb","webpack:///./src/views/charts-and-maps/charts/chartjs/ChartjsBubbleChart.vue?af8a","webpack:///./src/views/charts-and-maps/charts/chartjs/ChartjsScatterChart.vue","webpack:///src/views/charts-and-maps/charts/chartjs/charts-components/ChartjsComponentScatterChart.vue","webpack:///./src/views/charts-and-maps/charts/chartjs/charts-components/ChartjsComponentScatterChart.vue?9d16","webpack:///src/views/charts-and-maps/charts/chartjs/ChartjsScatterChart.vue","webpack:///./src/views/charts-and-maps/charts/chartjs/ChartjsScatterChart.vue?1c41","webpack:///./src/views/charts-and-maps/charts/chartjs/ChartjsScatterChart.vue?23a4","webpack:///src/views/charts-and-maps/charts/chartjs/Chartjs.vue","webpack:///./src/views/charts-and-maps/charts/chartjs/Chartjs.vue?1e6f","webpack:///./src/views/charts-and-maps/charts/chartjs/Chartjs.vue?d3bb"],"names":["global","factory","module","exports","e","this","moment","hasOwnProperty","conversions","rgb2hsl","rgb2hsv","rgb2hwb","rgb2cmyk","rgb2keyword","rgb2xyz","rgb2lab","rgb2lch","hsl2rgb","hsl2hsv","hsl2hwb","hsl2cmyk","hsl2keyword","hsv2rgb","hsv2hsl","hsv2hwb","hsv2cmyk","hsv2keyword","hwb2rgb","hwb2hsl","hwb2hsv","hwb2cmyk","hwb2keyword","cmyk2rgb","cmyk2hsl","cmyk2hsv","cmyk2hwb","cmyk2keyword","keyword2rgb","keyword2hsl","keyword2hsv","keyword2hwb","keyword2cmyk","keyword2lab","keyword2xyz","xyz2rgb","xyz2lab","xyz2lch","lab2xyz","lab2rgb","lab2lch","lch2lab","lch2xyz","lch2rgb","rgb","h","s","l","r","g","b","min","Math","max","delta","v","w","c","m","y","k","reverseKeywords","JSON","stringify","pow","x","z","a","xyz","args","hsl","t1","t2","t3","val","i","sv","hsv","hi","floor","f","p","q","t","sl","hwb","n","wh","bl","ratio","cmyk","lab","y2","hr","atan2","PI","sqrt","lch","cos","sin","keyword","cssKeywords","aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","green","greenyellow","grey","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen","key","convert","Converter","func","arg","Array","prototype","slice","call","arguments","pair","exec","from","to","undefined","length","round","convs","routeSpace","space","values","getValues","setValues","vals","fspace","forEach","colorConvert","colorName","colorString","getRgba","getHsla","getRgb","getHsl","getHwb","getAlpha","hexString","rgbString","rgbaString","percentString","percentaString","hslString","hslaString","hwbString","string","abbr","hex","rgba","per","match","hexAlpha","parseInt","parseFloat","scale","alpha","isNaN","hsla","hexDouble","reverseNames","num","str","toString","toUpperCase","name","Color","obj","valid","lightness","value","whiteness","isValid","setSpace","rgbArray","hslArray","hsvArray","hwbArray","concat","cmykArray","rgbaArray","hslaArray","setChannel","hue","saturation","saturationv","blackness","rgbNumber","luminosity","lum","chan","contrast","color2","lum1","lum2","level","contrastRatio","dark","yiq","light","negate","lighten","darken","saturate","desaturate","whiten","blacken","greyscale","clearer","opaquer","rotate","degrees","mix","mixinColor","weight","color1","w1","w2","toJSON","clone","type","result","source","target","prop","console","error","spaces","maxes","charAt","capped","chans","sname","index","svalues","window","chartjsColor","helpers","noop","uid","id","isNullOrUndef","isArray","Object","substr","isObject","isFinite","Number","valueOrDefault","defaultValue","valueAtIndexOrDefault","callback","fn","thisArg","apply","each","loopable","reverse","len","keys","arrayEquals","a0","a1","ilen","v0","v1","map","klen","_merger","options","tval","sval","merge","_mergerIf","mergeIf","sources","merger","extend","setFn","inherits","extensions","me","ChartElement","constructor","Surrogate","__super__","helpers_core","callCallback","indexOf","array","item","fromIndex","getValueOrDefault","getValueAtIndexOrDefault","effects","linear","easeInQuad","easeOutQuad","easeInOutQuad","easeInCubic","easeOutCubic","easeInOutCubic","easeInQuart","easeOutQuart","easeInOutQuart","easeInQuint","easeOutQuint","easeInOutQuint","easeInSine","easeOutSine","easeInOutSine","easeInExpo","easeOutExpo","easeInOutExpo","easeInCirc","easeOutCirc","easeInOutCirc","easeInElastic","asin","easeOutElastic","easeInOutElastic","easeInBack","easeOutBack","easeInOutBack","easeInBounce","easeOutBounce","easeInOutBounce","helpers_easing","easingEffects","RAD_PER_DEG","DOUBLE_PI","HALF_PI","QUARTER_PI","TWO_THIRDS_PI","exports$1","clear","chart","ctx","clearRect","width","height","roundedRect","radius","left","top","right","bottom","moveTo","arc","closePath","rect","drawPoint","style","rotation","xOffset","yOffset","size","cornerRadius","rad","drawImage","beginPath","lineTo","SQRT1_2","fill","stroke","_isPointInArea","point","area","epsilon","clipArea","save","clip","unclipArea","restore","previous","flip","stepped","steppedLine","midpoint","tension","bezierCurveTo","controlPointPreviousX","controlPointNextX","controlPointPreviousY","controlPointNextY","helpers_canvas","drawRoundedRectangle","defaults","_set","scope","defaultColor","defaultFontColor","defaultFontFamily","defaultFontSize","defaultFontStyle","defaultLineHeight","showLines","core_defaults","toFontString","font","family","helpers_options","toLineHeight","matches","toPadding","_parseFont","globalDefaults","fontSize","fontFamily","lineHeight","fontStyle","resolve","inputs","context","helpers$1","easing","canvas","interpolate","start","view","model","ease","actual","origin","c0","c1","Element","configuration","initialize","hidden","pivot","_view","_model","_start","transition","tooltipPosition","hasValue","isNumber","core_element","exports$2","currentStep","numSteps","render","onAnimationProgress","onAnimationComplete","core_animation","defineProperty","get","set","animation","duration","onProgress","onComplete","core_animations","animations","request","addAnimation","lazy","startTime","Date","now","animating","push","requestAnimationFrame","cancelAnimation","findIndex","splice","requestAnimFrame","startDigest","advance","nextStep","arrayEvents","listenArrayEvents","listener","_chartjs","listeners","configurable","enumerable","method","base","res","object","unlistenArrayEvents","stub","DatasetController","datasetIndex","datasetElementType","dataElementType","linkScales","addElements","updateIndex","meta","getMeta","dataset","getDataset","xAxisID","scales","xAxes","yAxisID","yAxes","data","datasets","getDatasetMeta","getScaleForId","scaleID","_getValueScaleId","_getIndexScaleId","_getValueScale","_getIndexScale","reset","update","destroy","_data","createMetaDataset","_chart","_datasetIndex","createMetaData","_index","metaData","addElementAndReset","element","updateElement","buildOrUpdateElements","isExtensible","resyncElements","easingValue","elements","draw","removeHoverStyle","$previousStyle","setHoverStyle","custom","getHoverColor","backgroundColor","borderColor","borderWidth","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth","numMeta","numData","insertElements","count","onDataPush","onDataPop","pop","onDataShift","shift","onDataSplice","onDataUnshift","core_datasetController","borderAlign","element_arc","inLabelRange","mouseX","vm","hoverRadius","inRange","chartX","chartY","pointRelativePosition","getAngleFromPoint","angle","distance","startAngle","endAngle","betweenAngles","withinRadius","innerRadius","outerRadius","getCenterPoint","halfAngle","halfRadius","getArea","centreAngle","rangeFromCentre","angleMargin","sA","eA","pixelMargin","fillStyle","lineWidth","lineJoin","strokeStyle","valueOrDefault$1","line","borderCapStyle","borderDash","borderDashOffset","borderJoinStyle","capBezierPoints","element_line","current","currentVM","spanGaps","points","_children","globalOptionLineElements","lastDrawnIndex","_loop","lineCap","setLineDash","lineDashOffset","previousItem","skip","valueOrDefault$2","defaultColor$1","xRange","abs","hitRadius","yRange","mouseY","pointStyle","element_point","inXRange","inYRange","padding","chartArea","defaultColor$2","isVertical","getBarBounds","x1","x2","y1","half","swap","orig","v2","parseBorderSkipped","edge","borderSkipped","horizontal","parseBorderWidth","maxW","maxH","boundingRects","bounds","border","outer","inner","skipX","skipY","rectangle","element_rectangle","rects","fillRect","Arc","Line","Point","Rectangle","resolve$1","computeMinSampleSize","pixels","prev","curr","isHorizontal","ticks","getTicks","getPixelForTick","computeFitCategoryTraits","ruler","thickness","barThickness","stackCount","categoryPercentage","barPercentage","chunk","computeFlexCategoryTraits","next","percent","end","hover","mode","offset","gridLines","offsetGridLines","controller_bar","stack","bar","_ruler","getRuler","_resolveElementOptions","_xScale","_yScale","datasetLabel","label","labels","_updateElementGeometry","vscale","getBasePixel","vpixels","calculateBarValuePixels","ipixels","calculateBarIndexPixels","head","center","_getStacks","last","stacked","stacks","isDatasetVisible","getStackCount","getStackIndex","getPixelForValue","imeta","ivalue","getRightValue","minBarLength","controller","range","stackIndex","maxBarThickness","Infinity","dataIndex","valueOrDefault$3","resolve$2","position","tooltips","callbacks","title","dataPoint","xLabel","yLabel","controller_bubble","xScale","yScale","dsIndex","getPixelForDecimal","NaN","_options","resolve$3","valueOrDefault$4","animateRotate","animateScale","legendCallback","text","join","legend","generateLabels","ds","arcOpts","bw","onClick","legendItem","cutoutPercentage","circumference","tooltipItem","dataLabel","controller_doughnut","getRingIndex","ringIndex","j","opts","availableWidth","availableHeight","minSize","arcs","chartWeight","_getRingWeight","contains0","contains90","contains180","contains270","cutout","getMaxBorderWidth","radiusLength","_getVisibleDatasetWeightTotal","offsetX","offsetY","total","calculateTotal","_getRingWeightOffset","animationOpts","centerX","centerY","calculateCircumference","hoverWidth","ringWeightOffset","dataSetIndex","axis","controller_horizontalBar","valueOrDefault$5","resolve$4","isPointInArea","lineEnabled","showLine","controller_line","lineTension","_scale","_resolveLineOptions","updateBezierControlPoints","lineModel","_resolvePointOptions","calculatePointY","ELEMENT_OPTIONS","elementOptions","dsMeta","sumPos","sumNeg","stackedRightValue","rightValue","controlPoints","capControlPoint","pt","filter","cubicInterpolationMode","splineCurveMonotone","splineCurve","nextItem","halfBorderWidth","resolve$5","angleLines","display","circular","pointLabels","beginAtZero","controller_polarArea","starts","_starts","angles","_angles","_updateRadius","countVisibleElements","_computeAngle","getVisibleDatasetCount","xCenter","yCenter","datasetStartAngle","getDistanceFromCenterForValue","resetRadius","doughnut","controller_pie","valueOrDefault$6","resolve$6","controller_radar","pointPosition","getPointPositionForValue","controller_scatter","controllers","bubble","horizontalBar","polarArea","pie","radar","scatter","getRelativePosition","native","parseVisibleItems","handler","jlen","getIntersectItems","getNearestItems","intersect","distanceMetric","minDistance","POSITIVE_INFINITY","nearestItems","getDistanceMetricForAxis","useX","useY","pt1","pt2","deltaX","deltaY","indexMode","items","core_interaction","modes","single","nearest","intersectsItem","filterByPosition","where","sortByWeight","_tmpIndex_","sort","findMaxPadding","boxes","box","getPadding","boxPadding","addSizeByPosition","layout","core_layouts","addBox","fullWidth","removeBox","layoutItem","configure","props","layoutOptions","leftPadding","rightPadding","topPadding","bottomPadding","leftBoxes","rightBoxes","topBoxes","bottomBoxes","chartAreaBoxes","maxPadding","verticalBoxes","horizontalBoxes","outerBoxes","chartWidth","chartHeight","chartAreaWidth","verticalBoxWidth","maxChartAreaWidth","maxChartAreaHeight","outerBoxSizes","minBoxSizes","getMinimumBoxSize","fitBox","finalFitVerticalBox","leftPaddingAddition","topPaddingAddition","newMaxChartAreaHeight","newMaxChartAreaWidth","placeBox","minBoxSize","findNextWhere","minBox","scaleMargin","platform_basic","acquireContext","getContext","platform_dom","platform_dom$1","freeze","default","getCjsExportFromNamespace","stylesheet","EXPANDO_KEY","CSS_PREFIX","CSS_SIZE_MONITOR","CSS_RENDER_MONITOR","CSS_RENDER_ANIMATION","ANIMATION_START_EVENTS","EVENT_TYPES","touchstart","touchmove","touchend","pointerenter","pointerdown","pointermove","pointerup","pointerleave","pointerout","readUsedSize","property","getStyle","initCanvas","config","renderHeight","getAttribute","renderWidth","initial","displayWidth","aspectRatio","displayHeight","supportsEventListenerOptions","supports","addEventListener","eventListenerOptions","passive","addListener","node","removeListener","removeEventListener","createEvent","nativeEvent","fromNativeEvent","event","pos","throttled","ticking","createDiv","cls","el","document","createElement","className","createResizer","maxSize","resizer","expand","shrink","appendChild","_reset","scrollLeft","scrollTop","onScroll","bind","watchForRender","expando","proxy","renderProxy","animationName","reflow","offsetParent","classList","add","unwatchForRender","remove","addResizeListener","container","maintainAspectRatio","parentNode","clientWidth","insertBefore","firstChild","removeResizeListener","removeChild","injectCSS","platform","css","_style","setAttribute","getElementsByTagName","createTextNode","platform_dom$2","disableCSSInjection","_enabled","_ensureLoaded","_loaded","getElementById","releaseContext","removeAttribute","proxies","addEvent","removeEvent","implementation","plugins","core_plugins","_plugins","_cacheId","register","plugin","unregister","idx","getAll","notify","hook","descriptor","params","descriptors","cache","$plugins","_invalidate","core_scaleService","constructors","registerScaleType","scaleConstructor","scaleDefaults","getScaleConstructor","getScaleDefaults","updateScaleDefaults","additions","addScalesToLayout","valueOrDefault$7","enabled","titleFontStyle","titleSpacing","titleMarginBottom","titleFontColor","titleAlign","bodySpacing","bodyFontColor","bodyAlign","footerFontStyle","footerSpacing","footerMarginTop","footerFontColor","footerAlign","yPadding","xPadding","caretPadding","caretSize","multiKeyBackground","displayColors","beforeTitle","tooltipItems","labelCount","afterTitle","beforeBody","beforeLabel","labelColor","activeElement","labelTextColor","afterLabel","afterBody","beforeFooter","footer","afterFooter","positioners","average","eventPosition","nearestElement","d","distanceBetweenPoints","tp","pushOrConcat","toPush","splitNewlines","String","split","createTooltipItem","indexScale","valueScale","getLabelForIndex","getBaseModel","tooltipOpts","xAlign","yAlign","_bodyFontFamily","bodyFontFamily","_bodyFontStyle","bodyFontStyle","_bodyAlign","bodyFontSize","_titleFontFamily","titleFontFamily","_titleFontStyle","titleFontSize","_titleAlign","_footerFontFamily","footerFontFamily","_footerFontStyle","footerFontSize","_footerAlign","opacity","legendColorBackground","getTooltipSize","tooltip","body","combinedBodyLength","reduce","bodyItem","before","lines","after","titleLineCount","footerLineCount","widthPadding","maxLineWidth","measureText","fontString","determineAlignment","lf","rf","olf","orf","yf","midX","midY","getBackgroundPoint","alignment","paddingAndSize","radiusAndPadding","getAlignedX","align","getBeforeAfterBodyLines","exports$3","_lastActive","getTitle","getBeforeBody","getBody","bodyItems","getAfterBody","getFooter","changed","existingModel","active","_active","backgroundPoint","tooltipSize","caretX","caretY","labelColors","labelTextColors","_eventPosition","itemSort","dataPoints","drawCaret","tooltipPoint","caretPosition","getCaretPosition","x3","y3","ptX","ptY","tmp","drawTitle","textAlign","textBaseline","fillText","drawBody","textColor","drawColorBoxes","xLinePadding","colorX","fillLineOfText","strokeRect","drawFooter","drawBackground","quadraticCurveTo","hasTooltipContent","globalAlpha","handleEvent","getElementsAtEventForMode","positioners_1","core_tooltip","valueOrDefault$8","mergeScaleConfig","slen","mergeConfig","initConfig","updateConfig","newOptions","ensureScalesHaveIDs","buildOrUpdateScales","positionIsHorizontal","events","onHover","animationDuration","responsive","responsiveAnimationDuration","Chart","construct","_bufferedRender","instances","retinaScale","devicePixelRatio","bindEvents","resize","initToolTip","stop","silent","newWidth","getMaximumWidth","newHeight","getMaximumHeight","newSize","onResize","scalesOptions","scaleOptions","xAxisOptions","yAxisOptions","updated","dtype","dposition","isDefault","scaleType","scaleClass","mergeTicksOptions","hasUpdated","buildOrUpdateControllers","newControllers","destroyDatasetMeta","ControllerClass","Error","resetElements","updateLayout","updateDatasets","lastActive","_bufferedRequest","updateDataset","animationOptions","animationObject","easingFunction","stepDecimal","drawDatasets","_drawTooltip","drawDataset","getElementAtEvent","getElementsAtEvent","getElementsAtXAxis","getDatasetAtEvent","_meta","generateLegend","unbindEvents","toBase64Image","toDataURL","_chartInstance","_listeners","eventHandler","updateHoverStyle","bufferedRequest","hoverOptions","core_controller","Controller","types","configMerge","scaleMerge","core_helpers","parseMaxStyle","styleValue","parentProperty","valueInPixels","isConstrainedValue","getConstraintDimension","domNode","maxStyle","percentageProperty","defaultView","_getParentNode","constrainedNode","getComputedStyle","constrainedContainer","hasCNode","hasCContainer","infinity","collection","filterCallback","filtered","arrayToSearch","startIndex","currentItem","findPreviousWhere","almostEquals","almostWhole","rounded","NEGATIVE_INFINITY","sign","log10","exponent","log","LOG10E","powerOf10","isPowerOf10","toRadians","toDegrees","radians","_decimalPlaces","centrePoint","anglePoint","distanceFromXCenter","distanceFromYCenter","radialDistanceFromCenter","aliasPixel","pixelWidth","_alignPixel","pixel","currentDevicePixelRatio","halfWidth","firstPoint","middlePoint","afterPoint","d01","d12","s01","s12","fa","fb","EPSILON","pointBefore","pointCurrent","pointAfter","alphaK","betaK","tauK","squaredMagnitude","pointsWithTangents","deltaK","mK","pointsLen","slopeDeltaX","loop","niceNum","niceFraction","fraction","webkitRequestAnimationFrame","mozRequestAnimationFrame","oRequestAnimationFrame","msRequestAnimationFrame","setTimeout","evt","originalEvent","srcElement","boundingRect","getBoundingClientRect","touches","clientX","clientY","paddingLeft","paddingTop","paddingRight","paddingBottom","getConstraintWidth","getConstraintHeight","_calculatePadding","parentDimension","parent","host","cw","clientHeight","ch","currentStyle","getPropertyValue","forceRatio","pixelRatio","pixelSize","longestText","arrayOfThings","gc","garbageCollect","longest","thing","nestedThing","gcLen","textWidth","numberOfLabelLines","numberOfLines","color","CanvasGradient","colorValue","CanvasPattern","abstract","DateAdapter","formats","parse","format","diff","startOf","endOf","_create","override","members","_date","core_adapters","core_ticks","formatters","tickValue","logDelta","tickString","maxTick","logTick","toExponential","numDecimal","toFixed","logarithmic","remain","valueOrDefault$9","labelsFromTicks","getPixelForGridLine","lineValue","computeTextSize","tick","drawBorder","drawOnChartArea","drawTicks","tickMarkLength","zeroLineWidth","zeroLineColor","zeroLineBorderDash","zeroLineBorderDashOffset","scaleLabel","labelString","minRotation","maxRotation","mirror","autoSkip","autoSkipPadding","labelOffset","minor","major","core_scale","_ticks","beforeUpdate","maxWidth","maxHeight","margins","_maxLabelLines","longestLabelWidth","longestTextCache","beforeSetDimensions","setDimensions","afterSetDimensions","beforeDataLimits","determineDataLimits","afterDataLimits","beforeBuildTicks","buildTicks","afterBuildTicks","beforeTickToLabelConversion","convertTicksToLabels","afterTickToLabelConversion","beforeCalculateTickRotation","calculateTickRotation","afterCalculateTickRotation","beforeFit","fit","afterFit","afterUpdate","tickOpts","userCallback","tickFont","labelRotation","cosRotation","sinRotation","originalLabelWidth","labelWidth","tickWidth","angleRadians","scaleLabelOpts","gridLineOpts","_isVisible","parseFont","isFullWidth","scaleLabelFont","scaleLabelPadding","deltaHeight","largestTextWidth","tallestLabelHeightInLines","lineSpace","tickPadding","labelHeight","firstLabelWidth","lastLabelWidth","offsetLeft","offsetRight","handleMargins","rawValue","getValueForPixel","innerWidth","finalVal","innerHeight","decimal","valueOffset","getBaseValue","_autoSkip","optionTicks","tickCount","skipRatio","maxTicks","maxTicksLimit","ticksLength","_tickSize","axisLength","PaddingBottom","rot","borderValue","tickStart","tickEnd","optionMajorTicks","isRotated","isMirrored","tickFontColor","fontColor","majorTickFontColor","majorTickFont","tl","scaleLabelFontColor","labelRotationRadians","itemsToDraw","axisWidth","alignPixel","lineColor","tx1","ty1","tx2","ty2","labelX","labelY","textOffset","zeroLineIndex","labelYOffset","labelXOffset","glWidth","glColor","glBorderDash","glBorderDashOffset","itemToDraw","translate","scaleLabelX","scaleLabelY","halfLineHeight","isLeft","firstLineWidth","lastLineWidth","defaultConfig","scale_category","getLabels","xLabels","yLabels","minIndex","maxIndex","valueCategory","offsetAmt","valueWidth","widthOffset","valueHeight","heightOffset","horz","valueDimension","_defaults","generateTicks","generationOptions","dataRange","factor","niceMin","niceMax","numSpaces","MIN_SPACING","stepSize","unit","maxNumSpaces","precision","rmin","rmax","spacing","ceil","scale_linearbase","handleTickRangeOptions","minSign","maxSign","setMin","suggestedMin","setMax","suggestedMax","getTickLimit","_computeTickLimit","handleDirectionalChanges","numericGeneratorOptions","fixedStepSize","ticksAsNumbers","defaultConfig$1","scale_linear","DEFAULT_MIN","DEFAULT_MAX","IDMatches","hasStacks","valuesPerStack","positiveValues","negativeValues","relativePoints","valuesForType","minVal","maxVal","innerDimension","_defaults$1","valueOrDefault$a","generateTicks$1","exp","significand","tickVal","endExp","endSignificand","minNotZero","lastTick","defaultConfig$2","nonNegativeOrDefault","scale_logarithmic","tickValues","_getFirstTickValue","firstTickValue","_defaults$2","valueOrDefault$b","valueAtIndexOrDefault$1","resolve$7","defaultConfig$3","animate","showLabelBackdrop","backdropColor","backdropPaddingY","backdropPaddingX","getValueCount","getTickBackdropHeight","measureLabelSize","determineLimits","fitWithPointLabels","textSize","plFont","furthestLimits","furthestAngles","_pointLabelSizes","valueCount","getPointPosition","drawingArea","getIndexAngle","hLimits","vLimits","setReductions","getTextAlignForAngle","adjustPointPositionForLabelHeight","drawPointLabels","angleLineOpts","pointLabelOpts","tickBackdropHeight","outerDistance","outerPosition","extra","pointLabelPosition","pointLabelFontColor","drawRadiusLine","numberOrZero","param","scale_radialLinear","setCenterPoint","largestPossibleRadius","radiusReductionLeft","radiusReductionRight","radiusReductionTop","radiusReductionBottom","leftMovement","rightMovement","topMovement","bottomMovement","maxRight","maxLeft","maxTop","maxBottom","angleMultiplier","startAngleRadians","scalingFactor","distanceFromCenter","thisAngle","getBasePosition","yCenterOffset","_defaults$3","valueOrDefault$c","MIN_INTEGER","MIN_SAFE_INTEGER","MAX_INTEGER","MAX_SAFE_INTEGER","INTERVALS","millisecond","common","steps","second","minute","hour","day","week","month","quarter","year","UNITS","sorter","arrayUnique","hash","out","buildLookupTable","timestamps","distribution","time","table","lookup","mid","i0","i1","lo","interpolate$1","skey","tkey","span","toTimestamp","input","adapter","_adapter","parser","determineStepSize","capacity","interval","milliseconds","determineUnitForAutoTicks","minUnit","determineUnitForFormatting","determineMajorUnit","generate","timeOpts","unitStepSize","weekday","isoWeekday","majorTicksEnabled","first","computeOffsets","ticksFromTimestamps","majorUnit","defaultConfig$4","adapters","displayFormat","displayFormats","scale_time","date","warn","timestamp","dataLabels","_horizontal","_table","_timestamps","getLabelCapacity","_unit","_majorUnit","_offsets","tooltipFormat","datetime","tickFormatFunction","minorFormat","majorFormat","majorTime","majorTickOpts","formatter","getPixelForOffset","isReverse","getLabelWidth","ticksOpts","tickLabelWidth","tickFontSize","exampleTime","exampleLabel","_defaults$4","category","radialLinear","FORMATS","_id","valueOf","amount","as","filler","propagate","mappers","visible","boundary","decodeFill","computeBoundary","scaleBottom","scaleTop","scaleZero","resolveTarget","visited","createMapper","isDrawable","drawArea","curve0","curve1","len0","len1","doFill","mapper","p0","p1","d0","d1","plugin_filler","afterDatasetsUpdate","$filler","beforeDatasetDraw","noop$1","valueOrDefault$d","getBoxWidth","labelOpts","usePointStyle","boxWidth","ci","onLeave","lineDash","Legend","legendHitBoxes","_hoveredItem","doughnutMode","beforeBuildLabels","buildLabels","afterBuildLabels","legendItems","labelFont","hitboxes","lineWidths","totalHeight","vPadding","columnWidths","totalWidth","currentColWidth","currentColHeight","itemHeight","itemWidth","lineDefault","legendWidth","cursor","drawLegendBox","SQRT2","halfFontSize","xLeft","yMiddle","_getLegendItemAt","hitBox","lh","hoveredItem","createNewLegendAndAttach","legendOpts","plugin_legend","_element","beforeInit","afterEvent","noop$2","Title","lineCount","fontOpts","titleX","titleY","createNewTitleBlockAndAttach","titleOpts","titleBlock","plugin_title","_adapters","Animation","animationService","Interaction","layouts","Scale","scaleService","Ticks","Tooltip","src","pluginService","PluginBase","canvasHelpers","layoutService","LinearScaleBase","klass","cfg","toLowerCase","_vm","_c","_self","attrs","_m","staticClass","staticRenderFns","_v","slot","generateChart","chartId","chartType","styles","class","cssClasses","ref","methods","addPlugin","$data","renderChart","$refs","beforeDestroy","Bar","HorizontalBar","Doughnut","Pie","PolarArea","Radar","Bubble","Scatter","extends","mounted","component","components","ChartjsComponentBarChart","ChartjsComponentLineChart","ChartjsComponentPieChart","pointBorderColor","pointBackgroundColor","ChartjsComponentRadarChart","ChartjsComponentPolarAreaChart","ChartjsComponentDoughnutChart","ChartjsComponentHorizontalBarChart","ChartjsComponentBubbleChart","pointBorderWidth","pointHoverBorderWidth","pointRadius","ChartjsComponentScatterChart","ChartjsBarChart","ChartjsLineChart","ChartjsPieChart","ChartjsRadarChart","ChartjsPolarAreaChart","ChartjsDoughnutChart","ChartjsHorizontalBarChart","ChartjsScatterChart","ChartjsBubbleChart"],"mappings":";;;;;;;CAMC,SAAUA,E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uO,KAAA,WACA,OACAA,KAAA,CACAC,SAAA,EACAwL,MAAA,mBACAzL,KAAA,EACAtkB,EAAA,GACAN,EAAA,IACA,CACAM,EAAA,GACAN,EAAA,IACA,CACAM,EAAA,GACAN,EAAA,IACA,CACAM,EAAA,GACAN,EAAA,IACA,CACAM,EAAA,GACAN,EAAA,IACA,CACAM,EAAA,GACAN,EAAA,IACA,CACAM,EAAA,GACAN,EAAA,KAEA6mB,gBAAA,uBACAC,YAAA,cACAk5C,iBAAA,UACAC,qBAAA,OACAM,iBAAA,EACAC,sBAAA,EACAC,YAAA,GACA,CACApwC,MAAA,oBACAzL,KAAA,EACAtkB,EAAA,GACAN,EAAA,IACA,CACAM,EAAA,GACAN,EAAA,IACA,CACAM,EAAA,GACAN,EAAA,IACA,CACAM,EAAA,GACAN,EAAA,IACA,CACAM,EAAA,GACAN,EAAA,IACA,CACAM,EAAA,GACAN,EAAA,IACA,CACAM,EAAA,GACAN,EAAA,KAEA6mB,gBAAA,sBACAC,YAAA,cACAk5C,iBAAA,UACAC,qBAAA,OACAM,iBAAA,EACAC,sBAAA,EACAC,YAAA,KAIApqD,QAAA,CACA67B,YAAA,EACA3N,qBAAA,EACA4N,4BAAA,IACA5f,MAAA,CACA6F,SAAA,EACA7E,KAAA,0BAEA/O,OAAA,CACAC,MAAA,EACA2N,SAAA,MACA1C,UAAA,CACA4wB,cAAA,kBACAxC,MAAA,UACAqC,WAAA,GAEAM,WAAA,CACAroB,SAAA,EACAsoB,YAAA,YAGA/7B,MAAA,EACAyN,SAAA,QACA1C,UAAA,CACA4wB,cAAA,kBACAxC,MAAA,UACAqC,WAAA,GAEAM,WAAA,CACAroB,SAAA,EACAsoB,YAAA,gBAOAkf,WAAA,CACAc,kCCxOyY,MCOrY,GAAY,eACd,GACA,GACA,IACA,EACA,KACA,KACA,MAIa,M,QCsCA,IACfd,WAAA,CACAe,kBACAC,oBACAC,mBACAC,qBACAC,yBACAC,wBACAC,6BACAC,uBACAC,wBClE6X,MCOzX,GAAY,eACd,GACAjgD,EACA+8C,GACA,EACA,KACA,KACA,MAIa,gB","file":"js/chunk-efb14088.0abfeac4.js","sourcesContent":["/*!\n * Chart.js v2.8.0\n * https://www.chartjs.org\n * (c) 2019 Chart.js Contributors\n * Released under the MIT License\n */\n(function (global, factory) {\ntypeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(function() { try { return require('moment'); } catch(e) { } }()) :\ntypeof define === 'function' && define.amd ? define(['require'], function(require) { return factory(function() { try { return require('moment'); } catch(e) { } }()); }) :\n(global.Chart = factory(global.moment));\n}(this, (function (moment) { 'use strict';\n\nmoment = moment && moment.hasOwnProperty('default') ? moment['default'] : moment;\n\n/* MIT license */\n\nvar conversions = {\n rgb2hsl: rgb2hsl,\n rgb2hsv: rgb2hsv,\n rgb2hwb: rgb2hwb,\n rgb2cmyk: rgb2cmyk,\n rgb2keyword: rgb2keyword,\n rgb2xyz: rgb2xyz,\n rgb2lab: rgb2lab,\n rgb2lch: rgb2lch,\n\n hsl2rgb: hsl2rgb,\n hsl2hsv: hsl2hsv,\n hsl2hwb: hsl2hwb,\n hsl2cmyk: hsl2cmyk,\n hsl2keyword: hsl2keyword,\n\n hsv2rgb: hsv2rgb,\n hsv2hsl: hsv2hsl,\n hsv2hwb: hsv2hwb,\n hsv2cmyk: hsv2cmyk,\n hsv2keyword: hsv2keyword,\n\n hwb2rgb: hwb2rgb,\n hwb2hsl: hwb2hsl,\n hwb2hsv: hwb2hsv,\n hwb2cmyk: hwb2cmyk,\n hwb2keyword: hwb2keyword,\n\n cmyk2rgb: cmyk2rgb,\n cmyk2hsl: cmyk2hsl,\n cmyk2hsv: cmyk2hsv,\n cmyk2hwb: cmyk2hwb,\n cmyk2keyword: cmyk2keyword,\n\n keyword2rgb: keyword2rgb,\n keyword2hsl: keyword2hsl,\n keyword2hsv: keyword2hsv,\n keyword2hwb: keyword2hwb,\n keyword2cmyk: keyword2cmyk,\n keyword2lab: keyword2lab,\n keyword2xyz: keyword2xyz,\n\n xyz2rgb: xyz2rgb,\n xyz2lab: xyz2lab,\n xyz2lch: xyz2lch,\n\n lab2xyz: lab2xyz,\n lab2rgb: lab2rgb,\n lab2lch: lab2lch,\n\n lch2lab: lch2lab,\n lch2xyz: lch2xyz,\n lch2rgb: lch2rgb\n};\n\n\nfunction rgb2hsl(rgb) {\n var r = rgb[0]/255,\n g = rgb[1]/255,\n b = rgb[2]/255,\n min = Math.min(r, g, b),\n max = Math.max(r, g, b),\n delta = max - min,\n h, s, l;\n\n if (max == min)\n h = 0;\n else if (r == max)\n h = (g - b) / delta;\n else if (g == max)\n h = 2 + (b - r) / delta;\n else if (b == max)\n h = 4 + (r - g)/ delta;\n\n h = Math.min(h * 60, 360);\n\n if (h < 0)\n h += 360;\n\n l = (min + max) / 2;\n\n if (max == min)\n s = 0;\n else if (l <= 0.5)\n s = delta / (max + min);\n else\n s = delta / (2 - max - min);\n\n return [h, s * 100, l * 100];\n}\n\nfunction rgb2hsv(rgb) {\n var r = rgb[0],\n g = rgb[1],\n b = rgb[2],\n min = Math.min(r, g, b),\n max = Math.max(r, g, b),\n delta = max - min,\n h, s, v;\n\n if (max == 0)\n s = 0;\n else\n s = (delta/max * 1000)/10;\n\n if (max == min)\n h = 0;\n else if (r == max)\n h = (g - b) / delta;\n else if (g == max)\n h = 2 + (b - r) / delta;\n else if (b == max)\n h = 4 + (r - g) / delta;\n\n h = Math.min(h * 60, 360);\n\n if (h < 0)\n h += 360;\n\n v = ((max / 255) * 1000) / 10;\n\n return [h, s, v];\n}\n\nfunction rgb2hwb(rgb) {\n var r = rgb[0],\n g = rgb[1],\n b = rgb[2],\n h = rgb2hsl(rgb)[0],\n w = 1/255 * Math.min(r, Math.min(g, b)),\n b = 1 - 1/255 * Math.max(r, Math.max(g, b));\n\n return [h, w * 100, b * 100];\n}\n\nfunction rgb2cmyk(rgb) {\n var r = rgb[0] / 255,\n g = rgb[1] / 255,\n b = rgb[2] / 255,\n c, m, y, k;\n\n k = Math.min(1 - r, 1 - g, 1 - b);\n c = (1 - r - k) / (1 - k) || 0;\n m = (1 - g - k) / (1 - k) || 0;\n y = (1 - b - k) / (1 - k) || 0;\n return [c * 100, m * 100, y * 100, k * 100];\n}\n\nfunction rgb2keyword(rgb) {\n return reverseKeywords[JSON.stringify(rgb)];\n}\n\nfunction rgb2xyz(rgb) {\n var r = rgb[0] / 255,\n g = rgb[1] / 255,\n b = rgb[2] / 255;\n\n // assume sRGB\n r = r > 0.04045 ? Math.pow(((r + 0.055) / 1.055), 2.4) : (r / 12.92);\n g = g > 0.04045 ? Math.pow(((g + 0.055) / 1.055), 2.4) : (g / 12.92);\n b = b > 0.04045 ? Math.pow(((b + 0.055) / 1.055), 2.4) : (b / 12.92);\n\n var x = (r * 0.4124) + (g * 0.3576) + (b * 0.1805);\n var y = (r * 0.2126) + (g * 0.7152) + (b * 0.0722);\n var z = (r * 0.0193) + (g * 0.1192) + (b * 0.9505);\n\n return [x * 100, y *100, z * 100];\n}\n\nfunction rgb2lab(rgb) {\n var xyz = rgb2xyz(rgb),\n x = xyz[0],\n y = xyz[1],\n z = xyz[2],\n l, a, b;\n\n x /= 95.047;\n y /= 100;\n z /= 108.883;\n\n x = x > 0.008856 ? Math.pow(x, 1/3) : (7.787 * x) + (16 / 116);\n y = y > 0.008856 ? Math.pow(y, 1/3) : (7.787 * y) + (16 / 116);\n z = z > 0.008856 ? Math.pow(z, 1/3) : (7.787 * z) + (16 / 116);\n\n l = (116 * y) - 16;\n a = 500 * (x - y);\n b = 200 * (y - z);\n\n return [l, a, b];\n}\n\nfunction rgb2lch(args) {\n return lab2lch(rgb2lab(args));\n}\n\nfunction hsl2rgb(hsl) {\n var h = hsl[0] / 360,\n s = hsl[1] / 100,\n l = hsl[2] / 100,\n t1, t2, t3, rgb, val;\n\n if (s == 0) {\n val = l * 255;\n return [val, val, val];\n }\n\n if (l < 0.5)\n t2 = l * (1 + s);\n else\n t2 = l + s - l * s;\n t1 = 2 * l - t2;\n\n rgb = [0, 0, 0];\n for (var i = 0; i < 3; i++) {\n t3 = h + 1 / 3 * - (i - 1);\n t3 < 0 && t3++;\n t3 > 1 && t3--;\n\n if (6 * t3 < 1)\n val = t1 + (t2 - t1) * 6 * t3;\n else if (2 * t3 < 1)\n val = t2;\n else if (3 * t3 < 2)\n val = t1 + (t2 - t1) * (2 / 3 - t3) * 6;\n else\n val = t1;\n\n rgb[i] = val * 255;\n }\n\n return rgb;\n}\n\nfunction hsl2hsv(hsl) {\n var h = hsl[0],\n s = hsl[1] / 100,\n l = hsl[2] / 100,\n sv, v;\n\n if(l === 0) {\n // no need to do calc on black\n // also avoids divide by 0 error\n return [0, 0, 0];\n }\n\n l *= 2;\n s *= (l <= 1) ? l : 2 - l;\n v = (l + s) / 2;\n sv = (2 * s) / (l + s);\n return [h, sv * 100, v * 100];\n}\n\nfunction hsl2hwb(args) {\n return rgb2hwb(hsl2rgb(args));\n}\n\nfunction hsl2cmyk(args) {\n return rgb2cmyk(hsl2rgb(args));\n}\n\nfunction hsl2keyword(args) {\n return rgb2keyword(hsl2rgb(args));\n}\n\n\nfunction hsv2rgb(hsv) {\n var h = hsv[0] / 60,\n s = hsv[1] / 100,\n v = hsv[2] / 100,\n hi = Math.floor(h) % 6;\n\n var f = h - Math.floor(h),\n p = 255 * v * (1 - s),\n q = 255 * v * (1 - (s * f)),\n t = 255 * v * (1 - (s * (1 - f))),\n v = 255 * v;\n\n switch(hi) {\n case 0:\n return [v, t, p];\n case 1:\n return [q, v, p];\n case 2:\n return [p, v, t];\n case 3:\n return [p, q, v];\n case 4:\n return [t, p, v];\n case 5:\n return [v, p, q];\n }\n}\n\nfunction hsv2hsl(hsv) {\n var h = hsv[0],\n s = hsv[1] / 100,\n v = hsv[2] / 100,\n sl, l;\n\n l = (2 - s) * v;\n sl = s * v;\n sl /= (l <= 1) ? l : 2 - l;\n sl = sl || 0;\n l /= 2;\n return [h, sl * 100, l * 100];\n}\n\nfunction hsv2hwb(args) {\n return rgb2hwb(hsv2rgb(args))\n}\n\nfunction hsv2cmyk(args) {\n return rgb2cmyk(hsv2rgb(args));\n}\n\nfunction hsv2keyword(args) {\n return rgb2keyword(hsv2rgb(args));\n}\n\n// http://dev.w3.org/csswg/css-color/#hwb-to-rgb\nfunction hwb2rgb(hwb) {\n var h = hwb[0] / 360,\n wh = hwb[1] / 100,\n bl = hwb[2] / 100,\n ratio = wh + bl,\n i, v, f, n;\n\n // wh + bl cant be > 1\n if (ratio > 1) {\n wh /= ratio;\n bl /= ratio;\n }\n\n i = Math.floor(6 * h);\n v = 1 - bl;\n f = 6 * h - i;\n if ((i & 0x01) != 0) {\n f = 1 - f;\n }\n n = wh + f * (v - wh); // linear interpolation\n\n switch (i) {\n default:\n case 6:\n case 0: r = v; g = n; b = wh; break;\n case 1: r = n; g = v; b = wh; break;\n case 2: r = wh; g = v; b = n; break;\n case 3: r = wh; g = n; b = v; break;\n case 4: r = n; g = wh; b = v; break;\n case 5: r = v; g = wh; b = n; break;\n }\n\n return [r * 255, g * 255, b * 255];\n}\n\nfunction hwb2hsl(args) {\n return rgb2hsl(hwb2rgb(args));\n}\n\nfunction hwb2hsv(args) {\n return rgb2hsv(hwb2rgb(args));\n}\n\nfunction hwb2cmyk(args) {\n return rgb2cmyk(hwb2rgb(args));\n}\n\nfunction hwb2keyword(args) {\n return rgb2keyword(hwb2rgb(args));\n}\n\nfunction cmyk2rgb(cmyk) {\n var c = cmyk[0] / 100,\n m = cmyk[1] / 100,\n y = cmyk[2] / 100,\n k = cmyk[3] / 100,\n r, g, b;\n\n r = 1 - Math.min(1, c * (1 - k) + k);\n g = 1 - Math.min(1, m * (1 - k) + k);\n b = 1 - Math.min(1, y * (1 - k) + k);\n return [r * 255, g * 255, b * 255];\n}\n\nfunction cmyk2hsl(args) {\n return rgb2hsl(cmyk2rgb(args));\n}\n\nfunction cmyk2hsv(args) {\n return rgb2hsv(cmyk2rgb(args));\n}\n\nfunction cmyk2hwb(args) {\n return rgb2hwb(cmyk2rgb(args));\n}\n\nfunction cmyk2keyword(args) {\n return rgb2keyword(cmyk2rgb(args));\n}\n\n\nfunction xyz2rgb(xyz) {\n var x = xyz[0] / 100,\n y = xyz[1] / 100,\n z = xyz[2] / 100,\n r, g, b;\n\n r = (x * 3.2406) + (y * -1.5372) + (z * -0.4986);\n g = (x * -0.9689) + (y * 1.8758) + (z * 0.0415);\n b = (x * 0.0557) + (y * -0.2040) + (z * 1.0570);\n\n // assume sRGB\n r = r > 0.0031308 ? ((1.055 * Math.pow(r, 1.0 / 2.4)) - 0.055)\n : r = (r * 12.92);\n\n g = g > 0.0031308 ? ((1.055 * Math.pow(g, 1.0 / 2.4)) - 0.055)\n : g = (g * 12.92);\n\n b = b > 0.0031308 ? ((1.055 * Math.pow(b, 1.0 / 2.4)) - 0.055)\n : b = (b * 12.92);\n\n r = Math.min(Math.max(0, r), 1);\n g = Math.min(Math.max(0, g), 1);\n b = Math.min(Math.max(0, b), 1);\n\n return [r * 255, g * 255, b * 255];\n}\n\nfunction xyz2lab(xyz) {\n var x = xyz[0],\n y = xyz[1],\n z = xyz[2],\n l, a, b;\n\n x /= 95.047;\n y /= 100;\n z /= 108.883;\n\n x = x > 0.008856 ? Math.pow(x, 1/3) : (7.787 * x) + (16 / 116);\n y = y > 0.008856 ? Math.pow(y, 1/3) : (7.787 * y) + (16 / 116);\n z = z > 0.008856 ? Math.pow(z, 1/3) : (7.787 * z) + (16 / 116);\n\n l = (116 * y) - 16;\n a = 500 * (x - y);\n b = 200 * (y - z);\n\n return [l, a, b];\n}\n\nfunction xyz2lch(args) {\n return lab2lch(xyz2lab(args));\n}\n\nfunction lab2xyz(lab) {\n var l = lab[0],\n a = lab[1],\n b = lab[2],\n x, y, z, y2;\n\n if (l <= 8) {\n y = (l * 100) / 903.3;\n y2 = (7.787 * (y / 100)) + (16 / 116);\n } else {\n y = 100 * Math.pow((l + 16) / 116, 3);\n y2 = Math.pow(y / 100, 1/3);\n }\n\n x = x / 95.047 <= 0.008856 ? x = (95.047 * ((a / 500) + y2 - (16 / 116))) / 7.787 : 95.047 * Math.pow((a / 500) + y2, 3);\n\n z = z / 108.883 <= 0.008859 ? z = (108.883 * (y2 - (b / 200) - (16 / 116))) / 7.787 : 108.883 * Math.pow(y2 - (b / 200), 3);\n\n return [x, y, z];\n}\n\nfunction lab2lch(lab) {\n var l = lab[0],\n a = lab[1],\n b = lab[2],\n hr, h, c;\n\n hr = Math.atan2(b, a);\n h = hr * 360 / 2 / Math.PI;\n if (h < 0) {\n h += 360;\n }\n c = Math.sqrt(a * a + b * b);\n return [l, c, h];\n}\n\nfunction lab2rgb(args) {\n return xyz2rgb(lab2xyz(args));\n}\n\nfunction lch2lab(lch) {\n var l = lch[0],\n c = lch[1],\n h = lch[2],\n a, b, hr;\n\n hr = h / 360 * 2 * Math.PI;\n a = c * Math.cos(hr);\n b = c * Math.sin(hr);\n return [l, a, b];\n}\n\nfunction lch2xyz(args) {\n return lab2xyz(lch2lab(args));\n}\n\nfunction lch2rgb(args) {\n return lab2rgb(lch2lab(args));\n}\n\nfunction keyword2rgb(keyword) {\n return cssKeywords[keyword];\n}\n\nfunction keyword2hsl(args) {\n return rgb2hsl(keyword2rgb(args));\n}\n\nfunction keyword2hsv(args) {\n return rgb2hsv(keyword2rgb(args));\n}\n\nfunction keyword2hwb(args) {\n return rgb2hwb(keyword2rgb(args));\n}\n\nfunction keyword2cmyk(args) {\n return rgb2cmyk(keyword2rgb(args));\n}\n\nfunction keyword2lab(args) {\n return rgb2lab(keyword2rgb(args));\n}\n\nfunction keyword2xyz(args) {\n return rgb2xyz(keyword2rgb(args));\n}\n\nvar cssKeywords = {\n aliceblue: [240,248,255],\n antiquewhite: [250,235,215],\n aqua: [0,255,255],\n aquamarine: [127,255,212],\n azure: [240,255,255],\n beige: [245,245,220],\n bisque: [255,228,196],\n black: [0,0,0],\n blanchedalmond: [255,235,205],\n blue: [0,0,255],\n blueviolet: [138,43,226],\n brown: [165,42,42],\n burlywood: [222,184,135],\n cadetblue: [95,158,160],\n chartreuse: [127,255,0],\n chocolate: [210,105,30],\n coral: [255,127,80],\n cornflowerblue: [100,149,237],\n cornsilk: [255,248,220],\n crimson: [220,20,60],\n cyan: [0,255,255],\n darkblue: [0,0,139],\n darkcyan: [0,139,139],\n darkgoldenrod: [184,134,11],\n darkgray: [169,169,169],\n darkgreen: [0,100,0],\n darkgrey: [169,169,169],\n darkkhaki: [189,183,107],\n darkmagenta: [139,0,139],\n darkolivegreen: [85,107,47],\n darkorange: [255,140,0],\n darkorchid: [153,50,204],\n darkred: [139,0,0],\n darksalmon: [233,150,122],\n darkseagreen: [143,188,143],\n darkslateblue: [72,61,139],\n darkslategray: [47,79,79],\n darkslategrey: [47,79,79],\n darkturquoise: [0,206,209],\n darkviolet: [148,0,211],\n deeppink: [255,20,147],\n deepskyblue: [0,191,255],\n dimgray: [105,105,105],\n dimgrey: [105,105,105],\n dodgerblue: [30,144,255],\n firebrick: [178,34,34],\n floralwhite: [255,250,240],\n forestgreen: [34,139,34],\n fuchsia: [255,0,255],\n gainsboro: [220,220,220],\n ghostwhite: [248,248,255],\n gold: [255,215,0],\n goldenrod: [218,165,32],\n gray: [128,128,128],\n green: [0,128,0],\n greenyellow: [173,255,47],\n grey: [128,128,128],\n honeydew: [240,255,240],\n hotpink: [255,105,180],\n indianred: [205,92,92],\n indigo: [75,0,130],\n ivory: [255,255,240],\n khaki: [240,230,140],\n lavender: [230,230,250],\n lavenderblush: [255,240,245],\n lawngreen: [124,252,0],\n lemonchiffon: [255,250,205],\n lightblue: [173,216,230],\n lightcoral: [240,128,128],\n lightcyan: [224,255,255],\n lightgoldenrodyellow: [250,250,210],\n lightgray: [211,211,211],\n lightgreen: [144,238,144],\n lightgrey: [211,211,211],\n lightpink: [255,182,193],\n lightsalmon: [255,160,122],\n lightseagreen: [32,178,170],\n lightskyblue: [135,206,250],\n lightslategray: [119,136,153],\n lightslategrey: [119,136,153],\n lightsteelblue: [176,196,222],\n lightyellow: [255,255,224],\n lime: [0,255,0],\n limegreen: [50,205,50],\n linen: [250,240,230],\n magenta: [255,0,255],\n maroon: [128,0,0],\n mediumaquamarine: [102,205,170],\n mediumblue: [0,0,205],\n mediumorchid: [186,85,211],\n mediumpurple: [147,112,219],\n mediumseagreen: [60,179,113],\n mediumslateblue: [123,104,238],\n mediumspringgreen: [0,250,154],\n mediumturquoise: [72,209,204],\n mediumvioletred: [199,21,133],\n midnightblue: [25,25,112],\n mintcream: [245,255,250],\n mistyrose: [255,228,225],\n moccasin: [255,228,181],\n navajowhite: [255,222,173],\n navy: [0,0,128],\n oldlace: [253,245,230],\n olive: [128,128,0],\n olivedrab: [107,142,35],\n orange: [255,165,0],\n orangered: [255,69,0],\n orchid: [218,112,214],\n palegoldenrod: [238,232,170],\n palegreen: [152,251,152],\n paleturquoise: [175,238,238],\n palevioletred: [219,112,147],\n papayawhip: [255,239,213],\n peachpuff: [255,218,185],\n peru: [205,133,63],\n pink: [255,192,203],\n plum: [221,160,221],\n powderblue: [176,224,230],\n purple: [128,0,128],\n rebeccapurple: [102, 51, 153],\n red: [255,0,0],\n rosybrown: [188,143,143],\n royalblue: [65,105,225],\n saddlebrown: [139,69,19],\n salmon: [250,128,114],\n sandybrown: [244,164,96],\n seagreen: [46,139,87],\n seashell: [255,245,238],\n sienna: [160,82,45],\n silver: [192,192,192],\n skyblue: [135,206,235],\n slateblue: [106,90,205],\n slategray: [112,128,144],\n slategrey: [112,128,144],\n snow: [255,250,250],\n springgreen: [0,255,127],\n steelblue: [70,130,180],\n tan: [210,180,140],\n teal: [0,128,128],\n thistle: [216,191,216],\n tomato: [255,99,71],\n turquoise: [64,224,208],\n violet: [238,130,238],\n wheat: [245,222,179],\n white: [255,255,255],\n whitesmoke: [245,245,245],\n yellow: [255,255,0],\n yellowgreen: [154,205,50]\n};\n\nvar reverseKeywords = {};\nfor (var key in cssKeywords) {\n reverseKeywords[JSON.stringify(cssKeywords[key])] = key;\n}\n\nvar convert = function() {\n return new Converter();\n};\n\nfor (var func in conversions) {\n // export Raw versions\n convert[func + \"Raw\"] = (function(func) {\n // accept array or plain args\n return function(arg) {\n if (typeof arg == \"number\")\n arg = Array.prototype.slice.call(arguments);\n return conversions[func](arg);\n }\n })(func);\n\n var pair = /(\\w+)2(\\w+)/.exec(func),\n from = pair[1],\n to = pair[2];\n\n // export rgb2hsl and [\"rgb\"][\"hsl\"]\n convert[from] = convert[from] || {};\n\n convert[from][to] = convert[func] = (function(func) { \n return function(arg) {\n if (typeof arg == \"number\")\n arg = Array.prototype.slice.call(arguments);\n \n var val = conversions[func](arg);\n if (typeof val == \"string\" || val === undefined)\n return val; // keyword\n\n for (var i = 0; i < val.length; i++)\n val[i] = Math.round(val[i]);\n return val;\n }\n })(func);\n}\n\n\n/* Converter does lazy conversion and caching */\nvar Converter = function() {\n this.convs = {};\n};\n\n/* Either get the values for a space or\n set the values for a space, depending on args */\nConverter.prototype.routeSpace = function(space, args) {\n var values = args[0];\n if (values === undefined) {\n // color.rgb()\n return this.getValues(space);\n }\n // color.rgb(10, 10, 10)\n if (typeof values == \"number\") {\n values = Array.prototype.slice.call(args); \n }\n\n return this.setValues(space, values);\n};\n \n/* Set the values for a space, invalidating cache */\nConverter.prototype.setValues = function(space, values) {\n this.space = space;\n this.convs = {};\n this.convs[space] = values;\n return this;\n};\n\n/* Get the values for a space. If there's already\n a conversion for the space, fetch it, otherwise\n compute it */\nConverter.prototype.getValues = function(space) {\n var vals = this.convs[space];\n if (!vals) {\n var fspace = this.space,\n from = this.convs[fspace];\n vals = convert[fspace][space](from);\n\n this.convs[space] = vals;\n }\n return vals;\n};\n\n[\"rgb\", \"hsl\", \"hsv\", \"cmyk\", \"keyword\"].forEach(function(space) {\n Converter.prototype[space] = function(vals) {\n return this.routeSpace(space, arguments);\n };\n});\n\nvar colorConvert = convert;\n\nvar colorName = {\r\n\t\"aliceblue\": [240, 248, 255],\r\n\t\"antiquewhite\": [250, 235, 215],\r\n\t\"aqua\": [0, 255, 255],\r\n\t\"aquamarine\": [127, 255, 212],\r\n\t\"azure\": [240, 255, 255],\r\n\t\"beige\": [245, 245, 220],\r\n\t\"bisque\": [255, 228, 196],\r\n\t\"black\": [0, 0, 0],\r\n\t\"blanchedalmond\": [255, 235, 205],\r\n\t\"blue\": [0, 0, 255],\r\n\t\"blueviolet\": [138, 43, 226],\r\n\t\"brown\": [165, 42, 42],\r\n\t\"burlywood\": [222, 184, 135],\r\n\t\"cadetblue\": [95, 158, 160],\r\n\t\"chartreuse\": [127, 255, 0],\r\n\t\"chocolate\": [210, 105, 30],\r\n\t\"coral\": [255, 127, 80],\r\n\t\"cornflowerblue\": [100, 149, 237],\r\n\t\"cornsilk\": [255, 248, 220],\r\n\t\"crimson\": [220, 20, 60],\r\n\t\"cyan\": [0, 255, 255],\r\n\t\"darkblue\": [0, 0, 139],\r\n\t\"darkcyan\": [0, 139, 139],\r\n\t\"darkgoldenrod\": [184, 134, 11],\r\n\t\"darkgray\": [169, 169, 169],\r\n\t\"darkgreen\": [0, 100, 0],\r\n\t\"darkgrey\": [169, 169, 169],\r\n\t\"darkkhaki\": [189, 183, 107],\r\n\t\"darkmagenta\": [139, 0, 139],\r\n\t\"darkolivegreen\": [85, 107, 47],\r\n\t\"darkorange\": [255, 140, 0],\r\n\t\"darkorchid\": [153, 50, 204],\r\n\t\"darkred\": [139, 0, 0],\r\n\t\"darksalmon\": [233, 150, 122],\r\n\t\"darkseagreen\": [143, 188, 143],\r\n\t\"darkslateblue\": [72, 61, 139],\r\n\t\"darkslategray\": [47, 79, 79],\r\n\t\"darkslategrey\": [47, 79, 79],\r\n\t\"darkturquoise\": [0, 206, 209],\r\n\t\"darkviolet\": [148, 0, 211],\r\n\t\"deeppink\": [255, 20, 147],\r\n\t\"deepskyblue\": [0, 191, 255],\r\n\t\"dimgray\": [105, 105, 105],\r\n\t\"dimgrey\": [105, 105, 105],\r\n\t\"dodgerblue\": [30, 144, 255],\r\n\t\"firebrick\": [178, 34, 34],\r\n\t\"floralwhite\": [255, 250, 240],\r\n\t\"forestgreen\": [34, 139, 34],\r\n\t\"fuchsia\": [255, 0, 255],\r\n\t\"gainsboro\": [220, 220, 220],\r\n\t\"ghostwhite\": [248, 248, 255],\r\n\t\"gold\": [255, 215, 0],\r\n\t\"goldenrod\": [218, 165, 32],\r\n\t\"gray\": [128, 128, 128],\r\n\t\"green\": [0, 128, 0],\r\n\t\"greenyellow\": [173, 255, 47],\r\n\t\"grey\": [128, 128, 128],\r\n\t\"honeydew\": [240, 255, 240],\r\n\t\"hotpink\": [255, 105, 180],\r\n\t\"indianred\": [205, 92, 92],\r\n\t\"indigo\": [75, 0, 130],\r\n\t\"ivory\": [255, 255, 240],\r\n\t\"khaki\": [240, 230, 140],\r\n\t\"lavender\": [230, 230, 250],\r\n\t\"lavenderblush\": [255, 240, 245],\r\n\t\"lawngreen\": [124, 252, 0],\r\n\t\"lemonchiffon\": [255, 250, 205],\r\n\t\"lightblue\": [173, 216, 230],\r\n\t\"lightcoral\": [240, 128, 128],\r\n\t\"lightcyan\": [224, 255, 255],\r\n\t\"lightgoldenrodyellow\": [250, 250, 210],\r\n\t\"lightgray\": [211, 211, 211],\r\n\t\"lightgreen\": [144, 238, 144],\r\n\t\"lightgrey\": [211, 211, 211],\r\n\t\"lightpink\": [255, 182, 193],\r\n\t\"lightsalmon\": [255, 160, 122],\r\n\t\"lightseagreen\": [32, 178, 170],\r\n\t\"lightskyblue\": [135, 206, 250],\r\n\t\"lightslategray\": [119, 136, 153],\r\n\t\"lightslategrey\": [119, 136, 153],\r\n\t\"lightsteelblue\": [176, 196, 222],\r\n\t\"lightyellow\": [255, 255, 224],\r\n\t\"lime\": [0, 255, 0],\r\n\t\"limegreen\": [50, 205, 50],\r\n\t\"linen\": [250, 240, 230],\r\n\t\"magenta\": [255, 0, 255],\r\n\t\"maroon\": [128, 0, 0],\r\n\t\"mediumaquamarine\": [102, 205, 170],\r\n\t\"mediumblue\": [0, 0, 205],\r\n\t\"mediumorchid\": [186, 85, 211],\r\n\t\"mediumpurple\": [147, 112, 219],\r\n\t\"mediumseagreen\": [60, 179, 113],\r\n\t\"mediumslateblue\": [123, 104, 238],\r\n\t\"mediumspringgreen\": [0, 250, 154],\r\n\t\"mediumturquoise\": [72, 209, 204],\r\n\t\"mediumvioletred\": [199, 21, 133],\r\n\t\"midnightblue\": [25, 25, 112],\r\n\t\"mintcream\": [245, 255, 250],\r\n\t\"mistyrose\": [255, 228, 225],\r\n\t\"moccasin\": [255, 228, 181],\r\n\t\"navajowhite\": [255, 222, 173],\r\n\t\"navy\": [0, 0, 128],\r\n\t\"oldlace\": [253, 245, 230],\r\n\t\"olive\": [128, 128, 0],\r\n\t\"olivedrab\": [107, 142, 35],\r\n\t\"orange\": [255, 165, 0],\r\n\t\"orangered\": [255, 69, 0],\r\n\t\"orchid\": [218, 112, 214],\r\n\t\"palegoldenrod\": [238, 232, 170],\r\n\t\"palegreen\": [152, 251, 152],\r\n\t\"paleturquoise\": [175, 238, 238],\r\n\t\"palevioletred\": [219, 112, 147],\r\n\t\"papayawhip\": [255, 239, 213],\r\n\t\"peachpuff\": [255, 218, 185],\r\n\t\"peru\": [205, 133, 63],\r\n\t\"pink\": [255, 192, 203],\r\n\t\"plum\": [221, 160, 221],\r\n\t\"powderblue\": [176, 224, 230],\r\n\t\"purple\": [128, 0, 128],\r\n\t\"rebeccapurple\": [102, 51, 153],\r\n\t\"red\": [255, 0, 0],\r\n\t\"rosybrown\": [188, 143, 143],\r\n\t\"royalblue\": [65, 105, 225],\r\n\t\"saddlebrown\": [139, 69, 19],\r\n\t\"salmon\": [250, 128, 114],\r\n\t\"sandybrown\": [244, 164, 96],\r\n\t\"seagreen\": [46, 139, 87],\r\n\t\"seashell\": [255, 245, 238],\r\n\t\"sienna\": [160, 82, 45],\r\n\t\"silver\": [192, 192, 192],\r\n\t\"skyblue\": [135, 206, 235],\r\n\t\"slateblue\": [106, 90, 205],\r\n\t\"slategray\": [112, 128, 144],\r\n\t\"slategrey\": [112, 128, 144],\r\n\t\"snow\": [255, 250, 250],\r\n\t\"springgreen\": [0, 255, 127],\r\n\t\"steelblue\": [70, 130, 180],\r\n\t\"tan\": [210, 180, 140],\r\n\t\"teal\": [0, 128, 128],\r\n\t\"thistle\": [216, 191, 216],\r\n\t\"tomato\": [255, 99, 71],\r\n\t\"turquoise\": [64, 224, 208],\r\n\t\"violet\": [238, 130, 238],\r\n\t\"wheat\": [245, 222, 179],\r\n\t\"white\": [255, 255, 255],\r\n\t\"whitesmoke\": [245, 245, 245],\r\n\t\"yellow\": [255, 255, 0],\r\n\t\"yellowgreen\": [154, 205, 50]\r\n};\n\n/* MIT license */\n\n\nvar colorString = {\n getRgba: getRgba,\n getHsla: getHsla,\n getRgb: getRgb,\n getHsl: getHsl,\n getHwb: getHwb,\n getAlpha: getAlpha,\n\n hexString: hexString,\n rgbString: rgbString,\n rgbaString: rgbaString,\n percentString: percentString,\n percentaString: percentaString,\n hslString: hslString,\n hslaString: hslaString,\n hwbString: hwbString,\n keyword: keyword\n};\n\nfunction getRgba(string) {\n if (!string) {\n return;\n }\n var abbr = /^#([a-fA-F0-9]{3,4})$/i,\n hex = /^#([a-fA-F0-9]{6}([a-fA-F0-9]{2})?)$/i,\n rgba = /^rgba?\\(\\s*([+-]?\\d+)\\s*,\\s*([+-]?\\d+)\\s*,\\s*([+-]?\\d+)\\s*(?:,\\s*([+-]?[\\d\\.]+)\\s*)?\\)$/i,\n per = /^rgba?\\(\\s*([+-]?[\\d\\.]+)\\%\\s*,\\s*([+-]?[\\d\\.]+)\\%\\s*,\\s*([+-]?[\\d\\.]+)\\%\\s*(?:,\\s*([+-]?[\\d\\.]+)\\s*)?\\)$/i,\n keyword = /(\\w+)/;\n\n var rgb = [0, 0, 0],\n a = 1,\n match = string.match(abbr),\n hexAlpha = \"\";\n if (match) {\n match = match[1];\n hexAlpha = match[3];\n for (var i = 0; i < rgb.length; i++) {\n rgb[i] = parseInt(match[i] + match[i], 16);\n }\n if (hexAlpha) {\n a = Math.round((parseInt(hexAlpha + hexAlpha, 16) / 255) * 100) / 100;\n }\n }\n else if (match = string.match(hex)) {\n hexAlpha = match[2];\n match = match[1];\n for (var i = 0; i < rgb.length; i++) {\n rgb[i] = parseInt(match.slice(i * 2, i * 2 + 2), 16);\n }\n if (hexAlpha) {\n a = Math.round((parseInt(hexAlpha, 16) / 255) * 100) / 100;\n }\n }\n else if (match = string.match(rgba)) {\n for (var i = 0; i < rgb.length; i++) {\n rgb[i] = parseInt(match[i + 1]);\n }\n a = parseFloat(match[4]);\n }\n else if (match = string.match(per)) {\n for (var i = 0; i < rgb.length; i++) {\n rgb[i] = Math.round(parseFloat(match[i + 1]) * 2.55);\n }\n a = parseFloat(match[4]);\n }\n else if (match = string.match(keyword)) {\n if (match[1] == \"transparent\") {\n return [0, 0, 0, 0];\n }\n rgb = colorName[match[1]];\n if (!rgb) {\n return;\n }\n }\n\n for (var i = 0; i < rgb.length; i++) {\n rgb[i] = scale(rgb[i], 0, 255);\n }\n if (!a && a != 0) {\n a = 1;\n }\n else {\n a = scale(a, 0, 1);\n }\n rgb[3] = a;\n return rgb;\n}\n\nfunction getHsla(string) {\n if (!string) {\n return;\n }\n var hsl = /^hsla?\\(\\s*([+-]?\\d+)(?:deg)?\\s*,\\s*([+-]?[\\d\\.]+)%\\s*,\\s*([+-]?[\\d\\.]+)%\\s*(?:,\\s*([+-]?[\\d\\.]+)\\s*)?\\)/;\n var match = string.match(hsl);\n if (match) {\n var alpha = parseFloat(match[4]);\n var h = scale(parseInt(match[1]), 0, 360),\n s = scale(parseFloat(match[2]), 0, 100),\n l = scale(parseFloat(match[3]), 0, 100),\n a = scale(isNaN(alpha) ? 1 : alpha, 0, 1);\n return [h, s, l, a];\n }\n}\n\nfunction getHwb(string) {\n if (!string) {\n return;\n }\n var hwb = /^hwb\\(\\s*([+-]?\\d+)(?:deg)?\\s*,\\s*([+-]?[\\d\\.]+)%\\s*,\\s*([+-]?[\\d\\.]+)%\\s*(?:,\\s*([+-]?[\\d\\.]+)\\s*)?\\)/;\n var match = string.match(hwb);\n if (match) {\n var alpha = parseFloat(match[4]);\n var h = scale(parseInt(match[1]), 0, 360),\n w = scale(parseFloat(match[2]), 0, 100),\n b = scale(parseFloat(match[3]), 0, 100),\n a = scale(isNaN(alpha) ? 1 : alpha, 0, 1);\n return [h, w, b, a];\n }\n}\n\nfunction getRgb(string) {\n var rgba = getRgba(string);\n return rgba && rgba.slice(0, 3);\n}\n\nfunction getHsl(string) {\n var hsla = getHsla(string);\n return hsla && hsla.slice(0, 3);\n}\n\nfunction getAlpha(string) {\n var vals = getRgba(string);\n if (vals) {\n return vals[3];\n }\n else if (vals = getHsla(string)) {\n return vals[3];\n }\n else if (vals = getHwb(string)) {\n return vals[3];\n }\n}\n\n// generators\nfunction hexString(rgba, a) {\n var a = (a !== undefined && rgba.length === 3) ? a : rgba[3];\n return \"#\" + hexDouble(rgba[0]) \n + hexDouble(rgba[1])\n + hexDouble(rgba[2])\n + (\n (a >= 0 && a < 1)\n ? hexDouble(Math.round(a * 255))\n : \"\"\n );\n}\n\nfunction rgbString(rgba, alpha) {\n if (alpha < 1 || (rgba[3] && rgba[3] < 1)) {\n return rgbaString(rgba, alpha);\n }\n return \"rgb(\" + rgba[0] + \", \" + rgba[1] + \", \" + rgba[2] + \")\";\n}\n\nfunction rgbaString(rgba, alpha) {\n if (alpha === undefined) {\n alpha = (rgba[3] !== undefined ? rgba[3] : 1);\n }\n return \"rgba(\" + rgba[0] + \", \" + rgba[1] + \", \" + rgba[2]\n + \", \" + alpha + \")\";\n}\n\nfunction percentString(rgba, alpha) {\n if (alpha < 1 || (rgba[3] && rgba[3] < 1)) {\n return percentaString(rgba, alpha);\n }\n var r = Math.round(rgba[0]/255 * 100),\n g = Math.round(rgba[1]/255 * 100),\n b = Math.round(rgba[2]/255 * 100);\n\n return \"rgb(\" + r + \"%, \" + g + \"%, \" + b + \"%)\";\n}\n\nfunction percentaString(rgba, alpha) {\n var r = Math.round(rgba[0]/255 * 100),\n g = Math.round(rgba[1]/255 * 100),\n b = Math.round(rgba[2]/255 * 100);\n return \"rgba(\" + r + \"%, \" + g + \"%, \" + b + \"%, \" + (alpha || rgba[3] || 1) + \")\";\n}\n\nfunction hslString(hsla, alpha) {\n if (alpha < 1 || (hsla[3] && hsla[3] < 1)) {\n return hslaString(hsla, alpha);\n }\n return \"hsl(\" + hsla[0] + \", \" + hsla[1] + \"%, \" + hsla[2] + \"%)\";\n}\n\nfunction hslaString(hsla, alpha) {\n if (alpha === undefined) {\n alpha = (hsla[3] !== undefined ? hsla[3] : 1);\n }\n return \"hsla(\" + hsla[0] + \", \" + hsla[1] + \"%, \" + hsla[2] + \"%, \"\n + alpha + \")\";\n}\n\n// hwb is a bit different than rgb(a) & hsl(a) since there is no alpha specific syntax\n// (hwb have alpha optional & 1 is default value)\nfunction hwbString(hwb, alpha) {\n if (alpha === undefined) {\n alpha = (hwb[3] !== undefined ? hwb[3] : 1);\n }\n return \"hwb(\" + hwb[0] + \", \" + hwb[1] + \"%, \" + hwb[2] + \"%\"\n + (alpha !== undefined && alpha !== 1 ? \", \" + alpha : \"\") + \")\";\n}\n\nfunction keyword(rgb) {\n return reverseNames[rgb.slice(0, 3)];\n}\n\n// helpers\nfunction scale(num, min, max) {\n return Math.min(Math.max(min, num), max);\n}\n\nfunction hexDouble(num) {\n var str = num.toString(16).toUpperCase();\n return (str.length < 2) ? \"0\" + str : str;\n}\n\n\n//create a list of reverse color names\nvar reverseNames = {};\nfor (var name in colorName) {\n reverseNames[colorName[name]] = name;\n}\n\n/* MIT license */\n\n\n\nvar Color = function (obj) {\n\tif (obj instanceof Color) {\n\t\treturn obj;\n\t}\n\tif (!(this instanceof Color)) {\n\t\treturn new Color(obj);\n\t}\n\n\tthis.valid = false;\n\tthis.values = {\n\t\trgb: [0, 0, 0],\n\t\thsl: [0, 0, 0],\n\t\thsv: [0, 0, 0],\n\t\thwb: [0, 0, 0],\n\t\tcmyk: [0, 0, 0, 0],\n\t\talpha: 1\n\t};\n\n\t// parse Color() argument\n\tvar vals;\n\tif (typeof obj === 'string') {\n\t\tvals = colorString.getRgba(obj);\n\t\tif (vals) {\n\t\t\tthis.setValues('rgb', vals);\n\t\t} else if (vals = colorString.getHsla(obj)) {\n\t\t\tthis.setValues('hsl', vals);\n\t\t} else if (vals = colorString.getHwb(obj)) {\n\t\t\tthis.setValues('hwb', vals);\n\t\t}\n\t} else if (typeof obj === 'object') {\n\t\tvals = obj;\n\t\tif (vals.r !== undefined || vals.red !== undefined) {\n\t\t\tthis.setValues('rgb', vals);\n\t\t} else if (vals.l !== undefined || vals.lightness !== undefined) {\n\t\t\tthis.setValues('hsl', vals);\n\t\t} else if (vals.v !== undefined || vals.value !== undefined) {\n\t\t\tthis.setValues('hsv', vals);\n\t\t} else if (vals.w !== undefined || vals.whiteness !== undefined) {\n\t\t\tthis.setValues('hwb', vals);\n\t\t} else if (vals.c !== undefined || vals.cyan !== undefined) {\n\t\t\tthis.setValues('cmyk', vals);\n\t\t}\n\t}\n};\n\nColor.prototype = {\n\tisValid: function () {\n\t\treturn this.valid;\n\t},\n\trgb: function () {\n\t\treturn this.setSpace('rgb', arguments);\n\t},\n\thsl: function () {\n\t\treturn this.setSpace('hsl', arguments);\n\t},\n\thsv: function () {\n\t\treturn this.setSpace('hsv', arguments);\n\t},\n\thwb: function () {\n\t\treturn this.setSpace('hwb', arguments);\n\t},\n\tcmyk: function () {\n\t\treturn this.setSpace('cmyk', arguments);\n\t},\n\n\trgbArray: function () {\n\t\treturn this.values.rgb;\n\t},\n\thslArray: function () {\n\t\treturn this.values.hsl;\n\t},\n\thsvArray: function () {\n\t\treturn this.values.hsv;\n\t},\n\thwbArray: function () {\n\t\tvar values = this.values;\n\t\tif (values.alpha !== 1) {\n\t\t\treturn values.hwb.concat([values.alpha]);\n\t\t}\n\t\treturn values.hwb;\n\t},\n\tcmykArray: function () {\n\t\treturn this.values.cmyk;\n\t},\n\trgbaArray: function () {\n\t\tvar values = this.values;\n\t\treturn values.rgb.concat([values.alpha]);\n\t},\n\thslaArray: function () {\n\t\tvar values = this.values;\n\t\treturn values.hsl.concat([values.alpha]);\n\t},\n\talpha: function (val) {\n\t\tif (val === undefined) {\n\t\t\treturn this.values.alpha;\n\t\t}\n\t\tthis.setValues('alpha', val);\n\t\treturn this;\n\t},\n\n\tred: function (val) {\n\t\treturn this.setChannel('rgb', 0, val);\n\t},\n\tgreen: function (val) {\n\t\treturn this.setChannel('rgb', 1, val);\n\t},\n\tblue: function (val) {\n\t\treturn this.setChannel('rgb', 2, val);\n\t},\n\thue: function (val) {\n\t\tif (val) {\n\t\t\tval %= 360;\n\t\t\tval = val < 0 ? 360 + val : val;\n\t\t}\n\t\treturn this.setChannel('hsl', 0, val);\n\t},\n\tsaturation: function (val) {\n\t\treturn this.setChannel('hsl', 1, val);\n\t},\n\tlightness: function (val) {\n\t\treturn this.setChannel('hsl', 2, val);\n\t},\n\tsaturationv: function (val) {\n\t\treturn this.setChannel('hsv', 1, val);\n\t},\n\twhiteness: function (val) {\n\t\treturn this.setChannel('hwb', 1, val);\n\t},\n\tblackness: function (val) {\n\t\treturn this.setChannel('hwb', 2, val);\n\t},\n\tvalue: function (val) {\n\t\treturn this.setChannel('hsv', 2, val);\n\t},\n\tcyan: function (val) {\n\t\treturn this.setChannel('cmyk', 0, val);\n\t},\n\tmagenta: function (val) {\n\t\treturn this.setChannel('cmyk', 1, val);\n\t},\n\tyellow: function (val) {\n\t\treturn this.setChannel('cmyk', 2, val);\n\t},\n\tblack: function (val) {\n\t\treturn this.setChannel('cmyk', 3, val);\n\t},\n\n\thexString: function () {\n\t\treturn colorString.hexString(this.values.rgb);\n\t},\n\trgbString: function () {\n\t\treturn colorString.rgbString(this.values.rgb, this.values.alpha);\n\t},\n\trgbaString: function () {\n\t\treturn colorString.rgbaString(this.values.rgb, this.values.alpha);\n\t},\n\tpercentString: function () {\n\t\treturn colorString.percentString(this.values.rgb, this.values.alpha);\n\t},\n\thslString: function () {\n\t\treturn colorString.hslString(this.values.hsl, this.values.alpha);\n\t},\n\thslaString: function () {\n\t\treturn colorString.hslaString(this.values.hsl, this.values.alpha);\n\t},\n\thwbString: function () {\n\t\treturn colorString.hwbString(this.values.hwb, this.values.alpha);\n\t},\n\tkeyword: function () {\n\t\treturn colorString.keyword(this.values.rgb, this.values.alpha);\n\t},\n\n\trgbNumber: function () {\n\t\tvar rgb = this.values.rgb;\n\t\treturn (rgb[0] << 16) | (rgb[1] << 8) | rgb[2];\n\t},\n\n\tluminosity: function () {\n\t\t// http://www.w3.org/TR/WCAG20/#relativeluminancedef\n\t\tvar rgb = this.values.rgb;\n\t\tvar lum = [];\n\t\tfor (var i = 0; i < rgb.length; i++) {\n\t\t\tvar chan = rgb[i] / 255;\n\t\t\tlum[i] = (chan <= 0.03928) ? chan / 12.92 : Math.pow(((chan + 0.055) / 1.055), 2.4);\n\t\t}\n\t\treturn 0.2126 * lum[0] + 0.7152 * lum[1] + 0.0722 * lum[2];\n\t},\n\n\tcontrast: function (color2) {\n\t\t// http://www.w3.org/TR/WCAG20/#contrast-ratiodef\n\t\tvar lum1 = this.luminosity();\n\t\tvar lum2 = color2.luminosity();\n\t\tif (lum1 > lum2) {\n\t\t\treturn (lum1 + 0.05) / (lum2 + 0.05);\n\t\t}\n\t\treturn (lum2 + 0.05) / (lum1 + 0.05);\n\t},\n\n\tlevel: function (color2) {\n\t\tvar contrastRatio = this.contrast(color2);\n\t\tif (contrastRatio >= 7.1) {\n\t\t\treturn 'AAA';\n\t\t}\n\n\t\treturn (contrastRatio >= 4.5) ? 'AA' : '';\n\t},\n\n\tdark: function () {\n\t\t// YIQ equation from http://24ways.org/2010/calculating-color-contrast\n\t\tvar rgb = this.values.rgb;\n\t\tvar yiq = (rgb[0] * 299 + rgb[1] * 587 + rgb[2] * 114) / 1000;\n\t\treturn yiq < 128;\n\t},\n\n\tlight: function () {\n\t\treturn !this.dark();\n\t},\n\n\tnegate: function () {\n\t\tvar rgb = [];\n\t\tfor (var i = 0; i < 3; i++) {\n\t\t\trgb[i] = 255 - this.values.rgb[i];\n\t\t}\n\t\tthis.setValues('rgb', rgb);\n\t\treturn this;\n\t},\n\n\tlighten: function (ratio) {\n\t\tvar hsl = this.values.hsl;\n\t\thsl[2] += hsl[2] * ratio;\n\t\tthis.setValues('hsl', hsl);\n\t\treturn this;\n\t},\n\n\tdarken: function (ratio) {\n\t\tvar hsl = this.values.hsl;\n\t\thsl[2] -= hsl[2] * ratio;\n\t\tthis.setValues('hsl', hsl);\n\t\treturn this;\n\t},\n\n\tsaturate: function (ratio) {\n\t\tvar hsl = this.values.hsl;\n\t\thsl[1] += hsl[1] * ratio;\n\t\tthis.setValues('hsl', hsl);\n\t\treturn this;\n\t},\n\n\tdesaturate: function (ratio) {\n\t\tvar hsl = this.values.hsl;\n\t\thsl[1] -= hsl[1] * ratio;\n\t\tthis.setValues('hsl', hsl);\n\t\treturn this;\n\t},\n\n\twhiten: function (ratio) {\n\t\tvar hwb = this.values.hwb;\n\t\thwb[1] += hwb[1] * ratio;\n\t\tthis.setValues('hwb', hwb);\n\t\treturn this;\n\t},\n\n\tblacken: function (ratio) {\n\t\tvar hwb = this.values.hwb;\n\t\thwb[2] += hwb[2] * ratio;\n\t\tthis.setValues('hwb', hwb);\n\t\treturn this;\n\t},\n\n\tgreyscale: function () {\n\t\tvar rgb = this.values.rgb;\n\t\t// http://en.wikipedia.org/wiki/Grayscale#Converting_color_to_grayscale\n\t\tvar val = rgb[0] * 0.3 + rgb[1] * 0.59 + rgb[2] * 0.11;\n\t\tthis.setValues('rgb', [val, val, val]);\n\t\treturn this;\n\t},\n\n\tclearer: function (ratio) {\n\t\tvar alpha = this.values.alpha;\n\t\tthis.setValues('alpha', alpha - (alpha * ratio));\n\t\treturn this;\n\t},\n\n\topaquer: function (ratio) {\n\t\tvar alpha = this.values.alpha;\n\t\tthis.setValues('alpha', alpha + (alpha * ratio));\n\t\treturn this;\n\t},\n\n\trotate: function (degrees) {\n\t\tvar hsl = this.values.hsl;\n\t\tvar hue = (hsl[0] + degrees) % 360;\n\t\thsl[0] = hue < 0 ? 360 + hue : hue;\n\t\tthis.setValues('hsl', hsl);\n\t\treturn this;\n\t},\n\n\t/**\n\t * Ported from sass implementation in C\n\t * https://github.com/sass/libsass/blob/0e6b4a2850092356aa3ece07c6b249f0221caced/functions.cpp#L209\n\t */\n\tmix: function (mixinColor, weight) {\n\t\tvar color1 = this;\n\t\tvar color2 = mixinColor;\n\t\tvar p = weight === undefined ? 0.5 : weight;\n\n\t\tvar w = 2 * p - 1;\n\t\tvar a = color1.alpha() - color2.alpha();\n\n\t\tvar w1 = (((w * a === -1) ? w : (w + a) / (1 + w * a)) + 1) / 2.0;\n\t\tvar w2 = 1 - w1;\n\n\t\treturn this\n\t\t\t.rgb(\n\t\t\t\tw1 * color1.red() + w2 * color2.red(),\n\t\t\t\tw1 * color1.green() + w2 * color2.green(),\n\t\t\t\tw1 * color1.blue() + w2 * color2.blue()\n\t\t\t)\n\t\t\t.alpha(color1.alpha() * p + color2.alpha() * (1 - p));\n\t},\n\n\ttoJSON: function () {\n\t\treturn this.rgb();\n\t},\n\n\tclone: function () {\n\t\t// NOTE(SB): using node-clone creates a dependency to Buffer when using browserify,\n\t\t// making the final build way to big to embed in Chart.js. So let's do it manually,\n\t\t// assuming that values to clone are 1 dimension arrays containing only numbers,\n\t\t// except 'alpha' which is a number.\n\t\tvar result = new Color();\n\t\tvar source = this.values;\n\t\tvar target = result.values;\n\t\tvar value, type;\n\n\t\tfor (var prop in source) {\n\t\t\tif (source.hasOwnProperty(prop)) {\n\t\t\t\tvalue = source[prop];\n\t\t\t\ttype = ({}).toString.call(value);\n\t\t\t\tif (type === '[object Array]') {\n\t\t\t\t\ttarget[prop] = value.slice(0);\n\t\t\t\t} else if (type === '[object Number]') {\n\t\t\t\t\ttarget[prop] = value;\n\t\t\t\t} else {\n\t\t\t\t\tconsole.error('unexpected color value:', value);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t}\n};\n\nColor.prototype.spaces = {\n\trgb: ['red', 'green', 'blue'],\n\thsl: ['hue', 'saturation', 'lightness'],\n\thsv: ['hue', 'saturation', 'value'],\n\thwb: ['hue', 'whiteness', 'blackness'],\n\tcmyk: ['cyan', 'magenta', 'yellow', 'black']\n};\n\nColor.prototype.maxes = {\n\trgb: [255, 255, 255],\n\thsl: [360, 100, 100],\n\thsv: [360, 100, 100],\n\thwb: [360, 100, 100],\n\tcmyk: [100, 100, 100, 100]\n};\n\nColor.prototype.getValues = function (space) {\n\tvar values = this.values;\n\tvar vals = {};\n\n\tfor (var i = 0; i < space.length; i++) {\n\t\tvals[space.charAt(i)] = values[space][i];\n\t}\n\n\tif (values.alpha !== 1) {\n\t\tvals.a = values.alpha;\n\t}\n\n\t// {r: 255, g: 255, b: 255, a: 0.4}\n\treturn vals;\n};\n\nColor.prototype.setValues = function (space, vals) {\n\tvar values = this.values;\n\tvar spaces = this.spaces;\n\tvar maxes = this.maxes;\n\tvar alpha = 1;\n\tvar i;\n\n\tthis.valid = true;\n\n\tif (space === 'alpha') {\n\t\talpha = vals;\n\t} else if (vals.length) {\n\t\t// [10, 10, 10]\n\t\tvalues[space] = vals.slice(0, space.length);\n\t\talpha = vals[space.length];\n\t} else if (vals[space.charAt(0)] !== undefined) {\n\t\t// {r: 10, g: 10, b: 10}\n\t\tfor (i = 0; i < space.length; i++) {\n\t\t\tvalues[space][i] = vals[space.charAt(i)];\n\t\t}\n\n\t\talpha = vals.a;\n\t} else if (vals[spaces[space][0]] !== undefined) {\n\t\t// {red: 10, green: 10, blue: 10}\n\t\tvar chans = spaces[space];\n\n\t\tfor (i = 0; i < space.length; i++) {\n\t\t\tvalues[space][i] = vals[chans[i]];\n\t\t}\n\n\t\talpha = vals.alpha;\n\t}\n\n\tvalues.alpha = Math.max(0, Math.min(1, (alpha === undefined ? values.alpha : alpha)));\n\n\tif (space === 'alpha') {\n\t\treturn false;\n\t}\n\n\tvar capped;\n\n\t// cap values of the space prior converting all values\n\tfor (i = 0; i < space.length; i++) {\n\t\tcapped = Math.max(0, Math.min(maxes[space][i], values[space][i]));\n\t\tvalues[space][i] = Math.round(capped);\n\t}\n\n\t// convert to all the other color spaces\n\tfor (var sname in spaces) {\n\t\tif (sname !== space) {\n\t\t\tvalues[sname] = colorConvert[space][sname](values[space]);\n\t\t}\n\t}\n\n\treturn true;\n};\n\nColor.prototype.setSpace = function (space, args) {\n\tvar vals = args[0];\n\n\tif (vals === undefined) {\n\t\t// color.rgb()\n\t\treturn this.getValues(space);\n\t}\n\n\t// color.rgb(10, 10, 10)\n\tif (typeof vals === 'number') {\n\t\tvals = Array.prototype.slice.call(args);\n\t}\n\n\tthis.setValues(space, vals);\n\treturn this;\n};\n\nColor.prototype.setChannel = function (space, index, val) {\n\tvar svalues = this.values[space];\n\tif (val === undefined) {\n\t\t// color.red()\n\t\treturn svalues[index];\n\t} else if (val === svalues[index]) {\n\t\t// color.red(color.red())\n\t\treturn this;\n\t}\n\n\t// color.red(100)\n\tsvalues[index] = val;\n\tthis.setValues(space, svalues);\n\n\treturn this;\n};\n\nif (typeof window !== 'undefined') {\n\twindow.Color = Color;\n}\n\nvar chartjsColor = Color;\n\n/**\n * @namespace Chart.helpers\n */\nvar helpers = {\n\t/**\n\t * An empty function that can be used, for example, for optional callback.\n\t */\n\tnoop: function() {},\n\n\t/**\n\t * Returns a unique id, sequentially generated from a global variable.\n\t * @returns {number}\n\t * @function\n\t */\n\tuid: (function() {\n\t\tvar id = 0;\n\t\treturn function() {\n\t\t\treturn id++;\n\t\t};\n\t}()),\n\n\t/**\n\t * Returns true if `value` is neither null nor undefined, else returns false.\n\t * @param {*} value - The value to test.\n\t * @returns {boolean}\n\t * @since 2.7.0\n\t */\n\tisNullOrUndef: function(value) {\n\t\treturn value === null || typeof value === 'undefined';\n\t},\n\n\t/**\n\t * Returns true if `value` is an array (including typed arrays), else returns false.\n\t * @param {*} value - The value to test.\n\t * @returns {boolean}\n\t * @function\n\t */\n\tisArray: function(value) {\n\t\tif (Array.isArray && Array.isArray(value)) {\n\t\t\treturn true;\n\t\t}\n\t\tvar type = Object.prototype.toString.call(value);\n\t\tif (type.substr(0, 7) === '[object' && type.substr(-6) === 'Array]') {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t},\n\n\t/**\n\t * Returns true if `value` is an object (excluding null), else returns false.\n\t * @param {*} value - The value to test.\n\t * @returns {boolean}\n\t * @since 2.7.0\n\t */\n\tisObject: function(value) {\n\t\treturn value !== null && Object.prototype.toString.call(value) === '[object Object]';\n\t},\n\n\t/**\n\t * Returns true if `value` is a finite number, else returns false\n\t * @param {*} value - The value to test.\n\t * @returns {boolean}\n\t */\n\tisFinite: function(value) {\n\t\treturn (typeof value === 'number' || value instanceof Number) && isFinite(value);\n\t},\n\n\t/**\n\t * Returns `value` if defined, else returns `defaultValue`.\n\t * @param {*} value - The value to return if defined.\n\t * @param {*} defaultValue - The value to return if `value` is undefined.\n\t * @returns {*}\n\t */\n\tvalueOrDefault: function(value, defaultValue) {\n\t\treturn typeof value === 'undefined' ? defaultValue : value;\n\t},\n\n\t/**\n\t * Returns value at the given `index` in array if defined, else returns `defaultValue`.\n\t * @param {Array} value - The array to lookup for value at `index`.\n\t * @param {number} index - The index in `value` to lookup for value.\n\t * @param {*} defaultValue - The value to return if `value[index]` is undefined.\n\t * @returns {*}\n\t */\n\tvalueAtIndexOrDefault: function(value, index, defaultValue) {\n\t\treturn helpers.valueOrDefault(helpers.isArray(value) ? value[index] : value, defaultValue);\n\t},\n\n\t/**\n\t * Calls `fn` with the given `args` in the scope defined by `thisArg` and returns the\n\t * value returned by `fn`. If `fn` is not a function, this method returns undefined.\n\t * @param {function} fn - The function to call.\n\t * @param {Array|undefined|null} args - The arguments with which `fn` should be called.\n\t * @param {object} [thisArg] - The value of `this` provided for the call to `fn`.\n\t * @returns {*}\n\t */\n\tcallback: function(fn, args, thisArg) {\n\t\tif (fn && typeof fn.call === 'function') {\n\t\t\treturn fn.apply(thisArg, args);\n\t\t}\n\t},\n\n\t/**\n\t * Note(SB) for performance sake, this method should only be used when loopable type\n\t * is unknown or in none intensive code (not called often and small loopable). Else\n\t * it's preferable to use a regular for() loop and save extra function calls.\n\t * @param {object|Array} loopable - The object or array to be iterated.\n\t * @param {function} fn - The function to call for each item.\n\t * @param {object} [thisArg] - The value of `this` provided for the call to `fn`.\n\t * @param {boolean} [reverse] - If true, iterates backward on the loopable.\n\t */\n\teach: function(loopable, fn, thisArg, reverse) {\n\t\tvar i, len, keys;\n\t\tif (helpers.isArray(loopable)) {\n\t\t\tlen = loopable.length;\n\t\t\tif (reverse) {\n\t\t\t\tfor (i = len - 1; i >= 0; i--) {\n\t\t\t\t\tfn.call(thisArg, loopable[i], i);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor (i = 0; i < len; i++) {\n\t\t\t\t\tfn.call(thisArg, loopable[i], i);\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (helpers.isObject(loopable)) {\n\t\t\tkeys = Object.keys(loopable);\n\t\t\tlen = keys.length;\n\t\t\tfor (i = 0; i < len; i++) {\n\t\t\t\tfn.call(thisArg, loopable[keys[i]], keys[i]);\n\t\t\t}\n\t\t}\n\t},\n\n\t/**\n\t * Returns true if the `a0` and `a1` arrays have the same content, else returns false.\n\t * @see https://stackoverflow.com/a/14853974\n\t * @param {Array} a0 - The array to compare\n\t * @param {Array} a1 - The array to compare\n\t * @returns {boolean}\n\t */\n\tarrayEquals: function(a0, a1) {\n\t\tvar i, ilen, v0, v1;\n\n\t\tif (!a0 || !a1 || a0.length !== a1.length) {\n\t\t\treturn false;\n\t\t}\n\n\t\tfor (i = 0, ilen = a0.length; i < ilen; ++i) {\n\t\t\tv0 = a0[i];\n\t\t\tv1 = a1[i];\n\n\t\t\tif (v0 instanceof Array && v1 instanceof Array) {\n\t\t\t\tif (!helpers.arrayEquals(v0, v1)) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t} else if (v0 !== v1) {\n\t\t\t\t// NOTE: two different object instances will never be equal: {x:20} != {x:20}\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t},\n\n\t/**\n\t * Returns a deep copy of `source` without keeping references on objects and arrays.\n\t * @param {*} source - The value to clone.\n\t * @returns {*}\n\t */\n\tclone: function(source) {\n\t\tif (helpers.isArray(source)) {\n\t\t\treturn source.map(helpers.clone);\n\t\t}\n\n\t\tif (helpers.isObject(source)) {\n\t\t\tvar target = {};\n\t\t\tvar keys = Object.keys(source);\n\t\t\tvar klen = keys.length;\n\t\t\tvar k = 0;\n\n\t\t\tfor (; k < klen; ++k) {\n\t\t\t\ttarget[keys[k]] = helpers.clone(source[keys[k]]);\n\t\t\t}\n\n\t\t\treturn target;\n\t\t}\n\n\t\treturn source;\n\t},\n\n\t/**\n\t * The default merger when Chart.helpers.merge is called without merger option.\n\t * Note(SB): also used by mergeConfig and mergeScaleConfig as fallback.\n\t * @private\n\t */\n\t_merger: function(key, target, source, options) {\n\t\tvar tval = target[key];\n\t\tvar sval = source[key];\n\n\t\tif (helpers.isObject(tval) && helpers.isObject(sval)) {\n\t\t\thelpers.merge(tval, sval, options);\n\t\t} else {\n\t\t\ttarget[key] = helpers.clone(sval);\n\t\t}\n\t},\n\n\t/**\n\t * Merges source[key] in target[key] only if target[key] is undefined.\n\t * @private\n\t */\n\t_mergerIf: function(key, target, source) {\n\t\tvar tval = target[key];\n\t\tvar sval = source[key];\n\n\t\tif (helpers.isObject(tval) && helpers.isObject(sval)) {\n\t\t\thelpers.mergeIf(tval, sval);\n\t\t} else if (!target.hasOwnProperty(key)) {\n\t\t\ttarget[key] = helpers.clone(sval);\n\t\t}\n\t},\n\n\t/**\n\t * Recursively deep copies `source` properties into `target` with the given `options`.\n\t * IMPORTANT: `target` is not cloned and will be updated with `source` properties.\n\t * @param {object} target - The target object in which all sources are merged into.\n\t * @param {object|object[]} source - Object(s) to merge into `target`.\n\t * @param {object} [options] - Merging options:\n\t * @param {function} [options.merger] - The merge method (key, target, source, options)\n\t * @returns {object} The `target` object.\n\t */\n\tmerge: function(target, source, options) {\n\t\tvar sources = helpers.isArray(source) ? source : [source];\n\t\tvar ilen = sources.length;\n\t\tvar merge, i, keys, klen, k;\n\n\t\tif (!helpers.isObject(target)) {\n\t\t\treturn target;\n\t\t}\n\n\t\toptions = options || {};\n\t\tmerge = options.merger || helpers._merger;\n\n\t\tfor (i = 0; i < ilen; ++i) {\n\t\t\tsource = sources[i];\n\t\t\tif (!helpers.isObject(source)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tkeys = Object.keys(source);\n\t\t\tfor (k = 0, klen = keys.length; k < klen; ++k) {\n\t\t\t\tmerge(keys[k], target, source, options);\n\t\t\t}\n\t\t}\n\n\t\treturn target;\n\t},\n\n\t/**\n\t * Recursively deep copies `source` properties into `target` *only* if not defined in target.\n\t * IMPORTANT: `target` is not cloned and will be updated with `source` properties.\n\t * @param {object} target - The target object in which all sources are merged into.\n\t * @param {object|object[]} source - Object(s) to merge into `target`.\n\t * @returns {object} The `target` object.\n\t */\n\tmergeIf: function(target, source) {\n\t\treturn helpers.merge(target, source, {merger: helpers._mergerIf});\n\t},\n\n\t/**\n\t * Applies the contents of two or more objects together into the first object.\n\t * @param {object} target - The target object in which all objects are merged into.\n\t * @param {object} arg1 - Object containing additional properties to merge in target.\n\t * @param {object} argN - Additional objects containing properties to merge in target.\n\t * @returns {object} The `target` object.\n\t */\n\textend: function(target) {\n\t\tvar setFn = function(value, key) {\n\t\t\ttarget[key] = value;\n\t\t};\n\t\tfor (var i = 1, ilen = arguments.length; i < ilen; ++i) {\n\t\t\thelpers.each(arguments[i], setFn);\n\t\t}\n\t\treturn target;\n\t},\n\n\t/**\n\t * Basic javascript inheritance based on the model created in Backbone.js\n\t */\n\tinherits: function(extensions) {\n\t\tvar me = this;\n\t\tvar ChartElement = (extensions && extensions.hasOwnProperty('constructor')) ? extensions.constructor : function() {\n\t\t\treturn me.apply(this, arguments);\n\t\t};\n\n\t\tvar Surrogate = function() {\n\t\t\tthis.constructor = ChartElement;\n\t\t};\n\n\t\tSurrogate.prototype = me.prototype;\n\t\tChartElement.prototype = new Surrogate();\n\t\tChartElement.extend = helpers.inherits;\n\n\t\tif (extensions) {\n\t\t\thelpers.extend(ChartElement.prototype, extensions);\n\t\t}\n\n\t\tChartElement.__super__ = me.prototype;\n\t\treturn ChartElement;\n\t}\n};\n\nvar helpers_core = helpers;\n\n// DEPRECATIONS\n\n/**\n * Provided for backward compatibility, use Chart.helpers.callback instead.\n * @function Chart.helpers.callCallback\n * @deprecated since version 2.6.0\n * @todo remove at version 3\n * @private\n */\nhelpers.callCallback = helpers.callback;\n\n/**\n * Provided for backward compatibility, use Array.prototype.indexOf instead.\n * Array.prototype.indexOf compatibility: Chrome, Opera, Safari, FF1.5+, IE9+\n * @function Chart.helpers.indexOf\n * @deprecated since version 2.7.0\n * @todo remove at version 3\n * @private\n */\nhelpers.indexOf = function(array, item, fromIndex) {\n\treturn Array.prototype.indexOf.call(array, item, fromIndex);\n};\n\n/**\n * Provided for backward compatibility, use Chart.helpers.valueOrDefault instead.\n * @function Chart.helpers.getValueOrDefault\n * @deprecated since version 2.7.0\n * @todo remove at version 3\n * @private\n */\nhelpers.getValueOrDefault = helpers.valueOrDefault;\n\n/**\n * Provided for backward compatibility, use Chart.helpers.valueAtIndexOrDefault instead.\n * @function Chart.helpers.getValueAtIndexOrDefault\n * @deprecated since version 2.7.0\n * @todo remove at version 3\n * @private\n */\nhelpers.getValueAtIndexOrDefault = helpers.valueAtIndexOrDefault;\n\n/**\n * Easing functions adapted from Robert Penner's easing equations.\n * @namespace Chart.helpers.easingEffects\n * @see http://www.robertpenner.com/easing/\n */\nvar effects = {\n\tlinear: function(t) {\n\t\treturn t;\n\t},\n\n\teaseInQuad: function(t) {\n\t\treturn t * t;\n\t},\n\n\teaseOutQuad: function(t) {\n\t\treturn -t * (t - 2);\n\t},\n\n\teaseInOutQuad: function(t) {\n\t\tif ((t /= 0.5) < 1) {\n\t\t\treturn 0.5 * t * t;\n\t\t}\n\t\treturn -0.5 * ((--t) * (t - 2) - 1);\n\t},\n\n\teaseInCubic: function(t) {\n\t\treturn t * t * t;\n\t},\n\n\teaseOutCubic: function(t) {\n\t\treturn (t = t - 1) * t * t + 1;\n\t},\n\n\teaseInOutCubic: function(t) {\n\t\tif ((t /= 0.5) < 1) {\n\t\t\treturn 0.5 * t * t * t;\n\t\t}\n\t\treturn 0.5 * ((t -= 2) * t * t + 2);\n\t},\n\n\teaseInQuart: function(t) {\n\t\treturn t * t * t * t;\n\t},\n\n\teaseOutQuart: function(t) {\n\t\treturn -((t = t - 1) * t * t * t - 1);\n\t},\n\n\teaseInOutQuart: function(t) {\n\t\tif ((t /= 0.5) < 1) {\n\t\t\treturn 0.5 * t * t * t * t;\n\t\t}\n\t\treturn -0.5 * ((t -= 2) * t * t * t - 2);\n\t},\n\n\teaseInQuint: function(t) {\n\t\treturn t * t * t * t * t;\n\t},\n\n\teaseOutQuint: function(t) {\n\t\treturn (t = t - 1) * t * t * t * t + 1;\n\t},\n\n\teaseInOutQuint: function(t) {\n\t\tif ((t /= 0.5) < 1) {\n\t\t\treturn 0.5 * t * t * t * t * t;\n\t\t}\n\t\treturn 0.5 * ((t -= 2) * t * t * t * t + 2);\n\t},\n\n\teaseInSine: function(t) {\n\t\treturn -Math.cos(t * (Math.PI / 2)) + 1;\n\t},\n\n\teaseOutSine: function(t) {\n\t\treturn Math.sin(t * (Math.PI / 2));\n\t},\n\n\teaseInOutSine: function(t) {\n\t\treturn -0.5 * (Math.cos(Math.PI * t) - 1);\n\t},\n\n\teaseInExpo: function(t) {\n\t\treturn (t === 0) ? 0 : Math.pow(2, 10 * (t - 1));\n\t},\n\n\teaseOutExpo: function(t) {\n\t\treturn (t === 1) ? 1 : -Math.pow(2, -10 * t) + 1;\n\t},\n\n\teaseInOutExpo: function(t) {\n\t\tif (t === 0) {\n\t\t\treturn 0;\n\t\t}\n\t\tif (t === 1) {\n\t\t\treturn 1;\n\t\t}\n\t\tif ((t /= 0.5) < 1) {\n\t\t\treturn 0.5 * Math.pow(2, 10 * (t - 1));\n\t\t}\n\t\treturn 0.5 * (-Math.pow(2, -10 * --t) + 2);\n\t},\n\n\teaseInCirc: function(t) {\n\t\tif (t >= 1) {\n\t\t\treturn t;\n\t\t}\n\t\treturn -(Math.sqrt(1 - t * t) - 1);\n\t},\n\n\teaseOutCirc: function(t) {\n\t\treturn Math.sqrt(1 - (t = t - 1) * t);\n\t},\n\n\teaseInOutCirc: function(t) {\n\t\tif ((t /= 0.5) < 1) {\n\t\t\treturn -0.5 * (Math.sqrt(1 - t * t) - 1);\n\t\t}\n\t\treturn 0.5 * (Math.sqrt(1 - (t -= 2) * t) + 1);\n\t},\n\n\teaseInElastic: function(t) {\n\t\tvar s = 1.70158;\n\t\tvar p = 0;\n\t\tvar a = 1;\n\t\tif (t === 0) {\n\t\t\treturn 0;\n\t\t}\n\t\tif (t === 1) {\n\t\t\treturn 1;\n\t\t}\n\t\tif (!p) {\n\t\t\tp = 0.3;\n\t\t}\n\t\tif (a < 1) {\n\t\t\ta = 1;\n\t\t\ts = p / 4;\n\t\t} else {\n\t\t\ts = p / (2 * Math.PI) * Math.asin(1 / a);\n\t\t}\n\t\treturn -(a * Math.pow(2, 10 * (t -= 1)) * Math.sin((t - s) * (2 * Math.PI) / p));\n\t},\n\n\teaseOutElastic: function(t) {\n\t\tvar s = 1.70158;\n\t\tvar p = 0;\n\t\tvar a = 1;\n\t\tif (t === 0) {\n\t\t\treturn 0;\n\t\t}\n\t\tif (t === 1) {\n\t\t\treturn 1;\n\t\t}\n\t\tif (!p) {\n\t\t\tp = 0.3;\n\t\t}\n\t\tif (a < 1) {\n\t\t\ta = 1;\n\t\t\ts = p / 4;\n\t\t} else {\n\t\t\ts = p / (2 * Math.PI) * Math.asin(1 / a);\n\t\t}\n\t\treturn a * Math.pow(2, -10 * t) * Math.sin((t - s) * (2 * Math.PI) / p) + 1;\n\t},\n\n\teaseInOutElastic: function(t) {\n\t\tvar s = 1.70158;\n\t\tvar p = 0;\n\t\tvar a = 1;\n\t\tif (t === 0) {\n\t\t\treturn 0;\n\t\t}\n\t\tif ((t /= 0.5) === 2) {\n\t\t\treturn 1;\n\t\t}\n\t\tif (!p) {\n\t\t\tp = 0.45;\n\t\t}\n\t\tif (a < 1) {\n\t\t\ta = 1;\n\t\t\ts = p / 4;\n\t\t} else {\n\t\t\ts = p / (2 * Math.PI) * Math.asin(1 / a);\n\t\t}\n\t\tif (t < 1) {\n\t\t\treturn -0.5 * (a * Math.pow(2, 10 * (t -= 1)) * Math.sin((t - s) * (2 * Math.PI) / p));\n\t\t}\n\t\treturn a * Math.pow(2, -10 * (t -= 1)) * Math.sin((t - s) * (2 * Math.PI) / p) * 0.5 + 1;\n\t},\n\teaseInBack: function(t) {\n\t\tvar s = 1.70158;\n\t\treturn t * t * ((s + 1) * t - s);\n\t},\n\n\teaseOutBack: function(t) {\n\t\tvar s = 1.70158;\n\t\treturn (t = t - 1) * t * ((s + 1) * t + s) + 1;\n\t},\n\n\teaseInOutBack: function(t) {\n\t\tvar s = 1.70158;\n\t\tif ((t /= 0.5) < 1) {\n\t\t\treturn 0.5 * (t * t * (((s *= (1.525)) + 1) * t - s));\n\t\t}\n\t\treturn 0.5 * ((t -= 2) * t * (((s *= (1.525)) + 1) * t + s) + 2);\n\t},\n\n\teaseInBounce: function(t) {\n\t\treturn 1 - effects.easeOutBounce(1 - t);\n\t},\n\n\teaseOutBounce: function(t) {\n\t\tif (t < (1 / 2.75)) {\n\t\t\treturn 7.5625 * t * t;\n\t\t}\n\t\tif (t < (2 / 2.75)) {\n\t\t\treturn 7.5625 * (t -= (1.5 / 2.75)) * t + 0.75;\n\t\t}\n\t\tif (t < (2.5 / 2.75)) {\n\t\t\treturn 7.5625 * (t -= (2.25 / 2.75)) * t + 0.9375;\n\t\t}\n\t\treturn 7.5625 * (t -= (2.625 / 2.75)) * t + 0.984375;\n\t},\n\n\teaseInOutBounce: function(t) {\n\t\tif (t < 0.5) {\n\t\t\treturn effects.easeInBounce(t * 2) * 0.5;\n\t\t}\n\t\treturn effects.easeOutBounce(t * 2 - 1) * 0.5 + 0.5;\n\t}\n};\n\nvar helpers_easing = {\n\teffects: effects\n};\n\n// DEPRECATIONS\n\n/**\n * Provided for backward compatibility, use Chart.helpers.easing.effects instead.\n * @function Chart.helpers.easingEffects\n * @deprecated since version 2.7.0\n * @todo remove at version 3\n * @private\n */\nhelpers_core.easingEffects = effects;\n\nvar PI = Math.PI;\nvar RAD_PER_DEG = PI / 180;\nvar DOUBLE_PI = PI * 2;\nvar HALF_PI = PI / 2;\nvar QUARTER_PI = PI / 4;\nvar TWO_THIRDS_PI = PI * 2 / 3;\n\n/**\n * @namespace Chart.helpers.canvas\n */\nvar exports$1 = {\n\t/**\n\t * Clears the entire canvas associated to the given `chart`.\n\t * @param {Chart} chart - The chart for which to clear the canvas.\n\t */\n\tclear: function(chart) {\n\t\tchart.ctx.clearRect(0, 0, chart.width, chart.height);\n\t},\n\n\t/**\n\t * Creates a \"path\" for a rectangle with rounded corners at position (x, y) with a\n\t * given size (width, height) and the same `radius` for all corners.\n\t * @param {CanvasRenderingContext2D} ctx - The canvas 2D Context.\n\t * @param {number} x - The x axis of the coordinate for the rectangle starting point.\n\t * @param {number} y - The y axis of the coordinate for the rectangle starting point.\n\t * @param {number} width - The rectangle's width.\n\t * @param {number} height - The rectangle's height.\n\t * @param {number} radius - The rounded amount (in pixels) for the four corners.\n\t * @todo handle `radius` as top-left, top-right, bottom-right, bottom-left array/object?\n\t */\n\troundedRect: function(ctx, x, y, width, height, radius) {\n\t\tif (radius) {\n\t\t\tvar r = Math.min(radius, height / 2, width / 2);\n\t\t\tvar left = x + r;\n\t\t\tvar top = y + r;\n\t\t\tvar right = x + width - r;\n\t\t\tvar bottom = y + height - r;\n\n\t\t\tctx.moveTo(x, top);\n\t\t\tif (left < right && top < bottom) {\n\t\t\t\tctx.arc(left, top, r, -PI, -HALF_PI);\n\t\t\t\tctx.arc(right, top, r, -HALF_PI, 0);\n\t\t\t\tctx.arc(right, bottom, r, 0, HALF_PI);\n\t\t\t\tctx.arc(left, bottom, r, HALF_PI, PI);\n\t\t\t} else if (left < right) {\n\t\t\t\tctx.moveTo(left, y);\n\t\t\t\tctx.arc(right, top, r, -HALF_PI, HALF_PI);\n\t\t\t\tctx.arc(left, top, r, HALF_PI, PI + HALF_PI);\n\t\t\t} else if (top < bottom) {\n\t\t\t\tctx.arc(left, top, r, -PI, 0);\n\t\t\t\tctx.arc(left, bottom, r, 0, PI);\n\t\t\t} else {\n\t\t\t\tctx.arc(left, top, r, -PI, PI);\n\t\t\t}\n\t\t\tctx.closePath();\n\t\t\tctx.moveTo(x, y);\n\t\t} else {\n\t\t\tctx.rect(x, y, width, height);\n\t\t}\n\t},\n\n\tdrawPoint: function(ctx, style, radius, x, y, rotation) {\n\t\tvar type, xOffset, yOffset, size, cornerRadius;\n\t\tvar rad = (rotation || 0) * RAD_PER_DEG;\n\n\t\tif (style && typeof style === 'object') {\n\t\t\ttype = style.toString();\n\t\t\tif (type === '[object HTMLImageElement]' || type === '[object HTMLCanvasElement]') {\n\t\t\t\tctx.drawImage(style, x - style.width / 2, y - style.height / 2, style.width, style.height);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tif (isNaN(radius) || radius <= 0) {\n\t\t\treturn;\n\t\t}\n\n\t\tctx.beginPath();\n\n\t\tswitch (style) {\n\t\t// Default includes circle\n\t\tdefault:\n\t\t\tctx.arc(x, y, radius, 0, DOUBLE_PI);\n\t\t\tctx.closePath();\n\t\t\tbreak;\n\t\tcase 'triangle':\n\t\t\tctx.moveTo(x + Math.sin(rad) * radius, y - Math.cos(rad) * radius);\n\t\t\trad += TWO_THIRDS_PI;\n\t\t\tctx.lineTo(x + Math.sin(rad) * radius, y - Math.cos(rad) * radius);\n\t\t\trad += TWO_THIRDS_PI;\n\t\t\tctx.lineTo(x + Math.sin(rad) * radius, y - Math.cos(rad) * radius);\n\t\t\tctx.closePath();\n\t\t\tbreak;\n\t\tcase 'rectRounded':\n\t\t\t// NOTE: the rounded rect implementation changed to use `arc` instead of\n\t\t\t// `quadraticCurveTo` since it generates better results when rect is\n\t\t\t// almost a circle. 0.516 (instead of 0.5) produces results with visually\n\t\t\t// closer proportion to the previous impl and it is inscribed in the\n\t\t\t// circle with `radius`. For more details, see the following PRs:\n\t\t\t// https://github.com/chartjs/Chart.js/issues/5597\n\t\t\t// https://github.com/chartjs/Chart.js/issues/5858\n\t\t\tcornerRadius = radius * 0.516;\n\t\t\tsize = radius - cornerRadius;\n\t\t\txOffset = Math.cos(rad + QUARTER_PI) * size;\n\t\t\tyOffset = Math.sin(rad + QUARTER_PI) * size;\n\t\t\tctx.arc(x - xOffset, y - yOffset, cornerRadius, rad - PI, rad - HALF_PI);\n\t\t\tctx.arc(x + yOffset, y - xOffset, cornerRadius, rad - HALF_PI, rad);\n\t\t\tctx.arc(x + xOffset, y + yOffset, cornerRadius, rad, rad + HALF_PI);\n\t\t\tctx.arc(x - yOffset, y + xOffset, cornerRadius, rad + HALF_PI, rad + PI);\n\t\t\tctx.closePath();\n\t\t\tbreak;\n\t\tcase 'rect':\n\t\t\tif (!rotation) {\n\t\t\t\tsize = Math.SQRT1_2 * radius;\n\t\t\t\tctx.rect(x - size, y - size, 2 * size, 2 * size);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\trad += QUARTER_PI;\n\t\t\t/* falls through */\n\t\tcase 'rectRot':\n\t\t\txOffset = Math.cos(rad) * radius;\n\t\t\tyOffset = Math.sin(rad) * radius;\n\t\t\tctx.moveTo(x - xOffset, y - yOffset);\n\t\t\tctx.lineTo(x + yOffset, y - xOffset);\n\t\t\tctx.lineTo(x + xOffset, y + yOffset);\n\t\t\tctx.lineTo(x - yOffset, y + xOffset);\n\t\t\tctx.closePath();\n\t\t\tbreak;\n\t\tcase 'crossRot':\n\t\t\trad += QUARTER_PI;\n\t\t\t/* falls through */\n\t\tcase 'cross':\n\t\t\txOffset = Math.cos(rad) * radius;\n\t\t\tyOffset = Math.sin(rad) * radius;\n\t\t\tctx.moveTo(x - xOffset, y - yOffset);\n\t\t\tctx.lineTo(x + xOffset, y + yOffset);\n\t\t\tctx.moveTo(x + yOffset, y - xOffset);\n\t\t\tctx.lineTo(x - yOffset, y + xOffset);\n\t\t\tbreak;\n\t\tcase 'star':\n\t\t\txOffset = Math.cos(rad) * radius;\n\t\t\tyOffset = Math.sin(rad) * radius;\n\t\t\tctx.moveTo(x - xOffset, y - yOffset);\n\t\t\tctx.lineTo(x + xOffset, y + yOffset);\n\t\t\tctx.moveTo(x + yOffset, y - xOffset);\n\t\t\tctx.lineTo(x - yOffset, y + xOffset);\n\t\t\trad += QUARTER_PI;\n\t\t\txOffset = Math.cos(rad) * radius;\n\t\t\tyOffset = Math.sin(rad) * radius;\n\t\t\tctx.moveTo(x - xOffset, y - yOffset);\n\t\t\tctx.lineTo(x + xOffset, y + yOffset);\n\t\t\tctx.moveTo(x + yOffset, y - xOffset);\n\t\t\tctx.lineTo(x - yOffset, y + xOffset);\n\t\t\tbreak;\n\t\tcase 'line':\n\t\t\txOffset = Math.cos(rad) * radius;\n\t\t\tyOffset = Math.sin(rad) * radius;\n\t\t\tctx.moveTo(x - xOffset, y - yOffset);\n\t\t\tctx.lineTo(x + xOffset, y + yOffset);\n\t\t\tbreak;\n\t\tcase 'dash':\n\t\t\tctx.moveTo(x, y);\n\t\t\tctx.lineTo(x + Math.cos(rad) * radius, y + Math.sin(rad) * radius);\n\t\t\tbreak;\n\t\t}\n\n\t\tctx.fill();\n\t\tctx.stroke();\n\t},\n\n\t/**\n\t * Returns true if the point is inside the rectangle\n\t * @param {object} point - The point to test\n\t * @param {object} area - The rectangle\n\t * @returns {boolean}\n\t * @private\n\t */\n\t_isPointInArea: function(point, area) {\n\t\tvar epsilon = 1e-6; // 1e-6 is margin in pixels for accumulated error.\n\n\t\treturn point.x > area.left - epsilon && point.x < area.right + epsilon &&\n\t\t\tpoint.y > area.top - epsilon && point.y < area.bottom + epsilon;\n\t},\n\n\tclipArea: function(ctx, area) {\n\t\tctx.save();\n\t\tctx.beginPath();\n\t\tctx.rect(area.left, area.top, area.right - area.left, area.bottom - area.top);\n\t\tctx.clip();\n\t},\n\n\tunclipArea: function(ctx) {\n\t\tctx.restore();\n\t},\n\n\tlineTo: function(ctx, previous, target, flip) {\n\t\tvar stepped = target.steppedLine;\n\t\tif (stepped) {\n\t\t\tif (stepped === 'middle') {\n\t\t\t\tvar midpoint = (previous.x + target.x) / 2.0;\n\t\t\t\tctx.lineTo(midpoint, flip ? target.y : previous.y);\n\t\t\t\tctx.lineTo(midpoint, flip ? previous.y : target.y);\n\t\t\t} else if ((stepped === 'after' && !flip) || (stepped !== 'after' && flip)) {\n\t\t\t\tctx.lineTo(previous.x, target.y);\n\t\t\t} else {\n\t\t\t\tctx.lineTo(target.x, previous.y);\n\t\t\t}\n\t\t\tctx.lineTo(target.x, target.y);\n\t\t\treturn;\n\t\t}\n\n\t\tif (!target.tension) {\n\t\t\tctx.lineTo(target.x, target.y);\n\t\t\treturn;\n\t\t}\n\n\t\tctx.bezierCurveTo(\n\t\t\tflip ? previous.controlPointPreviousX : previous.controlPointNextX,\n\t\t\tflip ? previous.controlPointPreviousY : previous.controlPointNextY,\n\t\t\tflip ? target.controlPointNextX : target.controlPointPreviousX,\n\t\t\tflip ? target.controlPointNextY : target.controlPointPreviousY,\n\t\t\ttarget.x,\n\t\t\ttarget.y);\n\t}\n};\n\nvar helpers_canvas = exports$1;\n\n// DEPRECATIONS\n\n/**\n * Provided for backward compatibility, use Chart.helpers.canvas.clear instead.\n * @namespace Chart.helpers.clear\n * @deprecated since version 2.7.0\n * @todo remove at version 3\n * @private\n */\nhelpers_core.clear = exports$1.clear;\n\n/**\n * Provided for backward compatibility, use Chart.helpers.canvas.roundedRect instead.\n * @namespace Chart.helpers.drawRoundedRectangle\n * @deprecated since version 2.7.0\n * @todo remove at version 3\n * @private\n */\nhelpers_core.drawRoundedRectangle = function(ctx) {\n\tctx.beginPath();\n\texports$1.roundedRect.apply(exports$1, arguments);\n};\n\nvar defaults = {\n\t/**\n\t * @private\n\t */\n\t_set: function(scope, values) {\n\t\treturn helpers_core.merge(this[scope] || (this[scope] = {}), values);\n\t}\n};\n\ndefaults._set('global', {\n\tdefaultColor: 'rgba(0,0,0,0.1)',\n\tdefaultFontColor: '#666',\n\tdefaultFontFamily: \"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif\",\n\tdefaultFontSize: 12,\n\tdefaultFontStyle: 'normal',\n\tdefaultLineHeight: 1.2,\n\tshowLines: true\n});\n\nvar core_defaults = defaults;\n\nvar valueOrDefault = helpers_core.valueOrDefault;\n\n/**\n * Converts the given font object into a CSS font string.\n * @param {object} font - A font object.\n * @return {string} The CSS font string. See https://developer.mozilla.org/en-US/docs/Web/CSS/font\n * @private\n */\nfunction toFontString(font) {\n\tif (!font || helpers_core.isNullOrUndef(font.size) || helpers_core.isNullOrUndef(font.family)) {\n\t\treturn null;\n\t}\n\n\treturn (font.style ? font.style + ' ' : '')\n\t\t+ (font.weight ? font.weight + ' ' : '')\n\t\t+ font.size + 'px '\n\t\t+ font.family;\n}\n\n/**\n * @alias Chart.helpers.options\n * @namespace\n */\nvar helpers_options = {\n\t/**\n\t * Converts the given line height `value` in pixels for a specific font `size`.\n\t * @param {number|string} value - The lineHeight to parse (eg. 1.6, '14px', '75%', '1.6em').\n\t * @param {number} size - The font size (in pixels) used to resolve relative `value`.\n\t * @returns {number} The effective line height in pixels (size * 1.2 if value is invalid).\n\t * @see https://developer.mozilla.org/en-US/docs/Web/CSS/line-height\n\t * @since 2.7.0\n\t */\n\ttoLineHeight: function(value, size) {\n\t\tvar matches = ('' + value).match(/^(normal|(\\d+(?:\\.\\d+)?)(px|em|%)?)$/);\n\t\tif (!matches || matches[1] === 'normal') {\n\t\t\treturn size * 1.2;\n\t\t}\n\n\t\tvalue = +matches[2];\n\n\t\tswitch (matches[3]) {\n\t\tcase 'px':\n\t\t\treturn value;\n\t\tcase '%':\n\t\t\tvalue /= 100;\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\n\t\treturn size * value;\n\t},\n\n\t/**\n\t * Converts the given value into a padding object with pre-computed width/height.\n\t * @param {number|object} value - If a number, set the value to all TRBL component,\n\t * else, if and object, use defined properties and sets undefined ones to 0.\n\t * @returns {object} The padding values (top, right, bottom, left, width, height)\n\t * @since 2.7.0\n\t */\n\ttoPadding: function(value) {\n\t\tvar t, r, b, l;\n\n\t\tif (helpers_core.isObject(value)) {\n\t\t\tt = +value.top || 0;\n\t\t\tr = +value.right || 0;\n\t\t\tb = +value.bottom || 0;\n\t\t\tl = +value.left || 0;\n\t\t} else {\n\t\t\tt = r = b = l = +value || 0;\n\t\t}\n\n\t\treturn {\n\t\t\ttop: t,\n\t\t\tright: r,\n\t\t\tbottom: b,\n\t\t\tleft: l,\n\t\t\theight: t + b,\n\t\t\twidth: l + r\n\t\t};\n\t},\n\n\t/**\n\t * Parses font options and returns the font object.\n\t * @param {object} options - A object that contains font options to be parsed.\n\t * @return {object} The font object.\n\t * @todo Support font.* options and renamed to toFont().\n\t * @private\n\t */\n\t_parseFont: function(options) {\n\t\tvar globalDefaults = core_defaults.global;\n\t\tvar size = valueOrDefault(options.fontSize, globalDefaults.defaultFontSize);\n\t\tvar font = {\n\t\t\tfamily: valueOrDefault(options.fontFamily, globalDefaults.defaultFontFamily),\n\t\t\tlineHeight: helpers_core.options.toLineHeight(valueOrDefault(options.lineHeight, globalDefaults.defaultLineHeight), size),\n\t\t\tsize: size,\n\t\t\tstyle: valueOrDefault(options.fontStyle, globalDefaults.defaultFontStyle),\n\t\t\tweight: null,\n\t\t\tstring: ''\n\t\t};\n\n\t\tfont.string = toFontString(font);\n\t\treturn font;\n\t},\n\n\t/**\n\t * Evaluates the given `inputs` sequentially and returns the first defined value.\n\t * @param {Array} inputs - An array of values, falling back to the last value.\n\t * @param {object} [context] - If defined and the current value is a function, the value\n\t * is called with `context` as first argument and the result becomes the new input.\n\t * @param {number} [index] - If defined and the current value is an array, the value\n\t * at `index` become the new input.\n\t * @since 2.7.0\n\t */\n\tresolve: function(inputs, context, index) {\n\t\tvar i, ilen, value;\n\n\t\tfor (i = 0, ilen = inputs.length; i < ilen; ++i) {\n\t\t\tvalue = inputs[i];\n\t\t\tif (value === undefined) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (context !== undefined && typeof value === 'function') {\n\t\t\t\tvalue = value(context);\n\t\t\t}\n\t\t\tif (index !== undefined && helpers_core.isArray(value)) {\n\t\t\t\tvalue = value[index];\n\t\t\t}\n\t\t\tif (value !== undefined) {\n\t\t\t\treturn value;\n\t\t\t}\n\t\t}\n\t}\n};\n\nvar helpers$1 = helpers_core;\nvar easing = helpers_easing;\nvar canvas = helpers_canvas;\nvar options = helpers_options;\nhelpers$1.easing = easing;\nhelpers$1.canvas = canvas;\nhelpers$1.options = options;\n\nfunction interpolate(start, view, model, ease) {\n\tvar keys = Object.keys(model);\n\tvar i, ilen, key, actual, origin, target, type, c0, c1;\n\n\tfor (i = 0, ilen = keys.length; i < ilen; ++i) {\n\t\tkey = keys[i];\n\n\t\ttarget = model[key];\n\n\t\t// if a value is added to the model after pivot() has been called, the view\n\t\t// doesn't contain it, so let's initialize the view to the target value.\n\t\tif (!view.hasOwnProperty(key)) {\n\t\t\tview[key] = target;\n\t\t}\n\n\t\tactual = view[key];\n\n\t\tif (actual === target || key[0] === '_') {\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (!start.hasOwnProperty(key)) {\n\t\t\tstart[key] = actual;\n\t\t}\n\n\t\torigin = start[key];\n\n\t\ttype = typeof target;\n\n\t\tif (type === typeof origin) {\n\t\t\tif (type === 'string') {\n\t\t\t\tc0 = chartjsColor(origin);\n\t\t\t\tif (c0.valid) {\n\t\t\t\t\tc1 = chartjsColor(target);\n\t\t\t\t\tif (c1.valid) {\n\t\t\t\t\t\tview[key] = c1.mix(c0, ease).rgbString();\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (helpers$1.isFinite(origin) && helpers$1.isFinite(target)) {\n\t\t\t\tview[key] = origin + (target - origin) * ease;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\n\t\tview[key] = target;\n\t}\n}\n\nvar Element = function(configuration) {\n\thelpers$1.extend(this, configuration);\n\tthis.initialize.apply(this, arguments);\n};\n\nhelpers$1.extend(Element.prototype, {\n\n\tinitialize: function() {\n\t\tthis.hidden = false;\n\t},\n\n\tpivot: function() {\n\t\tvar me = this;\n\t\tif (!me._view) {\n\t\t\tme._view = helpers$1.clone(me._model);\n\t\t}\n\t\tme._start = {};\n\t\treturn me;\n\t},\n\n\ttransition: function(ease) {\n\t\tvar me = this;\n\t\tvar model = me._model;\n\t\tvar start = me._start;\n\t\tvar view = me._view;\n\n\t\t// No animation -> No Transition\n\t\tif (!model || ease === 1) {\n\t\t\tme._view = model;\n\t\t\tme._start = null;\n\t\t\treturn me;\n\t\t}\n\n\t\tif (!view) {\n\t\t\tview = me._view = {};\n\t\t}\n\n\t\tif (!start) {\n\t\t\tstart = me._start = {};\n\t\t}\n\n\t\tinterpolate(start, view, model, ease);\n\n\t\treturn me;\n\t},\n\n\ttooltipPosition: function() {\n\t\treturn {\n\t\t\tx: this._model.x,\n\t\t\ty: this._model.y\n\t\t};\n\t},\n\n\thasValue: function() {\n\t\treturn helpers$1.isNumber(this._model.x) && helpers$1.isNumber(this._model.y);\n\t}\n});\n\nElement.extend = helpers$1.inherits;\n\nvar core_element = Element;\n\nvar exports$2 = core_element.extend({\n\tchart: null, // the animation associated chart instance\n\tcurrentStep: 0, // the current animation step\n\tnumSteps: 60, // default number of steps\n\teasing: '', // the easing to use for this animation\n\trender: null, // render function used by the animation service\n\n\tonAnimationProgress: null, // user specified callback to fire on each step of the animation\n\tonAnimationComplete: null, // user specified callback to fire when the animation finishes\n});\n\nvar core_animation = exports$2;\n\n// DEPRECATIONS\n\n/**\n * Provided for backward compatibility, use Chart.Animation instead\n * @prop Chart.Animation#animationObject\n * @deprecated since version 2.6.0\n * @todo remove at version 3\n */\nObject.defineProperty(exports$2.prototype, 'animationObject', {\n\tget: function() {\n\t\treturn this;\n\t}\n});\n\n/**\n * Provided for backward compatibility, use Chart.Animation#chart instead\n * @prop Chart.Animation#chartInstance\n * @deprecated since version 2.6.0\n * @todo remove at version 3\n */\nObject.defineProperty(exports$2.prototype, 'chartInstance', {\n\tget: function() {\n\t\treturn this.chart;\n\t},\n\tset: function(value) {\n\t\tthis.chart = value;\n\t}\n});\n\ncore_defaults._set('global', {\n\tanimation: {\n\t\tduration: 1000,\n\t\teasing: 'easeOutQuart',\n\t\tonProgress: helpers$1.noop,\n\t\tonComplete: helpers$1.noop\n\t}\n});\n\nvar core_animations = {\n\tanimations: [],\n\trequest: null,\n\n\t/**\n\t * @param {Chart} chart - The chart to animate.\n\t * @param {Chart.Animation} animation - The animation that we will animate.\n\t * @param {number} duration - The animation duration in ms.\n\t * @param {boolean} lazy - if true, the chart is not marked as animating to enable more responsive interactions\n\t */\n\taddAnimation: function(chart, animation, duration, lazy) {\n\t\tvar animations = this.animations;\n\t\tvar i, ilen;\n\n\t\tanimation.chart = chart;\n\t\tanimation.startTime = Date.now();\n\t\tanimation.duration = duration;\n\n\t\tif (!lazy) {\n\t\t\tchart.animating = true;\n\t\t}\n\n\t\tfor (i = 0, ilen = animations.length; i < ilen; ++i) {\n\t\t\tif (animations[i].chart === chart) {\n\t\t\t\tanimations[i] = animation;\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tanimations.push(animation);\n\n\t\t// If there are no animations queued, manually kickstart a digest, for lack of a better word\n\t\tif (animations.length === 1) {\n\t\t\tthis.requestAnimationFrame();\n\t\t}\n\t},\n\n\tcancelAnimation: function(chart) {\n\t\tvar index = helpers$1.findIndex(this.animations, function(animation) {\n\t\t\treturn animation.chart === chart;\n\t\t});\n\n\t\tif (index !== -1) {\n\t\t\tthis.animations.splice(index, 1);\n\t\t\tchart.animating = false;\n\t\t}\n\t},\n\n\trequestAnimationFrame: function() {\n\t\tvar me = this;\n\t\tif (me.request === null) {\n\t\t\t// Skip animation frame requests until the active one is executed.\n\t\t\t// This can happen when processing mouse events, e.g. 'mousemove'\n\t\t\t// and 'mouseout' events will trigger multiple renders.\n\t\t\tme.request = helpers$1.requestAnimFrame.call(window, function() {\n\t\t\t\tme.request = null;\n\t\t\t\tme.startDigest();\n\t\t\t});\n\t\t}\n\t},\n\n\t/**\n\t * @private\n\t */\n\tstartDigest: function() {\n\t\tvar me = this;\n\n\t\tme.advance();\n\n\t\t// Do we have more stuff to animate?\n\t\tif (me.animations.length > 0) {\n\t\t\tme.requestAnimationFrame();\n\t\t}\n\t},\n\n\t/**\n\t * @private\n\t */\n\tadvance: function() {\n\t\tvar animations = this.animations;\n\t\tvar animation, chart, numSteps, nextStep;\n\t\tvar i = 0;\n\n\t\t// 1 animation per chart, so we are looping charts here\n\t\twhile (i < animations.length) {\n\t\t\tanimation = animations[i];\n\t\t\tchart = animation.chart;\n\t\t\tnumSteps = animation.numSteps;\n\n\t\t\t// Make sure that currentStep starts at 1\n\t\t\t// https://github.com/chartjs/Chart.js/issues/6104\n\t\t\tnextStep = Math.floor((Date.now() - animation.startTime) / animation.duration * numSteps) + 1;\n\t\t\tanimation.currentStep = Math.min(nextStep, numSteps);\n\n\t\t\thelpers$1.callback(animation.render, [chart, animation], chart);\n\t\t\thelpers$1.callback(animation.onAnimationProgress, [animation], chart);\n\n\t\t\tif (animation.currentStep >= numSteps) {\n\t\t\t\thelpers$1.callback(animation.onAnimationComplete, [animation], chart);\n\t\t\t\tchart.animating = false;\n\t\t\t\tanimations.splice(i, 1);\n\t\t\t} else {\n\t\t\t\t++i;\n\t\t\t}\n\t\t}\n\t}\n};\n\nvar resolve = helpers$1.options.resolve;\n\nvar arrayEvents = ['push', 'pop', 'shift', 'splice', 'unshift'];\n\n/**\n * Hooks the array methods that add or remove values ('push', pop', 'shift', 'splice',\n * 'unshift') and notify the listener AFTER the array has been altered. Listeners are\n * called on the 'onData*' callbacks (e.g. onDataPush, etc.) with same arguments.\n */\nfunction listenArrayEvents(array, listener) {\n\tif (array._chartjs) {\n\t\tarray._chartjs.listeners.push(listener);\n\t\treturn;\n\t}\n\n\tObject.defineProperty(array, '_chartjs', {\n\t\tconfigurable: true,\n\t\tenumerable: false,\n\t\tvalue: {\n\t\t\tlisteners: [listener]\n\t\t}\n\t});\n\n\tarrayEvents.forEach(function(key) {\n\t\tvar method = 'onData' + key.charAt(0).toUpperCase() + key.slice(1);\n\t\tvar base = array[key];\n\n\t\tObject.defineProperty(array, key, {\n\t\t\tconfigurable: true,\n\t\t\tenumerable: false,\n\t\t\tvalue: function() {\n\t\t\t\tvar args = Array.prototype.slice.call(arguments);\n\t\t\t\tvar res = base.apply(this, args);\n\n\t\t\t\thelpers$1.each(array._chartjs.listeners, function(object) {\n\t\t\t\t\tif (typeof object[method] === 'function') {\n\t\t\t\t\t\tobject[method].apply(object, args);\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\treturn res;\n\t\t\t}\n\t\t});\n\t});\n}\n\n/**\n * Removes the given array event listener and cleanup extra attached properties (such as\n * the _chartjs stub and overridden methods) if array doesn't have any more listeners.\n */\nfunction unlistenArrayEvents(array, listener) {\n\tvar stub = array._chartjs;\n\tif (!stub) {\n\t\treturn;\n\t}\n\n\tvar listeners = stub.listeners;\n\tvar index = listeners.indexOf(listener);\n\tif (index !== -1) {\n\t\tlisteners.splice(index, 1);\n\t}\n\n\tif (listeners.length > 0) {\n\t\treturn;\n\t}\n\n\tarrayEvents.forEach(function(key) {\n\t\tdelete array[key];\n\t});\n\n\tdelete array._chartjs;\n}\n\n// Base class for all dataset controllers (line, bar, etc)\nvar DatasetController = function(chart, datasetIndex) {\n\tthis.initialize(chart, datasetIndex);\n};\n\nhelpers$1.extend(DatasetController.prototype, {\n\n\t/**\n\t * Element type used to generate a meta dataset (e.g. Chart.element.Line).\n\t * @type {Chart.core.element}\n\t */\n\tdatasetElementType: null,\n\n\t/**\n\t * Element type used to generate a meta data (e.g. Chart.element.Point).\n\t * @type {Chart.core.element}\n\t */\n\tdataElementType: null,\n\n\tinitialize: function(chart, datasetIndex) {\n\t\tvar me = this;\n\t\tme.chart = chart;\n\t\tme.index = datasetIndex;\n\t\tme.linkScales();\n\t\tme.addElements();\n\t},\n\n\tupdateIndex: function(datasetIndex) {\n\t\tthis.index = datasetIndex;\n\t},\n\n\tlinkScales: function() {\n\t\tvar me = this;\n\t\tvar meta = me.getMeta();\n\t\tvar dataset = me.getDataset();\n\n\t\tif (meta.xAxisID === null || !(meta.xAxisID in me.chart.scales)) {\n\t\t\tmeta.xAxisID = dataset.xAxisID || me.chart.options.scales.xAxes[0].id;\n\t\t}\n\t\tif (meta.yAxisID === null || !(meta.yAxisID in me.chart.scales)) {\n\t\t\tmeta.yAxisID = dataset.yAxisID || me.chart.options.scales.yAxes[0].id;\n\t\t}\n\t},\n\n\tgetDataset: function() {\n\t\treturn this.chart.data.datasets[this.index];\n\t},\n\n\tgetMeta: function() {\n\t\treturn this.chart.getDatasetMeta(this.index);\n\t},\n\n\tgetScaleForId: function(scaleID) {\n\t\treturn this.chart.scales[scaleID];\n\t},\n\n\t/**\n\t * @private\n\t */\n\t_getValueScaleId: function() {\n\t\treturn this.getMeta().yAxisID;\n\t},\n\n\t/**\n\t * @private\n\t */\n\t_getIndexScaleId: function() {\n\t\treturn this.getMeta().xAxisID;\n\t},\n\n\t/**\n\t * @private\n\t */\n\t_getValueScale: function() {\n\t\treturn this.getScaleForId(this._getValueScaleId());\n\t},\n\n\t/**\n\t * @private\n\t */\n\t_getIndexScale: function() {\n\t\treturn this.getScaleForId(this._getIndexScaleId());\n\t},\n\n\treset: function() {\n\t\tthis.update(true);\n\t},\n\n\t/**\n\t * @private\n\t */\n\tdestroy: function() {\n\t\tif (this._data) {\n\t\t\tunlistenArrayEvents(this._data, this);\n\t\t}\n\t},\n\n\tcreateMetaDataset: function() {\n\t\tvar me = this;\n\t\tvar type = me.datasetElementType;\n\t\treturn type && new type({\n\t\t\t_chart: me.chart,\n\t\t\t_datasetIndex: me.index\n\t\t});\n\t},\n\n\tcreateMetaData: function(index) {\n\t\tvar me = this;\n\t\tvar type = me.dataElementType;\n\t\treturn type && new type({\n\t\t\t_chart: me.chart,\n\t\t\t_datasetIndex: me.index,\n\t\t\t_index: index\n\t\t});\n\t},\n\n\taddElements: function() {\n\t\tvar me = this;\n\t\tvar meta = me.getMeta();\n\t\tvar data = me.getDataset().data || [];\n\t\tvar metaData = meta.data;\n\t\tvar i, ilen;\n\n\t\tfor (i = 0, ilen = data.length; i < ilen; ++i) {\n\t\t\tmetaData[i] = metaData[i] || me.createMetaData(i);\n\t\t}\n\n\t\tmeta.dataset = meta.dataset || me.createMetaDataset();\n\t},\n\n\taddElementAndReset: function(index) {\n\t\tvar element = this.createMetaData(index);\n\t\tthis.getMeta().data.splice(index, 0, element);\n\t\tthis.updateElement(element, index, true);\n\t},\n\n\tbuildOrUpdateElements: function() {\n\t\tvar me = this;\n\t\tvar dataset = me.getDataset();\n\t\tvar data = dataset.data || (dataset.data = []);\n\n\t\t// In order to correctly handle data addition/deletion animation (an thus simulate\n\t\t// real-time charts), we need to monitor these data modifications and synchronize\n\t\t// the internal meta data accordingly.\n\t\tif (me._data !== data) {\n\t\t\tif (me._data) {\n\t\t\t\t// This case happens when the user replaced the data array instance.\n\t\t\t\tunlistenArrayEvents(me._data, me);\n\t\t\t}\n\n\t\t\tif (data && Object.isExtensible(data)) {\n\t\t\t\tlistenArrayEvents(data, me);\n\t\t\t}\n\t\t\tme._data = data;\n\t\t}\n\n\t\t// Re-sync meta data in case the user replaced the data array or if we missed\n\t\t// any updates and so make sure that we handle number of datapoints changing.\n\t\tme.resyncElements();\n\t},\n\n\tupdate: helpers$1.noop,\n\n\ttransition: function(easingValue) {\n\t\tvar meta = this.getMeta();\n\t\tvar elements = meta.data || [];\n\t\tvar ilen = elements.length;\n\t\tvar i = 0;\n\n\t\tfor (; i < ilen; ++i) {\n\t\t\telements[i].transition(easingValue);\n\t\t}\n\n\t\tif (meta.dataset) {\n\t\t\tmeta.dataset.transition(easingValue);\n\t\t}\n\t},\n\n\tdraw: function() {\n\t\tvar meta = this.getMeta();\n\t\tvar elements = meta.data || [];\n\t\tvar ilen = elements.length;\n\t\tvar i = 0;\n\n\t\tif (meta.dataset) {\n\t\t\tmeta.dataset.draw();\n\t\t}\n\n\t\tfor (; i < ilen; ++i) {\n\t\t\telements[i].draw();\n\t\t}\n\t},\n\n\tremoveHoverStyle: function(element) {\n\t\thelpers$1.merge(element._model, element.$previousStyle || {});\n\t\tdelete element.$previousStyle;\n\t},\n\n\tsetHoverStyle: function(element) {\n\t\tvar dataset = this.chart.data.datasets[element._datasetIndex];\n\t\tvar index = element._index;\n\t\tvar custom = element.custom || {};\n\t\tvar model = element._model;\n\t\tvar getHoverColor = helpers$1.getHoverColor;\n\n\t\telement.$previousStyle = {\n\t\t\tbackgroundColor: model.backgroundColor,\n\t\t\tborderColor: model.borderColor,\n\t\t\tborderWidth: model.borderWidth\n\t\t};\n\n\t\tmodel.backgroundColor = resolve([custom.hoverBackgroundColor, dataset.hoverBackgroundColor, getHoverColor(model.backgroundColor)], undefined, index);\n\t\tmodel.borderColor = resolve([custom.hoverBorderColor, dataset.hoverBorderColor, getHoverColor(model.borderColor)], undefined, index);\n\t\tmodel.borderWidth = resolve([custom.hoverBorderWidth, dataset.hoverBorderWidth, model.borderWidth], undefined, index);\n\t},\n\n\t/**\n\t * @private\n\t */\n\tresyncElements: function() {\n\t\tvar me = this;\n\t\tvar meta = me.getMeta();\n\t\tvar data = me.getDataset().data;\n\t\tvar numMeta = meta.data.length;\n\t\tvar numData = data.length;\n\n\t\tif (numData < numMeta) {\n\t\t\tmeta.data.splice(numData, numMeta - numData);\n\t\t} else if (numData > numMeta) {\n\t\t\tme.insertElements(numMeta, numData - numMeta);\n\t\t}\n\t},\n\n\t/**\n\t * @private\n\t */\n\tinsertElements: function(start, count) {\n\t\tfor (var i = 0; i < count; ++i) {\n\t\t\tthis.addElementAndReset(start + i);\n\t\t}\n\t},\n\n\t/**\n\t * @private\n\t */\n\tonDataPush: function() {\n\t\tvar count = arguments.length;\n\t\tthis.insertElements(this.getDataset().data.length - count, count);\n\t},\n\n\t/**\n\t * @private\n\t */\n\tonDataPop: function() {\n\t\tthis.getMeta().data.pop();\n\t},\n\n\t/**\n\t * @private\n\t */\n\tonDataShift: function() {\n\t\tthis.getMeta().data.shift();\n\t},\n\n\t/**\n\t * @private\n\t */\n\tonDataSplice: function(start, count) {\n\t\tthis.getMeta().data.splice(start, count);\n\t\tthis.insertElements(start, arguments.length - 2);\n\t},\n\n\t/**\n\t * @private\n\t */\n\tonDataUnshift: function() {\n\t\tthis.insertElements(0, arguments.length);\n\t}\n});\n\nDatasetController.extend = helpers$1.inherits;\n\nvar core_datasetController = DatasetController;\n\ncore_defaults._set('global', {\n\telements: {\n\t\tarc: {\n\t\t\tbackgroundColor: core_defaults.global.defaultColor,\n\t\t\tborderColor: '#fff',\n\t\t\tborderWidth: 2,\n\t\t\tborderAlign: 'center'\n\t\t}\n\t}\n});\n\nvar element_arc = core_element.extend({\n\tinLabelRange: function(mouseX) {\n\t\tvar vm = this._view;\n\n\t\tif (vm) {\n\t\t\treturn (Math.pow(mouseX - vm.x, 2) < Math.pow(vm.radius + vm.hoverRadius, 2));\n\t\t}\n\t\treturn false;\n\t},\n\n\tinRange: function(chartX, chartY) {\n\t\tvar vm = this._view;\n\n\t\tif (vm) {\n\t\t\tvar pointRelativePosition = helpers$1.getAngleFromPoint(vm, {x: chartX, y: chartY});\n\t\t\tvar\tangle = pointRelativePosition.angle;\n\t\t\tvar distance = pointRelativePosition.distance;\n\n\t\t\t// Sanitise angle range\n\t\t\tvar startAngle = vm.startAngle;\n\t\t\tvar endAngle = vm.endAngle;\n\t\t\twhile (endAngle < startAngle) {\n\t\t\t\tendAngle += 2.0 * Math.PI;\n\t\t\t}\n\t\t\twhile (angle > endAngle) {\n\t\t\t\tangle -= 2.0 * Math.PI;\n\t\t\t}\n\t\t\twhile (angle < startAngle) {\n\t\t\t\tangle += 2.0 * Math.PI;\n\t\t\t}\n\n\t\t\t// Check if within the range of the open/close angle\n\t\t\tvar betweenAngles = (angle >= startAngle && angle <= endAngle);\n\t\t\tvar withinRadius = (distance >= vm.innerRadius && distance <= vm.outerRadius);\n\n\t\t\treturn (betweenAngles && withinRadius);\n\t\t}\n\t\treturn false;\n\t},\n\n\tgetCenterPoint: function() {\n\t\tvar vm = this._view;\n\t\tvar halfAngle = (vm.startAngle + vm.endAngle) / 2;\n\t\tvar halfRadius = (vm.innerRadius + vm.outerRadius) / 2;\n\t\treturn {\n\t\t\tx: vm.x + Math.cos(halfAngle) * halfRadius,\n\t\t\ty: vm.y + Math.sin(halfAngle) * halfRadius\n\t\t};\n\t},\n\n\tgetArea: function() {\n\t\tvar vm = this._view;\n\t\treturn Math.PI * ((vm.endAngle - vm.startAngle) / (2 * Math.PI)) * (Math.pow(vm.outerRadius, 2) - Math.pow(vm.innerRadius, 2));\n\t},\n\n\ttooltipPosition: function() {\n\t\tvar vm = this._view;\n\t\tvar centreAngle = vm.startAngle + ((vm.endAngle - vm.startAngle) / 2);\n\t\tvar rangeFromCentre = (vm.outerRadius - vm.innerRadius) / 2 + vm.innerRadius;\n\n\t\treturn {\n\t\t\tx: vm.x + (Math.cos(centreAngle) * rangeFromCentre),\n\t\t\ty: vm.y + (Math.sin(centreAngle) * rangeFromCentre)\n\t\t};\n\t},\n\n\tdraw: function() {\n\t\tvar ctx = this._chart.ctx;\n\t\tvar vm = this._view;\n\t\tvar sA = vm.startAngle;\n\t\tvar eA = vm.endAngle;\n\t\tvar pixelMargin = (vm.borderAlign === 'inner') ? 0.33 : 0;\n\t\tvar angleMargin;\n\n\t\tctx.save();\n\n\t\tctx.beginPath();\n\t\tctx.arc(vm.x, vm.y, Math.max(vm.outerRadius - pixelMargin, 0), sA, eA);\n\t\tctx.arc(vm.x, vm.y, vm.innerRadius, eA, sA, true);\n\t\tctx.closePath();\n\n\t\tctx.fillStyle = vm.backgroundColor;\n\t\tctx.fill();\n\n\t\tif (vm.borderWidth) {\n\t\t\tif (vm.borderAlign === 'inner') {\n\t\t\t\t// Draw an inner border by cliping the arc and drawing a double-width border\n\t\t\t\t// Enlarge the clipping arc by 0.33 pixels to eliminate glitches between borders\n\t\t\t\tctx.beginPath();\n\t\t\t\tangleMargin = pixelMargin / vm.outerRadius;\n\t\t\t\tctx.arc(vm.x, vm.y, vm.outerRadius, sA - angleMargin, eA + angleMargin);\n\t\t\t\tif (vm.innerRadius > pixelMargin) {\n\t\t\t\t\tangleMargin = pixelMargin / vm.innerRadius;\n\t\t\t\t\tctx.arc(vm.x, vm.y, vm.innerRadius - pixelMargin, eA + angleMargin, sA - angleMargin, true);\n\t\t\t\t} else {\n\t\t\t\t\tctx.arc(vm.x, vm.y, pixelMargin, eA + Math.PI / 2, sA - Math.PI / 2);\n\t\t\t\t}\n\t\t\t\tctx.closePath();\n\t\t\t\tctx.clip();\n\n\t\t\t\tctx.beginPath();\n\t\t\t\tctx.arc(vm.x, vm.y, vm.outerRadius, sA, eA);\n\t\t\t\tctx.arc(vm.x, vm.y, vm.innerRadius, eA, sA, true);\n\t\t\t\tctx.closePath();\n\n\t\t\t\tctx.lineWidth = vm.borderWidth * 2;\n\t\t\t\tctx.lineJoin = 'round';\n\t\t\t} else {\n\t\t\t\tctx.lineWidth = vm.borderWidth;\n\t\t\t\tctx.lineJoin = 'bevel';\n\t\t\t}\n\n\t\t\tctx.strokeStyle = vm.borderColor;\n\t\t\tctx.stroke();\n\t\t}\n\n\t\tctx.restore();\n\t}\n});\n\nvar valueOrDefault$1 = helpers$1.valueOrDefault;\n\nvar defaultColor = core_defaults.global.defaultColor;\n\ncore_defaults._set('global', {\n\telements: {\n\t\tline: {\n\t\t\ttension: 0.4,\n\t\t\tbackgroundColor: defaultColor,\n\t\t\tborderWidth: 3,\n\t\t\tborderColor: defaultColor,\n\t\t\tborderCapStyle: 'butt',\n\t\t\tborderDash: [],\n\t\t\tborderDashOffset: 0.0,\n\t\t\tborderJoinStyle: 'miter',\n\t\t\tcapBezierPoints: true,\n\t\t\tfill: true, // do we fill in the area between the line and its base axis\n\t\t}\n\t}\n});\n\nvar element_line = core_element.extend({\n\tdraw: function() {\n\t\tvar me = this;\n\t\tvar vm = me._view;\n\t\tvar ctx = me._chart.ctx;\n\t\tvar spanGaps = vm.spanGaps;\n\t\tvar points = me._children.slice(); // clone array\n\t\tvar globalDefaults = core_defaults.global;\n\t\tvar globalOptionLineElements = globalDefaults.elements.line;\n\t\tvar lastDrawnIndex = -1;\n\t\tvar index, current, previous, currentVM;\n\n\t\t// If we are looping, adding the first point again\n\t\tif (me._loop && points.length) {\n\t\t\tpoints.push(points[0]);\n\t\t}\n\n\t\tctx.save();\n\n\t\t// Stroke Line Options\n\t\tctx.lineCap = vm.borderCapStyle || globalOptionLineElements.borderCapStyle;\n\n\t\t// IE 9 and 10 do not support line dash\n\t\tif (ctx.setLineDash) {\n\t\t\tctx.setLineDash(vm.borderDash || globalOptionLineElements.borderDash);\n\t\t}\n\n\t\tctx.lineDashOffset = valueOrDefault$1(vm.borderDashOffset, globalOptionLineElements.borderDashOffset);\n\t\tctx.lineJoin = vm.borderJoinStyle || globalOptionLineElements.borderJoinStyle;\n\t\tctx.lineWidth = valueOrDefault$1(vm.borderWidth, globalOptionLineElements.borderWidth);\n\t\tctx.strokeStyle = vm.borderColor || globalDefaults.defaultColor;\n\n\t\t// Stroke Line\n\t\tctx.beginPath();\n\t\tlastDrawnIndex = -1;\n\n\t\tfor (index = 0; index < points.length; ++index) {\n\t\t\tcurrent = points[index];\n\t\t\tprevious = helpers$1.previousItem(points, index);\n\t\t\tcurrentVM = current._view;\n\n\t\t\t// First point moves to it's starting position no matter what\n\t\t\tif (index === 0) {\n\t\t\t\tif (!currentVM.skip) {\n\t\t\t\t\tctx.moveTo(currentVM.x, currentVM.y);\n\t\t\t\t\tlastDrawnIndex = index;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tprevious = lastDrawnIndex === -1 ? previous : points[lastDrawnIndex];\n\n\t\t\t\tif (!currentVM.skip) {\n\t\t\t\t\tif ((lastDrawnIndex !== (index - 1) && !spanGaps) || lastDrawnIndex === -1) {\n\t\t\t\t\t\t// There was a gap and this is the first point after the gap\n\t\t\t\t\t\tctx.moveTo(currentVM.x, currentVM.y);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Line to next point\n\t\t\t\t\t\thelpers$1.canvas.lineTo(ctx, previous._view, current._view);\n\t\t\t\t\t}\n\t\t\t\t\tlastDrawnIndex = index;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tctx.stroke();\n\t\tctx.restore();\n\t}\n});\n\nvar valueOrDefault$2 = helpers$1.valueOrDefault;\n\nvar defaultColor$1 = core_defaults.global.defaultColor;\n\ncore_defaults._set('global', {\n\telements: {\n\t\tpoint: {\n\t\t\tradius: 3,\n\t\t\tpointStyle: 'circle',\n\t\t\tbackgroundColor: defaultColor$1,\n\t\t\tborderColor: defaultColor$1,\n\t\t\tborderWidth: 1,\n\t\t\t// Hover\n\t\t\thitRadius: 1,\n\t\t\thoverRadius: 4,\n\t\t\thoverBorderWidth: 1\n\t\t}\n\t}\n});\n\nfunction xRange(mouseX) {\n\tvar vm = this._view;\n\treturn vm ? (Math.abs(mouseX - vm.x) < vm.radius + vm.hitRadius) : false;\n}\n\nfunction yRange(mouseY) {\n\tvar vm = this._view;\n\treturn vm ? (Math.abs(mouseY - vm.y) < vm.radius + vm.hitRadius) : false;\n}\n\nvar element_point = core_element.extend({\n\tinRange: function(mouseX, mouseY) {\n\t\tvar vm = this._view;\n\t\treturn vm ? ((Math.pow(mouseX - vm.x, 2) + Math.pow(mouseY - vm.y, 2)) < Math.pow(vm.hitRadius + vm.radius, 2)) : false;\n\t},\n\n\tinLabelRange: xRange,\n\tinXRange: xRange,\n\tinYRange: yRange,\n\n\tgetCenterPoint: function() {\n\t\tvar vm = this._view;\n\t\treturn {\n\t\t\tx: vm.x,\n\t\t\ty: vm.y\n\t\t};\n\t},\n\n\tgetArea: function() {\n\t\treturn Math.PI * Math.pow(this._view.radius, 2);\n\t},\n\n\ttooltipPosition: function() {\n\t\tvar vm = this._view;\n\t\treturn {\n\t\t\tx: vm.x,\n\t\t\ty: vm.y,\n\t\t\tpadding: vm.radius + vm.borderWidth\n\t\t};\n\t},\n\n\tdraw: function(chartArea) {\n\t\tvar vm = this._view;\n\t\tvar ctx = this._chart.ctx;\n\t\tvar pointStyle = vm.pointStyle;\n\t\tvar rotation = vm.rotation;\n\t\tvar radius = vm.radius;\n\t\tvar x = vm.x;\n\t\tvar y = vm.y;\n\t\tvar globalDefaults = core_defaults.global;\n\t\tvar defaultColor = globalDefaults.defaultColor; // eslint-disable-line no-shadow\n\n\t\tif (vm.skip) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Clipping for Points.\n\t\tif (chartArea === undefined || helpers$1.canvas._isPointInArea(vm, chartArea)) {\n\t\t\tctx.strokeStyle = vm.borderColor || defaultColor;\n\t\t\tctx.lineWidth = valueOrDefault$2(vm.borderWidth, globalDefaults.elements.point.borderWidth);\n\t\t\tctx.fillStyle = vm.backgroundColor || defaultColor;\n\t\t\thelpers$1.canvas.drawPoint(ctx, pointStyle, radius, x, y, rotation);\n\t\t}\n\t}\n});\n\nvar defaultColor$2 = core_defaults.global.defaultColor;\n\ncore_defaults._set('global', {\n\telements: {\n\t\trectangle: {\n\t\t\tbackgroundColor: defaultColor$2,\n\t\t\tborderColor: defaultColor$2,\n\t\t\tborderSkipped: 'bottom',\n\t\t\tborderWidth: 0\n\t\t}\n\t}\n});\n\nfunction isVertical(vm) {\n\treturn vm && vm.width !== undefined;\n}\n\n/**\n * Helper function to get the bounds of the bar regardless of the orientation\n * @param bar {Chart.Element.Rectangle} the bar\n * @return {Bounds} bounds of the bar\n * @private\n */\nfunction getBarBounds(vm) {\n\tvar x1, x2, y1, y2, half;\n\n\tif (isVertical(vm)) {\n\t\thalf = vm.width / 2;\n\t\tx1 = vm.x - half;\n\t\tx2 = vm.x + half;\n\t\ty1 = Math.min(vm.y, vm.base);\n\t\ty2 = Math.max(vm.y, vm.base);\n\t} else {\n\t\thalf = vm.height / 2;\n\t\tx1 = Math.min(vm.x, vm.base);\n\t\tx2 = Math.max(vm.x, vm.base);\n\t\ty1 = vm.y - half;\n\t\ty2 = vm.y + half;\n\t}\n\n\treturn {\n\t\tleft: x1,\n\t\ttop: y1,\n\t\tright: x2,\n\t\tbottom: y2\n\t};\n}\n\nfunction swap(orig, v1, v2) {\n\treturn orig === v1 ? v2 : orig === v2 ? v1 : orig;\n}\n\nfunction parseBorderSkipped(vm) {\n\tvar edge = vm.borderSkipped;\n\tvar res = {};\n\n\tif (!edge) {\n\t\treturn res;\n\t}\n\n\tif (vm.horizontal) {\n\t\tif (vm.base > vm.x) {\n\t\t\tedge = swap(edge, 'left', 'right');\n\t\t}\n\t} else if (vm.base < vm.y) {\n\t\tedge = swap(edge, 'bottom', 'top');\n\t}\n\n\tres[edge] = true;\n\treturn res;\n}\n\nfunction parseBorderWidth(vm, maxW, maxH) {\n\tvar value = vm.borderWidth;\n\tvar skip = parseBorderSkipped(vm);\n\tvar t, r, b, l;\n\n\tif (helpers$1.isObject(value)) {\n\t\tt = +value.top || 0;\n\t\tr = +value.right || 0;\n\t\tb = +value.bottom || 0;\n\t\tl = +value.left || 0;\n\t} else {\n\t\tt = r = b = l = +value || 0;\n\t}\n\n\treturn {\n\t\tt: skip.top || (t < 0) ? 0 : t > maxH ? maxH : t,\n\t\tr: skip.right || (r < 0) ? 0 : r > maxW ? maxW : r,\n\t\tb: skip.bottom || (b < 0) ? 0 : b > maxH ? maxH : b,\n\t\tl: skip.left || (l < 0) ? 0 : l > maxW ? maxW : l\n\t};\n}\n\nfunction boundingRects(vm) {\n\tvar bounds = getBarBounds(vm);\n\tvar width = bounds.right - bounds.left;\n\tvar height = bounds.bottom - bounds.top;\n\tvar border = parseBorderWidth(vm, width / 2, height / 2);\n\n\treturn {\n\t\touter: {\n\t\t\tx: bounds.left,\n\t\t\ty: bounds.top,\n\t\t\tw: width,\n\t\t\th: height\n\t\t},\n\t\tinner: {\n\t\t\tx: bounds.left + border.l,\n\t\t\ty: bounds.top + border.t,\n\t\t\tw: width - border.l - border.r,\n\t\t\th: height - border.t - border.b\n\t\t}\n\t};\n}\n\nfunction inRange(vm, x, y) {\n\tvar skipX = x === null;\n\tvar skipY = y === null;\n\tvar bounds = !vm || (skipX && skipY) ? false : getBarBounds(vm);\n\n\treturn bounds\n\t\t&& (skipX || x >= bounds.left && x <= bounds.right)\n\t\t&& (skipY || y >= bounds.top && y <= bounds.bottom);\n}\n\nvar element_rectangle = core_element.extend({\n\tdraw: function() {\n\t\tvar ctx = this._chart.ctx;\n\t\tvar vm = this._view;\n\t\tvar rects = boundingRects(vm);\n\t\tvar outer = rects.outer;\n\t\tvar inner = rects.inner;\n\n\t\tctx.fillStyle = vm.backgroundColor;\n\t\tctx.fillRect(outer.x, outer.y, outer.w, outer.h);\n\n\t\tif (outer.w === inner.w && outer.h === inner.h) {\n\t\t\treturn;\n\t\t}\n\n\t\tctx.save();\n\t\tctx.beginPath();\n\t\tctx.rect(outer.x, outer.y, outer.w, outer.h);\n\t\tctx.clip();\n\t\tctx.fillStyle = vm.borderColor;\n\t\tctx.rect(inner.x, inner.y, inner.w, inner.h);\n\t\tctx.fill('evenodd');\n\t\tctx.restore();\n\t},\n\n\theight: function() {\n\t\tvar vm = this._view;\n\t\treturn vm.base - vm.y;\n\t},\n\n\tinRange: function(mouseX, mouseY) {\n\t\treturn inRange(this._view, mouseX, mouseY);\n\t},\n\n\tinLabelRange: function(mouseX, mouseY) {\n\t\tvar vm = this._view;\n\t\treturn isVertical(vm)\n\t\t\t? inRange(vm, mouseX, null)\n\t\t\t: inRange(vm, null, mouseY);\n\t},\n\n\tinXRange: function(mouseX) {\n\t\treturn inRange(this._view, mouseX, null);\n\t},\n\n\tinYRange: function(mouseY) {\n\t\treturn inRange(this._view, null, mouseY);\n\t},\n\n\tgetCenterPoint: function() {\n\t\tvar vm = this._view;\n\t\tvar x, y;\n\t\tif (isVertical(vm)) {\n\t\t\tx = vm.x;\n\t\t\ty = (vm.y + vm.base) / 2;\n\t\t} else {\n\t\t\tx = (vm.x + vm.base) / 2;\n\t\t\ty = vm.y;\n\t\t}\n\n\t\treturn {x: x, y: y};\n\t},\n\n\tgetArea: function() {\n\t\tvar vm = this._view;\n\n\t\treturn isVertical(vm)\n\t\t\t? vm.width * Math.abs(vm.y - vm.base)\n\t\t\t: vm.height * Math.abs(vm.x - vm.base);\n\t},\n\n\ttooltipPosition: function() {\n\t\tvar vm = this._view;\n\t\treturn {\n\t\t\tx: vm.x,\n\t\t\ty: vm.y\n\t\t};\n\t}\n});\n\nvar elements = {};\nvar Arc = element_arc;\nvar Line = element_line;\nvar Point = element_point;\nvar Rectangle = element_rectangle;\nelements.Arc = Arc;\nelements.Line = Line;\nelements.Point = Point;\nelements.Rectangle = Rectangle;\n\nvar resolve$1 = helpers$1.options.resolve;\n\ncore_defaults._set('bar', {\n\thover: {\n\t\tmode: 'label'\n\t},\n\n\tscales: {\n\t\txAxes: [{\n\t\t\ttype: 'category',\n\t\t\tcategoryPercentage: 0.8,\n\t\t\tbarPercentage: 0.9,\n\t\t\toffset: true,\n\t\t\tgridLines: {\n\t\t\t\toffsetGridLines: true\n\t\t\t}\n\t\t}],\n\n\t\tyAxes: [{\n\t\t\ttype: 'linear'\n\t\t}]\n\t}\n});\n\n/**\n * Computes the \"optimal\" sample size to maintain bars equally sized while preventing overlap.\n * @private\n */\nfunction computeMinSampleSize(scale, pixels) {\n\tvar min = scale.isHorizontal() ? scale.width : scale.height;\n\tvar ticks = scale.getTicks();\n\tvar prev, curr, i, ilen;\n\n\tfor (i = 1, ilen = pixels.length; i < ilen; ++i) {\n\t\tmin = Math.min(min, Math.abs(pixels[i] - pixels[i - 1]));\n\t}\n\n\tfor (i = 0, ilen = ticks.length; i < ilen; ++i) {\n\t\tcurr = scale.getPixelForTick(i);\n\t\tmin = i > 0 ? Math.min(min, curr - prev) : min;\n\t\tprev = curr;\n\t}\n\n\treturn min;\n}\n\n/**\n * Computes an \"ideal\" category based on the absolute bar thickness or, if undefined or null,\n * uses the smallest interval (see computeMinSampleSize) that prevents bar overlapping. This\n * mode currently always generates bars equally sized (until we introduce scriptable options?).\n * @private\n */\nfunction computeFitCategoryTraits(index, ruler, options) {\n\tvar thickness = options.barThickness;\n\tvar count = ruler.stackCount;\n\tvar curr = ruler.pixels[index];\n\tvar size, ratio;\n\n\tif (helpers$1.isNullOrUndef(thickness)) {\n\t\tsize = ruler.min * options.categoryPercentage;\n\t\tratio = options.barPercentage;\n\t} else {\n\t\t// When bar thickness is enforced, category and bar percentages are ignored.\n\t\t// Note(SB): we could add support for relative bar thickness (e.g. barThickness: '50%')\n\t\t// and deprecate barPercentage since this value is ignored when thickness is absolute.\n\t\tsize = thickness * count;\n\t\tratio = 1;\n\t}\n\n\treturn {\n\t\tchunk: size / count,\n\t\tratio: ratio,\n\t\tstart: curr - (size / 2)\n\t};\n}\n\n/**\n * Computes an \"optimal\" category that globally arranges bars side by side (no gap when\n * percentage options are 1), based on the previous and following categories. This mode\n * generates bars with different widths when data are not evenly spaced.\n * @private\n */\nfunction computeFlexCategoryTraits(index, ruler, options) {\n\tvar pixels = ruler.pixels;\n\tvar curr = pixels[index];\n\tvar prev = index > 0 ? pixels[index - 1] : null;\n\tvar next = index < pixels.length - 1 ? pixels[index + 1] : null;\n\tvar percent = options.categoryPercentage;\n\tvar start, size;\n\n\tif (prev === null) {\n\t\t// first data: its size is double based on the next point or,\n\t\t// if it's also the last data, we use the scale size.\n\t\tprev = curr - (next === null ? ruler.end - ruler.start : next - curr);\n\t}\n\n\tif (next === null) {\n\t\t// last data: its size is also double based on the previous point.\n\t\tnext = curr + curr - prev;\n\t}\n\n\tstart = curr - (curr - Math.min(prev, next)) / 2 * percent;\n\tsize = Math.abs(next - prev) / 2 * percent;\n\n\treturn {\n\t\tchunk: size / ruler.stackCount,\n\t\tratio: options.barPercentage,\n\t\tstart: start\n\t};\n}\n\nvar controller_bar = core_datasetController.extend({\n\n\tdataElementType: elements.Rectangle,\n\n\tinitialize: function() {\n\t\tvar me = this;\n\t\tvar meta;\n\n\t\tcore_datasetController.prototype.initialize.apply(me, arguments);\n\n\t\tmeta = me.getMeta();\n\t\tmeta.stack = me.getDataset().stack;\n\t\tmeta.bar = true;\n\t},\n\n\tupdate: function(reset) {\n\t\tvar me = this;\n\t\tvar rects = me.getMeta().data;\n\t\tvar i, ilen;\n\n\t\tme._ruler = me.getRuler();\n\n\t\tfor (i = 0, ilen = rects.length; i < ilen; ++i) {\n\t\t\tme.updateElement(rects[i], i, reset);\n\t\t}\n\t},\n\n\tupdateElement: function(rectangle, index, reset) {\n\t\tvar me = this;\n\t\tvar meta = me.getMeta();\n\t\tvar dataset = me.getDataset();\n\t\tvar options = me._resolveElementOptions(rectangle, index);\n\n\t\trectangle._xScale = me.getScaleForId(meta.xAxisID);\n\t\trectangle._yScale = me.getScaleForId(meta.yAxisID);\n\t\trectangle._datasetIndex = me.index;\n\t\trectangle._index = index;\n\t\trectangle._model = {\n\t\t\tbackgroundColor: options.backgroundColor,\n\t\t\tborderColor: options.borderColor,\n\t\t\tborderSkipped: options.borderSkipped,\n\t\t\tborderWidth: options.borderWidth,\n\t\t\tdatasetLabel: dataset.label,\n\t\t\tlabel: me.chart.data.labels[index]\n\t\t};\n\n\t\tme._updateElementGeometry(rectangle, index, reset);\n\n\t\trectangle.pivot();\n\t},\n\n\t/**\n\t * @private\n\t */\n\t_updateElementGeometry: function(rectangle, index, reset) {\n\t\tvar me = this;\n\t\tvar model = rectangle._model;\n\t\tvar vscale = me._getValueScale();\n\t\tvar base = vscale.getBasePixel();\n\t\tvar horizontal = vscale.isHorizontal();\n\t\tvar ruler = me._ruler || me.getRuler();\n\t\tvar vpixels = me.calculateBarValuePixels(me.index, index);\n\t\tvar ipixels = me.calculateBarIndexPixels(me.index, index, ruler);\n\n\t\tmodel.horizontal = horizontal;\n\t\tmodel.base = reset ? base : vpixels.base;\n\t\tmodel.x = horizontal ? reset ? base : vpixels.head : ipixels.center;\n\t\tmodel.y = horizontal ? ipixels.center : reset ? base : vpixels.head;\n\t\tmodel.height = horizontal ? ipixels.size : undefined;\n\t\tmodel.width = horizontal ? undefined : ipixels.size;\n\t},\n\n\t/**\n\t * Returns the stacks based on groups and bar visibility.\n\t * @param {number} [last] - The dataset index\n\t * @returns {string[]} The list of stack IDs\n\t * @private\n\t */\n\t_getStacks: function(last) {\n\t\tvar me = this;\n\t\tvar chart = me.chart;\n\t\tvar scale = me._getIndexScale();\n\t\tvar stacked = scale.options.stacked;\n\t\tvar ilen = last === undefined ? chart.data.datasets.length : last + 1;\n\t\tvar stacks = [];\n\t\tvar i, meta;\n\n\t\tfor (i = 0; i < ilen; ++i) {\n\t\t\tmeta = chart.getDatasetMeta(i);\n\t\t\tif (meta.bar && chart.isDatasetVisible(i) &&\n\t\t\t\t(stacked === false ||\n\t\t\t\t(stacked === true && stacks.indexOf(meta.stack) === -1) ||\n\t\t\t\t(stacked === undefined && (meta.stack === undefined || stacks.indexOf(meta.stack) === -1)))) {\n\t\t\t\tstacks.push(meta.stack);\n\t\t\t}\n\t\t}\n\n\t\treturn stacks;\n\t},\n\n\t/**\n\t * Returns the effective number of stacks based on groups and bar visibility.\n\t * @private\n\t */\n\tgetStackCount: function() {\n\t\treturn this._getStacks().length;\n\t},\n\n\t/**\n\t * Returns the stack index for the given dataset based on groups and bar visibility.\n\t * @param {number} [datasetIndex] - The dataset index\n\t * @param {string} [name] - The stack name to find\n\t * @returns {number} The stack index\n\t * @private\n\t */\n\tgetStackIndex: function(datasetIndex, name) {\n\t\tvar stacks = this._getStacks(datasetIndex);\n\t\tvar index = (name !== undefined)\n\t\t\t? stacks.indexOf(name)\n\t\t\t: -1; // indexOf returns -1 if element is not present\n\n\t\treturn (index === -1)\n\t\t\t? stacks.length - 1\n\t\t\t: index;\n\t},\n\n\t/**\n\t * @private\n\t */\n\tgetRuler: function() {\n\t\tvar me = this;\n\t\tvar scale = me._getIndexScale();\n\t\tvar stackCount = me.getStackCount();\n\t\tvar datasetIndex = me.index;\n\t\tvar isHorizontal = scale.isHorizontal();\n\t\tvar start = isHorizontal ? scale.left : scale.top;\n\t\tvar end = start + (isHorizontal ? scale.width : scale.height);\n\t\tvar pixels = [];\n\t\tvar i, ilen, min;\n\n\t\tfor (i = 0, ilen = me.getMeta().data.length; i < ilen; ++i) {\n\t\t\tpixels.push(scale.getPixelForValue(null, i, datasetIndex));\n\t\t}\n\n\t\tmin = helpers$1.isNullOrUndef(scale.options.barThickness)\n\t\t\t? computeMinSampleSize(scale, pixels)\n\t\t\t: -1;\n\n\t\treturn {\n\t\t\tmin: min,\n\t\t\tpixels: pixels,\n\t\t\tstart: start,\n\t\t\tend: end,\n\t\t\tstackCount: stackCount,\n\t\t\tscale: scale\n\t\t};\n\t},\n\n\t/**\n\t * Note: pixel values are not clamped to the scale area.\n\t * @private\n\t */\n\tcalculateBarValuePixels: function(datasetIndex, index) {\n\t\tvar me = this;\n\t\tvar chart = me.chart;\n\t\tvar meta = me.getMeta();\n\t\tvar scale = me._getValueScale();\n\t\tvar isHorizontal = scale.isHorizontal();\n\t\tvar datasets = chart.data.datasets;\n\t\tvar value = +scale.getRightValue(datasets[datasetIndex].data[index]);\n\t\tvar minBarLength = scale.options.minBarLength;\n\t\tvar stacked = scale.options.stacked;\n\t\tvar stack = meta.stack;\n\t\tvar start = 0;\n\t\tvar i, imeta, ivalue, base, head, size;\n\n\t\tif (stacked || (stacked === undefined && stack !== undefined)) {\n\t\t\tfor (i = 0; i < datasetIndex; ++i) {\n\t\t\t\timeta = chart.getDatasetMeta(i);\n\n\t\t\t\tif (imeta.bar &&\n\t\t\t\t\timeta.stack === stack &&\n\t\t\t\t\timeta.controller._getValueScaleId() === scale.id &&\n\t\t\t\t\tchart.isDatasetVisible(i)) {\n\n\t\t\t\t\tivalue = +scale.getRightValue(datasets[i].data[index]);\n\t\t\t\t\tif ((value < 0 && ivalue < 0) || (value >= 0 && ivalue > 0)) {\n\t\t\t\t\t\tstart += ivalue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tbase = scale.getPixelForValue(start);\n\t\thead = scale.getPixelForValue(start + value);\n\t\tsize = head - base;\n\n\t\tif (minBarLength !== undefined && Math.abs(size) < minBarLength) {\n\t\t\tsize = minBarLength;\n\t\t\tif (value >= 0 && !isHorizontal || value < 0 && isHorizontal) {\n\t\t\t\thead = base - minBarLength;\n\t\t\t} else {\n\t\t\t\thead = base + minBarLength;\n\t\t\t}\n\t\t}\n\n\t\treturn {\n\t\t\tsize: size,\n\t\t\tbase: base,\n\t\t\thead: head,\n\t\t\tcenter: head + size / 2\n\t\t};\n\t},\n\n\t/**\n\t * @private\n\t */\n\tcalculateBarIndexPixels: function(datasetIndex, index, ruler) {\n\t\tvar me = this;\n\t\tvar options = ruler.scale.options;\n\t\tvar range = options.barThickness === 'flex'\n\t\t\t? computeFlexCategoryTraits(index, ruler, options)\n\t\t\t: computeFitCategoryTraits(index, ruler, options);\n\n\t\tvar stackIndex = me.getStackIndex(datasetIndex, me.getMeta().stack);\n\t\tvar center = range.start + (range.chunk * stackIndex) + (range.chunk / 2);\n\t\tvar size = Math.min(\n\t\t\thelpers$1.valueOrDefault(options.maxBarThickness, Infinity),\n\t\t\trange.chunk * range.ratio);\n\n\t\treturn {\n\t\t\tbase: center - size / 2,\n\t\t\thead: center + size / 2,\n\t\t\tcenter: center,\n\t\t\tsize: size\n\t\t};\n\t},\n\n\tdraw: function() {\n\t\tvar me = this;\n\t\tvar chart = me.chart;\n\t\tvar scale = me._getValueScale();\n\t\tvar rects = me.getMeta().data;\n\t\tvar dataset = me.getDataset();\n\t\tvar ilen = rects.length;\n\t\tvar i = 0;\n\n\t\thelpers$1.canvas.clipArea(chart.ctx, chart.chartArea);\n\n\t\tfor (; i < ilen; ++i) {\n\t\t\tif (!isNaN(scale.getRightValue(dataset.data[i]))) {\n\t\t\t\trects[i].draw();\n\t\t\t}\n\t\t}\n\n\t\thelpers$1.canvas.unclipArea(chart.ctx);\n\t},\n\n\t/**\n\t * @private\n\t */\n\t_resolveElementOptions: function(rectangle, index) {\n\t\tvar me = this;\n\t\tvar chart = me.chart;\n\t\tvar datasets = chart.data.datasets;\n\t\tvar dataset = datasets[me.index];\n\t\tvar custom = rectangle.custom || {};\n\t\tvar options = chart.options.elements.rectangle;\n\t\tvar values = {};\n\t\tvar i, ilen, key;\n\n\t\t// Scriptable options\n\t\tvar context = {\n\t\t\tchart: chart,\n\t\t\tdataIndex: index,\n\t\t\tdataset: dataset,\n\t\t\tdatasetIndex: me.index\n\t\t};\n\n\t\tvar keys = [\n\t\t\t'backgroundColor',\n\t\t\t'borderColor',\n\t\t\t'borderSkipped',\n\t\t\t'borderWidth'\n\t\t];\n\n\t\tfor (i = 0, ilen = keys.length; i < ilen; ++i) {\n\t\t\tkey = keys[i];\n\t\t\tvalues[key] = resolve$1([\n\t\t\t\tcustom[key],\n\t\t\t\tdataset[key],\n\t\t\t\toptions[key]\n\t\t\t], context, index);\n\t\t}\n\n\t\treturn values;\n\t}\n});\n\nvar valueOrDefault$3 = helpers$1.valueOrDefault;\nvar resolve$2 = helpers$1.options.resolve;\n\ncore_defaults._set('bubble', {\n\thover: {\n\t\tmode: 'single'\n\t},\n\n\tscales: {\n\t\txAxes: [{\n\t\t\ttype: 'linear', // bubble should probably use a linear scale by default\n\t\t\tposition: 'bottom',\n\t\t\tid: 'x-axis-0' // need an ID so datasets can reference the scale\n\t\t}],\n\t\tyAxes: [{\n\t\t\ttype: 'linear',\n\t\t\tposition: 'left',\n\t\t\tid: 'y-axis-0'\n\t\t}]\n\t},\n\n\ttooltips: {\n\t\tcallbacks: {\n\t\t\ttitle: function() {\n\t\t\t\t// Title doesn't make sense for scatter since we format the data as a point\n\t\t\t\treturn '';\n\t\t\t},\n\t\t\tlabel: function(item, data) {\n\t\t\t\tvar datasetLabel = data.datasets[item.datasetIndex].label || '';\n\t\t\t\tvar dataPoint = data.datasets[item.datasetIndex].data[item.index];\n\t\t\t\treturn datasetLabel + ': (' + item.xLabel + ', ' + item.yLabel + ', ' + dataPoint.r + ')';\n\t\t\t}\n\t\t}\n\t}\n});\n\nvar controller_bubble = core_datasetController.extend({\n\t/**\n\t * @protected\n\t */\n\tdataElementType: elements.Point,\n\n\t/**\n\t * @protected\n\t */\n\tupdate: function(reset) {\n\t\tvar me = this;\n\t\tvar meta = me.getMeta();\n\t\tvar points = meta.data;\n\n\t\t// Update Points\n\t\thelpers$1.each(points, function(point, index) {\n\t\t\tme.updateElement(point, index, reset);\n\t\t});\n\t},\n\n\t/**\n\t * @protected\n\t */\n\tupdateElement: function(point, index, reset) {\n\t\tvar me = this;\n\t\tvar meta = me.getMeta();\n\t\tvar custom = point.custom || {};\n\t\tvar xScale = me.getScaleForId(meta.xAxisID);\n\t\tvar yScale = me.getScaleForId(meta.yAxisID);\n\t\tvar options = me._resolveElementOptions(point, index);\n\t\tvar data = me.getDataset().data[index];\n\t\tvar dsIndex = me.index;\n\n\t\tvar x = reset ? xScale.getPixelForDecimal(0.5) : xScale.getPixelForValue(typeof data === 'object' ? data : NaN, index, dsIndex);\n\t\tvar y = reset ? yScale.getBasePixel() : yScale.getPixelForValue(data, index, dsIndex);\n\n\t\tpoint._xScale = xScale;\n\t\tpoint._yScale = yScale;\n\t\tpoint._options = options;\n\t\tpoint._datasetIndex = dsIndex;\n\t\tpoint._index = index;\n\t\tpoint._model = {\n\t\t\tbackgroundColor: options.backgroundColor,\n\t\t\tborderColor: options.borderColor,\n\t\t\tborderWidth: options.borderWidth,\n\t\t\thitRadius: options.hitRadius,\n\t\t\tpointStyle: options.pointStyle,\n\t\t\trotation: options.rotation,\n\t\t\tradius: reset ? 0 : options.radius,\n\t\t\tskip: custom.skip || isNaN(x) || isNaN(y),\n\t\t\tx: x,\n\t\t\ty: y,\n\t\t};\n\n\t\tpoint.pivot();\n\t},\n\n\t/**\n\t * @protected\n\t */\n\tsetHoverStyle: function(point) {\n\t\tvar model = point._model;\n\t\tvar options = point._options;\n\t\tvar getHoverColor = helpers$1.getHoverColor;\n\n\t\tpoint.$previousStyle = {\n\t\t\tbackgroundColor: model.backgroundColor,\n\t\t\tborderColor: model.borderColor,\n\t\t\tborderWidth: model.borderWidth,\n\t\t\tradius: model.radius\n\t\t};\n\n\t\tmodel.backgroundColor = valueOrDefault$3(options.hoverBackgroundColor, getHoverColor(options.backgroundColor));\n\t\tmodel.borderColor = valueOrDefault$3(options.hoverBorderColor, getHoverColor(options.borderColor));\n\t\tmodel.borderWidth = valueOrDefault$3(options.hoverBorderWidth, options.borderWidth);\n\t\tmodel.radius = options.radius + options.hoverRadius;\n\t},\n\n\t/**\n\t * @private\n\t */\n\t_resolveElementOptions: function(point, index) {\n\t\tvar me = this;\n\t\tvar chart = me.chart;\n\t\tvar datasets = chart.data.datasets;\n\t\tvar dataset = datasets[me.index];\n\t\tvar custom = point.custom || {};\n\t\tvar options = chart.options.elements.point;\n\t\tvar data = dataset.data[index];\n\t\tvar values = {};\n\t\tvar i, ilen, key;\n\n\t\t// Scriptable options\n\t\tvar context = {\n\t\t\tchart: chart,\n\t\t\tdataIndex: index,\n\t\t\tdataset: dataset,\n\t\t\tdatasetIndex: me.index\n\t\t};\n\n\t\tvar keys = [\n\t\t\t'backgroundColor',\n\t\t\t'borderColor',\n\t\t\t'borderWidth',\n\t\t\t'hoverBackgroundColor',\n\t\t\t'hoverBorderColor',\n\t\t\t'hoverBorderWidth',\n\t\t\t'hoverRadius',\n\t\t\t'hitRadius',\n\t\t\t'pointStyle',\n\t\t\t'rotation'\n\t\t];\n\n\t\tfor (i = 0, ilen = keys.length; i < ilen; ++i) {\n\t\t\tkey = keys[i];\n\t\t\tvalues[key] = resolve$2([\n\t\t\t\tcustom[key],\n\t\t\t\tdataset[key],\n\t\t\t\toptions[key]\n\t\t\t], context, index);\n\t\t}\n\n\t\t// Custom radius resolution\n\t\tvalues.radius = resolve$2([\n\t\t\tcustom.radius,\n\t\t\tdata ? data.r : undefined,\n\t\t\tdataset.radius,\n\t\t\toptions.radius\n\t\t], context, index);\n\n\t\treturn values;\n\t}\n});\n\nvar resolve$3 = helpers$1.options.resolve;\nvar valueOrDefault$4 = helpers$1.valueOrDefault;\n\ncore_defaults._set('doughnut', {\n\tanimation: {\n\t\t// Boolean - Whether we animate the rotation of the Doughnut\n\t\tanimateRotate: true,\n\t\t// Boolean - Whether we animate scaling the Doughnut from the centre\n\t\tanimateScale: false\n\t},\n\thover: {\n\t\tmode: 'single'\n\t},\n\tlegendCallback: function(chart) {\n\t\tvar text = [];\n\t\ttext.push('');\n\t\treturn text.join('');\n\t},\n\tlegend: {\n\t\tlabels: {\n\t\t\tgenerateLabels: function(chart) {\n\t\t\t\tvar data = chart.data;\n\t\t\t\tif (data.labels.length && data.datasets.length) {\n\t\t\t\t\treturn data.labels.map(function(label, i) {\n\t\t\t\t\t\tvar meta = chart.getDatasetMeta(0);\n\t\t\t\t\t\tvar ds = data.datasets[0];\n\t\t\t\t\t\tvar arc = meta.data[i];\n\t\t\t\t\t\tvar custom = arc && arc.custom || {};\n\t\t\t\t\t\tvar arcOpts = chart.options.elements.arc;\n\t\t\t\t\t\tvar fill = resolve$3([custom.backgroundColor, ds.backgroundColor, arcOpts.backgroundColor], undefined, i);\n\t\t\t\t\t\tvar stroke = resolve$3([custom.borderColor, ds.borderColor, arcOpts.borderColor], undefined, i);\n\t\t\t\t\t\tvar bw = resolve$3([custom.borderWidth, ds.borderWidth, arcOpts.borderWidth], undefined, i);\n\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\ttext: label,\n\t\t\t\t\t\t\tfillStyle: fill,\n\t\t\t\t\t\t\tstrokeStyle: stroke,\n\t\t\t\t\t\t\tlineWidth: bw,\n\t\t\t\t\t\t\thidden: isNaN(ds.data[i]) || meta.data[i].hidden,\n\n\t\t\t\t\t\t\t// Extra data used for toggling the correct item\n\t\t\t\t\t\t\tindex: i\n\t\t\t\t\t\t};\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\treturn [];\n\t\t\t}\n\t\t},\n\n\t\tonClick: function(e, legendItem) {\n\t\t\tvar index = legendItem.index;\n\t\t\tvar chart = this.chart;\n\t\t\tvar i, ilen, meta;\n\n\t\t\tfor (i = 0, ilen = (chart.data.datasets || []).length; i < ilen; ++i) {\n\t\t\t\tmeta = chart.getDatasetMeta(i);\n\t\t\t\t// toggle visibility of index if exists\n\t\t\t\tif (meta.data[index]) {\n\t\t\t\t\tmeta.data[index].hidden = !meta.data[index].hidden;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tchart.update();\n\t\t}\n\t},\n\n\t// The percentage of the chart that we cut out of the middle.\n\tcutoutPercentage: 50,\n\n\t// The rotation of the chart, where the first data arc begins.\n\trotation: Math.PI * -0.5,\n\n\t// The total circumference of the chart.\n\tcircumference: Math.PI * 2.0,\n\n\t// Need to override these to give a nice default\n\ttooltips: {\n\t\tcallbacks: {\n\t\t\ttitle: function() {\n\t\t\t\treturn '';\n\t\t\t},\n\t\t\tlabel: function(tooltipItem, data) {\n\t\t\t\tvar dataLabel = data.labels[tooltipItem.index];\n\t\t\t\tvar value = ': ' + data.datasets[tooltipItem.datasetIndex].data[tooltipItem.index];\n\n\t\t\t\tif (helpers$1.isArray(dataLabel)) {\n\t\t\t\t\t// show value on first line of multiline label\n\t\t\t\t\t// need to clone because we are changing the value\n\t\t\t\t\tdataLabel = dataLabel.slice();\n\t\t\t\t\tdataLabel[0] += value;\n\t\t\t\t} else {\n\t\t\t\t\tdataLabel += value;\n\t\t\t\t}\n\n\t\t\t\treturn dataLabel;\n\t\t\t}\n\t\t}\n\t}\n});\n\nvar controller_doughnut = core_datasetController.extend({\n\n\tdataElementType: elements.Arc,\n\n\tlinkScales: helpers$1.noop,\n\n\t// Get index of the dataset in relation to the visible datasets. This allows determining the inner and outer radius correctly\n\tgetRingIndex: function(datasetIndex) {\n\t\tvar ringIndex = 0;\n\n\t\tfor (var j = 0; j < datasetIndex; ++j) {\n\t\t\tif (this.chart.isDatasetVisible(j)) {\n\t\t\t\t++ringIndex;\n\t\t\t}\n\t\t}\n\n\t\treturn ringIndex;\n\t},\n\n\tupdate: function(reset) {\n\t\tvar me = this;\n\t\tvar chart = me.chart;\n\t\tvar chartArea = chart.chartArea;\n\t\tvar opts = chart.options;\n\t\tvar availableWidth = chartArea.right - chartArea.left;\n\t\tvar availableHeight = chartArea.bottom - chartArea.top;\n\t\tvar minSize = Math.min(availableWidth, availableHeight);\n\t\tvar offset = {x: 0, y: 0};\n\t\tvar meta = me.getMeta();\n\t\tvar arcs = meta.data;\n\t\tvar cutoutPercentage = opts.cutoutPercentage;\n\t\tvar circumference = opts.circumference;\n\t\tvar chartWeight = me._getRingWeight(me.index);\n\t\tvar i, ilen;\n\n\t\t// If the chart's circumference isn't a full circle, calculate minSize as a ratio of the width/height of the arc\n\t\tif (circumference < Math.PI * 2.0) {\n\t\t\tvar startAngle = opts.rotation % (Math.PI * 2.0);\n\t\t\tstartAngle += Math.PI * 2.0 * (startAngle >= Math.PI ? -1 : startAngle < -Math.PI ? 1 : 0);\n\t\t\tvar endAngle = startAngle + circumference;\n\t\t\tvar start = {x: Math.cos(startAngle), y: Math.sin(startAngle)};\n\t\t\tvar end = {x: Math.cos(endAngle), y: Math.sin(endAngle)};\n\t\t\tvar contains0 = (startAngle <= 0 && endAngle >= 0) || (startAngle <= Math.PI * 2.0 && Math.PI * 2.0 <= endAngle);\n\t\t\tvar contains90 = (startAngle <= Math.PI * 0.5 && Math.PI * 0.5 <= endAngle) || (startAngle <= Math.PI * 2.5 && Math.PI * 2.5 <= endAngle);\n\t\t\tvar contains180 = (startAngle <= -Math.PI && -Math.PI <= endAngle) || (startAngle <= Math.PI && Math.PI <= endAngle);\n\t\t\tvar contains270 = (startAngle <= -Math.PI * 0.5 && -Math.PI * 0.5 <= endAngle) || (startAngle <= Math.PI * 1.5 && Math.PI * 1.5 <= endAngle);\n\t\t\tvar cutout = cutoutPercentage / 100.0;\n\t\t\tvar min = {x: contains180 ? -1 : Math.min(start.x * (start.x < 0 ? 1 : cutout), end.x * (end.x < 0 ? 1 : cutout)), y: contains270 ? -1 : Math.min(start.y * (start.y < 0 ? 1 : cutout), end.y * (end.y < 0 ? 1 : cutout))};\n\t\t\tvar max = {x: contains0 ? 1 : Math.max(start.x * (start.x > 0 ? 1 : cutout), end.x * (end.x > 0 ? 1 : cutout)), y: contains90 ? 1 : Math.max(start.y * (start.y > 0 ? 1 : cutout), end.y * (end.y > 0 ? 1 : cutout))};\n\t\t\tvar size = {width: (max.x - min.x) * 0.5, height: (max.y - min.y) * 0.5};\n\t\t\tminSize = Math.min(availableWidth / size.width, availableHeight / size.height);\n\t\t\toffset = {x: (max.x + min.x) * -0.5, y: (max.y + min.y) * -0.5};\n\t\t}\n\n\t\tfor (i = 0, ilen = arcs.length; i < ilen; ++i) {\n\t\t\tarcs[i]._options = me._resolveElementOptions(arcs[i], i);\n\t\t}\n\n\t\tchart.borderWidth = me.getMaxBorderWidth();\n\t\tchart.outerRadius = Math.max((minSize - chart.borderWidth) / 2, 0);\n\t\tchart.innerRadius = Math.max(cutoutPercentage ? (chart.outerRadius / 100) * (cutoutPercentage) : 0, 0);\n\t\tchart.radiusLength = (chart.outerRadius - chart.innerRadius) / (me._getVisibleDatasetWeightTotal() || 1);\n\t\tchart.offsetX = offset.x * chart.outerRadius;\n\t\tchart.offsetY = offset.y * chart.outerRadius;\n\n\t\tmeta.total = me.calculateTotal();\n\n\t\tme.outerRadius = chart.outerRadius - chart.radiusLength * me._getRingWeightOffset(me.index);\n\t\tme.innerRadius = Math.max(me.outerRadius - chart.radiusLength * chartWeight, 0);\n\n\t\tfor (i = 0, ilen = arcs.length; i < ilen; ++i) {\n\t\t\tme.updateElement(arcs[i], i, reset);\n\t\t}\n\t},\n\n\tupdateElement: function(arc, index, reset) {\n\t\tvar me = this;\n\t\tvar chart = me.chart;\n\t\tvar chartArea = chart.chartArea;\n\t\tvar opts = chart.options;\n\t\tvar animationOpts = opts.animation;\n\t\tvar centerX = (chartArea.left + chartArea.right) / 2;\n\t\tvar centerY = (chartArea.top + chartArea.bottom) / 2;\n\t\tvar startAngle = opts.rotation; // non reset case handled later\n\t\tvar endAngle = opts.rotation; // non reset case handled later\n\t\tvar dataset = me.getDataset();\n\t\tvar circumference = reset && animationOpts.animateRotate ? 0 : arc.hidden ? 0 : me.calculateCircumference(dataset.data[index]) * (opts.circumference / (2.0 * Math.PI));\n\t\tvar innerRadius = reset && animationOpts.animateScale ? 0 : me.innerRadius;\n\t\tvar outerRadius = reset && animationOpts.animateScale ? 0 : me.outerRadius;\n\t\tvar options = arc._options || {};\n\n\t\thelpers$1.extend(arc, {\n\t\t\t// Utility\n\t\t\t_datasetIndex: me.index,\n\t\t\t_index: index,\n\n\t\t\t// Desired view properties\n\t\t\t_model: {\n\t\t\t\tbackgroundColor: options.backgroundColor,\n\t\t\t\tborderColor: options.borderColor,\n\t\t\t\tborderWidth: options.borderWidth,\n\t\t\t\tborderAlign: options.borderAlign,\n\t\t\t\tx: centerX + chart.offsetX,\n\t\t\t\ty: centerY + chart.offsetY,\n\t\t\t\tstartAngle: startAngle,\n\t\t\t\tendAngle: endAngle,\n\t\t\t\tcircumference: circumference,\n\t\t\t\touterRadius: outerRadius,\n\t\t\t\tinnerRadius: innerRadius,\n\t\t\t\tlabel: helpers$1.valueAtIndexOrDefault(dataset.label, index, chart.data.labels[index])\n\t\t\t}\n\t\t});\n\n\t\tvar model = arc._model;\n\n\t\t// Set correct angles if not resetting\n\t\tif (!reset || !animationOpts.animateRotate) {\n\t\t\tif (index === 0) {\n\t\t\t\tmodel.startAngle = opts.rotation;\n\t\t\t} else {\n\t\t\t\tmodel.startAngle = me.getMeta().data[index - 1]._model.endAngle;\n\t\t\t}\n\n\t\t\tmodel.endAngle = model.startAngle + model.circumference;\n\t\t}\n\n\t\tarc.pivot();\n\t},\n\n\tcalculateTotal: function() {\n\t\tvar dataset = this.getDataset();\n\t\tvar meta = this.getMeta();\n\t\tvar total = 0;\n\t\tvar value;\n\n\t\thelpers$1.each(meta.data, function(element, index) {\n\t\t\tvalue = dataset.data[index];\n\t\t\tif (!isNaN(value) && !element.hidden) {\n\t\t\t\ttotal += Math.abs(value);\n\t\t\t}\n\t\t});\n\n\t\t/* if (total === 0) {\n\t\t\ttotal = NaN;\n\t\t}*/\n\n\t\treturn total;\n\t},\n\n\tcalculateCircumference: function(value) {\n\t\tvar total = this.getMeta().total;\n\t\tif (total > 0 && !isNaN(value)) {\n\t\t\treturn (Math.PI * 2.0) * (Math.abs(value) / total);\n\t\t}\n\t\treturn 0;\n\t},\n\n\t// gets the max border or hover width to properly scale pie charts\n\tgetMaxBorderWidth: function(arcs) {\n\t\tvar me = this;\n\t\tvar max = 0;\n\t\tvar chart = me.chart;\n\t\tvar i, ilen, meta, arc, controller, options, borderWidth, hoverWidth;\n\n\t\tif (!arcs) {\n\t\t\t// Find the outmost visible dataset\n\t\t\tfor (i = 0, ilen = chart.data.datasets.length; i < ilen; ++i) {\n\t\t\t\tif (chart.isDatasetVisible(i)) {\n\t\t\t\t\tmeta = chart.getDatasetMeta(i);\n\t\t\t\t\tarcs = meta.data;\n\t\t\t\t\tif (i !== me.index) {\n\t\t\t\t\t\tcontroller = meta.controller;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (!arcs) {\n\t\t\treturn 0;\n\t\t}\n\n\t\tfor (i = 0, ilen = arcs.length; i < ilen; ++i) {\n\t\t\tarc = arcs[i];\n\t\t\toptions = controller ? controller._resolveElementOptions(arc, i) : arc._options;\n\t\t\tif (options.borderAlign !== 'inner') {\n\t\t\t\tborderWidth = options.borderWidth;\n\t\t\t\thoverWidth = options.hoverBorderWidth;\n\n\t\t\t\tmax = borderWidth > max ? borderWidth : max;\n\t\t\t\tmax = hoverWidth > max ? hoverWidth : max;\n\t\t\t}\n\t\t}\n\t\treturn max;\n\t},\n\n\t/**\n\t * @protected\n\t */\n\tsetHoverStyle: function(arc) {\n\t\tvar model = arc._model;\n\t\tvar options = arc._options;\n\t\tvar getHoverColor = helpers$1.getHoverColor;\n\n\t\tarc.$previousStyle = {\n\t\t\tbackgroundColor: model.backgroundColor,\n\t\t\tborderColor: model.borderColor,\n\t\t\tborderWidth: model.borderWidth,\n\t\t};\n\n\t\tmodel.backgroundColor = valueOrDefault$4(options.hoverBackgroundColor, getHoverColor(options.backgroundColor));\n\t\tmodel.borderColor = valueOrDefault$4(options.hoverBorderColor, getHoverColor(options.borderColor));\n\t\tmodel.borderWidth = valueOrDefault$4(options.hoverBorderWidth, options.borderWidth);\n\t},\n\n\t/**\n\t * @private\n\t */\n\t_resolveElementOptions: function(arc, index) {\n\t\tvar me = this;\n\t\tvar chart = me.chart;\n\t\tvar dataset = me.getDataset();\n\t\tvar custom = arc.custom || {};\n\t\tvar options = chart.options.elements.arc;\n\t\tvar values = {};\n\t\tvar i, ilen, key;\n\n\t\t// Scriptable options\n\t\tvar context = {\n\t\t\tchart: chart,\n\t\t\tdataIndex: index,\n\t\t\tdataset: dataset,\n\t\t\tdatasetIndex: me.index\n\t\t};\n\n\t\tvar keys = [\n\t\t\t'backgroundColor',\n\t\t\t'borderColor',\n\t\t\t'borderWidth',\n\t\t\t'borderAlign',\n\t\t\t'hoverBackgroundColor',\n\t\t\t'hoverBorderColor',\n\t\t\t'hoverBorderWidth',\n\t\t];\n\n\t\tfor (i = 0, ilen = keys.length; i < ilen; ++i) {\n\t\t\tkey = keys[i];\n\t\t\tvalues[key] = resolve$3([\n\t\t\t\tcustom[key],\n\t\t\t\tdataset[key],\n\t\t\t\toptions[key]\n\t\t\t], context, index);\n\t\t}\n\n\t\treturn values;\n\t},\n\n\t/**\n\t * Get radius length offset of the dataset in relation to the visible datasets weights. This allows determining the inner and outer radius correctly\n\t * @private\n\t */\n\t_getRingWeightOffset: function(datasetIndex) {\n\t\tvar ringWeightOffset = 0;\n\n\t\tfor (var i = 0; i < datasetIndex; ++i) {\n\t\t\tif (this.chart.isDatasetVisible(i)) {\n\t\t\t\tringWeightOffset += this._getRingWeight(i);\n\t\t\t}\n\t\t}\n\n\t\treturn ringWeightOffset;\n\t},\n\n\t/**\n\t * @private\n\t */\n\t_getRingWeight: function(dataSetIndex) {\n\t\treturn Math.max(valueOrDefault$4(this.chart.data.datasets[dataSetIndex].weight, 1), 0);\n\t},\n\n\t/**\n\t * Returns the sum of all visibile data set weights. This value can be 0.\n\t * @private\n\t */\n\t_getVisibleDatasetWeightTotal: function() {\n\t\treturn this._getRingWeightOffset(this.chart.data.datasets.length);\n\t}\n});\n\ncore_defaults._set('horizontalBar', {\n\thover: {\n\t\tmode: 'index',\n\t\taxis: 'y'\n\t},\n\n\tscales: {\n\t\txAxes: [{\n\t\t\ttype: 'linear',\n\t\t\tposition: 'bottom'\n\t\t}],\n\n\t\tyAxes: [{\n\t\t\ttype: 'category',\n\t\t\tposition: 'left',\n\t\t\tcategoryPercentage: 0.8,\n\t\t\tbarPercentage: 0.9,\n\t\t\toffset: true,\n\t\t\tgridLines: {\n\t\t\t\toffsetGridLines: true\n\t\t\t}\n\t\t}]\n\t},\n\n\telements: {\n\t\trectangle: {\n\t\t\tborderSkipped: 'left'\n\t\t}\n\t},\n\n\ttooltips: {\n\t\tmode: 'index',\n\t\taxis: 'y'\n\t}\n});\n\nvar controller_horizontalBar = controller_bar.extend({\n\t/**\n\t * @private\n\t */\n\t_getValueScaleId: function() {\n\t\treturn this.getMeta().xAxisID;\n\t},\n\n\t/**\n\t * @private\n\t */\n\t_getIndexScaleId: function() {\n\t\treturn this.getMeta().yAxisID;\n\t}\n});\n\nvar valueOrDefault$5 = helpers$1.valueOrDefault;\nvar resolve$4 = helpers$1.options.resolve;\nvar isPointInArea = helpers$1.canvas._isPointInArea;\n\ncore_defaults._set('line', {\n\tshowLines: true,\n\tspanGaps: false,\n\n\thover: {\n\t\tmode: 'label'\n\t},\n\n\tscales: {\n\t\txAxes: [{\n\t\t\ttype: 'category',\n\t\t\tid: 'x-axis-0'\n\t\t}],\n\t\tyAxes: [{\n\t\t\ttype: 'linear',\n\t\t\tid: 'y-axis-0'\n\t\t}]\n\t}\n});\n\nfunction lineEnabled(dataset, options) {\n\treturn valueOrDefault$5(dataset.showLine, options.showLines);\n}\n\nvar controller_line = core_datasetController.extend({\n\n\tdatasetElementType: elements.Line,\n\n\tdataElementType: elements.Point,\n\n\tupdate: function(reset) {\n\t\tvar me = this;\n\t\tvar meta = me.getMeta();\n\t\tvar line = meta.dataset;\n\t\tvar points = meta.data || [];\n\t\tvar scale = me.getScaleForId(meta.yAxisID);\n\t\tvar dataset = me.getDataset();\n\t\tvar showLine = lineEnabled(dataset, me.chart.options);\n\t\tvar i, ilen;\n\n\t\t// Update Line\n\t\tif (showLine) {\n\t\t\t// Compatibility: If the properties are defined with only the old name, use those values\n\t\t\tif ((dataset.tension !== undefined) && (dataset.lineTension === undefined)) {\n\t\t\t\tdataset.lineTension = dataset.tension;\n\t\t\t}\n\n\t\t\t// Utility\n\t\t\tline._scale = scale;\n\t\t\tline._datasetIndex = me.index;\n\t\t\t// Data\n\t\t\tline._children = points;\n\t\t\t// Model\n\t\t\tline._model = me._resolveLineOptions(line);\n\n\t\t\tline.pivot();\n\t\t}\n\n\t\t// Update Points\n\t\tfor (i = 0, ilen = points.length; i < ilen; ++i) {\n\t\t\tme.updateElement(points[i], i, reset);\n\t\t}\n\n\t\tif (showLine && line._model.tension !== 0) {\n\t\t\tme.updateBezierControlPoints();\n\t\t}\n\n\t\t// Now pivot the point for animation\n\t\tfor (i = 0, ilen = points.length; i < ilen; ++i) {\n\t\t\tpoints[i].pivot();\n\t\t}\n\t},\n\n\tupdateElement: function(point, index, reset) {\n\t\tvar me = this;\n\t\tvar meta = me.getMeta();\n\t\tvar custom = point.custom || {};\n\t\tvar dataset = me.getDataset();\n\t\tvar datasetIndex = me.index;\n\t\tvar value = dataset.data[index];\n\t\tvar yScale = me.getScaleForId(meta.yAxisID);\n\t\tvar xScale = me.getScaleForId(meta.xAxisID);\n\t\tvar lineModel = meta.dataset._model;\n\t\tvar x, y;\n\n\t\tvar options = me._resolvePointOptions(point, index);\n\n\t\tx = xScale.getPixelForValue(typeof value === 'object' ? value : NaN, index, datasetIndex);\n\t\ty = reset ? yScale.getBasePixel() : me.calculatePointY(value, index, datasetIndex);\n\n\t\t// Utility\n\t\tpoint._xScale = xScale;\n\t\tpoint._yScale = yScale;\n\t\tpoint._options = options;\n\t\tpoint._datasetIndex = datasetIndex;\n\t\tpoint._index = index;\n\n\t\t// Desired view properties\n\t\tpoint._model = {\n\t\t\tx: x,\n\t\t\ty: y,\n\t\t\tskip: custom.skip || isNaN(x) || isNaN(y),\n\t\t\t// Appearance\n\t\t\tradius: options.radius,\n\t\t\tpointStyle: options.pointStyle,\n\t\t\trotation: options.rotation,\n\t\t\tbackgroundColor: options.backgroundColor,\n\t\t\tborderColor: options.borderColor,\n\t\t\tborderWidth: options.borderWidth,\n\t\t\ttension: valueOrDefault$5(custom.tension, lineModel ? lineModel.tension : 0),\n\t\t\tsteppedLine: lineModel ? lineModel.steppedLine : false,\n\t\t\t// Tooltip\n\t\t\thitRadius: options.hitRadius\n\t\t};\n\t},\n\n\t/**\n\t * @private\n\t */\n\t_resolvePointOptions: function(element, index) {\n\t\tvar me = this;\n\t\tvar chart = me.chart;\n\t\tvar dataset = chart.data.datasets[me.index];\n\t\tvar custom = element.custom || {};\n\t\tvar options = chart.options.elements.point;\n\t\tvar values = {};\n\t\tvar i, ilen, key;\n\n\t\t// Scriptable options\n\t\tvar context = {\n\t\t\tchart: chart,\n\t\t\tdataIndex: index,\n\t\t\tdataset: dataset,\n\t\t\tdatasetIndex: me.index\n\t\t};\n\n\t\tvar ELEMENT_OPTIONS = {\n\t\t\tbackgroundColor: 'pointBackgroundColor',\n\t\t\tborderColor: 'pointBorderColor',\n\t\t\tborderWidth: 'pointBorderWidth',\n\t\t\thitRadius: 'pointHitRadius',\n\t\t\thoverBackgroundColor: 'pointHoverBackgroundColor',\n\t\t\thoverBorderColor: 'pointHoverBorderColor',\n\t\t\thoverBorderWidth: 'pointHoverBorderWidth',\n\t\t\thoverRadius: 'pointHoverRadius',\n\t\t\tpointStyle: 'pointStyle',\n\t\t\tradius: 'pointRadius',\n\t\t\trotation: 'pointRotation'\n\t\t};\n\t\tvar keys = Object.keys(ELEMENT_OPTIONS);\n\n\t\tfor (i = 0, ilen = keys.length; i < ilen; ++i) {\n\t\t\tkey = keys[i];\n\t\t\tvalues[key] = resolve$4([\n\t\t\t\tcustom[key],\n\t\t\t\tdataset[ELEMENT_OPTIONS[key]],\n\t\t\t\tdataset[key],\n\t\t\t\toptions[key]\n\t\t\t], context, index);\n\t\t}\n\n\t\treturn values;\n\t},\n\n\t/**\n\t * @private\n\t */\n\t_resolveLineOptions: function(element) {\n\t\tvar me = this;\n\t\tvar chart = me.chart;\n\t\tvar dataset = chart.data.datasets[me.index];\n\t\tvar custom = element.custom || {};\n\t\tvar options = chart.options;\n\t\tvar elementOptions = options.elements.line;\n\t\tvar values = {};\n\t\tvar i, ilen, key;\n\n\t\tvar keys = [\n\t\t\t'backgroundColor',\n\t\t\t'borderWidth',\n\t\t\t'borderColor',\n\t\t\t'borderCapStyle',\n\t\t\t'borderDash',\n\t\t\t'borderDashOffset',\n\t\t\t'borderJoinStyle',\n\t\t\t'fill',\n\t\t\t'cubicInterpolationMode'\n\t\t];\n\n\t\tfor (i = 0, ilen = keys.length; i < ilen; ++i) {\n\t\t\tkey = keys[i];\n\t\t\tvalues[key] = resolve$4([\n\t\t\t\tcustom[key],\n\t\t\t\tdataset[key],\n\t\t\t\telementOptions[key]\n\t\t\t]);\n\t\t}\n\n\t\t// The default behavior of lines is to break at null values, according\n\t\t// to https://github.com/chartjs/Chart.js/issues/2435#issuecomment-216718158\n\t\t// This option gives lines the ability to span gaps\n\t\tvalues.spanGaps = valueOrDefault$5(dataset.spanGaps, options.spanGaps);\n\t\tvalues.tension = valueOrDefault$5(dataset.lineTension, elementOptions.tension);\n\t\tvalues.steppedLine = resolve$4([custom.steppedLine, dataset.steppedLine, elementOptions.stepped]);\n\n\t\treturn values;\n\t},\n\n\tcalculatePointY: function(value, index, datasetIndex) {\n\t\tvar me = this;\n\t\tvar chart = me.chart;\n\t\tvar meta = me.getMeta();\n\t\tvar yScale = me.getScaleForId(meta.yAxisID);\n\t\tvar sumPos = 0;\n\t\tvar sumNeg = 0;\n\t\tvar i, ds, dsMeta;\n\n\t\tif (yScale.options.stacked) {\n\t\t\tfor (i = 0; i < datasetIndex; i++) {\n\t\t\t\tds = chart.data.datasets[i];\n\t\t\t\tdsMeta = chart.getDatasetMeta(i);\n\t\t\t\tif (dsMeta.type === 'line' && dsMeta.yAxisID === yScale.id && chart.isDatasetVisible(i)) {\n\t\t\t\t\tvar stackedRightValue = Number(yScale.getRightValue(ds.data[index]));\n\t\t\t\t\tif (stackedRightValue < 0) {\n\t\t\t\t\t\tsumNeg += stackedRightValue || 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsumPos += stackedRightValue || 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvar rightValue = Number(yScale.getRightValue(value));\n\t\t\tif (rightValue < 0) {\n\t\t\t\treturn yScale.getPixelForValue(sumNeg + rightValue);\n\t\t\t}\n\t\t\treturn yScale.getPixelForValue(sumPos + rightValue);\n\t\t}\n\n\t\treturn yScale.getPixelForValue(value);\n\t},\n\n\tupdateBezierControlPoints: function() {\n\t\tvar me = this;\n\t\tvar chart = me.chart;\n\t\tvar meta = me.getMeta();\n\t\tvar lineModel = meta.dataset._model;\n\t\tvar area = chart.chartArea;\n\t\tvar points = meta.data || [];\n\t\tvar i, ilen, model, controlPoints;\n\n\t\t// Only consider points that are drawn in case the spanGaps option is used\n\t\tif (lineModel.spanGaps) {\n\t\t\tpoints = points.filter(function(pt) {\n\t\t\t\treturn !pt._model.skip;\n\t\t\t});\n\t\t}\n\n\t\tfunction capControlPoint(pt, min, max) {\n\t\t\treturn Math.max(Math.min(pt, max), min);\n\t\t}\n\n\t\tif (lineModel.cubicInterpolationMode === 'monotone') {\n\t\t\thelpers$1.splineCurveMonotone(points);\n\t\t} else {\n\t\t\tfor (i = 0, ilen = points.length; i < ilen; ++i) {\n\t\t\t\tmodel = points[i]._model;\n\t\t\t\tcontrolPoints = helpers$1.splineCurve(\n\t\t\t\t\thelpers$1.previousItem(points, i)._model,\n\t\t\t\t\tmodel,\n\t\t\t\t\thelpers$1.nextItem(points, i)._model,\n\t\t\t\t\tlineModel.tension\n\t\t\t\t);\n\t\t\t\tmodel.controlPointPreviousX = controlPoints.previous.x;\n\t\t\t\tmodel.controlPointPreviousY = controlPoints.previous.y;\n\t\t\t\tmodel.controlPointNextX = controlPoints.next.x;\n\t\t\t\tmodel.controlPointNextY = controlPoints.next.y;\n\t\t\t}\n\t\t}\n\n\t\tif (chart.options.elements.line.capBezierPoints) {\n\t\t\tfor (i = 0, ilen = points.length; i < ilen; ++i) {\n\t\t\t\tmodel = points[i]._model;\n\t\t\t\tif (isPointInArea(model, area)) {\n\t\t\t\t\tif (i > 0 && isPointInArea(points[i - 1]._model, area)) {\n\t\t\t\t\t\tmodel.controlPointPreviousX = capControlPoint(model.controlPointPreviousX, area.left, area.right);\n\t\t\t\t\t\tmodel.controlPointPreviousY = capControlPoint(model.controlPointPreviousY, area.top, area.bottom);\n\t\t\t\t\t}\n\t\t\t\t\tif (i < points.length - 1 && isPointInArea(points[i + 1]._model, area)) {\n\t\t\t\t\t\tmodel.controlPointNextX = capControlPoint(model.controlPointNextX, area.left, area.right);\n\t\t\t\t\t\tmodel.controlPointNextY = capControlPoint(model.controlPointNextY, area.top, area.bottom);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\tdraw: function() {\n\t\tvar me = this;\n\t\tvar chart = me.chart;\n\t\tvar meta = me.getMeta();\n\t\tvar points = meta.data || [];\n\t\tvar area = chart.chartArea;\n\t\tvar ilen = points.length;\n\t\tvar halfBorderWidth;\n\t\tvar i = 0;\n\n\t\tif (lineEnabled(me.getDataset(), chart.options)) {\n\t\t\thalfBorderWidth = (meta.dataset._model.borderWidth || 0) / 2;\n\n\t\t\thelpers$1.canvas.clipArea(chart.ctx, {\n\t\t\t\tleft: area.left,\n\t\t\t\tright: area.right,\n\t\t\t\ttop: area.top - halfBorderWidth,\n\t\t\t\tbottom: area.bottom + halfBorderWidth\n\t\t\t});\n\n\t\t\tmeta.dataset.draw();\n\n\t\t\thelpers$1.canvas.unclipArea(chart.ctx);\n\t\t}\n\n\t\t// Draw the points\n\t\tfor (; i < ilen; ++i) {\n\t\t\tpoints[i].draw(area);\n\t\t}\n\t},\n\n\t/**\n\t * @protected\n\t */\n\tsetHoverStyle: function(point) {\n\t\tvar model = point._model;\n\t\tvar options = point._options;\n\t\tvar getHoverColor = helpers$1.getHoverColor;\n\n\t\tpoint.$previousStyle = {\n\t\t\tbackgroundColor: model.backgroundColor,\n\t\t\tborderColor: model.borderColor,\n\t\t\tborderWidth: model.borderWidth,\n\t\t\tradius: model.radius\n\t\t};\n\n\t\tmodel.backgroundColor = valueOrDefault$5(options.hoverBackgroundColor, getHoverColor(options.backgroundColor));\n\t\tmodel.borderColor = valueOrDefault$5(options.hoverBorderColor, getHoverColor(options.borderColor));\n\t\tmodel.borderWidth = valueOrDefault$5(options.hoverBorderWidth, options.borderWidth);\n\t\tmodel.radius = valueOrDefault$5(options.hoverRadius, options.radius);\n\t},\n});\n\nvar resolve$5 = helpers$1.options.resolve;\n\ncore_defaults._set('polarArea', {\n\tscale: {\n\t\ttype: 'radialLinear',\n\t\tangleLines: {\n\t\t\tdisplay: false\n\t\t},\n\t\tgridLines: {\n\t\t\tcircular: true\n\t\t},\n\t\tpointLabels: {\n\t\t\tdisplay: false\n\t\t},\n\t\tticks: {\n\t\t\tbeginAtZero: true\n\t\t}\n\t},\n\n\t// Boolean - Whether to animate the rotation of the chart\n\tanimation: {\n\t\tanimateRotate: true,\n\t\tanimateScale: true\n\t},\n\n\tstartAngle: -0.5 * Math.PI,\n\tlegendCallback: function(chart) {\n\t\tvar text = [];\n\t\ttext.push('');\n\t\treturn text.join('');\n\t},\n\tlegend: {\n\t\tlabels: {\n\t\t\tgenerateLabels: function(chart) {\n\t\t\t\tvar data = chart.data;\n\t\t\t\tif (data.labels.length && data.datasets.length) {\n\t\t\t\t\treturn data.labels.map(function(label, i) {\n\t\t\t\t\t\tvar meta = chart.getDatasetMeta(0);\n\t\t\t\t\t\tvar ds = data.datasets[0];\n\t\t\t\t\t\tvar arc = meta.data[i];\n\t\t\t\t\t\tvar custom = arc.custom || {};\n\t\t\t\t\t\tvar arcOpts = chart.options.elements.arc;\n\t\t\t\t\t\tvar fill = resolve$5([custom.backgroundColor, ds.backgroundColor, arcOpts.backgroundColor], undefined, i);\n\t\t\t\t\t\tvar stroke = resolve$5([custom.borderColor, ds.borderColor, arcOpts.borderColor], undefined, i);\n\t\t\t\t\t\tvar bw = resolve$5([custom.borderWidth, ds.borderWidth, arcOpts.borderWidth], undefined, i);\n\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\ttext: label,\n\t\t\t\t\t\t\tfillStyle: fill,\n\t\t\t\t\t\t\tstrokeStyle: stroke,\n\t\t\t\t\t\t\tlineWidth: bw,\n\t\t\t\t\t\t\thidden: isNaN(ds.data[i]) || meta.data[i].hidden,\n\n\t\t\t\t\t\t\t// Extra data used for toggling the correct item\n\t\t\t\t\t\t\tindex: i\n\t\t\t\t\t\t};\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\treturn [];\n\t\t\t}\n\t\t},\n\n\t\tonClick: function(e, legendItem) {\n\t\t\tvar index = legendItem.index;\n\t\t\tvar chart = this.chart;\n\t\t\tvar i, ilen, meta;\n\n\t\t\tfor (i = 0, ilen = (chart.data.datasets || []).length; i < ilen; ++i) {\n\t\t\t\tmeta = chart.getDatasetMeta(i);\n\t\t\t\tmeta.data[index].hidden = !meta.data[index].hidden;\n\t\t\t}\n\n\t\t\tchart.update();\n\t\t}\n\t},\n\n\t// Need to override these to give a nice default\n\ttooltips: {\n\t\tcallbacks: {\n\t\t\ttitle: function() {\n\t\t\t\treturn '';\n\t\t\t},\n\t\t\tlabel: function(item, data) {\n\t\t\t\treturn data.labels[item.index] + ': ' + item.yLabel;\n\t\t\t}\n\t\t}\n\t}\n});\n\nvar controller_polarArea = core_datasetController.extend({\n\n\tdataElementType: elements.Arc,\n\n\tlinkScales: helpers$1.noop,\n\n\tupdate: function(reset) {\n\t\tvar me = this;\n\t\tvar dataset = me.getDataset();\n\t\tvar meta = me.getMeta();\n\t\tvar start = me.chart.options.startAngle || 0;\n\t\tvar starts = me._starts = [];\n\t\tvar angles = me._angles = [];\n\t\tvar arcs = meta.data;\n\t\tvar i, ilen, angle;\n\n\t\tme._updateRadius();\n\n\t\tmeta.count = me.countVisibleElements();\n\n\t\tfor (i = 0, ilen = dataset.data.length; i < ilen; i++) {\n\t\t\tstarts[i] = start;\n\t\t\tangle = me._computeAngle(i);\n\t\t\tangles[i] = angle;\n\t\t\tstart += angle;\n\t\t}\n\n\t\tfor (i = 0, ilen = arcs.length; i < ilen; ++i) {\n\t\t\tarcs[i]._options = me._resolveElementOptions(arcs[i], i);\n\t\t\tme.updateElement(arcs[i], i, reset);\n\t\t}\n\t},\n\n\t/**\n\t * @private\n\t */\n\t_updateRadius: function() {\n\t\tvar me = this;\n\t\tvar chart = me.chart;\n\t\tvar chartArea = chart.chartArea;\n\t\tvar opts = chart.options;\n\t\tvar minSize = Math.min(chartArea.right - chartArea.left, chartArea.bottom - chartArea.top);\n\n\t\tchart.outerRadius = Math.max(minSize / 2, 0);\n\t\tchart.innerRadius = Math.max(opts.cutoutPercentage ? (chart.outerRadius / 100) * (opts.cutoutPercentage) : 1, 0);\n\t\tchart.radiusLength = (chart.outerRadius - chart.innerRadius) / chart.getVisibleDatasetCount();\n\n\t\tme.outerRadius = chart.outerRadius - (chart.radiusLength * me.index);\n\t\tme.innerRadius = me.outerRadius - chart.radiusLength;\n\t},\n\n\tupdateElement: function(arc, index, reset) {\n\t\tvar me = this;\n\t\tvar chart = me.chart;\n\t\tvar dataset = me.getDataset();\n\t\tvar opts = chart.options;\n\t\tvar animationOpts = opts.animation;\n\t\tvar scale = chart.scale;\n\t\tvar labels = chart.data.labels;\n\n\t\tvar centerX = scale.xCenter;\n\t\tvar centerY = scale.yCenter;\n\n\t\t// var negHalfPI = -0.5 * Math.PI;\n\t\tvar datasetStartAngle = opts.startAngle;\n\t\tvar distance = arc.hidden ? 0 : scale.getDistanceFromCenterForValue(dataset.data[index]);\n\t\tvar startAngle = me._starts[index];\n\t\tvar endAngle = startAngle + (arc.hidden ? 0 : me._angles[index]);\n\n\t\tvar resetRadius = animationOpts.animateScale ? 0 : scale.getDistanceFromCenterForValue(dataset.data[index]);\n\t\tvar options = arc._options || {};\n\n\t\thelpers$1.extend(arc, {\n\t\t\t// Utility\n\t\t\t_datasetIndex: me.index,\n\t\t\t_index: index,\n\t\t\t_scale: scale,\n\n\t\t\t// Desired view properties\n\t\t\t_model: {\n\t\t\t\tbackgroundColor: options.backgroundColor,\n\t\t\t\tborderColor: options.borderColor,\n\t\t\t\tborderWidth: options.borderWidth,\n\t\t\t\tborderAlign: options.borderAlign,\n\t\t\t\tx: centerX,\n\t\t\t\ty: centerY,\n\t\t\t\tinnerRadius: 0,\n\t\t\t\touterRadius: reset ? resetRadius : distance,\n\t\t\t\tstartAngle: reset && animationOpts.animateRotate ? datasetStartAngle : startAngle,\n\t\t\t\tendAngle: reset && animationOpts.animateRotate ? datasetStartAngle : endAngle,\n\t\t\t\tlabel: helpers$1.valueAtIndexOrDefault(labels, index, labels[index])\n\t\t\t}\n\t\t});\n\n\t\tarc.pivot();\n\t},\n\n\tcountVisibleElements: function() {\n\t\tvar dataset = this.getDataset();\n\t\tvar meta = this.getMeta();\n\t\tvar count = 0;\n\n\t\thelpers$1.each(meta.data, function(element, index) {\n\t\t\tif (!isNaN(dataset.data[index]) && !element.hidden) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t});\n\n\t\treturn count;\n\t},\n\n\t/**\n\t * @protected\n\t */\n\tsetHoverStyle: function(arc) {\n\t\tvar model = arc._model;\n\t\tvar options = arc._options;\n\t\tvar getHoverColor = helpers$1.getHoverColor;\n\t\tvar valueOrDefault = helpers$1.valueOrDefault;\n\n\t\tarc.$previousStyle = {\n\t\t\tbackgroundColor: model.backgroundColor,\n\t\t\tborderColor: model.borderColor,\n\t\t\tborderWidth: model.borderWidth,\n\t\t};\n\n\t\tmodel.backgroundColor = valueOrDefault(options.hoverBackgroundColor, getHoverColor(options.backgroundColor));\n\t\tmodel.borderColor = valueOrDefault(options.hoverBorderColor, getHoverColor(options.borderColor));\n\t\tmodel.borderWidth = valueOrDefault(options.hoverBorderWidth, options.borderWidth);\n\t},\n\n\t/**\n\t * @private\n\t */\n\t_resolveElementOptions: function(arc, index) {\n\t\tvar me = this;\n\t\tvar chart = me.chart;\n\t\tvar dataset = me.getDataset();\n\t\tvar custom = arc.custom || {};\n\t\tvar options = chart.options.elements.arc;\n\t\tvar values = {};\n\t\tvar i, ilen, key;\n\n\t\t// Scriptable options\n\t\tvar context = {\n\t\t\tchart: chart,\n\t\t\tdataIndex: index,\n\t\t\tdataset: dataset,\n\t\t\tdatasetIndex: me.index\n\t\t};\n\n\t\tvar keys = [\n\t\t\t'backgroundColor',\n\t\t\t'borderColor',\n\t\t\t'borderWidth',\n\t\t\t'borderAlign',\n\t\t\t'hoverBackgroundColor',\n\t\t\t'hoverBorderColor',\n\t\t\t'hoverBorderWidth',\n\t\t];\n\n\t\tfor (i = 0, ilen = keys.length; i < ilen; ++i) {\n\t\t\tkey = keys[i];\n\t\t\tvalues[key] = resolve$5([\n\t\t\t\tcustom[key],\n\t\t\t\tdataset[key],\n\t\t\t\toptions[key]\n\t\t\t], context, index);\n\t\t}\n\n\t\treturn values;\n\t},\n\n\t/**\n\t * @private\n\t */\n\t_computeAngle: function(index) {\n\t\tvar me = this;\n\t\tvar count = this.getMeta().count;\n\t\tvar dataset = me.getDataset();\n\t\tvar meta = me.getMeta();\n\n\t\tif (isNaN(dataset.data[index]) || meta.data[index].hidden) {\n\t\t\treturn 0;\n\t\t}\n\n\t\t// Scriptable options\n\t\tvar context = {\n\t\t\tchart: me.chart,\n\t\t\tdataIndex: index,\n\t\t\tdataset: dataset,\n\t\t\tdatasetIndex: me.index\n\t\t};\n\n\t\treturn resolve$5([\n\t\t\tme.chart.options.elements.arc.angle,\n\t\t\t(2 * Math.PI) / count\n\t\t], context, index);\n\t}\n});\n\ncore_defaults._set('pie', helpers$1.clone(core_defaults.doughnut));\ncore_defaults._set('pie', {\n\tcutoutPercentage: 0\n});\n\n// Pie charts are Doughnut chart with different defaults\nvar controller_pie = controller_doughnut;\n\nvar valueOrDefault$6 = helpers$1.valueOrDefault;\nvar resolve$6 = helpers$1.options.resolve;\n\ncore_defaults._set('radar', {\n\tscale: {\n\t\ttype: 'radialLinear'\n\t},\n\telements: {\n\t\tline: {\n\t\t\ttension: 0 // no bezier in radar\n\t\t}\n\t}\n});\n\nvar controller_radar = core_datasetController.extend({\n\n\tdatasetElementType: elements.Line,\n\n\tdataElementType: elements.Point,\n\n\tlinkScales: helpers$1.noop,\n\n\tupdate: function(reset) {\n\t\tvar me = this;\n\t\tvar meta = me.getMeta();\n\t\tvar line = meta.dataset;\n\t\tvar points = meta.data || [];\n\t\tvar scale = me.chart.scale;\n\t\tvar dataset = me.getDataset();\n\t\tvar i, ilen;\n\n\t\t// Compatibility: If the properties are defined with only the old name, use those values\n\t\tif ((dataset.tension !== undefined) && (dataset.lineTension === undefined)) {\n\t\t\tdataset.lineTension = dataset.tension;\n\t\t}\n\n\t\t// Utility\n\t\tline._scale = scale;\n\t\tline._datasetIndex = me.index;\n\t\t// Data\n\t\tline._children = points;\n\t\tline._loop = true;\n\t\t// Model\n\t\tline._model = me._resolveLineOptions(line);\n\n\t\tline.pivot();\n\n\t\t// Update Points\n\t\tfor (i = 0, ilen = points.length; i < ilen; ++i) {\n\t\t\tme.updateElement(points[i], i, reset);\n\t\t}\n\n\t\t// Update bezier control points\n\t\tme.updateBezierControlPoints();\n\n\t\t// Now pivot the point for animation\n\t\tfor (i = 0, ilen = points.length; i < ilen; ++i) {\n\t\t\tpoints[i].pivot();\n\t\t}\n\t},\n\n\tupdateElement: function(point, index, reset) {\n\t\tvar me = this;\n\t\tvar custom = point.custom || {};\n\t\tvar dataset = me.getDataset();\n\t\tvar scale = me.chart.scale;\n\t\tvar pointPosition = scale.getPointPositionForValue(index, dataset.data[index]);\n\t\tvar options = me._resolvePointOptions(point, index);\n\t\tvar lineModel = me.getMeta().dataset._model;\n\t\tvar x = reset ? scale.xCenter : pointPosition.x;\n\t\tvar y = reset ? scale.yCenter : pointPosition.y;\n\n\t\t// Utility\n\t\tpoint._scale = scale;\n\t\tpoint._options = options;\n\t\tpoint._datasetIndex = me.index;\n\t\tpoint._index = index;\n\n\t\t// Desired view properties\n\t\tpoint._model = {\n\t\t\tx: x, // value not used in dataset scale, but we want a consistent API between scales\n\t\t\ty: y,\n\t\t\tskip: custom.skip || isNaN(x) || isNaN(y),\n\t\t\t// Appearance\n\t\t\tradius: options.radius,\n\t\t\tpointStyle: options.pointStyle,\n\t\t\trotation: options.rotation,\n\t\t\tbackgroundColor: options.backgroundColor,\n\t\t\tborderColor: options.borderColor,\n\t\t\tborderWidth: options.borderWidth,\n\t\t\ttension: valueOrDefault$6(custom.tension, lineModel ? lineModel.tension : 0),\n\n\t\t\t// Tooltip\n\t\t\thitRadius: options.hitRadius\n\t\t};\n\t},\n\n\t/**\n\t * @private\n\t */\n\t_resolvePointOptions: function(element, index) {\n\t\tvar me = this;\n\t\tvar chart = me.chart;\n\t\tvar dataset = chart.data.datasets[me.index];\n\t\tvar custom = element.custom || {};\n\t\tvar options = chart.options.elements.point;\n\t\tvar values = {};\n\t\tvar i, ilen, key;\n\n\t\t// Scriptable options\n\t\tvar context = {\n\t\t\tchart: chart,\n\t\t\tdataIndex: index,\n\t\t\tdataset: dataset,\n\t\t\tdatasetIndex: me.index\n\t\t};\n\n\t\tvar ELEMENT_OPTIONS = {\n\t\t\tbackgroundColor: 'pointBackgroundColor',\n\t\t\tborderColor: 'pointBorderColor',\n\t\t\tborderWidth: 'pointBorderWidth',\n\t\t\thitRadius: 'pointHitRadius',\n\t\t\thoverBackgroundColor: 'pointHoverBackgroundColor',\n\t\t\thoverBorderColor: 'pointHoverBorderColor',\n\t\t\thoverBorderWidth: 'pointHoverBorderWidth',\n\t\t\thoverRadius: 'pointHoverRadius',\n\t\t\tpointStyle: 'pointStyle',\n\t\t\tradius: 'pointRadius',\n\t\t\trotation: 'pointRotation'\n\t\t};\n\t\tvar keys = Object.keys(ELEMENT_OPTIONS);\n\n\t\tfor (i = 0, ilen = keys.length; i < ilen; ++i) {\n\t\t\tkey = keys[i];\n\t\t\tvalues[key] = resolve$6([\n\t\t\t\tcustom[key],\n\t\t\t\tdataset[ELEMENT_OPTIONS[key]],\n\t\t\t\tdataset[key],\n\t\t\t\toptions[key]\n\t\t\t], context, index);\n\t\t}\n\n\t\treturn values;\n\t},\n\n\t/**\n\t * @private\n\t */\n\t_resolveLineOptions: function(element) {\n\t\tvar me = this;\n\t\tvar chart = me.chart;\n\t\tvar dataset = chart.data.datasets[me.index];\n\t\tvar custom = element.custom || {};\n\t\tvar options = chart.options.elements.line;\n\t\tvar values = {};\n\t\tvar i, ilen, key;\n\n\t\tvar keys = [\n\t\t\t'backgroundColor',\n\t\t\t'borderWidth',\n\t\t\t'borderColor',\n\t\t\t'borderCapStyle',\n\t\t\t'borderDash',\n\t\t\t'borderDashOffset',\n\t\t\t'borderJoinStyle',\n\t\t\t'fill'\n\t\t];\n\n\t\tfor (i = 0, ilen = keys.length; i < ilen; ++i) {\n\t\t\tkey = keys[i];\n\t\t\tvalues[key] = resolve$6([\n\t\t\t\tcustom[key],\n\t\t\t\tdataset[key],\n\t\t\t\toptions[key]\n\t\t\t]);\n\t\t}\n\n\t\tvalues.tension = valueOrDefault$6(dataset.lineTension, options.tension);\n\n\t\treturn values;\n\t},\n\n\tupdateBezierControlPoints: function() {\n\t\tvar me = this;\n\t\tvar meta = me.getMeta();\n\t\tvar area = me.chart.chartArea;\n\t\tvar points = meta.data || [];\n\t\tvar i, ilen, model, controlPoints;\n\n\t\tfunction capControlPoint(pt, min, max) {\n\t\t\treturn Math.max(Math.min(pt, max), min);\n\t\t}\n\n\t\tfor (i = 0, ilen = points.length; i < ilen; ++i) {\n\t\t\tmodel = points[i]._model;\n\t\t\tcontrolPoints = helpers$1.splineCurve(\n\t\t\t\thelpers$1.previousItem(points, i, true)._model,\n\t\t\t\tmodel,\n\t\t\t\thelpers$1.nextItem(points, i, true)._model,\n\t\t\t\tmodel.tension\n\t\t\t);\n\n\t\t\t// Prevent the bezier going outside of the bounds of the graph\n\t\t\tmodel.controlPointPreviousX = capControlPoint(controlPoints.previous.x, area.left, area.right);\n\t\t\tmodel.controlPointPreviousY = capControlPoint(controlPoints.previous.y, area.top, area.bottom);\n\t\t\tmodel.controlPointNextX = capControlPoint(controlPoints.next.x, area.left, area.right);\n\t\t\tmodel.controlPointNextY = capControlPoint(controlPoints.next.y, area.top, area.bottom);\n\t\t}\n\t},\n\n\tsetHoverStyle: function(point) {\n\t\tvar model = point._model;\n\t\tvar options = point._options;\n\t\tvar getHoverColor = helpers$1.getHoverColor;\n\n\t\tpoint.$previousStyle = {\n\t\t\tbackgroundColor: model.backgroundColor,\n\t\t\tborderColor: model.borderColor,\n\t\t\tborderWidth: model.borderWidth,\n\t\t\tradius: model.radius\n\t\t};\n\n\t\tmodel.backgroundColor = valueOrDefault$6(options.hoverBackgroundColor, getHoverColor(options.backgroundColor));\n\t\tmodel.borderColor = valueOrDefault$6(options.hoverBorderColor, getHoverColor(options.borderColor));\n\t\tmodel.borderWidth = valueOrDefault$6(options.hoverBorderWidth, options.borderWidth);\n\t\tmodel.radius = valueOrDefault$6(options.hoverRadius, options.radius);\n\t}\n});\n\ncore_defaults._set('scatter', {\n\thover: {\n\t\tmode: 'single'\n\t},\n\n\tscales: {\n\t\txAxes: [{\n\t\t\tid: 'x-axis-1', // need an ID so datasets can reference the scale\n\t\t\ttype: 'linear', // scatter should not use a category axis\n\t\t\tposition: 'bottom'\n\t\t}],\n\t\tyAxes: [{\n\t\t\tid: 'y-axis-1',\n\t\t\ttype: 'linear',\n\t\t\tposition: 'left'\n\t\t}]\n\t},\n\n\tshowLines: false,\n\n\ttooltips: {\n\t\tcallbacks: {\n\t\t\ttitle: function() {\n\t\t\t\treturn ''; // doesn't make sense for scatter since data are formatted as a point\n\t\t\t},\n\t\t\tlabel: function(item) {\n\t\t\t\treturn '(' + item.xLabel + ', ' + item.yLabel + ')';\n\t\t\t}\n\t\t}\n\t}\n});\n\n// Scatter charts use line controllers\nvar controller_scatter = controller_line;\n\n// NOTE export a map in which the key represents the controller type, not\n// the class, and so must be CamelCase in order to be correctly retrieved\n// by the controller in core.controller.js (`controllers[meta.type]`).\n\nvar controllers = {\n\tbar: controller_bar,\n\tbubble: controller_bubble,\n\tdoughnut: controller_doughnut,\n\thorizontalBar: controller_horizontalBar,\n\tline: controller_line,\n\tpolarArea: controller_polarArea,\n\tpie: controller_pie,\n\tradar: controller_radar,\n\tscatter: controller_scatter\n};\n\n/**\n * Helper function to get relative position for an event\n * @param {Event|IEvent} event - The event to get the position for\n * @param {Chart} chart - The chart\n * @returns {object} the event position\n */\nfunction getRelativePosition(e, chart) {\n\tif (e.native) {\n\t\treturn {\n\t\t\tx: e.x,\n\t\t\ty: e.y\n\t\t};\n\t}\n\n\treturn helpers$1.getRelativePosition(e, chart);\n}\n\n/**\n * Helper function to traverse all of the visible elements in the chart\n * @param {Chart} chart - the chart\n * @param {function} handler - the callback to execute for each visible item\n */\nfunction parseVisibleItems(chart, handler) {\n\tvar datasets = chart.data.datasets;\n\tvar meta, i, j, ilen, jlen;\n\n\tfor (i = 0, ilen = datasets.length; i < ilen; ++i) {\n\t\tif (!chart.isDatasetVisible(i)) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tmeta = chart.getDatasetMeta(i);\n\t\tfor (j = 0, jlen = meta.data.length; j < jlen; ++j) {\n\t\t\tvar element = meta.data[j];\n\t\t\tif (!element._view.skip) {\n\t\t\t\thandler(element);\n\t\t\t}\n\t\t}\n\t}\n}\n\n/**\n * Helper function to get the items that intersect the event position\n * @param {ChartElement[]} items - elements to filter\n * @param {object} position - the point to be nearest to\n * @return {ChartElement[]} the nearest items\n */\nfunction getIntersectItems(chart, position) {\n\tvar elements = [];\n\n\tparseVisibleItems(chart, function(element) {\n\t\tif (element.inRange(position.x, position.y)) {\n\t\t\telements.push(element);\n\t\t}\n\t});\n\n\treturn elements;\n}\n\n/**\n * Helper function to get the items nearest to the event position considering all visible items in teh chart\n * @param {Chart} chart - the chart to look at elements from\n * @param {object} position - the point to be nearest to\n * @param {boolean} intersect - if true, only consider items that intersect the position\n * @param {function} distanceMetric - function to provide the distance between points\n * @return {ChartElement[]} the nearest items\n */\nfunction getNearestItems(chart, position, intersect, distanceMetric) {\n\tvar minDistance = Number.POSITIVE_INFINITY;\n\tvar nearestItems = [];\n\n\tparseVisibleItems(chart, function(element) {\n\t\tif (intersect && !element.inRange(position.x, position.y)) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar center = element.getCenterPoint();\n\t\tvar distance = distanceMetric(position, center);\n\t\tif (distance < minDistance) {\n\t\t\tnearestItems = [element];\n\t\t\tminDistance = distance;\n\t\t} else if (distance === minDistance) {\n\t\t\t// Can have multiple items at the same distance in which case we sort by size\n\t\t\tnearestItems.push(element);\n\t\t}\n\t});\n\n\treturn nearestItems;\n}\n\n/**\n * Get a distance metric function for two points based on the\n * axis mode setting\n * @param {string} axis - the axis mode. x|y|xy\n */\nfunction getDistanceMetricForAxis(axis) {\n\tvar useX = axis.indexOf('x') !== -1;\n\tvar useY = axis.indexOf('y') !== -1;\n\n\treturn function(pt1, pt2) {\n\t\tvar deltaX = useX ? Math.abs(pt1.x - pt2.x) : 0;\n\t\tvar deltaY = useY ? Math.abs(pt1.y - pt2.y) : 0;\n\t\treturn Math.sqrt(Math.pow(deltaX, 2) + Math.pow(deltaY, 2));\n\t};\n}\n\nfunction indexMode(chart, e, options) {\n\tvar position = getRelativePosition(e, chart);\n\t// Default axis for index mode is 'x' to match old behaviour\n\toptions.axis = options.axis || 'x';\n\tvar distanceMetric = getDistanceMetricForAxis(options.axis);\n\tvar items = options.intersect ? getIntersectItems(chart, position) : getNearestItems(chart, position, false, distanceMetric);\n\tvar elements = [];\n\n\tif (!items.length) {\n\t\treturn [];\n\t}\n\n\tchart.data.datasets.forEach(function(dataset, datasetIndex) {\n\t\tif (chart.isDatasetVisible(datasetIndex)) {\n\t\t\tvar meta = chart.getDatasetMeta(datasetIndex);\n\t\t\tvar element = meta.data[items[0]._index];\n\n\t\t\t// don't count items that are skipped (null data)\n\t\t\tif (element && !element._view.skip) {\n\t\t\t\telements.push(element);\n\t\t\t}\n\t\t}\n\t});\n\n\treturn elements;\n}\n\n/**\n * @interface IInteractionOptions\n */\n/**\n * If true, only consider items that intersect the point\n * @name IInterfaceOptions#boolean\n * @type Boolean\n */\n\n/**\n * Contains interaction related functions\n * @namespace Chart.Interaction\n */\nvar core_interaction = {\n\t// Helper function for different modes\n\tmodes: {\n\t\tsingle: function(chart, e) {\n\t\t\tvar position = getRelativePosition(e, chart);\n\t\t\tvar elements = [];\n\n\t\t\tparseVisibleItems(chart, function(element) {\n\t\t\t\tif (element.inRange(position.x, position.y)) {\n\t\t\t\t\telements.push(element);\n\t\t\t\t\treturn elements;\n\t\t\t\t}\n\t\t\t});\n\n\t\t\treturn elements.slice(0, 1);\n\t\t},\n\n\t\t/**\n\t\t * @function Chart.Interaction.modes.label\n\t\t * @deprecated since version 2.4.0\n\t\t * @todo remove at version 3\n\t\t * @private\n\t\t */\n\t\tlabel: indexMode,\n\n\t\t/**\n\t\t * Returns items at the same index. If the options.intersect parameter is true, we only return items if we intersect something\n\t\t * If the options.intersect mode is false, we find the nearest item and return the items at the same index as that item\n\t\t * @function Chart.Interaction.modes.index\n\t\t * @since v2.4.0\n\t\t * @param {Chart} chart - the chart we are returning items from\n\t\t * @param {Event} e - the event we are find things at\n\t\t * @param {IInteractionOptions} options - options to use during interaction\n\t\t * @return {Chart.Element[]} Array of elements that are under the point. If none are found, an empty array is returned\n\t\t */\n\t\tindex: indexMode,\n\n\t\t/**\n\t\t * Returns items in the same dataset. If the options.intersect parameter is true, we only return items if we intersect something\n\t\t * If the options.intersect is false, we find the nearest item and return the items in that dataset\n\t\t * @function Chart.Interaction.modes.dataset\n\t\t * @param {Chart} chart - the chart we are returning items from\n\t\t * @param {Event} e - the event we are find things at\n\t\t * @param {IInteractionOptions} options - options to use during interaction\n\t\t * @return {Chart.Element[]} Array of elements that are under the point. If none are found, an empty array is returned\n\t\t */\n\t\tdataset: function(chart, e, options) {\n\t\t\tvar position = getRelativePosition(e, chart);\n\t\t\toptions.axis = options.axis || 'xy';\n\t\t\tvar distanceMetric = getDistanceMetricForAxis(options.axis);\n\t\t\tvar items = options.intersect ? getIntersectItems(chart, position) : getNearestItems(chart, position, false, distanceMetric);\n\n\t\t\tif (items.length > 0) {\n\t\t\t\titems = chart.getDatasetMeta(items[0]._datasetIndex).data;\n\t\t\t}\n\n\t\t\treturn items;\n\t\t},\n\n\t\t/**\n\t\t * @function Chart.Interaction.modes.x-axis\n\t\t * @deprecated since version 2.4.0. Use index mode and intersect == true\n\t\t * @todo remove at version 3\n\t\t * @private\n\t\t */\n\t\t'x-axis': function(chart, e) {\n\t\t\treturn indexMode(chart, e, {intersect: false});\n\t\t},\n\n\t\t/**\n\t\t * Point mode returns all elements that hit test based on the event position\n\t\t * of the event\n\t\t * @function Chart.Interaction.modes.intersect\n\t\t * @param {Chart} chart - the chart we are returning items from\n\t\t * @param {Event} e - the event we are find things at\n\t\t * @return {Chart.Element[]} Array of elements that are under the point. If none are found, an empty array is returned\n\t\t */\n\t\tpoint: function(chart, e) {\n\t\t\tvar position = getRelativePosition(e, chart);\n\t\t\treturn getIntersectItems(chart, position);\n\t\t},\n\n\t\t/**\n\t\t * nearest mode returns the element closest to the point\n\t\t * @function Chart.Interaction.modes.intersect\n\t\t * @param {Chart} chart - the chart we are returning items from\n\t\t * @param {Event} e - the event we are find things at\n\t\t * @param {IInteractionOptions} options - options to use\n\t\t * @return {Chart.Element[]} Array of elements that are under the point. If none are found, an empty array is returned\n\t\t */\n\t\tnearest: function(chart, e, options) {\n\t\t\tvar position = getRelativePosition(e, chart);\n\t\t\toptions.axis = options.axis || 'xy';\n\t\t\tvar distanceMetric = getDistanceMetricForAxis(options.axis);\n\t\t\treturn getNearestItems(chart, position, options.intersect, distanceMetric);\n\t\t},\n\n\t\t/**\n\t\t * x mode returns the elements that hit-test at the current x coordinate\n\t\t * @function Chart.Interaction.modes.x\n\t\t * @param {Chart} chart - the chart we are returning items from\n\t\t * @param {Event} e - the event we are find things at\n\t\t * @param {IInteractionOptions} options - options to use\n\t\t * @return {Chart.Element[]} Array of elements that are under the point. If none are found, an empty array is returned\n\t\t */\n\t\tx: function(chart, e, options) {\n\t\t\tvar position = getRelativePosition(e, chart);\n\t\t\tvar items = [];\n\t\t\tvar intersectsItem = false;\n\n\t\t\tparseVisibleItems(chart, function(element) {\n\t\t\t\tif (element.inXRange(position.x)) {\n\t\t\t\t\titems.push(element);\n\t\t\t\t}\n\n\t\t\t\tif (element.inRange(position.x, position.y)) {\n\t\t\t\t\tintersectsItem = true;\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t// If we want to trigger on an intersect and we don't have any items\n\t\t\t// that intersect the position, return nothing\n\t\t\tif (options.intersect && !intersectsItem) {\n\t\t\t\titems = [];\n\t\t\t}\n\t\t\treturn items;\n\t\t},\n\n\t\t/**\n\t\t * y mode returns the elements that hit-test at the current y coordinate\n\t\t * @function Chart.Interaction.modes.y\n\t\t * @param {Chart} chart - the chart we are returning items from\n\t\t * @param {Event} e - the event we are find things at\n\t\t * @param {IInteractionOptions} options - options to use\n\t\t * @return {Chart.Element[]} Array of elements that are under the point. If none are found, an empty array is returned\n\t\t */\n\t\ty: function(chart, e, options) {\n\t\t\tvar position = getRelativePosition(e, chart);\n\t\t\tvar items = [];\n\t\t\tvar intersectsItem = false;\n\n\t\t\tparseVisibleItems(chart, function(element) {\n\t\t\t\tif (element.inYRange(position.y)) {\n\t\t\t\t\titems.push(element);\n\t\t\t\t}\n\n\t\t\t\tif (element.inRange(position.x, position.y)) {\n\t\t\t\t\tintersectsItem = true;\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t// If we want to trigger on an intersect and we don't have any items\n\t\t\t// that intersect the position, return nothing\n\t\t\tif (options.intersect && !intersectsItem) {\n\t\t\t\titems = [];\n\t\t\t}\n\t\t\treturn items;\n\t\t}\n\t}\n};\n\nfunction filterByPosition(array, position) {\n\treturn helpers$1.where(array, function(v) {\n\t\treturn v.position === position;\n\t});\n}\n\nfunction sortByWeight(array, reverse) {\n\tarray.forEach(function(v, i) {\n\t\tv._tmpIndex_ = i;\n\t\treturn v;\n\t});\n\tarray.sort(function(a, b) {\n\t\tvar v0 = reverse ? b : a;\n\t\tvar v1 = reverse ? a : b;\n\t\treturn v0.weight === v1.weight ?\n\t\t\tv0._tmpIndex_ - v1._tmpIndex_ :\n\t\t\tv0.weight - v1.weight;\n\t});\n\tarray.forEach(function(v) {\n\t\tdelete v._tmpIndex_;\n\t});\n}\n\nfunction findMaxPadding(boxes) {\n\tvar top = 0;\n\tvar left = 0;\n\tvar bottom = 0;\n\tvar right = 0;\n\thelpers$1.each(boxes, function(box) {\n\t\tif (box.getPadding) {\n\t\t\tvar boxPadding = box.getPadding();\n\t\t\ttop = Math.max(top, boxPadding.top);\n\t\t\tleft = Math.max(left, boxPadding.left);\n\t\t\tbottom = Math.max(bottom, boxPadding.bottom);\n\t\t\tright = Math.max(right, boxPadding.right);\n\t\t}\n\t});\n\treturn {\n\t\ttop: top,\n\t\tleft: left,\n\t\tbottom: bottom,\n\t\tright: right\n\t};\n}\n\nfunction addSizeByPosition(boxes, size) {\n\thelpers$1.each(boxes, function(box) {\n\t\tsize[box.position] += box.isHorizontal() ? box.height : box.width;\n\t});\n}\n\ncore_defaults._set('global', {\n\tlayout: {\n\t\tpadding: {\n\t\t\ttop: 0,\n\t\t\tright: 0,\n\t\t\tbottom: 0,\n\t\t\tleft: 0\n\t\t}\n\t}\n});\n\n/**\n * @interface ILayoutItem\n * @prop {string} position - The position of the item in the chart layout. Possible values are\n * 'left', 'top', 'right', 'bottom', and 'chartArea'\n * @prop {number} weight - The weight used to sort the item. Higher weights are further away from the chart area\n * @prop {boolean} fullWidth - if true, and the item is horizontal, then push vertical boxes down\n * @prop {function} isHorizontal - returns true if the layout item is horizontal (ie. top or bottom)\n * @prop {function} update - Takes two parameters: width and height. Returns size of item\n * @prop {function} getPadding - Returns an object with padding on the edges\n * @prop {number} width - Width of item. Must be valid after update()\n * @prop {number} height - Height of item. Must be valid after update()\n * @prop {number} left - Left edge of the item. Set by layout system and cannot be used in update\n * @prop {number} top - Top edge of the item. Set by layout system and cannot be used in update\n * @prop {number} right - Right edge of the item. Set by layout system and cannot be used in update\n * @prop {number} bottom - Bottom edge of the item. Set by layout system and cannot be used in update\n */\n\n// The layout service is very self explanatory. It's responsible for the layout within a chart.\n// Scales, Legends and Plugins all rely on the layout service and can easily register to be placed anywhere they need\n// It is this service's responsibility of carrying out that layout.\nvar core_layouts = {\n\tdefaults: {},\n\n\t/**\n\t * Register a box to a chart.\n\t * A box is simply a reference to an object that requires layout. eg. Scales, Legend, Title.\n\t * @param {Chart} chart - the chart to use\n\t * @param {ILayoutItem} item - the item to add to be layed out\n\t */\n\taddBox: function(chart, item) {\n\t\tif (!chart.boxes) {\n\t\t\tchart.boxes = [];\n\t\t}\n\n\t\t// initialize item with default values\n\t\titem.fullWidth = item.fullWidth || false;\n\t\titem.position = item.position || 'top';\n\t\titem.weight = item.weight || 0;\n\n\t\tchart.boxes.push(item);\n\t},\n\n\t/**\n\t * Remove a layoutItem from a chart\n\t * @param {Chart} chart - the chart to remove the box from\n\t * @param {ILayoutItem} layoutItem - the item to remove from the layout\n\t */\n\tremoveBox: function(chart, layoutItem) {\n\t\tvar index = chart.boxes ? chart.boxes.indexOf(layoutItem) : -1;\n\t\tif (index !== -1) {\n\t\t\tchart.boxes.splice(index, 1);\n\t\t}\n\t},\n\n\t/**\n\t * Sets (or updates) options on the given `item`.\n\t * @param {Chart} chart - the chart in which the item lives (or will be added to)\n\t * @param {ILayoutItem} item - the item to configure with the given options\n\t * @param {object} options - the new item options.\n\t */\n\tconfigure: function(chart, item, options) {\n\t\tvar props = ['fullWidth', 'position', 'weight'];\n\t\tvar ilen = props.length;\n\t\tvar i = 0;\n\t\tvar prop;\n\n\t\tfor (; i < ilen; ++i) {\n\t\t\tprop = props[i];\n\t\t\tif (options.hasOwnProperty(prop)) {\n\t\t\t\titem[prop] = options[prop];\n\t\t\t}\n\t\t}\n\t},\n\n\t/**\n\t * Fits boxes of the given chart into the given size by having each box measure itself\n\t * then running a fitting algorithm\n\t * @param {Chart} chart - the chart\n\t * @param {number} width - the width to fit into\n\t * @param {number} height - the height to fit into\n\t */\n\tupdate: function(chart, width, height) {\n\t\tif (!chart) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar layoutOptions = chart.options.layout || {};\n\t\tvar padding = helpers$1.options.toPadding(layoutOptions.padding);\n\t\tvar leftPadding = padding.left;\n\t\tvar rightPadding = padding.right;\n\t\tvar topPadding = padding.top;\n\t\tvar bottomPadding = padding.bottom;\n\n\t\tvar leftBoxes = filterByPosition(chart.boxes, 'left');\n\t\tvar rightBoxes = filterByPosition(chart.boxes, 'right');\n\t\tvar topBoxes = filterByPosition(chart.boxes, 'top');\n\t\tvar bottomBoxes = filterByPosition(chart.boxes, 'bottom');\n\t\tvar chartAreaBoxes = filterByPosition(chart.boxes, 'chartArea');\n\n\t\t// Sort boxes by weight. A higher weight is further away from the chart area\n\t\tsortByWeight(leftBoxes, true);\n\t\tsortByWeight(rightBoxes, false);\n\t\tsortByWeight(topBoxes, true);\n\t\tsortByWeight(bottomBoxes, false);\n\n\t\tvar verticalBoxes = leftBoxes.concat(rightBoxes);\n\t\tvar horizontalBoxes = topBoxes.concat(bottomBoxes);\n\t\tvar outerBoxes = verticalBoxes.concat(horizontalBoxes);\n\n\t\t// Essentially we now have any number of boxes on each of the 4 sides.\n\t\t// Our canvas looks like the following.\n\t\t// The areas L1 and L2 are the left axes. R1 is the right axis, T1 is the top axis and\n\t\t// B1 is the bottom axis\n\t\t// There are also 4 quadrant-like locations (left to right instead of clockwise) reserved for chart overlays\n\t\t// These locations are single-box locations only, when trying to register a chartArea location that is already taken,\n\t\t// an error will be thrown.\n\t\t//\n\t\t// |----------------------------------------------------|\n\t\t// | T1 (Full Width) |\n\t\t// |----------------------------------------------------|\n\t\t// | | | T2 | |\n\t\t// | |----|-------------------------------------|----|\n\t\t// | | | C1 | | C2 | |\n\t\t// | | |----| |----| |\n\t\t// | | | | |\n\t\t// | L1 | L2 | ChartArea (C0) | R1 |\n\t\t// | | | | |\n\t\t// | | |----| |----| |\n\t\t// | | | C3 | | C4 | |\n\t\t// | |----|-------------------------------------|----|\n\t\t// | | | B1 | |\n\t\t// |----------------------------------------------------|\n\t\t// | B2 (Full Width) |\n\t\t// |----------------------------------------------------|\n\t\t//\n\t\t// What we do to find the best sizing, we do the following\n\t\t// 1. Determine the minimum size of the chart area.\n\t\t// 2. Split the remaining width equally between each vertical axis\n\t\t// 3. Split the remaining height equally between each horizontal axis\n\t\t// 4. Give each layout the maximum size it can be. The layout will return it's minimum size\n\t\t// 5. Adjust the sizes of each axis based on it's minimum reported size.\n\t\t// 6. Refit each axis\n\t\t// 7. Position each axis in the final location\n\t\t// 8. Tell the chart the final location of the chart area\n\t\t// 9. Tell any axes that overlay the chart area the positions of the chart area\n\n\t\t// Step 1\n\t\tvar chartWidth = width - leftPadding - rightPadding;\n\t\tvar chartHeight = height - topPadding - bottomPadding;\n\t\tvar chartAreaWidth = chartWidth / 2; // min 50%\n\n\t\t// Step 2\n\t\tvar verticalBoxWidth = (width - chartAreaWidth) / verticalBoxes.length;\n\n\t\t// Step 3\n\t\t// TODO re-limit horizontal axis height (this limit has affected only padding calculation since PR 1837)\n\t\t// var horizontalBoxHeight = (height - chartAreaHeight) / horizontalBoxes.length;\n\n\t\t// Step 4\n\t\tvar maxChartAreaWidth = chartWidth;\n\t\tvar maxChartAreaHeight = chartHeight;\n\t\tvar outerBoxSizes = {top: topPadding, left: leftPadding, bottom: bottomPadding, right: rightPadding};\n\t\tvar minBoxSizes = [];\n\t\tvar maxPadding;\n\n\t\tfunction getMinimumBoxSize(box) {\n\t\t\tvar minSize;\n\t\t\tvar isHorizontal = box.isHorizontal();\n\n\t\t\tif (isHorizontal) {\n\t\t\t\tminSize = box.update(box.fullWidth ? chartWidth : maxChartAreaWidth, chartHeight / 2);\n\t\t\t\tmaxChartAreaHeight -= minSize.height;\n\t\t\t} else {\n\t\t\t\tminSize = box.update(verticalBoxWidth, maxChartAreaHeight);\n\t\t\t\tmaxChartAreaWidth -= minSize.width;\n\t\t\t}\n\n\t\t\tminBoxSizes.push({\n\t\t\t\thorizontal: isHorizontal,\n\t\t\t\twidth: minSize.width,\n\t\t\t\tbox: box,\n\t\t\t});\n\t\t}\n\n\t\thelpers$1.each(outerBoxes, getMinimumBoxSize);\n\n\t\t// If a horizontal box has padding, we move the left boxes over to avoid ugly charts (see issue #2478)\n\t\tmaxPadding = findMaxPadding(outerBoxes);\n\n\t\t// At this point, maxChartAreaHeight and maxChartAreaWidth are the size the chart area could\n\t\t// be if the axes are drawn at their minimum sizes.\n\t\t// Steps 5 & 6\n\n\t\t// Function to fit a box\n\t\tfunction fitBox(box) {\n\t\t\tvar minBoxSize = helpers$1.findNextWhere(minBoxSizes, function(minBox) {\n\t\t\t\treturn minBox.box === box;\n\t\t\t});\n\n\t\t\tif (minBoxSize) {\n\t\t\t\tif (minBoxSize.horizontal) {\n\t\t\t\t\tvar scaleMargin = {\n\t\t\t\t\t\tleft: Math.max(outerBoxSizes.left, maxPadding.left),\n\t\t\t\t\t\tright: Math.max(outerBoxSizes.right, maxPadding.right),\n\t\t\t\t\t\ttop: 0,\n\t\t\t\t\t\tbottom: 0\n\t\t\t\t\t};\n\n\t\t\t\t\t// Don't use min size here because of label rotation. When the labels are rotated, their rotation highly depends\n\t\t\t\t\t// on the margin. Sometimes they need to increase in size slightly\n\t\t\t\t\tbox.update(box.fullWidth ? chartWidth : maxChartAreaWidth, chartHeight / 2, scaleMargin);\n\t\t\t\t} else {\n\t\t\t\t\tbox.update(minBoxSize.width, maxChartAreaHeight);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Update, and calculate the left and right margins for the horizontal boxes\n\t\thelpers$1.each(verticalBoxes, fitBox);\n\t\taddSizeByPosition(verticalBoxes, outerBoxSizes);\n\n\t\t// Set the Left and Right margins for the horizontal boxes\n\t\thelpers$1.each(horizontalBoxes, fitBox);\n\t\taddSizeByPosition(horizontalBoxes, outerBoxSizes);\n\n\t\tfunction finalFitVerticalBox(box) {\n\t\t\tvar minBoxSize = helpers$1.findNextWhere(minBoxSizes, function(minSize) {\n\t\t\t\treturn minSize.box === box;\n\t\t\t});\n\n\t\t\tvar scaleMargin = {\n\t\t\t\tleft: 0,\n\t\t\t\tright: 0,\n\t\t\t\ttop: outerBoxSizes.top,\n\t\t\t\tbottom: outerBoxSizes.bottom\n\t\t\t};\n\n\t\t\tif (minBoxSize) {\n\t\t\t\tbox.update(minBoxSize.width, maxChartAreaHeight, scaleMargin);\n\t\t\t}\n\t\t}\n\n\t\t// Let the left layout know the final margin\n\t\thelpers$1.each(verticalBoxes, finalFitVerticalBox);\n\n\t\t// Recalculate because the size of each layout might have changed slightly due to the margins (label rotation for instance)\n\t\touterBoxSizes = {top: topPadding, left: leftPadding, bottom: bottomPadding, right: rightPadding};\n\t\taddSizeByPosition(outerBoxes, outerBoxSizes);\n\n\t\t// We may be adding some padding to account for rotated x axis labels\n\t\tvar leftPaddingAddition = Math.max(maxPadding.left - outerBoxSizes.left, 0);\n\t\touterBoxSizes.left += leftPaddingAddition;\n\t\touterBoxSizes.right += Math.max(maxPadding.right - outerBoxSizes.right, 0);\n\n\t\tvar topPaddingAddition = Math.max(maxPadding.top - outerBoxSizes.top, 0);\n\t\touterBoxSizes.top += topPaddingAddition;\n\t\touterBoxSizes.bottom += Math.max(maxPadding.bottom - outerBoxSizes.bottom, 0);\n\n\t\t// Figure out if our chart area changed. This would occur if the dataset layout label rotation\n\t\t// changed due to the application of the margins in step 6. Since we can only get bigger, this is safe to do\n\t\t// without calling `fit` again\n\t\tvar newMaxChartAreaHeight = height - outerBoxSizes.top - outerBoxSizes.bottom;\n\t\tvar newMaxChartAreaWidth = width - outerBoxSizes.left - outerBoxSizes.right;\n\n\t\tif (newMaxChartAreaWidth !== maxChartAreaWidth || newMaxChartAreaHeight !== maxChartAreaHeight) {\n\t\t\thelpers$1.each(verticalBoxes, function(box) {\n\t\t\t\tbox.height = newMaxChartAreaHeight;\n\t\t\t});\n\n\t\t\thelpers$1.each(horizontalBoxes, function(box) {\n\t\t\t\tif (!box.fullWidth) {\n\t\t\t\t\tbox.width = newMaxChartAreaWidth;\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tmaxChartAreaHeight = newMaxChartAreaHeight;\n\t\t\tmaxChartAreaWidth = newMaxChartAreaWidth;\n\t\t}\n\n\t\t// Step 7 - Position the boxes\n\t\tvar left = leftPadding + leftPaddingAddition;\n\t\tvar top = topPadding + topPaddingAddition;\n\n\t\tfunction placeBox(box) {\n\t\t\tif (box.isHorizontal()) {\n\t\t\t\tbox.left = box.fullWidth ? leftPadding : outerBoxSizes.left;\n\t\t\t\tbox.right = box.fullWidth ? width - rightPadding : outerBoxSizes.left + maxChartAreaWidth;\n\t\t\t\tbox.top = top;\n\t\t\t\tbox.bottom = top + box.height;\n\n\t\t\t\t// Move to next point\n\t\t\t\ttop = box.bottom;\n\n\t\t\t} else {\n\n\t\t\t\tbox.left = left;\n\t\t\t\tbox.right = left + box.width;\n\t\t\t\tbox.top = outerBoxSizes.top;\n\t\t\t\tbox.bottom = outerBoxSizes.top + maxChartAreaHeight;\n\n\t\t\t\t// Move to next point\n\t\t\t\tleft = box.right;\n\t\t\t}\n\t\t}\n\n\t\thelpers$1.each(leftBoxes.concat(topBoxes), placeBox);\n\n\t\t// Account for chart width and height\n\t\tleft += maxChartAreaWidth;\n\t\ttop += maxChartAreaHeight;\n\n\t\thelpers$1.each(rightBoxes, placeBox);\n\t\thelpers$1.each(bottomBoxes, placeBox);\n\n\t\t// Step 8\n\t\tchart.chartArea = {\n\t\t\tleft: outerBoxSizes.left,\n\t\t\ttop: outerBoxSizes.top,\n\t\t\tright: outerBoxSizes.left + maxChartAreaWidth,\n\t\t\tbottom: outerBoxSizes.top + maxChartAreaHeight\n\t\t};\n\n\t\t// Step 9\n\t\thelpers$1.each(chartAreaBoxes, function(box) {\n\t\t\tbox.left = chart.chartArea.left;\n\t\t\tbox.top = chart.chartArea.top;\n\t\t\tbox.right = chart.chartArea.right;\n\t\t\tbox.bottom = chart.chartArea.bottom;\n\n\t\t\tbox.update(maxChartAreaWidth, maxChartAreaHeight);\n\t\t});\n\t}\n};\n\n/**\n * Platform fallback implementation (minimal).\n * @see https://github.com/chartjs/Chart.js/pull/4591#issuecomment-319575939\n */\n\nvar platform_basic = {\n\tacquireContext: function(item) {\n\t\tif (item && item.canvas) {\n\t\t\t// Support for any object associated to a canvas (including a context2d)\n\t\t\titem = item.canvas;\n\t\t}\n\n\t\treturn item && item.getContext('2d') || null;\n\t}\n};\n\nvar platform_dom = \"/*\\n * DOM element rendering detection\\n * https://davidwalsh.name/detect-node-insertion\\n */\\n@keyframes chartjs-render-animation {\\n\\tfrom { opacity: 0.99; }\\n\\tto { opacity: 1; }\\n}\\n\\n.chartjs-render-monitor {\\n\\tanimation: chartjs-render-animation 0.001s;\\n}\\n\\n/*\\n * DOM element resizing detection\\n * https://github.com/marcj/css-element-queries\\n */\\n.chartjs-size-monitor,\\n.chartjs-size-monitor-expand,\\n.chartjs-size-monitor-shrink {\\n\\tposition: absolute;\\n\\tdirection: ltr;\\n\\tleft: 0;\\n\\ttop: 0;\\n\\tright: 0;\\n\\tbottom: 0;\\n\\toverflow: hidden;\\n\\tpointer-events: none;\\n\\tvisibility: hidden;\\n\\tz-index: -1;\\n}\\n\\n.chartjs-size-monitor-expand > div {\\n\\tposition: absolute;\\n\\twidth: 1000000px;\\n\\theight: 1000000px;\\n\\tleft: 0;\\n\\ttop: 0;\\n}\\n\\n.chartjs-size-monitor-shrink > div {\\n\\tposition: absolute;\\n\\twidth: 200%;\\n\\theight: 200%;\\n\\tleft: 0;\\n\\ttop: 0;\\n}\\n\";\n\nvar platform_dom$1 = /*#__PURE__*/Object.freeze({\ndefault: platform_dom\n});\n\nfunction getCjsExportFromNamespace (n) {\n\treturn n && n.default || n;\n}\n\nvar stylesheet = getCjsExportFromNamespace(platform_dom$1);\n\nvar EXPANDO_KEY = '$chartjs';\nvar CSS_PREFIX = 'chartjs-';\nvar CSS_SIZE_MONITOR = CSS_PREFIX + 'size-monitor';\nvar CSS_RENDER_MONITOR = CSS_PREFIX + 'render-monitor';\nvar CSS_RENDER_ANIMATION = CSS_PREFIX + 'render-animation';\nvar ANIMATION_START_EVENTS = ['animationstart', 'webkitAnimationStart'];\n\n/**\n * DOM event types -> Chart.js event types.\n * Note: only events with different types are mapped.\n * @see https://developer.mozilla.org/en-US/docs/Web/Events\n */\nvar EVENT_TYPES = {\n\ttouchstart: 'mousedown',\n\ttouchmove: 'mousemove',\n\ttouchend: 'mouseup',\n\tpointerenter: 'mouseenter',\n\tpointerdown: 'mousedown',\n\tpointermove: 'mousemove',\n\tpointerup: 'mouseup',\n\tpointerleave: 'mouseout',\n\tpointerout: 'mouseout'\n};\n\n/**\n * The \"used\" size is the final value of a dimension property after all calculations have\n * been performed. This method uses the computed style of `element` but returns undefined\n * if the computed style is not expressed in pixels. That can happen in some cases where\n * `element` has a size relative to its parent and this last one is not yet displayed,\n * for example because of `display: none` on a parent node.\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/used_value\n * @returns {number} Size in pixels or undefined if unknown.\n */\nfunction readUsedSize(element, property) {\n\tvar value = helpers$1.getStyle(element, property);\n\tvar matches = value && value.match(/^(\\d+)(\\.\\d+)?px$/);\n\treturn matches ? Number(matches[1]) : undefined;\n}\n\n/**\n * Initializes the canvas style and render size without modifying the canvas display size,\n * since responsiveness is handled by the controller.resize() method. The config is used\n * to determine the aspect ratio to apply in case no explicit height has been specified.\n */\nfunction initCanvas(canvas, config) {\n\tvar style = canvas.style;\n\n\t// NOTE(SB) canvas.getAttribute('width') !== canvas.width: in the first case it\n\t// returns null or '' if no explicit value has been set to the canvas attribute.\n\tvar renderHeight = canvas.getAttribute('height');\n\tvar renderWidth = canvas.getAttribute('width');\n\n\t// Chart.js modifies some canvas values that we want to restore on destroy\n\tcanvas[EXPANDO_KEY] = {\n\t\tinitial: {\n\t\t\theight: renderHeight,\n\t\t\twidth: renderWidth,\n\t\t\tstyle: {\n\t\t\t\tdisplay: style.display,\n\t\t\t\theight: style.height,\n\t\t\t\twidth: style.width\n\t\t\t}\n\t\t}\n\t};\n\n\t// Force canvas to display as block to avoid extra space caused by inline\n\t// elements, which would interfere with the responsive resize process.\n\t// https://github.com/chartjs/Chart.js/issues/2538\n\tstyle.display = style.display || 'block';\n\n\tif (renderWidth === null || renderWidth === '') {\n\t\tvar displayWidth = readUsedSize(canvas, 'width');\n\t\tif (displayWidth !== undefined) {\n\t\t\tcanvas.width = displayWidth;\n\t\t}\n\t}\n\n\tif (renderHeight === null || renderHeight === '') {\n\t\tif (canvas.style.height === '') {\n\t\t\t// If no explicit render height and style height, let's apply the aspect ratio,\n\t\t\t// which one can be specified by the user but also by charts as default option\n\t\t\t// (i.e. options.aspectRatio). If not specified, use canvas aspect ratio of 2.\n\t\t\tcanvas.height = canvas.width / (config.options.aspectRatio || 2);\n\t\t} else {\n\t\t\tvar displayHeight = readUsedSize(canvas, 'height');\n\t\t\tif (displayWidth !== undefined) {\n\t\t\t\tcanvas.height = displayHeight;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn canvas;\n}\n\n/**\n * Detects support for options object argument in addEventListener.\n * https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#Safely_detecting_option_support\n * @private\n */\nvar supportsEventListenerOptions = (function() {\n\tvar supports = false;\n\ttry {\n\t\tvar options = Object.defineProperty({}, 'passive', {\n\t\t\t// eslint-disable-next-line getter-return\n\t\t\tget: function() {\n\t\t\t\tsupports = true;\n\t\t\t}\n\t\t});\n\t\twindow.addEventListener('e', null, options);\n\t} catch (e) {\n\t\t// continue regardless of error\n\t}\n\treturn supports;\n}());\n\n// Default passive to true as expected by Chrome for 'touchstart' and 'touchend' events.\n// https://github.com/chartjs/Chart.js/issues/4287\nvar eventListenerOptions = supportsEventListenerOptions ? {passive: true} : false;\n\nfunction addListener(node, type, listener) {\n\tnode.addEventListener(type, listener, eventListenerOptions);\n}\n\nfunction removeListener(node, type, listener) {\n\tnode.removeEventListener(type, listener, eventListenerOptions);\n}\n\nfunction createEvent(type, chart, x, y, nativeEvent) {\n\treturn {\n\t\ttype: type,\n\t\tchart: chart,\n\t\tnative: nativeEvent || null,\n\t\tx: x !== undefined ? x : null,\n\t\ty: y !== undefined ? y : null,\n\t};\n}\n\nfunction fromNativeEvent(event, chart) {\n\tvar type = EVENT_TYPES[event.type] || event.type;\n\tvar pos = helpers$1.getRelativePosition(event, chart);\n\treturn createEvent(type, chart, pos.x, pos.y, event);\n}\n\nfunction throttled(fn, thisArg) {\n\tvar ticking = false;\n\tvar args = [];\n\n\treturn function() {\n\t\targs = Array.prototype.slice.call(arguments);\n\t\tthisArg = thisArg || this;\n\n\t\tif (!ticking) {\n\t\t\tticking = true;\n\t\t\thelpers$1.requestAnimFrame.call(window, function() {\n\t\t\t\tticking = false;\n\t\t\t\tfn.apply(thisArg, args);\n\t\t\t});\n\t\t}\n\t};\n}\n\nfunction createDiv(cls) {\n\tvar el = document.createElement('div');\n\tel.className = cls || '';\n\treturn el;\n}\n\n// Implementation based on https://github.com/marcj/css-element-queries\nfunction createResizer(handler) {\n\tvar maxSize = 1000000;\n\n\t// NOTE(SB) Don't use innerHTML because it could be considered unsafe.\n\t// https://github.com/chartjs/Chart.js/issues/5902\n\tvar resizer = createDiv(CSS_SIZE_MONITOR);\n\tvar expand = createDiv(CSS_SIZE_MONITOR + '-expand');\n\tvar shrink = createDiv(CSS_SIZE_MONITOR + '-shrink');\n\n\texpand.appendChild(createDiv());\n\tshrink.appendChild(createDiv());\n\n\tresizer.appendChild(expand);\n\tresizer.appendChild(shrink);\n\tresizer._reset = function() {\n\t\texpand.scrollLeft = maxSize;\n\t\texpand.scrollTop = maxSize;\n\t\tshrink.scrollLeft = maxSize;\n\t\tshrink.scrollTop = maxSize;\n\t};\n\n\tvar onScroll = function() {\n\t\tresizer._reset();\n\t\thandler();\n\t};\n\n\taddListener(expand, 'scroll', onScroll.bind(expand, 'expand'));\n\taddListener(shrink, 'scroll', onScroll.bind(shrink, 'shrink'));\n\n\treturn resizer;\n}\n\n// https://davidwalsh.name/detect-node-insertion\nfunction watchForRender(node, handler) {\n\tvar expando = node[EXPANDO_KEY] || (node[EXPANDO_KEY] = {});\n\tvar proxy = expando.renderProxy = function(e) {\n\t\tif (e.animationName === CSS_RENDER_ANIMATION) {\n\t\t\thandler();\n\t\t}\n\t};\n\n\thelpers$1.each(ANIMATION_START_EVENTS, function(type) {\n\t\taddListener(node, type, proxy);\n\t});\n\n\t// #4737: Chrome might skip the CSS animation when the CSS_RENDER_MONITOR class\n\t// is removed then added back immediately (same animation frame?). Accessing the\n\t// `offsetParent` property will force a reflow and re-evaluate the CSS animation.\n\t// https://gist.github.com/paulirish/5d52fb081b3570c81e3a#box-metrics\n\t// https://github.com/chartjs/Chart.js/issues/4737\n\texpando.reflow = !!node.offsetParent;\n\n\tnode.classList.add(CSS_RENDER_MONITOR);\n}\n\nfunction unwatchForRender(node) {\n\tvar expando = node[EXPANDO_KEY] || {};\n\tvar proxy = expando.renderProxy;\n\n\tif (proxy) {\n\t\thelpers$1.each(ANIMATION_START_EVENTS, function(type) {\n\t\t\tremoveListener(node, type, proxy);\n\t\t});\n\n\t\tdelete expando.renderProxy;\n\t}\n\n\tnode.classList.remove(CSS_RENDER_MONITOR);\n}\n\nfunction addResizeListener(node, listener, chart) {\n\tvar expando = node[EXPANDO_KEY] || (node[EXPANDO_KEY] = {});\n\n\t// Let's keep track of this added resizer and thus avoid DOM query when removing it.\n\tvar resizer = expando.resizer = createResizer(throttled(function() {\n\t\tif (expando.resizer) {\n\t\t\tvar container = chart.options.maintainAspectRatio && node.parentNode;\n\t\t\tvar w = container ? container.clientWidth : 0;\n\t\t\tlistener(createEvent('resize', chart));\n\t\t\tif (container && container.clientWidth < w && chart.canvas) {\n\t\t\t\t// If the container size shrank during chart resize, let's assume\n\t\t\t\t// scrollbar appeared. So we resize again with the scrollbar visible -\n\t\t\t\t// effectively making chart smaller and the scrollbar hidden again.\n\t\t\t\t// Because we are inside `throttled`, and currently `ticking`, scroll\n\t\t\t\t// events are ignored during this whole 2 resize process.\n\t\t\t\t// If we assumed wrong and something else happened, we are resizing\n\t\t\t\t// twice in a frame (potential performance issue)\n\t\t\t\tlistener(createEvent('resize', chart));\n\t\t\t}\n\t\t}\n\t}));\n\n\t// The resizer needs to be attached to the node parent, so we first need to be\n\t// sure that `node` is attached to the DOM before injecting the resizer element.\n\twatchForRender(node, function() {\n\t\tif (expando.resizer) {\n\t\t\tvar container = node.parentNode;\n\t\t\tif (container && container !== resizer.parentNode) {\n\t\t\t\tcontainer.insertBefore(resizer, container.firstChild);\n\t\t\t}\n\n\t\t\t// The container size might have changed, let's reset the resizer state.\n\t\t\tresizer._reset();\n\t\t}\n\t});\n}\n\nfunction removeResizeListener(node) {\n\tvar expando = node[EXPANDO_KEY] || {};\n\tvar resizer = expando.resizer;\n\n\tdelete expando.resizer;\n\tunwatchForRender(node);\n\n\tif (resizer && resizer.parentNode) {\n\t\tresizer.parentNode.removeChild(resizer);\n\t}\n}\n\nfunction injectCSS(platform, css) {\n\t// https://stackoverflow.com/q/3922139\n\tvar style = platform._style || document.createElement('style');\n\tif (!platform._style) {\n\t\tplatform._style = style;\n\t\tcss = '/* Chart.js */\\n' + css;\n\t\tstyle.setAttribute('type', 'text/css');\n\t\tdocument.getElementsByTagName('head')[0].appendChild(style);\n\t}\n\n\tstyle.appendChild(document.createTextNode(css));\n}\n\nvar platform_dom$2 = {\n\t/**\n\t * When `true`, prevents the automatic injection of the stylesheet required to\n\t * correctly detect when the chart is added to the DOM and then resized. This\n\t * switch has been added to allow external stylesheet (`dist/Chart(.min)?.js`)\n\t * to be manually imported to make this library compatible with any CSP.\n\t * See https://github.com/chartjs/Chart.js/issues/5208\n\t */\n\tdisableCSSInjection: false,\n\n\t/**\n\t * This property holds whether this platform is enabled for the current environment.\n\t * Currently used by platform.js to select the proper implementation.\n\t * @private\n\t */\n\t_enabled: typeof window !== 'undefined' && typeof document !== 'undefined',\n\n\t/**\n\t * @private\n\t */\n\t_ensureLoaded: function() {\n\t\tif (this._loaded) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._loaded = true;\n\n\t\t// https://github.com/chartjs/Chart.js/issues/5208\n\t\tif (!this.disableCSSInjection) {\n\t\t\tinjectCSS(this, stylesheet);\n\t\t}\n\t},\n\n\tacquireContext: function(item, config) {\n\t\tif (typeof item === 'string') {\n\t\t\titem = document.getElementById(item);\n\t\t} else if (item.length) {\n\t\t\t// Support for array based queries (such as jQuery)\n\t\t\titem = item[0];\n\t\t}\n\n\t\tif (item && item.canvas) {\n\t\t\t// Support for any object associated to a canvas (including a context2d)\n\t\t\titem = item.canvas;\n\t\t}\n\n\t\t// To prevent canvas fingerprinting, some add-ons undefine the getContext\n\t\t// method, for example: https://github.com/kkapsner/CanvasBlocker\n\t\t// https://github.com/chartjs/Chart.js/issues/2807\n\t\tvar context = item && item.getContext && item.getContext('2d');\n\n\t\t// Load platform resources on first chart creation, to make possible to change\n\t\t// platform options after importing the library (e.g. `disableCSSInjection`).\n\t\tthis._ensureLoaded();\n\n\t\t// `instanceof HTMLCanvasElement/CanvasRenderingContext2D` fails when the item is\n\t\t// inside an iframe or when running in a protected environment. We could guess the\n\t\t// types from their toString() value but let's keep things flexible and assume it's\n\t\t// a sufficient condition if the item has a context2D which has item as `canvas`.\n\t\t// https://github.com/chartjs/Chart.js/issues/3887\n\t\t// https://github.com/chartjs/Chart.js/issues/4102\n\t\t// https://github.com/chartjs/Chart.js/issues/4152\n\t\tif (context && context.canvas === item) {\n\t\t\tinitCanvas(item, config);\n\t\t\treturn context;\n\t\t}\n\n\t\treturn null;\n\t},\n\n\treleaseContext: function(context) {\n\t\tvar canvas = context.canvas;\n\t\tif (!canvas[EXPANDO_KEY]) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar initial = canvas[EXPANDO_KEY].initial;\n\t\t['height', 'width'].forEach(function(prop) {\n\t\t\tvar value = initial[prop];\n\t\t\tif (helpers$1.isNullOrUndef(value)) {\n\t\t\t\tcanvas.removeAttribute(prop);\n\t\t\t} else {\n\t\t\t\tcanvas.setAttribute(prop, value);\n\t\t\t}\n\t\t});\n\n\t\thelpers$1.each(initial.style || {}, function(value, key) {\n\t\t\tcanvas.style[key] = value;\n\t\t});\n\n\t\t// The canvas render size might have been changed (and thus the state stack discarded),\n\t\t// we can't use save() and restore() to restore the initial state. So make sure that at\n\t\t// least the canvas context is reset to the default state by setting the canvas width.\n\t\t// https://www.w3.org/TR/2011/WD-html5-20110525/the-canvas-element.html\n\t\t// eslint-disable-next-line no-self-assign\n\t\tcanvas.width = canvas.width;\n\n\t\tdelete canvas[EXPANDO_KEY];\n\t},\n\n\taddEventListener: function(chart, type, listener) {\n\t\tvar canvas = chart.canvas;\n\t\tif (type === 'resize') {\n\t\t\t// Note: the resize event is not supported on all browsers.\n\t\t\taddResizeListener(canvas, listener, chart);\n\t\t\treturn;\n\t\t}\n\n\t\tvar expando = listener[EXPANDO_KEY] || (listener[EXPANDO_KEY] = {});\n\t\tvar proxies = expando.proxies || (expando.proxies = {});\n\t\tvar proxy = proxies[chart.id + '_' + type] = function(event) {\n\t\t\tlistener(fromNativeEvent(event, chart));\n\t\t};\n\n\t\taddListener(canvas, type, proxy);\n\t},\n\n\tremoveEventListener: function(chart, type, listener) {\n\t\tvar canvas = chart.canvas;\n\t\tif (type === 'resize') {\n\t\t\t// Note: the resize event is not supported on all browsers.\n\t\t\tremoveResizeListener(canvas);\n\t\t\treturn;\n\t\t}\n\n\t\tvar expando = listener[EXPANDO_KEY] || {};\n\t\tvar proxies = expando.proxies || {};\n\t\tvar proxy = proxies[chart.id + '_' + type];\n\t\tif (!proxy) {\n\t\t\treturn;\n\t\t}\n\n\t\tremoveListener(canvas, type, proxy);\n\t}\n};\n\n// DEPRECATIONS\n\n/**\n * Provided for backward compatibility, use EventTarget.addEventListener instead.\n * EventTarget.addEventListener compatibility: Chrome, Opera 7, Safari, FF1.5+, IE9+\n * @see https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener\n * @function Chart.helpers.addEvent\n * @deprecated since version 2.7.0\n * @todo remove at version 3\n * @private\n */\nhelpers$1.addEvent = addListener;\n\n/**\n * Provided for backward compatibility, use EventTarget.removeEventListener instead.\n * EventTarget.removeEventListener compatibility: Chrome, Opera 7, Safari, FF1.5+, IE9+\n * @see https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/removeEventListener\n * @function Chart.helpers.removeEvent\n * @deprecated since version 2.7.0\n * @todo remove at version 3\n * @private\n */\nhelpers$1.removeEvent = removeListener;\n\n// @TODO Make possible to select another platform at build time.\nvar implementation = platform_dom$2._enabled ? platform_dom$2 : platform_basic;\n\n/**\n * @namespace Chart.platform\n * @see https://chartjs.gitbooks.io/proposals/content/Platform.html\n * @since 2.4.0\n */\nvar platform = helpers$1.extend({\n\t/**\n\t * @since 2.7.0\n\t */\n\tinitialize: function() {},\n\n\t/**\n\t * Called at chart construction time, returns a context2d instance implementing\n\t * the [W3C Canvas 2D Context API standard]{@link https://www.w3.org/TR/2dcontext/}.\n\t * @param {*} item - The native item from which to acquire context (platform specific)\n\t * @param {object} options - The chart options\n\t * @returns {CanvasRenderingContext2D} context2d instance\n\t */\n\tacquireContext: function() {},\n\n\t/**\n\t * Called at chart destruction time, releases any resources associated to the context\n\t * previously returned by the acquireContext() method.\n\t * @param {CanvasRenderingContext2D} context - The context2d instance\n\t * @returns {boolean} true if the method succeeded, else false\n\t */\n\treleaseContext: function() {},\n\n\t/**\n\t * Registers the specified listener on the given chart.\n\t * @param {Chart} chart - Chart from which to listen for event\n\t * @param {string} type - The ({@link IEvent}) type to listen for\n\t * @param {function} listener - Receives a notification (an object that implements\n\t * the {@link IEvent} interface) when an event of the specified type occurs.\n\t */\n\taddEventListener: function() {},\n\n\t/**\n\t * Removes the specified listener previously registered with addEventListener.\n\t * @param {Chart} chart - Chart from which to remove the listener\n\t * @param {string} type - The ({@link IEvent}) type to remove\n\t * @param {function} listener - The listener function to remove from the event target.\n\t */\n\tremoveEventListener: function() {}\n\n}, implementation);\n\ncore_defaults._set('global', {\n\tplugins: {}\n});\n\n/**\n * The plugin service singleton\n * @namespace Chart.plugins\n * @since 2.1.0\n */\nvar core_plugins = {\n\t/**\n\t * Globally registered plugins.\n\t * @private\n\t */\n\t_plugins: [],\n\n\t/**\n\t * This identifier is used to invalidate the descriptors cache attached to each chart\n\t * when a global plugin is registered or unregistered. In this case, the cache ID is\n\t * incremented and descriptors are regenerated during following API calls.\n\t * @private\n\t */\n\t_cacheId: 0,\n\n\t/**\n\t * Registers the given plugin(s) if not already registered.\n\t * @param {IPlugin[]|IPlugin} plugins plugin instance(s).\n\t */\n\tregister: function(plugins) {\n\t\tvar p = this._plugins;\n\t\t([]).concat(plugins).forEach(function(plugin) {\n\t\t\tif (p.indexOf(plugin) === -1) {\n\t\t\t\tp.push(plugin);\n\t\t\t}\n\t\t});\n\n\t\tthis._cacheId++;\n\t},\n\n\t/**\n\t * Unregisters the given plugin(s) only if registered.\n\t * @param {IPlugin[]|IPlugin} plugins plugin instance(s).\n\t */\n\tunregister: function(plugins) {\n\t\tvar p = this._plugins;\n\t\t([]).concat(plugins).forEach(function(plugin) {\n\t\t\tvar idx = p.indexOf(plugin);\n\t\t\tif (idx !== -1) {\n\t\t\t\tp.splice(idx, 1);\n\t\t\t}\n\t\t});\n\n\t\tthis._cacheId++;\n\t},\n\n\t/**\n\t * Remove all registered plugins.\n\t * @since 2.1.5\n\t */\n\tclear: function() {\n\t\tthis._plugins = [];\n\t\tthis._cacheId++;\n\t},\n\n\t/**\n\t * Returns the number of registered plugins?\n\t * @returns {number}\n\t * @since 2.1.5\n\t */\n\tcount: function() {\n\t\treturn this._plugins.length;\n\t},\n\n\t/**\n\t * Returns all registered plugin instances.\n\t * @returns {IPlugin[]} array of plugin objects.\n\t * @since 2.1.5\n\t */\n\tgetAll: function() {\n\t\treturn this._plugins;\n\t},\n\n\t/**\n\t * Calls enabled plugins for `chart` on the specified hook and with the given args.\n\t * This method immediately returns as soon as a plugin explicitly returns false. The\n\t * returned value can be used, for instance, to interrupt the current action.\n\t * @param {Chart} chart - The chart instance for which plugins should be called.\n\t * @param {string} hook - The name of the plugin method to call (e.g. 'beforeUpdate').\n\t * @param {Array} [args] - Extra arguments to apply to the hook call.\n\t * @returns {boolean} false if any of the plugins return false, else returns true.\n\t */\n\tnotify: function(chart, hook, args) {\n\t\tvar descriptors = this.descriptors(chart);\n\t\tvar ilen = descriptors.length;\n\t\tvar i, descriptor, plugin, params, method;\n\n\t\tfor (i = 0; i < ilen; ++i) {\n\t\t\tdescriptor = descriptors[i];\n\t\t\tplugin = descriptor.plugin;\n\t\t\tmethod = plugin[hook];\n\t\t\tif (typeof method === 'function') {\n\t\t\t\tparams = [chart].concat(args || []);\n\t\t\t\tparams.push(descriptor.options);\n\t\t\t\tif (method.apply(plugin, params) === false) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t},\n\n\t/**\n\t * Returns descriptors of enabled plugins for the given chart.\n\t * @returns {object[]} [{ plugin, options }]\n\t * @private\n\t */\n\tdescriptors: function(chart) {\n\t\tvar cache = chart.$plugins || (chart.$plugins = {});\n\t\tif (cache.id === this._cacheId) {\n\t\t\treturn cache.descriptors;\n\t\t}\n\n\t\tvar plugins = [];\n\t\tvar descriptors = [];\n\t\tvar config = (chart && chart.config) || {};\n\t\tvar options = (config.options && config.options.plugins) || {};\n\n\t\tthis._plugins.concat(config.plugins || []).forEach(function(plugin) {\n\t\t\tvar idx = plugins.indexOf(plugin);\n\t\t\tif (idx !== -1) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar id = plugin.id;\n\t\t\tvar opts = options[id];\n\t\t\tif (opts === false) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (opts === true) {\n\t\t\t\topts = helpers$1.clone(core_defaults.global.plugins[id]);\n\t\t\t}\n\n\t\t\tplugins.push(plugin);\n\t\t\tdescriptors.push({\n\t\t\t\tplugin: plugin,\n\t\t\t\toptions: opts || {}\n\t\t\t});\n\t\t});\n\n\t\tcache.descriptors = descriptors;\n\t\tcache.id = this._cacheId;\n\t\treturn descriptors;\n\t},\n\n\t/**\n\t * Invalidates cache for the given chart: descriptors hold a reference on plugin option,\n\t * but in some cases, this reference can be changed by the user when updating options.\n\t * https://github.com/chartjs/Chart.js/issues/5111#issuecomment-355934167\n\t * @private\n\t */\n\t_invalidate: function(chart) {\n\t\tdelete chart.$plugins;\n\t}\n};\n\nvar core_scaleService = {\n\t// Scale registration object. Extensions can register new scale types (such as log or DB scales) and then\n\t// use the new chart options to grab the correct scale\n\tconstructors: {},\n\t// Use a registration function so that we can move to an ES6 map when we no longer need to support\n\t// old browsers\n\n\t// Scale config defaults\n\tdefaults: {},\n\tregisterScaleType: function(type, scaleConstructor, scaleDefaults) {\n\t\tthis.constructors[type] = scaleConstructor;\n\t\tthis.defaults[type] = helpers$1.clone(scaleDefaults);\n\t},\n\tgetScaleConstructor: function(type) {\n\t\treturn this.constructors.hasOwnProperty(type) ? this.constructors[type] : undefined;\n\t},\n\tgetScaleDefaults: function(type) {\n\t\t// Return the scale defaults merged with the global settings so that we always use the latest ones\n\t\treturn this.defaults.hasOwnProperty(type) ? helpers$1.merge({}, [core_defaults.scale, this.defaults[type]]) : {};\n\t},\n\tupdateScaleDefaults: function(type, additions) {\n\t\tvar me = this;\n\t\tif (me.defaults.hasOwnProperty(type)) {\n\t\t\tme.defaults[type] = helpers$1.extend(me.defaults[type], additions);\n\t\t}\n\t},\n\taddScalesToLayout: function(chart) {\n\t\t// Adds each scale to the chart.boxes array to be sized accordingly\n\t\thelpers$1.each(chart.scales, function(scale) {\n\t\t\t// Set ILayoutItem parameters for backwards compatibility\n\t\t\tscale.fullWidth = scale.options.fullWidth;\n\t\t\tscale.position = scale.options.position;\n\t\t\tscale.weight = scale.options.weight;\n\t\t\tcore_layouts.addBox(chart, scale);\n\t\t});\n\t}\n};\n\nvar valueOrDefault$7 = helpers$1.valueOrDefault;\n\ncore_defaults._set('global', {\n\ttooltips: {\n\t\tenabled: true,\n\t\tcustom: null,\n\t\tmode: 'nearest',\n\t\tposition: 'average',\n\t\tintersect: true,\n\t\tbackgroundColor: 'rgba(0,0,0,0.8)',\n\t\ttitleFontStyle: 'bold',\n\t\ttitleSpacing: 2,\n\t\ttitleMarginBottom: 6,\n\t\ttitleFontColor: '#fff',\n\t\ttitleAlign: 'left',\n\t\tbodySpacing: 2,\n\t\tbodyFontColor: '#fff',\n\t\tbodyAlign: 'left',\n\t\tfooterFontStyle: 'bold',\n\t\tfooterSpacing: 2,\n\t\tfooterMarginTop: 6,\n\t\tfooterFontColor: '#fff',\n\t\tfooterAlign: 'left',\n\t\tyPadding: 6,\n\t\txPadding: 6,\n\t\tcaretPadding: 2,\n\t\tcaretSize: 5,\n\t\tcornerRadius: 6,\n\t\tmultiKeyBackground: '#fff',\n\t\tdisplayColors: true,\n\t\tborderColor: 'rgba(0,0,0,0)',\n\t\tborderWidth: 0,\n\t\tcallbacks: {\n\t\t\t// Args are: (tooltipItems, data)\n\t\t\tbeforeTitle: helpers$1.noop,\n\t\t\ttitle: function(tooltipItems, data) {\n\t\t\t\tvar title = '';\n\t\t\t\tvar labels = data.labels;\n\t\t\t\tvar labelCount = labels ? labels.length : 0;\n\n\t\t\t\tif (tooltipItems.length > 0) {\n\t\t\t\t\tvar item = tooltipItems[0];\n\t\t\t\t\tif (item.label) {\n\t\t\t\t\t\ttitle = item.label;\n\t\t\t\t\t} else if (item.xLabel) {\n\t\t\t\t\t\ttitle = item.xLabel;\n\t\t\t\t\t} else if (labelCount > 0 && item.index < labelCount) {\n\t\t\t\t\t\ttitle = labels[item.index];\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn title;\n\t\t\t},\n\t\t\tafterTitle: helpers$1.noop,\n\n\t\t\t// Args are: (tooltipItems, data)\n\t\t\tbeforeBody: helpers$1.noop,\n\n\t\t\t// Args are: (tooltipItem, data)\n\t\t\tbeforeLabel: helpers$1.noop,\n\t\t\tlabel: function(tooltipItem, data) {\n\t\t\t\tvar label = data.datasets[tooltipItem.datasetIndex].label || '';\n\n\t\t\t\tif (label) {\n\t\t\t\t\tlabel += ': ';\n\t\t\t\t}\n\t\t\t\tif (!helpers$1.isNullOrUndef(tooltipItem.value)) {\n\t\t\t\t\tlabel += tooltipItem.value;\n\t\t\t\t} else {\n\t\t\t\t\tlabel += tooltipItem.yLabel;\n\t\t\t\t}\n\t\t\t\treturn label;\n\t\t\t},\n\t\t\tlabelColor: function(tooltipItem, chart) {\n\t\t\t\tvar meta = chart.getDatasetMeta(tooltipItem.datasetIndex);\n\t\t\t\tvar activeElement = meta.data[tooltipItem.index];\n\t\t\t\tvar view = activeElement._view;\n\t\t\t\treturn {\n\t\t\t\t\tborderColor: view.borderColor,\n\t\t\t\t\tbackgroundColor: view.backgroundColor\n\t\t\t\t};\n\t\t\t},\n\t\t\tlabelTextColor: function() {\n\t\t\t\treturn this._options.bodyFontColor;\n\t\t\t},\n\t\t\tafterLabel: helpers$1.noop,\n\n\t\t\t// Args are: (tooltipItems, data)\n\t\t\tafterBody: helpers$1.noop,\n\n\t\t\t// Args are: (tooltipItems, data)\n\t\t\tbeforeFooter: helpers$1.noop,\n\t\t\tfooter: helpers$1.noop,\n\t\t\tafterFooter: helpers$1.noop\n\t\t}\n\t}\n});\n\nvar positioners = {\n\t/**\n\t * Average mode places the tooltip at the average position of the elements shown\n\t * @function Chart.Tooltip.positioners.average\n\t * @param elements {ChartElement[]} the elements being displayed in the tooltip\n\t * @returns {object} tooltip position\n\t */\n\taverage: function(elements) {\n\t\tif (!elements.length) {\n\t\t\treturn false;\n\t\t}\n\n\t\tvar i, len;\n\t\tvar x = 0;\n\t\tvar y = 0;\n\t\tvar count = 0;\n\n\t\tfor (i = 0, len = elements.length; i < len; ++i) {\n\t\t\tvar el = elements[i];\n\t\t\tif (el && el.hasValue()) {\n\t\t\t\tvar pos = el.tooltipPosition();\n\t\t\t\tx += pos.x;\n\t\t\t\ty += pos.y;\n\t\t\t\t++count;\n\t\t\t}\n\t\t}\n\n\t\treturn {\n\t\t\tx: x / count,\n\t\t\ty: y / count\n\t\t};\n\t},\n\n\t/**\n\t * Gets the tooltip position nearest of the item nearest to the event position\n\t * @function Chart.Tooltip.positioners.nearest\n\t * @param elements {Chart.Element[]} the tooltip elements\n\t * @param eventPosition {object} the position of the event in canvas coordinates\n\t * @returns {object} the tooltip position\n\t */\n\tnearest: function(elements, eventPosition) {\n\t\tvar x = eventPosition.x;\n\t\tvar y = eventPosition.y;\n\t\tvar minDistance = Number.POSITIVE_INFINITY;\n\t\tvar i, len, nearestElement;\n\n\t\tfor (i = 0, len = elements.length; i < len; ++i) {\n\t\t\tvar el = elements[i];\n\t\t\tif (el && el.hasValue()) {\n\t\t\t\tvar center = el.getCenterPoint();\n\t\t\t\tvar d = helpers$1.distanceBetweenPoints(eventPosition, center);\n\n\t\t\t\tif (d < minDistance) {\n\t\t\t\t\tminDistance = d;\n\t\t\t\t\tnearestElement = el;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (nearestElement) {\n\t\t\tvar tp = nearestElement.tooltipPosition();\n\t\t\tx = tp.x;\n\t\t\ty = tp.y;\n\t\t}\n\n\t\treturn {\n\t\t\tx: x,\n\t\t\ty: y\n\t\t};\n\t}\n};\n\n// Helper to push or concat based on if the 2nd parameter is an array or not\nfunction pushOrConcat(base, toPush) {\n\tif (toPush) {\n\t\tif (helpers$1.isArray(toPush)) {\n\t\t\t// base = base.concat(toPush);\n\t\t\tArray.prototype.push.apply(base, toPush);\n\t\t} else {\n\t\t\tbase.push(toPush);\n\t\t}\n\t}\n\n\treturn base;\n}\n\n/**\n * Returns array of strings split by newline\n * @param {string} value - The value to split by newline.\n * @returns {string[]} value if newline present - Returned from String split() method\n * @function\n */\nfunction splitNewlines(str) {\n\tif ((typeof str === 'string' || str instanceof String) && str.indexOf('\\n') > -1) {\n\t\treturn str.split('\\n');\n\t}\n\treturn str;\n}\n\n\n/**\n * Private helper to create a tooltip item model\n * @param element - the chart element (point, arc, bar) to create the tooltip item for\n * @return new tooltip item\n */\nfunction createTooltipItem(element) {\n\tvar xScale = element._xScale;\n\tvar yScale = element._yScale || element._scale; // handle radar || polarArea charts\n\tvar index = element._index;\n\tvar datasetIndex = element._datasetIndex;\n\tvar controller = element._chart.getDatasetMeta(datasetIndex).controller;\n\tvar indexScale = controller._getIndexScale();\n\tvar valueScale = controller._getValueScale();\n\n\treturn {\n\t\txLabel: xScale ? xScale.getLabelForIndex(index, datasetIndex) : '',\n\t\tyLabel: yScale ? yScale.getLabelForIndex(index, datasetIndex) : '',\n\t\tlabel: indexScale ? '' + indexScale.getLabelForIndex(index, datasetIndex) : '',\n\t\tvalue: valueScale ? '' + valueScale.getLabelForIndex(index, datasetIndex) : '',\n\t\tindex: index,\n\t\tdatasetIndex: datasetIndex,\n\t\tx: element._model.x,\n\t\ty: element._model.y\n\t};\n}\n\n/**\n * Helper to get the reset model for the tooltip\n * @param tooltipOpts {object} the tooltip options\n */\nfunction getBaseModel(tooltipOpts) {\n\tvar globalDefaults = core_defaults.global;\n\n\treturn {\n\t\t// Positioning\n\t\txPadding: tooltipOpts.xPadding,\n\t\tyPadding: tooltipOpts.yPadding,\n\t\txAlign: tooltipOpts.xAlign,\n\t\tyAlign: tooltipOpts.yAlign,\n\n\t\t// Body\n\t\tbodyFontColor: tooltipOpts.bodyFontColor,\n\t\t_bodyFontFamily: valueOrDefault$7(tooltipOpts.bodyFontFamily, globalDefaults.defaultFontFamily),\n\t\t_bodyFontStyle: valueOrDefault$7(tooltipOpts.bodyFontStyle, globalDefaults.defaultFontStyle),\n\t\t_bodyAlign: tooltipOpts.bodyAlign,\n\t\tbodyFontSize: valueOrDefault$7(tooltipOpts.bodyFontSize, globalDefaults.defaultFontSize),\n\t\tbodySpacing: tooltipOpts.bodySpacing,\n\n\t\t// Title\n\t\ttitleFontColor: tooltipOpts.titleFontColor,\n\t\t_titleFontFamily: valueOrDefault$7(tooltipOpts.titleFontFamily, globalDefaults.defaultFontFamily),\n\t\t_titleFontStyle: valueOrDefault$7(tooltipOpts.titleFontStyle, globalDefaults.defaultFontStyle),\n\t\ttitleFontSize: valueOrDefault$7(tooltipOpts.titleFontSize, globalDefaults.defaultFontSize),\n\t\t_titleAlign: tooltipOpts.titleAlign,\n\t\ttitleSpacing: tooltipOpts.titleSpacing,\n\t\ttitleMarginBottom: tooltipOpts.titleMarginBottom,\n\n\t\t// Footer\n\t\tfooterFontColor: tooltipOpts.footerFontColor,\n\t\t_footerFontFamily: valueOrDefault$7(tooltipOpts.footerFontFamily, globalDefaults.defaultFontFamily),\n\t\t_footerFontStyle: valueOrDefault$7(tooltipOpts.footerFontStyle, globalDefaults.defaultFontStyle),\n\t\tfooterFontSize: valueOrDefault$7(tooltipOpts.footerFontSize, globalDefaults.defaultFontSize),\n\t\t_footerAlign: tooltipOpts.footerAlign,\n\t\tfooterSpacing: tooltipOpts.footerSpacing,\n\t\tfooterMarginTop: tooltipOpts.footerMarginTop,\n\n\t\t// Appearance\n\t\tcaretSize: tooltipOpts.caretSize,\n\t\tcornerRadius: tooltipOpts.cornerRadius,\n\t\tbackgroundColor: tooltipOpts.backgroundColor,\n\t\topacity: 0,\n\t\tlegendColorBackground: tooltipOpts.multiKeyBackground,\n\t\tdisplayColors: tooltipOpts.displayColors,\n\t\tborderColor: tooltipOpts.borderColor,\n\t\tborderWidth: tooltipOpts.borderWidth\n\t};\n}\n\n/**\n * Get the size of the tooltip\n */\nfunction getTooltipSize(tooltip, model) {\n\tvar ctx = tooltip._chart.ctx;\n\n\tvar height = model.yPadding * 2; // Tooltip Padding\n\tvar width = 0;\n\n\t// Count of all lines in the body\n\tvar body = model.body;\n\tvar combinedBodyLength = body.reduce(function(count, bodyItem) {\n\t\treturn count + bodyItem.before.length + bodyItem.lines.length + bodyItem.after.length;\n\t}, 0);\n\tcombinedBodyLength += model.beforeBody.length + model.afterBody.length;\n\n\tvar titleLineCount = model.title.length;\n\tvar footerLineCount = model.footer.length;\n\tvar titleFontSize = model.titleFontSize;\n\tvar bodyFontSize = model.bodyFontSize;\n\tvar footerFontSize = model.footerFontSize;\n\n\theight += titleLineCount * titleFontSize; // Title Lines\n\theight += titleLineCount ? (titleLineCount - 1) * model.titleSpacing : 0; // Title Line Spacing\n\theight += titleLineCount ? model.titleMarginBottom : 0; // Title's bottom Margin\n\theight += combinedBodyLength * bodyFontSize; // Body Lines\n\theight += combinedBodyLength ? (combinedBodyLength - 1) * model.bodySpacing : 0; // Body Line Spacing\n\theight += footerLineCount ? model.footerMarginTop : 0; // Footer Margin\n\theight += footerLineCount * (footerFontSize); // Footer Lines\n\theight += footerLineCount ? (footerLineCount - 1) * model.footerSpacing : 0; // Footer Line Spacing\n\n\t// Title width\n\tvar widthPadding = 0;\n\tvar maxLineWidth = function(line) {\n\t\twidth = Math.max(width, ctx.measureText(line).width + widthPadding);\n\t};\n\n\tctx.font = helpers$1.fontString(titleFontSize, model._titleFontStyle, model._titleFontFamily);\n\thelpers$1.each(model.title, maxLineWidth);\n\n\t// Body width\n\tctx.font = helpers$1.fontString(bodyFontSize, model._bodyFontStyle, model._bodyFontFamily);\n\thelpers$1.each(model.beforeBody.concat(model.afterBody), maxLineWidth);\n\n\t// Body lines may include some extra width due to the color box\n\twidthPadding = model.displayColors ? (bodyFontSize + 2) : 0;\n\thelpers$1.each(body, function(bodyItem) {\n\t\thelpers$1.each(bodyItem.before, maxLineWidth);\n\t\thelpers$1.each(bodyItem.lines, maxLineWidth);\n\t\thelpers$1.each(bodyItem.after, maxLineWidth);\n\t});\n\n\t// Reset back to 0\n\twidthPadding = 0;\n\n\t// Footer width\n\tctx.font = helpers$1.fontString(footerFontSize, model._footerFontStyle, model._footerFontFamily);\n\thelpers$1.each(model.footer, maxLineWidth);\n\n\t// Add padding\n\twidth += 2 * model.xPadding;\n\n\treturn {\n\t\twidth: width,\n\t\theight: height\n\t};\n}\n\n/**\n * Helper to get the alignment of a tooltip given the size\n */\nfunction determineAlignment(tooltip, size) {\n\tvar model = tooltip._model;\n\tvar chart = tooltip._chart;\n\tvar chartArea = tooltip._chart.chartArea;\n\tvar xAlign = 'center';\n\tvar yAlign = 'center';\n\n\tif (model.y < size.height) {\n\t\tyAlign = 'top';\n\t} else if (model.y > (chart.height - size.height)) {\n\t\tyAlign = 'bottom';\n\t}\n\n\tvar lf, rf; // functions to determine left, right alignment\n\tvar olf, orf; // functions to determine if left/right alignment causes tooltip to go outside chart\n\tvar yf; // function to get the y alignment if the tooltip goes outside of the left or right edges\n\tvar midX = (chartArea.left + chartArea.right) / 2;\n\tvar midY = (chartArea.top + chartArea.bottom) / 2;\n\n\tif (yAlign === 'center') {\n\t\tlf = function(x) {\n\t\t\treturn x <= midX;\n\t\t};\n\t\trf = function(x) {\n\t\t\treturn x > midX;\n\t\t};\n\t} else {\n\t\tlf = function(x) {\n\t\t\treturn x <= (size.width / 2);\n\t\t};\n\t\trf = function(x) {\n\t\t\treturn x >= (chart.width - (size.width / 2));\n\t\t};\n\t}\n\n\tolf = function(x) {\n\t\treturn x + size.width + model.caretSize + model.caretPadding > chart.width;\n\t};\n\torf = function(x) {\n\t\treturn x - size.width - model.caretSize - model.caretPadding < 0;\n\t};\n\tyf = function(y) {\n\t\treturn y <= midY ? 'top' : 'bottom';\n\t};\n\n\tif (lf(model.x)) {\n\t\txAlign = 'left';\n\n\t\t// Is tooltip too wide and goes over the right side of the chart.?\n\t\tif (olf(model.x)) {\n\t\t\txAlign = 'center';\n\t\t\tyAlign = yf(model.y);\n\t\t}\n\t} else if (rf(model.x)) {\n\t\txAlign = 'right';\n\n\t\t// Is tooltip too wide and goes outside left edge of canvas?\n\t\tif (orf(model.x)) {\n\t\t\txAlign = 'center';\n\t\t\tyAlign = yf(model.y);\n\t\t}\n\t}\n\n\tvar opts = tooltip._options;\n\treturn {\n\t\txAlign: opts.xAlign ? opts.xAlign : xAlign,\n\t\tyAlign: opts.yAlign ? opts.yAlign : yAlign\n\t};\n}\n\n/**\n * Helper to get the location a tooltip needs to be placed at given the initial position (via the vm) and the size and alignment\n */\nfunction getBackgroundPoint(vm, size, alignment, chart) {\n\t// Background Position\n\tvar x = vm.x;\n\tvar y = vm.y;\n\n\tvar caretSize = vm.caretSize;\n\tvar caretPadding = vm.caretPadding;\n\tvar cornerRadius = vm.cornerRadius;\n\tvar xAlign = alignment.xAlign;\n\tvar yAlign = alignment.yAlign;\n\tvar paddingAndSize = caretSize + caretPadding;\n\tvar radiusAndPadding = cornerRadius + caretPadding;\n\n\tif (xAlign === 'right') {\n\t\tx -= size.width;\n\t} else if (xAlign === 'center') {\n\t\tx -= (size.width / 2);\n\t\tif (x + size.width > chart.width) {\n\t\t\tx = chart.width - size.width;\n\t\t}\n\t\tif (x < 0) {\n\t\t\tx = 0;\n\t\t}\n\t}\n\n\tif (yAlign === 'top') {\n\t\ty += paddingAndSize;\n\t} else if (yAlign === 'bottom') {\n\t\ty -= size.height + paddingAndSize;\n\t} else {\n\t\ty -= (size.height / 2);\n\t}\n\n\tif (yAlign === 'center') {\n\t\tif (xAlign === 'left') {\n\t\t\tx += paddingAndSize;\n\t\t} else if (xAlign === 'right') {\n\t\t\tx -= paddingAndSize;\n\t\t}\n\t} else if (xAlign === 'left') {\n\t\tx -= radiusAndPadding;\n\t} else if (xAlign === 'right') {\n\t\tx += radiusAndPadding;\n\t}\n\n\treturn {\n\t\tx: x,\n\t\ty: y\n\t};\n}\n\nfunction getAlignedX(vm, align) {\n\treturn align === 'center'\n\t\t? vm.x + vm.width / 2\n\t\t: align === 'right'\n\t\t\t? vm.x + vm.width - vm.xPadding\n\t\t\t: vm.x + vm.xPadding;\n}\n\n/**\n * Helper to build before and after body lines\n */\nfunction getBeforeAfterBodyLines(callback) {\n\treturn pushOrConcat([], splitNewlines(callback));\n}\n\nvar exports$3 = core_element.extend({\n\tinitialize: function() {\n\t\tthis._model = getBaseModel(this._options);\n\t\tthis._lastActive = [];\n\t},\n\n\t// Get the title\n\t// Args are: (tooltipItem, data)\n\tgetTitle: function() {\n\t\tvar me = this;\n\t\tvar opts = me._options;\n\t\tvar callbacks = opts.callbacks;\n\n\t\tvar beforeTitle = callbacks.beforeTitle.apply(me, arguments);\n\t\tvar title = callbacks.title.apply(me, arguments);\n\t\tvar afterTitle = callbacks.afterTitle.apply(me, arguments);\n\n\t\tvar lines = [];\n\t\tlines = pushOrConcat(lines, splitNewlines(beforeTitle));\n\t\tlines = pushOrConcat(lines, splitNewlines(title));\n\t\tlines = pushOrConcat(lines, splitNewlines(afterTitle));\n\n\t\treturn lines;\n\t},\n\n\t// Args are: (tooltipItem, data)\n\tgetBeforeBody: function() {\n\t\treturn getBeforeAfterBodyLines(this._options.callbacks.beforeBody.apply(this, arguments));\n\t},\n\n\t// Args are: (tooltipItem, data)\n\tgetBody: function(tooltipItems, data) {\n\t\tvar me = this;\n\t\tvar callbacks = me._options.callbacks;\n\t\tvar bodyItems = [];\n\n\t\thelpers$1.each(tooltipItems, function(tooltipItem) {\n\t\t\tvar bodyItem = {\n\t\t\t\tbefore: [],\n\t\t\t\tlines: [],\n\t\t\t\tafter: []\n\t\t\t};\n\t\t\tpushOrConcat(bodyItem.before, splitNewlines(callbacks.beforeLabel.call(me, tooltipItem, data)));\n\t\t\tpushOrConcat(bodyItem.lines, callbacks.label.call(me, tooltipItem, data));\n\t\t\tpushOrConcat(bodyItem.after, splitNewlines(callbacks.afterLabel.call(me, tooltipItem, data)));\n\n\t\t\tbodyItems.push(bodyItem);\n\t\t});\n\n\t\treturn bodyItems;\n\t},\n\n\t// Args are: (tooltipItem, data)\n\tgetAfterBody: function() {\n\t\treturn getBeforeAfterBodyLines(this._options.callbacks.afterBody.apply(this, arguments));\n\t},\n\n\t// Get the footer and beforeFooter and afterFooter lines\n\t// Args are: (tooltipItem, data)\n\tgetFooter: function() {\n\t\tvar me = this;\n\t\tvar callbacks = me._options.callbacks;\n\n\t\tvar beforeFooter = callbacks.beforeFooter.apply(me, arguments);\n\t\tvar footer = callbacks.footer.apply(me, arguments);\n\t\tvar afterFooter = callbacks.afterFooter.apply(me, arguments);\n\n\t\tvar lines = [];\n\t\tlines = pushOrConcat(lines, splitNewlines(beforeFooter));\n\t\tlines = pushOrConcat(lines, splitNewlines(footer));\n\t\tlines = pushOrConcat(lines, splitNewlines(afterFooter));\n\n\t\treturn lines;\n\t},\n\n\tupdate: function(changed) {\n\t\tvar me = this;\n\t\tvar opts = me._options;\n\n\t\t// Need to regenerate the model because its faster than using extend and it is necessary due to the optimization in Chart.Element.transition\n\t\t// that does _view = _model if ease === 1. This causes the 2nd tooltip update to set properties in both the view and model at the same time\n\t\t// which breaks any animations.\n\t\tvar existingModel = me._model;\n\t\tvar model = me._model = getBaseModel(opts);\n\t\tvar active = me._active;\n\n\t\tvar data = me._data;\n\n\t\t// In the case where active.length === 0 we need to keep these at existing values for good animations\n\t\tvar alignment = {\n\t\t\txAlign: existingModel.xAlign,\n\t\t\tyAlign: existingModel.yAlign\n\t\t};\n\t\tvar backgroundPoint = {\n\t\t\tx: existingModel.x,\n\t\t\ty: existingModel.y\n\t\t};\n\t\tvar tooltipSize = {\n\t\t\twidth: existingModel.width,\n\t\t\theight: existingModel.height\n\t\t};\n\t\tvar tooltipPosition = {\n\t\t\tx: existingModel.caretX,\n\t\t\ty: existingModel.caretY\n\t\t};\n\n\t\tvar i, len;\n\n\t\tif (active.length) {\n\t\t\tmodel.opacity = 1;\n\n\t\t\tvar labelColors = [];\n\t\t\tvar labelTextColors = [];\n\t\t\ttooltipPosition = positioners[opts.position].call(me, active, me._eventPosition);\n\n\t\t\tvar tooltipItems = [];\n\t\t\tfor (i = 0, len = active.length; i < len; ++i) {\n\t\t\t\ttooltipItems.push(createTooltipItem(active[i]));\n\t\t\t}\n\n\t\t\t// If the user provided a filter function, use it to modify the tooltip items\n\t\t\tif (opts.filter) {\n\t\t\t\ttooltipItems = tooltipItems.filter(function(a) {\n\t\t\t\t\treturn opts.filter(a, data);\n\t\t\t\t});\n\t\t\t}\n\n\t\t\t// If the user provided a sorting function, use it to modify the tooltip items\n\t\t\tif (opts.itemSort) {\n\t\t\t\ttooltipItems = tooltipItems.sort(function(a, b) {\n\t\t\t\t\treturn opts.itemSort(a, b, data);\n\t\t\t\t});\n\t\t\t}\n\n\t\t\t// Determine colors for boxes\n\t\t\thelpers$1.each(tooltipItems, function(tooltipItem) {\n\t\t\t\tlabelColors.push(opts.callbacks.labelColor.call(me, tooltipItem, me._chart));\n\t\t\t\tlabelTextColors.push(opts.callbacks.labelTextColor.call(me, tooltipItem, me._chart));\n\t\t\t});\n\n\n\t\t\t// Build the Text Lines\n\t\t\tmodel.title = me.getTitle(tooltipItems, data);\n\t\t\tmodel.beforeBody = me.getBeforeBody(tooltipItems, data);\n\t\t\tmodel.body = me.getBody(tooltipItems, data);\n\t\t\tmodel.afterBody = me.getAfterBody(tooltipItems, data);\n\t\t\tmodel.footer = me.getFooter(tooltipItems, data);\n\n\t\t\t// Initial positioning and colors\n\t\t\tmodel.x = tooltipPosition.x;\n\t\t\tmodel.y = tooltipPosition.y;\n\t\t\tmodel.caretPadding = opts.caretPadding;\n\t\t\tmodel.labelColors = labelColors;\n\t\t\tmodel.labelTextColors = labelTextColors;\n\n\t\t\t// data points\n\t\t\tmodel.dataPoints = tooltipItems;\n\n\t\t\t// We need to determine alignment of the tooltip\n\t\t\ttooltipSize = getTooltipSize(this, model);\n\t\t\talignment = determineAlignment(this, tooltipSize);\n\t\t\t// Final Size and Position\n\t\t\tbackgroundPoint = getBackgroundPoint(model, tooltipSize, alignment, me._chart);\n\t\t} else {\n\t\t\tmodel.opacity = 0;\n\t\t}\n\n\t\tmodel.xAlign = alignment.xAlign;\n\t\tmodel.yAlign = alignment.yAlign;\n\t\tmodel.x = backgroundPoint.x;\n\t\tmodel.y = backgroundPoint.y;\n\t\tmodel.width = tooltipSize.width;\n\t\tmodel.height = tooltipSize.height;\n\n\t\t// Point where the caret on the tooltip points to\n\t\tmodel.caretX = tooltipPosition.x;\n\t\tmodel.caretY = tooltipPosition.y;\n\n\t\tme._model = model;\n\n\t\tif (changed && opts.custom) {\n\t\t\topts.custom.call(me, model);\n\t\t}\n\n\t\treturn me;\n\t},\n\n\tdrawCaret: function(tooltipPoint, size) {\n\t\tvar ctx = this._chart.ctx;\n\t\tvar vm = this._view;\n\t\tvar caretPosition = this.getCaretPosition(tooltipPoint, size, vm);\n\n\t\tctx.lineTo(caretPosition.x1, caretPosition.y1);\n\t\tctx.lineTo(caretPosition.x2, caretPosition.y2);\n\t\tctx.lineTo(caretPosition.x3, caretPosition.y3);\n\t},\n\tgetCaretPosition: function(tooltipPoint, size, vm) {\n\t\tvar x1, x2, x3, y1, y2, y3;\n\t\tvar caretSize = vm.caretSize;\n\t\tvar cornerRadius = vm.cornerRadius;\n\t\tvar xAlign = vm.xAlign;\n\t\tvar yAlign = vm.yAlign;\n\t\tvar ptX = tooltipPoint.x;\n\t\tvar ptY = tooltipPoint.y;\n\t\tvar width = size.width;\n\t\tvar height = size.height;\n\n\t\tif (yAlign === 'center') {\n\t\t\ty2 = ptY + (height / 2);\n\n\t\t\tif (xAlign === 'left') {\n\t\t\t\tx1 = ptX;\n\t\t\t\tx2 = x1 - caretSize;\n\t\t\t\tx3 = x1;\n\n\t\t\t\ty1 = y2 + caretSize;\n\t\t\t\ty3 = y2 - caretSize;\n\t\t\t} else {\n\t\t\t\tx1 = ptX + width;\n\t\t\t\tx2 = x1 + caretSize;\n\t\t\t\tx3 = x1;\n\n\t\t\t\ty1 = y2 - caretSize;\n\t\t\t\ty3 = y2 + caretSize;\n\t\t\t}\n\t\t} else {\n\t\t\tif (xAlign === 'left') {\n\t\t\t\tx2 = ptX + cornerRadius + (caretSize);\n\t\t\t\tx1 = x2 - caretSize;\n\t\t\t\tx3 = x2 + caretSize;\n\t\t\t} else if (xAlign === 'right') {\n\t\t\t\tx2 = ptX + width - cornerRadius - caretSize;\n\t\t\t\tx1 = x2 - caretSize;\n\t\t\t\tx3 = x2 + caretSize;\n\t\t\t} else {\n\t\t\t\tx2 = vm.caretX;\n\t\t\t\tx1 = x2 - caretSize;\n\t\t\t\tx3 = x2 + caretSize;\n\t\t\t}\n\t\t\tif (yAlign === 'top') {\n\t\t\t\ty1 = ptY;\n\t\t\t\ty2 = y1 - caretSize;\n\t\t\t\ty3 = y1;\n\t\t\t} else {\n\t\t\t\ty1 = ptY + height;\n\t\t\t\ty2 = y1 + caretSize;\n\t\t\t\ty3 = y1;\n\t\t\t\t// invert drawing order\n\t\t\t\tvar tmp = x3;\n\t\t\t\tx3 = x1;\n\t\t\t\tx1 = tmp;\n\t\t\t}\n\t\t}\n\t\treturn {x1: x1, x2: x2, x3: x3, y1: y1, y2: y2, y3: y3};\n\t},\n\n\tdrawTitle: function(pt, vm, ctx) {\n\t\tvar title = vm.title;\n\n\t\tif (title.length) {\n\t\t\tpt.x = getAlignedX(vm, vm._titleAlign);\n\n\t\t\tctx.textAlign = vm._titleAlign;\n\t\t\tctx.textBaseline = 'top';\n\n\t\t\tvar titleFontSize = vm.titleFontSize;\n\t\t\tvar titleSpacing = vm.titleSpacing;\n\n\t\t\tctx.fillStyle = vm.titleFontColor;\n\t\t\tctx.font = helpers$1.fontString(titleFontSize, vm._titleFontStyle, vm._titleFontFamily);\n\n\t\t\tvar i, len;\n\t\t\tfor (i = 0, len = title.length; i < len; ++i) {\n\t\t\t\tctx.fillText(title[i], pt.x, pt.y);\n\t\t\t\tpt.y += titleFontSize + titleSpacing; // Line Height and spacing\n\n\t\t\t\tif (i + 1 === title.length) {\n\t\t\t\t\tpt.y += vm.titleMarginBottom - titleSpacing; // If Last, add margin, remove spacing\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\tdrawBody: function(pt, vm, ctx) {\n\t\tvar bodyFontSize = vm.bodyFontSize;\n\t\tvar bodySpacing = vm.bodySpacing;\n\t\tvar bodyAlign = vm._bodyAlign;\n\t\tvar body = vm.body;\n\t\tvar drawColorBoxes = vm.displayColors;\n\t\tvar labelColors = vm.labelColors;\n\t\tvar xLinePadding = 0;\n\t\tvar colorX = drawColorBoxes ? getAlignedX(vm, 'left') : 0;\n\t\tvar textColor;\n\n\t\tctx.textAlign = bodyAlign;\n\t\tctx.textBaseline = 'top';\n\t\tctx.font = helpers$1.fontString(bodyFontSize, vm._bodyFontStyle, vm._bodyFontFamily);\n\n\t\tpt.x = getAlignedX(vm, bodyAlign);\n\n\t\t// Before Body\n\t\tvar fillLineOfText = function(line) {\n\t\t\tctx.fillText(line, pt.x + xLinePadding, pt.y);\n\t\t\tpt.y += bodyFontSize + bodySpacing;\n\t\t};\n\n\t\t// Before body lines\n\t\tctx.fillStyle = vm.bodyFontColor;\n\t\thelpers$1.each(vm.beforeBody, fillLineOfText);\n\n\t\txLinePadding = drawColorBoxes && bodyAlign !== 'right'\n\t\t\t? bodyAlign === 'center' ? (bodyFontSize / 2 + 1) : (bodyFontSize + 2)\n\t\t\t: 0;\n\n\t\t// Draw body lines now\n\t\thelpers$1.each(body, function(bodyItem, i) {\n\t\t\ttextColor = vm.labelTextColors[i];\n\t\t\tctx.fillStyle = textColor;\n\t\t\thelpers$1.each(bodyItem.before, fillLineOfText);\n\n\t\t\thelpers$1.each(bodyItem.lines, function(line) {\n\t\t\t\t// Draw Legend-like boxes if needed\n\t\t\t\tif (drawColorBoxes) {\n\t\t\t\t\t// Fill a white rect so that colours merge nicely if the opacity is < 1\n\t\t\t\t\tctx.fillStyle = vm.legendColorBackground;\n\t\t\t\t\tctx.fillRect(colorX, pt.y, bodyFontSize, bodyFontSize);\n\n\t\t\t\t\t// Border\n\t\t\t\t\tctx.lineWidth = 1;\n\t\t\t\t\tctx.strokeStyle = labelColors[i].borderColor;\n\t\t\t\t\tctx.strokeRect(colorX, pt.y, bodyFontSize, bodyFontSize);\n\n\t\t\t\t\t// Inner square\n\t\t\t\t\tctx.fillStyle = labelColors[i].backgroundColor;\n\t\t\t\t\tctx.fillRect(colorX + 1, pt.y + 1, bodyFontSize - 2, bodyFontSize - 2);\n\t\t\t\t\tctx.fillStyle = textColor;\n\t\t\t\t}\n\n\t\t\t\tfillLineOfText(line);\n\t\t\t});\n\n\t\t\thelpers$1.each(bodyItem.after, fillLineOfText);\n\t\t});\n\n\t\t// Reset back to 0 for after body\n\t\txLinePadding = 0;\n\n\t\t// After body lines\n\t\thelpers$1.each(vm.afterBody, fillLineOfText);\n\t\tpt.y -= bodySpacing; // Remove last body spacing\n\t},\n\n\tdrawFooter: function(pt, vm, ctx) {\n\t\tvar footer = vm.footer;\n\n\t\tif (footer.length) {\n\t\t\tpt.x = getAlignedX(vm, vm._footerAlign);\n\t\t\tpt.y += vm.footerMarginTop;\n\n\t\t\tctx.textAlign = vm._footerAlign;\n\t\t\tctx.textBaseline = 'top';\n\n\t\t\tctx.fillStyle = vm.footerFontColor;\n\t\t\tctx.font = helpers$1.fontString(vm.footerFontSize, vm._footerFontStyle, vm._footerFontFamily);\n\n\t\t\thelpers$1.each(footer, function(line) {\n\t\t\t\tctx.fillText(line, pt.x, pt.y);\n\t\t\t\tpt.y += vm.footerFontSize + vm.footerSpacing;\n\t\t\t});\n\t\t}\n\t},\n\n\tdrawBackground: function(pt, vm, ctx, tooltipSize) {\n\t\tctx.fillStyle = vm.backgroundColor;\n\t\tctx.strokeStyle = vm.borderColor;\n\t\tctx.lineWidth = vm.borderWidth;\n\t\tvar xAlign = vm.xAlign;\n\t\tvar yAlign = vm.yAlign;\n\t\tvar x = pt.x;\n\t\tvar y = pt.y;\n\t\tvar width = tooltipSize.width;\n\t\tvar height = tooltipSize.height;\n\t\tvar radius = vm.cornerRadius;\n\n\t\tctx.beginPath();\n\t\tctx.moveTo(x + radius, y);\n\t\tif (yAlign === 'top') {\n\t\t\tthis.drawCaret(pt, tooltipSize);\n\t\t}\n\t\tctx.lineTo(x + width - radius, y);\n\t\tctx.quadraticCurveTo(x + width, y, x + width, y + radius);\n\t\tif (yAlign === 'center' && xAlign === 'right') {\n\t\t\tthis.drawCaret(pt, tooltipSize);\n\t\t}\n\t\tctx.lineTo(x + width, y + height - radius);\n\t\tctx.quadraticCurveTo(x + width, y + height, x + width - radius, y + height);\n\t\tif (yAlign === 'bottom') {\n\t\t\tthis.drawCaret(pt, tooltipSize);\n\t\t}\n\t\tctx.lineTo(x + radius, y + height);\n\t\tctx.quadraticCurveTo(x, y + height, x, y + height - radius);\n\t\tif (yAlign === 'center' && xAlign === 'left') {\n\t\t\tthis.drawCaret(pt, tooltipSize);\n\t\t}\n\t\tctx.lineTo(x, y + radius);\n\t\tctx.quadraticCurveTo(x, y, x + radius, y);\n\t\tctx.closePath();\n\n\t\tctx.fill();\n\n\t\tif (vm.borderWidth > 0) {\n\t\t\tctx.stroke();\n\t\t}\n\t},\n\n\tdraw: function() {\n\t\tvar ctx = this._chart.ctx;\n\t\tvar vm = this._view;\n\n\t\tif (vm.opacity === 0) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar tooltipSize = {\n\t\t\twidth: vm.width,\n\t\t\theight: vm.height\n\t\t};\n\t\tvar pt = {\n\t\t\tx: vm.x,\n\t\t\ty: vm.y\n\t\t};\n\n\t\t// IE11/Edge does not like very small opacities, so snap to 0\n\t\tvar opacity = Math.abs(vm.opacity < 1e-3) ? 0 : vm.opacity;\n\n\t\t// Truthy/falsey value for empty tooltip\n\t\tvar hasTooltipContent = vm.title.length || vm.beforeBody.length || vm.body.length || vm.afterBody.length || vm.footer.length;\n\n\t\tif (this._options.enabled && hasTooltipContent) {\n\t\t\tctx.save();\n\t\t\tctx.globalAlpha = opacity;\n\n\t\t\t// Draw Background\n\t\t\tthis.drawBackground(pt, vm, ctx, tooltipSize);\n\n\t\t\t// Draw Title, Body, and Footer\n\t\t\tpt.y += vm.yPadding;\n\n\t\t\t// Titles\n\t\t\tthis.drawTitle(pt, vm, ctx);\n\n\t\t\t// Body\n\t\t\tthis.drawBody(pt, vm, ctx);\n\n\t\t\t// Footer\n\t\t\tthis.drawFooter(pt, vm, ctx);\n\n\t\t\tctx.restore();\n\t\t}\n\t},\n\n\t/**\n\t * Handle an event\n\t * @private\n\t * @param {IEvent} event - The event to handle\n\t * @returns {boolean} true if the tooltip changed\n\t */\n\thandleEvent: function(e) {\n\t\tvar me = this;\n\t\tvar options = me._options;\n\t\tvar changed = false;\n\n\t\tme._lastActive = me._lastActive || [];\n\n\t\t// Find Active Elements for tooltips\n\t\tif (e.type === 'mouseout') {\n\t\t\tme._active = [];\n\t\t} else {\n\t\t\tme._active = me._chart.getElementsAtEventForMode(e, options.mode, options);\n\t\t}\n\n\t\t// Remember Last Actives\n\t\tchanged = !helpers$1.arrayEquals(me._active, me._lastActive);\n\n\t\t// Only handle target event on tooltip change\n\t\tif (changed) {\n\t\t\tme._lastActive = me._active;\n\n\t\t\tif (options.enabled || options.custom) {\n\t\t\t\tme._eventPosition = {\n\t\t\t\t\tx: e.x,\n\t\t\t\t\ty: e.y\n\t\t\t\t};\n\n\t\t\t\tme.update(true);\n\t\t\t\tme.pivot();\n\t\t\t}\n\t\t}\n\n\t\treturn changed;\n\t}\n});\n\n/**\n * @namespace Chart.Tooltip.positioners\n */\nvar positioners_1 = positioners;\n\nvar core_tooltip = exports$3;\ncore_tooltip.positioners = positioners_1;\n\nvar valueOrDefault$8 = helpers$1.valueOrDefault;\n\ncore_defaults._set('global', {\n\telements: {},\n\tevents: [\n\t\t'mousemove',\n\t\t'mouseout',\n\t\t'click',\n\t\t'touchstart',\n\t\t'touchmove'\n\t],\n\thover: {\n\t\tonHover: null,\n\t\tmode: 'nearest',\n\t\tintersect: true,\n\t\tanimationDuration: 400\n\t},\n\tonClick: null,\n\tmaintainAspectRatio: true,\n\tresponsive: true,\n\tresponsiveAnimationDuration: 0\n});\n\n/**\n * Recursively merge the given config objects representing the `scales` option\n * by incorporating scale defaults in `xAxes` and `yAxes` array items, then\n * returns a deep copy of the result, thus doesn't alter inputs.\n */\nfunction mergeScaleConfig(/* config objects ... */) {\n\treturn helpers$1.merge({}, [].slice.call(arguments), {\n\t\tmerger: function(key, target, source, options) {\n\t\t\tif (key === 'xAxes' || key === 'yAxes') {\n\t\t\t\tvar slen = source[key].length;\n\t\t\t\tvar i, type, scale;\n\n\t\t\t\tif (!target[key]) {\n\t\t\t\t\ttarget[key] = [];\n\t\t\t\t}\n\n\t\t\t\tfor (i = 0; i < slen; ++i) {\n\t\t\t\t\tscale = source[key][i];\n\t\t\t\t\ttype = valueOrDefault$8(scale.type, key === 'xAxes' ? 'category' : 'linear');\n\n\t\t\t\t\tif (i >= target[key].length) {\n\t\t\t\t\t\ttarget[key].push({});\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!target[key][i].type || (scale.type && scale.type !== target[key][i].type)) {\n\t\t\t\t\t\t// new/untyped scale or type changed: let's apply the new defaults\n\t\t\t\t\t\t// then merge source scale to correctly overwrite the defaults.\n\t\t\t\t\t\thelpers$1.merge(target[key][i], [core_scaleService.getScaleDefaults(type), scale]);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// scales type are the same\n\t\t\t\t\t\thelpers$1.merge(target[key][i], scale);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\thelpers$1._merger(key, target, source, options);\n\t\t\t}\n\t\t}\n\t});\n}\n\n/**\n * Recursively merge the given config objects as the root options by handling\n * default scale options for the `scales` and `scale` properties, then returns\n * a deep copy of the result, thus doesn't alter inputs.\n */\nfunction mergeConfig(/* config objects ... */) {\n\treturn helpers$1.merge({}, [].slice.call(arguments), {\n\t\tmerger: function(key, target, source, options) {\n\t\t\tvar tval = target[key] || {};\n\t\t\tvar sval = source[key];\n\n\t\t\tif (key === 'scales') {\n\t\t\t\t// scale config merging is complex. Add our own function here for that\n\t\t\t\ttarget[key] = mergeScaleConfig(tval, sval);\n\t\t\t} else if (key === 'scale') {\n\t\t\t\t// used in polar area & radar charts since there is only one scale\n\t\t\t\ttarget[key] = helpers$1.merge(tval, [core_scaleService.getScaleDefaults(sval.type), sval]);\n\t\t\t} else {\n\t\t\t\thelpers$1._merger(key, target, source, options);\n\t\t\t}\n\t\t}\n\t});\n}\n\nfunction initConfig(config) {\n\tconfig = config || {};\n\n\t// Do NOT use mergeConfig for the data object because this method merges arrays\n\t// and so would change references to labels and datasets, preventing data updates.\n\tvar data = config.data = config.data || {};\n\tdata.datasets = data.datasets || [];\n\tdata.labels = data.labels || [];\n\n\tconfig.options = mergeConfig(\n\t\tcore_defaults.global,\n\t\tcore_defaults[config.type],\n\t\tconfig.options || {});\n\n\treturn config;\n}\n\nfunction updateConfig(chart) {\n\tvar newOptions = chart.options;\n\n\thelpers$1.each(chart.scales, function(scale) {\n\t\tcore_layouts.removeBox(chart, scale);\n\t});\n\n\tnewOptions = mergeConfig(\n\t\tcore_defaults.global,\n\t\tcore_defaults[chart.config.type],\n\t\tnewOptions);\n\n\tchart.options = chart.config.options = newOptions;\n\tchart.ensureScalesHaveIDs();\n\tchart.buildOrUpdateScales();\n\n\t// Tooltip\n\tchart.tooltip._options = newOptions.tooltips;\n\tchart.tooltip.initialize();\n}\n\nfunction positionIsHorizontal(position) {\n\treturn position === 'top' || position === 'bottom';\n}\n\nvar Chart = function(item, config) {\n\tthis.construct(item, config);\n\treturn this;\n};\n\nhelpers$1.extend(Chart.prototype, /** @lends Chart */ {\n\t/**\n\t * @private\n\t */\n\tconstruct: function(item, config) {\n\t\tvar me = this;\n\n\t\tconfig = initConfig(config);\n\n\t\tvar context = platform.acquireContext(item, config);\n\t\tvar canvas = context && context.canvas;\n\t\tvar height = canvas && canvas.height;\n\t\tvar width = canvas && canvas.width;\n\n\t\tme.id = helpers$1.uid();\n\t\tme.ctx = context;\n\t\tme.canvas = canvas;\n\t\tme.config = config;\n\t\tme.width = width;\n\t\tme.height = height;\n\t\tme.aspectRatio = height ? width / height : null;\n\t\tme.options = config.options;\n\t\tme._bufferedRender = false;\n\n\t\t/**\n\t\t * Provided for backward compatibility, Chart and Chart.Controller have been merged,\n\t\t * the \"instance\" still need to be defined since it might be called from plugins.\n\t\t * @prop Chart#chart\n\t\t * @deprecated since version 2.6.0\n\t\t * @todo remove at version 3\n\t\t * @private\n\t\t */\n\t\tme.chart = me;\n\t\tme.controller = me; // chart.chart.controller #inception\n\n\t\t// Add the chart instance to the global namespace\n\t\tChart.instances[me.id] = me;\n\n\t\t// Define alias to the config data: `chart.data === chart.config.data`\n\t\tObject.defineProperty(me, 'data', {\n\t\t\tget: function() {\n\t\t\t\treturn me.config.data;\n\t\t\t},\n\t\t\tset: function(value) {\n\t\t\t\tme.config.data = value;\n\t\t\t}\n\t\t});\n\n\t\tif (!context || !canvas) {\n\t\t\t// The given item is not a compatible context2d element, let's return before finalizing\n\t\t\t// the chart initialization but after setting basic chart / controller properties that\n\t\t\t// can help to figure out that the chart is not valid (e.g chart.canvas !== null);\n\t\t\t// https://github.com/chartjs/Chart.js/issues/2807\n\t\t\tconsole.error(\"Failed to create chart: can't acquire context from the given item\");\n\t\t\treturn;\n\t\t}\n\n\t\tme.initialize();\n\t\tme.update();\n\t},\n\n\t/**\n\t * @private\n\t */\n\tinitialize: function() {\n\t\tvar me = this;\n\n\t\t// Before init plugin notification\n\t\tcore_plugins.notify(me, 'beforeInit');\n\n\t\thelpers$1.retinaScale(me, me.options.devicePixelRatio);\n\n\t\tme.bindEvents();\n\n\t\tif (me.options.responsive) {\n\t\t\t// Initial resize before chart draws (must be silent to preserve initial animations).\n\t\t\tme.resize(true);\n\t\t}\n\n\t\t// Make sure scales have IDs and are built before we build any controllers.\n\t\tme.ensureScalesHaveIDs();\n\t\tme.buildOrUpdateScales();\n\t\tme.initToolTip();\n\n\t\t// After init plugin notification\n\t\tcore_plugins.notify(me, 'afterInit');\n\n\t\treturn me;\n\t},\n\n\tclear: function() {\n\t\thelpers$1.canvas.clear(this);\n\t\treturn this;\n\t},\n\n\tstop: function() {\n\t\t// Stops any current animation loop occurring\n\t\tcore_animations.cancelAnimation(this);\n\t\treturn this;\n\t},\n\n\tresize: function(silent) {\n\t\tvar me = this;\n\t\tvar options = me.options;\n\t\tvar canvas = me.canvas;\n\t\tvar aspectRatio = (options.maintainAspectRatio && me.aspectRatio) || null;\n\n\t\t// the canvas render width and height will be casted to integers so make sure that\n\t\t// the canvas display style uses the same integer values to avoid blurring effect.\n\n\t\t// Set to 0 instead of canvas.size because the size defaults to 300x150 if the element is collapsed\n\t\tvar newWidth = Math.max(0, Math.floor(helpers$1.getMaximumWidth(canvas)));\n\t\tvar newHeight = Math.max(0, Math.floor(aspectRatio ? newWidth / aspectRatio : helpers$1.getMaximumHeight(canvas)));\n\n\t\tif (me.width === newWidth && me.height === newHeight) {\n\t\t\treturn;\n\t\t}\n\n\t\tcanvas.width = me.width = newWidth;\n\t\tcanvas.height = me.height = newHeight;\n\t\tcanvas.style.width = newWidth + 'px';\n\t\tcanvas.style.height = newHeight + 'px';\n\n\t\thelpers$1.retinaScale(me, options.devicePixelRatio);\n\n\t\tif (!silent) {\n\t\t\t// Notify any plugins about the resize\n\t\t\tvar newSize = {width: newWidth, height: newHeight};\n\t\t\tcore_plugins.notify(me, 'resize', [newSize]);\n\n\t\t\t// Notify of resize\n\t\t\tif (options.onResize) {\n\t\t\t\toptions.onResize(me, newSize);\n\t\t\t}\n\n\t\t\tme.stop();\n\t\t\tme.update({\n\t\t\t\tduration: options.responsiveAnimationDuration\n\t\t\t});\n\t\t}\n\t},\n\n\tensureScalesHaveIDs: function() {\n\t\tvar options = this.options;\n\t\tvar scalesOptions = options.scales || {};\n\t\tvar scaleOptions = options.scale;\n\n\t\thelpers$1.each(scalesOptions.xAxes, function(xAxisOptions, index) {\n\t\t\txAxisOptions.id = xAxisOptions.id || ('x-axis-' + index);\n\t\t});\n\n\t\thelpers$1.each(scalesOptions.yAxes, function(yAxisOptions, index) {\n\t\t\tyAxisOptions.id = yAxisOptions.id || ('y-axis-' + index);\n\t\t});\n\n\t\tif (scaleOptions) {\n\t\t\tscaleOptions.id = scaleOptions.id || 'scale';\n\t\t}\n\t},\n\n\t/**\n\t * Builds a map of scale ID to scale object for future lookup.\n\t */\n\tbuildOrUpdateScales: function() {\n\t\tvar me = this;\n\t\tvar options = me.options;\n\t\tvar scales = me.scales || {};\n\t\tvar items = [];\n\t\tvar updated = Object.keys(scales).reduce(function(obj, id) {\n\t\t\tobj[id] = false;\n\t\t\treturn obj;\n\t\t}, {});\n\n\t\tif (options.scales) {\n\t\t\titems = items.concat(\n\t\t\t\t(options.scales.xAxes || []).map(function(xAxisOptions) {\n\t\t\t\t\treturn {options: xAxisOptions, dtype: 'category', dposition: 'bottom'};\n\t\t\t\t}),\n\t\t\t\t(options.scales.yAxes || []).map(function(yAxisOptions) {\n\t\t\t\t\treturn {options: yAxisOptions, dtype: 'linear', dposition: 'left'};\n\t\t\t\t})\n\t\t\t);\n\t\t}\n\n\t\tif (options.scale) {\n\t\t\titems.push({\n\t\t\t\toptions: options.scale,\n\t\t\t\tdtype: 'radialLinear',\n\t\t\t\tisDefault: true,\n\t\t\t\tdposition: 'chartArea'\n\t\t\t});\n\t\t}\n\n\t\thelpers$1.each(items, function(item) {\n\t\t\tvar scaleOptions = item.options;\n\t\t\tvar id = scaleOptions.id;\n\t\t\tvar scaleType = valueOrDefault$8(scaleOptions.type, item.dtype);\n\n\t\t\tif (positionIsHorizontal(scaleOptions.position) !== positionIsHorizontal(item.dposition)) {\n\t\t\t\tscaleOptions.position = item.dposition;\n\t\t\t}\n\n\t\t\tupdated[id] = true;\n\t\t\tvar scale = null;\n\t\t\tif (id in scales && scales[id].type === scaleType) {\n\t\t\t\tscale = scales[id];\n\t\t\t\tscale.options = scaleOptions;\n\t\t\t\tscale.ctx = me.ctx;\n\t\t\t\tscale.chart = me;\n\t\t\t} else {\n\t\t\t\tvar scaleClass = core_scaleService.getScaleConstructor(scaleType);\n\t\t\t\tif (!scaleClass) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tscale = new scaleClass({\n\t\t\t\t\tid: id,\n\t\t\t\t\ttype: scaleType,\n\t\t\t\t\toptions: scaleOptions,\n\t\t\t\t\tctx: me.ctx,\n\t\t\t\t\tchart: me\n\t\t\t\t});\n\t\t\t\tscales[scale.id] = scale;\n\t\t\t}\n\n\t\t\tscale.mergeTicksOptions();\n\n\t\t\t// TODO(SB): I think we should be able to remove this custom case (options.scale)\n\t\t\t// and consider it as a regular scale part of the \"scales\"\" map only! This would\n\t\t\t// make the logic easier and remove some useless? custom code.\n\t\t\tif (item.isDefault) {\n\t\t\t\tme.scale = scale;\n\t\t\t}\n\t\t});\n\t\t// clear up discarded scales\n\t\thelpers$1.each(updated, function(hasUpdated, id) {\n\t\t\tif (!hasUpdated) {\n\t\t\t\tdelete scales[id];\n\t\t\t}\n\t\t});\n\n\t\tme.scales = scales;\n\n\t\tcore_scaleService.addScalesToLayout(this);\n\t},\n\n\tbuildOrUpdateControllers: function() {\n\t\tvar me = this;\n\t\tvar newControllers = [];\n\n\t\thelpers$1.each(me.data.datasets, function(dataset, datasetIndex) {\n\t\t\tvar meta = me.getDatasetMeta(datasetIndex);\n\t\t\tvar type = dataset.type || me.config.type;\n\n\t\t\tif (meta.type && meta.type !== type) {\n\t\t\t\tme.destroyDatasetMeta(datasetIndex);\n\t\t\t\tmeta = me.getDatasetMeta(datasetIndex);\n\t\t\t}\n\t\t\tmeta.type = type;\n\n\t\t\tif (meta.controller) {\n\t\t\t\tmeta.controller.updateIndex(datasetIndex);\n\t\t\t\tmeta.controller.linkScales();\n\t\t\t} else {\n\t\t\t\tvar ControllerClass = controllers[meta.type];\n\t\t\t\tif (ControllerClass === undefined) {\n\t\t\t\t\tthrow new Error('\"' + meta.type + '\" is not a chart type.');\n\t\t\t\t}\n\n\t\t\t\tmeta.controller = new ControllerClass(me, datasetIndex);\n\t\t\t\tnewControllers.push(meta.controller);\n\t\t\t}\n\t\t}, me);\n\n\t\treturn newControllers;\n\t},\n\n\t/**\n\t * Reset the elements of all datasets\n\t * @private\n\t */\n\tresetElements: function() {\n\t\tvar me = this;\n\t\thelpers$1.each(me.data.datasets, function(dataset, datasetIndex) {\n\t\t\tme.getDatasetMeta(datasetIndex).controller.reset();\n\t\t}, me);\n\t},\n\n\t/**\n\t* Resets the chart back to it's state before the initial animation\n\t*/\n\treset: function() {\n\t\tthis.resetElements();\n\t\tthis.tooltip.initialize();\n\t},\n\n\tupdate: function(config) {\n\t\tvar me = this;\n\n\t\tif (!config || typeof config !== 'object') {\n\t\t\t// backwards compatibility\n\t\t\tconfig = {\n\t\t\t\tduration: config,\n\t\t\t\tlazy: arguments[1]\n\t\t\t};\n\t\t}\n\n\t\tupdateConfig(me);\n\n\t\t// plugins options references might have change, let's invalidate the cache\n\t\t// https://github.com/chartjs/Chart.js/issues/5111#issuecomment-355934167\n\t\tcore_plugins._invalidate(me);\n\n\t\tif (core_plugins.notify(me, 'beforeUpdate') === false) {\n\t\t\treturn;\n\t\t}\n\n\t\t// In case the entire data object changed\n\t\tme.tooltip._data = me.data;\n\n\t\t// Make sure dataset controllers are updated and new controllers are reset\n\t\tvar newControllers = me.buildOrUpdateControllers();\n\n\t\t// Make sure all dataset controllers have correct meta data counts\n\t\thelpers$1.each(me.data.datasets, function(dataset, datasetIndex) {\n\t\t\tme.getDatasetMeta(datasetIndex).controller.buildOrUpdateElements();\n\t\t}, me);\n\n\t\tme.updateLayout();\n\n\t\t// Can only reset the new controllers after the scales have been updated\n\t\tif (me.options.animation && me.options.animation.duration) {\n\t\t\thelpers$1.each(newControllers, function(controller) {\n\t\t\t\tcontroller.reset();\n\t\t\t});\n\t\t}\n\n\t\tme.updateDatasets();\n\n\t\t// Need to reset tooltip in case it is displayed with elements that are removed\n\t\t// after update.\n\t\tme.tooltip.initialize();\n\n\t\t// Last active contains items that were previously in the tooltip.\n\t\t// When we reset the tooltip, we need to clear it\n\t\tme.lastActive = [];\n\n\t\t// Do this before render so that any plugins that need final scale updates can use it\n\t\tcore_plugins.notify(me, 'afterUpdate');\n\n\t\tif (me._bufferedRender) {\n\t\t\tme._bufferedRequest = {\n\t\t\t\tduration: config.duration,\n\t\t\t\teasing: config.easing,\n\t\t\t\tlazy: config.lazy\n\t\t\t};\n\t\t} else {\n\t\t\tme.render(config);\n\t\t}\n\t},\n\n\t/**\n\t * Updates the chart layout unless a plugin returns `false` to the `beforeLayout`\n\t * hook, in which case, plugins will not be called on `afterLayout`.\n\t * @private\n\t */\n\tupdateLayout: function() {\n\t\tvar me = this;\n\n\t\tif (core_plugins.notify(me, 'beforeLayout') === false) {\n\t\t\treturn;\n\t\t}\n\n\t\tcore_layouts.update(this, this.width, this.height);\n\n\t\t/**\n\t\t * Provided for backward compatibility, use `afterLayout` instead.\n\t\t * @method IPlugin#afterScaleUpdate\n\t\t * @deprecated since version 2.5.0\n\t\t * @todo remove at version 3\n\t\t * @private\n\t\t */\n\t\tcore_plugins.notify(me, 'afterScaleUpdate');\n\t\tcore_plugins.notify(me, 'afterLayout');\n\t},\n\n\t/**\n\t * Updates all datasets unless a plugin returns `false` to the `beforeDatasetsUpdate`\n\t * hook, in which case, plugins will not be called on `afterDatasetsUpdate`.\n\t * @private\n\t */\n\tupdateDatasets: function() {\n\t\tvar me = this;\n\n\t\tif (core_plugins.notify(me, 'beforeDatasetsUpdate') === false) {\n\t\t\treturn;\n\t\t}\n\n\t\tfor (var i = 0, ilen = me.data.datasets.length; i < ilen; ++i) {\n\t\t\tme.updateDataset(i);\n\t\t}\n\n\t\tcore_plugins.notify(me, 'afterDatasetsUpdate');\n\t},\n\n\t/**\n\t * Updates dataset at index unless a plugin returns `false` to the `beforeDatasetUpdate`\n\t * hook, in which case, plugins will not be called on `afterDatasetUpdate`.\n\t * @private\n\t */\n\tupdateDataset: function(index) {\n\t\tvar me = this;\n\t\tvar meta = me.getDatasetMeta(index);\n\t\tvar args = {\n\t\t\tmeta: meta,\n\t\t\tindex: index\n\t\t};\n\n\t\tif (core_plugins.notify(me, 'beforeDatasetUpdate', [args]) === false) {\n\t\t\treturn;\n\t\t}\n\n\t\tmeta.controller.update();\n\n\t\tcore_plugins.notify(me, 'afterDatasetUpdate', [args]);\n\t},\n\n\trender: function(config) {\n\t\tvar me = this;\n\n\t\tif (!config || typeof config !== 'object') {\n\t\t\t// backwards compatibility\n\t\t\tconfig = {\n\t\t\t\tduration: config,\n\t\t\t\tlazy: arguments[1]\n\t\t\t};\n\t\t}\n\n\t\tvar animationOptions = me.options.animation;\n\t\tvar duration = valueOrDefault$8(config.duration, animationOptions && animationOptions.duration);\n\t\tvar lazy = config.lazy;\n\n\t\tif (core_plugins.notify(me, 'beforeRender') === false) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar onComplete = function(animation) {\n\t\t\tcore_plugins.notify(me, 'afterRender');\n\t\t\thelpers$1.callback(animationOptions && animationOptions.onComplete, [animation], me);\n\t\t};\n\n\t\tif (animationOptions && duration) {\n\t\t\tvar animation = new core_animation({\n\t\t\t\tnumSteps: duration / 16.66, // 60 fps\n\t\t\t\teasing: config.easing || animationOptions.easing,\n\n\t\t\t\trender: function(chart, animationObject) {\n\t\t\t\t\tvar easingFunction = helpers$1.easing.effects[animationObject.easing];\n\t\t\t\t\tvar currentStep = animationObject.currentStep;\n\t\t\t\t\tvar stepDecimal = currentStep / animationObject.numSteps;\n\n\t\t\t\t\tchart.draw(easingFunction(stepDecimal), stepDecimal, currentStep);\n\t\t\t\t},\n\n\t\t\t\tonAnimationProgress: animationOptions.onProgress,\n\t\t\t\tonAnimationComplete: onComplete\n\t\t\t});\n\n\t\t\tcore_animations.addAnimation(me, animation, duration, lazy);\n\t\t} else {\n\t\t\tme.draw();\n\n\t\t\t// See https://github.com/chartjs/Chart.js/issues/3781\n\t\t\tonComplete(new core_animation({numSteps: 0, chart: me}));\n\t\t}\n\n\t\treturn me;\n\t},\n\n\tdraw: function(easingValue) {\n\t\tvar me = this;\n\n\t\tme.clear();\n\n\t\tif (helpers$1.isNullOrUndef(easingValue)) {\n\t\t\teasingValue = 1;\n\t\t}\n\n\t\tme.transition(easingValue);\n\n\t\tif (me.width <= 0 || me.height <= 0) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (core_plugins.notify(me, 'beforeDraw', [easingValue]) === false) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Draw all the scales\n\t\thelpers$1.each(me.boxes, function(box) {\n\t\t\tbox.draw(me.chartArea);\n\t\t}, me);\n\n\t\tme.drawDatasets(easingValue);\n\t\tme._drawTooltip(easingValue);\n\n\t\tcore_plugins.notify(me, 'afterDraw', [easingValue]);\n\t},\n\n\t/**\n\t * @private\n\t */\n\ttransition: function(easingValue) {\n\t\tvar me = this;\n\n\t\tfor (var i = 0, ilen = (me.data.datasets || []).length; i < ilen; ++i) {\n\t\t\tif (me.isDatasetVisible(i)) {\n\t\t\t\tme.getDatasetMeta(i).controller.transition(easingValue);\n\t\t\t}\n\t\t}\n\n\t\tme.tooltip.transition(easingValue);\n\t},\n\n\t/**\n\t * Draws all datasets unless a plugin returns `false` to the `beforeDatasetsDraw`\n\t * hook, in which case, plugins will not be called on `afterDatasetsDraw`.\n\t * @private\n\t */\n\tdrawDatasets: function(easingValue) {\n\t\tvar me = this;\n\n\t\tif (core_plugins.notify(me, 'beforeDatasetsDraw', [easingValue]) === false) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Draw datasets reversed to support proper line stacking\n\t\tfor (var i = (me.data.datasets || []).length - 1; i >= 0; --i) {\n\t\t\tif (me.isDatasetVisible(i)) {\n\t\t\t\tme.drawDataset(i, easingValue);\n\t\t\t}\n\t\t}\n\n\t\tcore_plugins.notify(me, 'afterDatasetsDraw', [easingValue]);\n\t},\n\n\t/**\n\t * Draws dataset at index unless a plugin returns `false` to the `beforeDatasetDraw`\n\t * hook, in which case, plugins will not be called on `afterDatasetDraw`.\n\t * @private\n\t */\n\tdrawDataset: function(index, easingValue) {\n\t\tvar me = this;\n\t\tvar meta = me.getDatasetMeta(index);\n\t\tvar args = {\n\t\t\tmeta: meta,\n\t\t\tindex: index,\n\t\t\teasingValue: easingValue\n\t\t};\n\n\t\tif (core_plugins.notify(me, 'beforeDatasetDraw', [args]) === false) {\n\t\t\treturn;\n\t\t}\n\n\t\tmeta.controller.draw(easingValue);\n\n\t\tcore_plugins.notify(me, 'afterDatasetDraw', [args]);\n\t},\n\n\t/**\n\t * Draws tooltip unless a plugin returns `false` to the `beforeTooltipDraw`\n\t * hook, in which case, plugins will not be called on `afterTooltipDraw`.\n\t * @private\n\t */\n\t_drawTooltip: function(easingValue) {\n\t\tvar me = this;\n\t\tvar tooltip = me.tooltip;\n\t\tvar args = {\n\t\t\ttooltip: tooltip,\n\t\t\teasingValue: easingValue\n\t\t};\n\n\t\tif (core_plugins.notify(me, 'beforeTooltipDraw', [args]) === false) {\n\t\t\treturn;\n\t\t}\n\n\t\ttooltip.draw();\n\n\t\tcore_plugins.notify(me, 'afterTooltipDraw', [args]);\n\t},\n\n\t/**\n\t * Get the single element that was clicked on\n\t * @return An object containing the dataset index and element index of the matching element. Also contains the rectangle that was draw\n\t */\n\tgetElementAtEvent: function(e) {\n\t\treturn core_interaction.modes.single(this, e);\n\t},\n\n\tgetElementsAtEvent: function(e) {\n\t\treturn core_interaction.modes.label(this, e, {intersect: true});\n\t},\n\n\tgetElementsAtXAxis: function(e) {\n\t\treturn core_interaction.modes['x-axis'](this, e, {intersect: true});\n\t},\n\n\tgetElementsAtEventForMode: function(e, mode, options) {\n\t\tvar method = core_interaction.modes[mode];\n\t\tif (typeof method === 'function') {\n\t\t\treturn method(this, e, options);\n\t\t}\n\n\t\treturn [];\n\t},\n\n\tgetDatasetAtEvent: function(e) {\n\t\treturn core_interaction.modes.dataset(this, e, {intersect: true});\n\t},\n\n\tgetDatasetMeta: function(datasetIndex) {\n\t\tvar me = this;\n\t\tvar dataset = me.data.datasets[datasetIndex];\n\t\tif (!dataset._meta) {\n\t\t\tdataset._meta = {};\n\t\t}\n\n\t\tvar meta = dataset._meta[me.id];\n\t\tif (!meta) {\n\t\t\tmeta = dataset._meta[me.id] = {\n\t\t\t\ttype: null,\n\t\t\t\tdata: [],\n\t\t\t\tdataset: null,\n\t\t\t\tcontroller: null,\n\t\t\t\thidden: null,\t\t\t// See isDatasetVisible() comment\n\t\t\t\txAxisID: null,\n\t\t\t\tyAxisID: null\n\t\t\t};\n\t\t}\n\n\t\treturn meta;\n\t},\n\n\tgetVisibleDatasetCount: function() {\n\t\tvar count = 0;\n\t\tfor (var i = 0, ilen = this.data.datasets.length; i < ilen; ++i) {\n\t\t\tif (this.isDatasetVisible(i)) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\treturn count;\n\t},\n\n\tisDatasetVisible: function(datasetIndex) {\n\t\tvar meta = this.getDatasetMeta(datasetIndex);\n\n\t\t// meta.hidden is a per chart dataset hidden flag override with 3 states: if true or false,\n\t\t// the dataset.hidden value is ignored, else if null, the dataset hidden state is returned.\n\t\treturn typeof meta.hidden === 'boolean' ? !meta.hidden : !this.data.datasets[datasetIndex].hidden;\n\t},\n\n\tgenerateLegend: function() {\n\t\treturn this.options.legendCallback(this);\n\t},\n\n\t/**\n\t * @private\n\t */\n\tdestroyDatasetMeta: function(datasetIndex) {\n\t\tvar id = this.id;\n\t\tvar dataset = this.data.datasets[datasetIndex];\n\t\tvar meta = dataset._meta && dataset._meta[id];\n\n\t\tif (meta) {\n\t\t\tmeta.controller.destroy();\n\t\t\tdelete dataset._meta[id];\n\t\t}\n\t},\n\n\tdestroy: function() {\n\t\tvar me = this;\n\t\tvar canvas = me.canvas;\n\t\tvar i, ilen;\n\n\t\tme.stop();\n\n\t\t// dataset controllers need to cleanup associated data\n\t\tfor (i = 0, ilen = me.data.datasets.length; i < ilen; ++i) {\n\t\t\tme.destroyDatasetMeta(i);\n\t\t}\n\n\t\tif (canvas) {\n\t\t\tme.unbindEvents();\n\t\t\thelpers$1.canvas.clear(me);\n\t\t\tplatform.releaseContext(me.ctx);\n\t\t\tme.canvas = null;\n\t\t\tme.ctx = null;\n\t\t}\n\n\t\tcore_plugins.notify(me, 'destroy');\n\n\t\tdelete Chart.instances[me.id];\n\t},\n\n\ttoBase64Image: function() {\n\t\treturn this.canvas.toDataURL.apply(this.canvas, arguments);\n\t},\n\n\tinitToolTip: function() {\n\t\tvar me = this;\n\t\tme.tooltip = new core_tooltip({\n\t\t\t_chart: me,\n\t\t\t_chartInstance: me, // deprecated, backward compatibility\n\t\t\t_data: me.data,\n\t\t\t_options: me.options.tooltips\n\t\t}, me);\n\t},\n\n\t/**\n\t * @private\n\t */\n\tbindEvents: function() {\n\t\tvar me = this;\n\t\tvar listeners = me._listeners = {};\n\t\tvar listener = function() {\n\t\t\tme.eventHandler.apply(me, arguments);\n\t\t};\n\n\t\thelpers$1.each(me.options.events, function(type) {\n\t\t\tplatform.addEventListener(me, type, listener);\n\t\t\tlisteners[type] = listener;\n\t\t});\n\n\t\t// Elements used to detect size change should not be injected for non responsive charts.\n\t\t// See https://github.com/chartjs/Chart.js/issues/2210\n\t\tif (me.options.responsive) {\n\t\t\tlistener = function() {\n\t\t\t\tme.resize();\n\t\t\t};\n\n\t\t\tplatform.addEventListener(me, 'resize', listener);\n\t\t\tlisteners.resize = listener;\n\t\t}\n\t},\n\n\t/**\n\t * @private\n\t */\n\tunbindEvents: function() {\n\t\tvar me = this;\n\t\tvar listeners = me._listeners;\n\t\tif (!listeners) {\n\t\t\treturn;\n\t\t}\n\n\t\tdelete me._listeners;\n\t\thelpers$1.each(listeners, function(listener, type) {\n\t\t\tplatform.removeEventListener(me, type, listener);\n\t\t});\n\t},\n\n\tupdateHoverStyle: function(elements, mode, enabled) {\n\t\tvar method = enabled ? 'setHoverStyle' : 'removeHoverStyle';\n\t\tvar element, i, ilen;\n\n\t\tfor (i = 0, ilen = elements.length; i < ilen; ++i) {\n\t\t\telement = elements[i];\n\t\t\tif (element) {\n\t\t\t\tthis.getDatasetMeta(element._datasetIndex).controller[method](element);\n\t\t\t}\n\t\t}\n\t},\n\n\t/**\n\t * @private\n\t */\n\teventHandler: function(e) {\n\t\tvar me = this;\n\t\tvar tooltip = me.tooltip;\n\n\t\tif (core_plugins.notify(me, 'beforeEvent', [e]) === false) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Buffer any update calls so that renders do not occur\n\t\tme._bufferedRender = true;\n\t\tme._bufferedRequest = null;\n\n\t\tvar changed = me.handleEvent(e);\n\t\t// for smooth tooltip animations issue #4989\n\t\t// the tooltip should be the source of change\n\t\t// Animation check workaround:\n\t\t// tooltip._start will be null when tooltip isn't animating\n\t\tif (tooltip) {\n\t\t\tchanged = tooltip._start\n\t\t\t\t? tooltip.handleEvent(e)\n\t\t\t\t: changed | tooltip.handleEvent(e);\n\t\t}\n\n\t\tcore_plugins.notify(me, 'afterEvent', [e]);\n\n\t\tvar bufferedRequest = me._bufferedRequest;\n\t\tif (bufferedRequest) {\n\t\t\t// If we have an update that was triggered, we need to do a normal render\n\t\t\tme.render(bufferedRequest);\n\t\t} else if (changed && !me.animating) {\n\t\t\t// If entering, leaving, or changing elements, animate the change via pivot\n\t\t\tme.stop();\n\n\t\t\t// We only need to render at this point. Updating will cause scales to be\n\t\t\t// recomputed generating flicker & using more memory than necessary.\n\t\t\tme.render({\n\t\t\t\tduration: me.options.hover.animationDuration,\n\t\t\t\tlazy: true\n\t\t\t});\n\t\t}\n\n\t\tme._bufferedRender = false;\n\t\tme._bufferedRequest = null;\n\n\t\treturn me;\n\t},\n\n\t/**\n\t * Handle an event\n\t * @private\n\t * @param {IEvent} event the event to handle\n\t * @return {boolean} true if the chart needs to re-render\n\t */\n\thandleEvent: function(e) {\n\t\tvar me = this;\n\t\tvar options = me.options || {};\n\t\tvar hoverOptions = options.hover;\n\t\tvar changed = false;\n\n\t\tme.lastActive = me.lastActive || [];\n\n\t\t// Find Active Elements for hover and tooltips\n\t\tif (e.type === 'mouseout') {\n\t\t\tme.active = [];\n\t\t} else {\n\t\t\tme.active = me.getElementsAtEventForMode(e, hoverOptions.mode, hoverOptions);\n\t\t}\n\n\t\t// Invoke onHover hook\n\t\t// Need to call with native event here to not break backwards compatibility\n\t\thelpers$1.callback(options.onHover || options.hover.onHover, [e.native, me.active], me);\n\n\t\tif (e.type === 'mouseup' || e.type === 'click') {\n\t\t\tif (options.onClick) {\n\t\t\t\t// Use e.native here for backwards compatibility\n\t\t\t\toptions.onClick.call(me, e.native, me.active);\n\t\t\t}\n\t\t}\n\n\t\t// Remove styling for last active (even if it may still be active)\n\t\tif (me.lastActive.length) {\n\t\t\tme.updateHoverStyle(me.lastActive, hoverOptions.mode, false);\n\t\t}\n\n\t\t// Built in hover styling\n\t\tif (me.active.length && hoverOptions.mode) {\n\t\t\tme.updateHoverStyle(me.active, hoverOptions.mode, true);\n\t\t}\n\n\t\tchanged = !helpers$1.arrayEquals(me.active, me.lastActive);\n\n\t\t// Remember Last Actives\n\t\tme.lastActive = me.active;\n\n\t\treturn changed;\n\t}\n});\n\n/**\n * NOTE(SB) We actually don't use this container anymore but we need to keep it\n * for backward compatibility. Though, it can still be useful for plugins that\n * would need to work on multiple charts?!\n */\nChart.instances = {};\n\nvar core_controller = Chart;\n\n// DEPRECATIONS\n\n/**\n * Provided for backward compatibility, use Chart instead.\n * @class Chart.Controller\n * @deprecated since version 2.6\n * @todo remove at version 3\n * @private\n */\nChart.Controller = Chart;\n\n/**\n * Provided for backward compatibility, not available anymore.\n * @namespace Chart\n * @deprecated since version 2.8\n * @todo remove at version 3\n * @private\n */\nChart.types = {};\n\n/**\n * Provided for backward compatibility, not available anymore.\n * @namespace Chart.helpers.configMerge\n * @deprecated since version 2.8.0\n * @todo remove at version 3\n * @private\n */\nhelpers$1.configMerge = mergeConfig;\n\n/**\n * Provided for backward compatibility, not available anymore.\n * @namespace Chart.helpers.scaleMerge\n * @deprecated since version 2.8.0\n * @todo remove at version 3\n * @private\n */\nhelpers$1.scaleMerge = mergeScaleConfig;\n\nvar core_helpers = function() {\n\n\t// -- Basic js utility methods\n\n\thelpers$1.where = function(collection, filterCallback) {\n\t\tif (helpers$1.isArray(collection) && Array.prototype.filter) {\n\t\t\treturn collection.filter(filterCallback);\n\t\t}\n\t\tvar filtered = [];\n\n\t\thelpers$1.each(collection, function(item) {\n\t\t\tif (filterCallback(item)) {\n\t\t\t\tfiltered.push(item);\n\t\t\t}\n\t\t});\n\n\t\treturn filtered;\n\t};\n\thelpers$1.findIndex = Array.prototype.findIndex ?\n\t\tfunction(array, callback, scope) {\n\t\t\treturn array.findIndex(callback, scope);\n\t\t} :\n\t\tfunction(array, callback, scope) {\n\t\t\tscope = scope === undefined ? array : scope;\n\t\t\tfor (var i = 0, ilen = array.length; i < ilen; ++i) {\n\t\t\t\tif (callback.call(scope, array[i], i, array)) {\n\t\t\t\t\treturn i;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn -1;\n\t\t};\n\thelpers$1.findNextWhere = function(arrayToSearch, filterCallback, startIndex) {\n\t\t// Default to start of the array\n\t\tif (helpers$1.isNullOrUndef(startIndex)) {\n\t\t\tstartIndex = -1;\n\t\t}\n\t\tfor (var i = startIndex + 1; i < arrayToSearch.length; i++) {\n\t\t\tvar currentItem = arrayToSearch[i];\n\t\t\tif (filterCallback(currentItem)) {\n\t\t\t\treturn currentItem;\n\t\t\t}\n\t\t}\n\t};\n\thelpers$1.findPreviousWhere = function(arrayToSearch, filterCallback, startIndex) {\n\t\t// Default to end of the array\n\t\tif (helpers$1.isNullOrUndef(startIndex)) {\n\t\t\tstartIndex = arrayToSearch.length;\n\t\t}\n\t\tfor (var i = startIndex - 1; i >= 0; i--) {\n\t\t\tvar currentItem = arrayToSearch[i];\n\t\t\tif (filterCallback(currentItem)) {\n\t\t\t\treturn currentItem;\n\t\t\t}\n\t\t}\n\t};\n\n\t// -- Math methods\n\thelpers$1.isNumber = function(n) {\n\t\treturn !isNaN(parseFloat(n)) && isFinite(n);\n\t};\n\thelpers$1.almostEquals = function(x, y, epsilon) {\n\t\treturn Math.abs(x - y) < epsilon;\n\t};\n\thelpers$1.almostWhole = function(x, epsilon) {\n\t\tvar rounded = Math.round(x);\n\t\treturn (((rounded - epsilon) < x) && ((rounded + epsilon) > x));\n\t};\n\thelpers$1.max = function(array) {\n\t\treturn array.reduce(function(max, value) {\n\t\t\tif (!isNaN(value)) {\n\t\t\t\treturn Math.max(max, value);\n\t\t\t}\n\t\t\treturn max;\n\t\t}, Number.NEGATIVE_INFINITY);\n\t};\n\thelpers$1.min = function(array) {\n\t\treturn array.reduce(function(min, value) {\n\t\t\tif (!isNaN(value)) {\n\t\t\t\treturn Math.min(min, value);\n\t\t\t}\n\t\t\treturn min;\n\t\t}, Number.POSITIVE_INFINITY);\n\t};\n\thelpers$1.sign = Math.sign ?\n\t\tfunction(x) {\n\t\t\treturn Math.sign(x);\n\t\t} :\n\t\tfunction(x) {\n\t\t\tx = +x; // convert to a number\n\t\t\tif (x === 0 || isNaN(x)) {\n\t\t\t\treturn x;\n\t\t\t}\n\t\t\treturn x > 0 ? 1 : -1;\n\t\t};\n\thelpers$1.log10 = Math.log10 ?\n\t\tfunction(x) {\n\t\t\treturn Math.log10(x);\n\t\t} :\n\t\tfunction(x) {\n\t\t\tvar exponent = Math.log(x) * Math.LOG10E; // Math.LOG10E = 1 / Math.LN10.\n\t\t\t// Check for whole powers of 10,\n\t\t\t// which due to floating point rounding error should be corrected.\n\t\t\tvar powerOf10 = Math.round(exponent);\n\t\t\tvar isPowerOf10 = x === Math.pow(10, powerOf10);\n\n\t\t\treturn isPowerOf10 ? powerOf10 : exponent;\n\t\t};\n\thelpers$1.toRadians = function(degrees) {\n\t\treturn degrees * (Math.PI / 180);\n\t};\n\thelpers$1.toDegrees = function(radians) {\n\t\treturn radians * (180 / Math.PI);\n\t};\n\n\t/**\n\t * Returns the number of decimal places\n\t * i.e. the number of digits after the decimal point, of the value of this Number.\n\t * @param {number} x - A number.\n\t * @returns {number} The number of decimal places.\n\t * @private\n\t */\n\thelpers$1._decimalPlaces = function(x) {\n\t\tif (!helpers$1.isFinite(x)) {\n\t\t\treturn;\n\t\t}\n\t\tvar e = 1;\n\t\tvar p = 0;\n\t\twhile (Math.round(x * e) / e !== x) {\n\t\t\te *= 10;\n\t\t\tp++;\n\t\t}\n\t\treturn p;\n\t};\n\n\t// Gets the angle from vertical upright to the point about a centre.\n\thelpers$1.getAngleFromPoint = function(centrePoint, anglePoint) {\n\t\tvar distanceFromXCenter = anglePoint.x - centrePoint.x;\n\t\tvar distanceFromYCenter = anglePoint.y - centrePoint.y;\n\t\tvar radialDistanceFromCenter = Math.sqrt(distanceFromXCenter * distanceFromXCenter + distanceFromYCenter * distanceFromYCenter);\n\n\t\tvar angle = Math.atan2(distanceFromYCenter, distanceFromXCenter);\n\n\t\tif (angle < (-0.5 * Math.PI)) {\n\t\t\tangle += 2.0 * Math.PI; // make sure the returned angle is in the range of (-PI/2, 3PI/2]\n\t\t}\n\n\t\treturn {\n\t\t\tangle: angle,\n\t\t\tdistance: radialDistanceFromCenter\n\t\t};\n\t};\n\thelpers$1.distanceBetweenPoints = function(pt1, pt2) {\n\t\treturn Math.sqrt(Math.pow(pt2.x - pt1.x, 2) + Math.pow(pt2.y - pt1.y, 2));\n\t};\n\n\t/**\n\t * Provided for backward compatibility, not available anymore\n\t * @function Chart.helpers.aliasPixel\n\t * @deprecated since version 2.8.0\n\t * @todo remove at version 3\n\t */\n\thelpers$1.aliasPixel = function(pixelWidth) {\n\t\treturn (pixelWidth % 2 === 0) ? 0 : 0.5;\n\t};\n\n\t/**\n\t * Returns the aligned pixel value to avoid anti-aliasing blur\n\t * @param {Chart} chart - The chart instance.\n\t * @param {number} pixel - A pixel value.\n\t * @param {number} width - The width of the element.\n\t * @returns {number} The aligned pixel value.\n\t * @private\n\t */\n\thelpers$1._alignPixel = function(chart, pixel, width) {\n\t\tvar devicePixelRatio = chart.currentDevicePixelRatio;\n\t\tvar halfWidth = width / 2;\n\t\treturn Math.round((pixel - halfWidth) * devicePixelRatio) / devicePixelRatio + halfWidth;\n\t};\n\n\thelpers$1.splineCurve = function(firstPoint, middlePoint, afterPoint, t) {\n\t\t// Props to Rob Spencer at scaled innovation for his post on splining between points\n\t\t// http://scaledinnovation.com/analytics/splines/aboutSplines.html\n\n\t\t// This function must also respect \"skipped\" points\n\n\t\tvar previous = firstPoint.skip ? middlePoint : firstPoint;\n\t\tvar current = middlePoint;\n\t\tvar next = afterPoint.skip ? middlePoint : afterPoint;\n\n\t\tvar d01 = Math.sqrt(Math.pow(current.x - previous.x, 2) + Math.pow(current.y - previous.y, 2));\n\t\tvar d12 = Math.sqrt(Math.pow(next.x - current.x, 2) + Math.pow(next.y - current.y, 2));\n\n\t\tvar s01 = d01 / (d01 + d12);\n\t\tvar s12 = d12 / (d01 + d12);\n\n\t\t// If all points are the same, s01 & s02 will be inf\n\t\ts01 = isNaN(s01) ? 0 : s01;\n\t\ts12 = isNaN(s12) ? 0 : s12;\n\n\t\tvar fa = t * s01; // scaling factor for triangle Ta\n\t\tvar fb = t * s12;\n\n\t\treturn {\n\t\t\tprevious: {\n\t\t\t\tx: current.x - fa * (next.x - previous.x),\n\t\t\t\ty: current.y - fa * (next.y - previous.y)\n\t\t\t},\n\t\t\tnext: {\n\t\t\t\tx: current.x + fb * (next.x - previous.x),\n\t\t\t\ty: current.y + fb * (next.y - previous.y)\n\t\t\t}\n\t\t};\n\t};\n\thelpers$1.EPSILON = Number.EPSILON || 1e-14;\n\thelpers$1.splineCurveMonotone = function(points) {\n\t\t// This function calculates Bézier control points in a similar way than |splineCurve|,\n\t\t// but preserves monotonicity of the provided data and ensures no local extremums are added\n\t\t// between the dataset discrete points due to the interpolation.\n\t\t// See : https://en.wikipedia.org/wiki/Monotone_cubic_interpolation\n\n\t\tvar pointsWithTangents = (points || []).map(function(point) {\n\t\t\treturn {\n\t\t\t\tmodel: point._model,\n\t\t\t\tdeltaK: 0,\n\t\t\t\tmK: 0\n\t\t\t};\n\t\t});\n\n\t\t// Calculate slopes (deltaK) and initialize tangents (mK)\n\t\tvar pointsLen = pointsWithTangents.length;\n\t\tvar i, pointBefore, pointCurrent, pointAfter;\n\t\tfor (i = 0; i < pointsLen; ++i) {\n\t\t\tpointCurrent = pointsWithTangents[i];\n\t\t\tif (pointCurrent.model.skip) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tpointBefore = i > 0 ? pointsWithTangents[i - 1] : null;\n\t\t\tpointAfter = i < pointsLen - 1 ? pointsWithTangents[i + 1] : null;\n\t\t\tif (pointAfter && !pointAfter.model.skip) {\n\t\t\t\tvar slopeDeltaX = (pointAfter.model.x - pointCurrent.model.x);\n\n\t\t\t\t// In the case of two points that appear at the same x pixel, slopeDeltaX is 0\n\t\t\t\tpointCurrent.deltaK = slopeDeltaX !== 0 ? (pointAfter.model.y - pointCurrent.model.y) / slopeDeltaX : 0;\n\t\t\t}\n\n\t\t\tif (!pointBefore || pointBefore.model.skip) {\n\t\t\t\tpointCurrent.mK = pointCurrent.deltaK;\n\t\t\t} else if (!pointAfter || pointAfter.model.skip) {\n\t\t\t\tpointCurrent.mK = pointBefore.deltaK;\n\t\t\t} else if (this.sign(pointBefore.deltaK) !== this.sign(pointCurrent.deltaK)) {\n\t\t\t\tpointCurrent.mK = 0;\n\t\t\t} else {\n\t\t\t\tpointCurrent.mK = (pointBefore.deltaK + pointCurrent.deltaK) / 2;\n\t\t\t}\n\t\t}\n\n\t\t// Adjust tangents to ensure monotonic properties\n\t\tvar alphaK, betaK, tauK, squaredMagnitude;\n\t\tfor (i = 0; i < pointsLen - 1; ++i) {\n\t\t\tpointCurrent = pointsWithTangents[i];\n\t\t\tpointAfter = pointsWithTangents[i + 1];\n\t\t\tif (pointCurrent.model.skip || pointAfter.model.skip) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (helpers$1.almostEquals(pointCurrent.deltaK, 0, this.EPSILON)) {\n\t\t\t\tpointCurrent.mK = pointAfter.mK = 0;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\talphaK = pointCurrent.mK / pointCurrent.deltaK;\n\t\t\tbetaK = pointAfter.mK / pointCurrent.deltaK;\n\t\t\tsquaredMagnitude = Math.pow(alphaK, 2) + Math.pow(betaK, 2);\n\t\t\tif (squaredMagnitude <= 9) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\ttauK = 3 / Math.sqrt(squaredMagnitude);\n\t\t\tpointCurrent.mK = alphaK * tauK * pointCurrent.deltaK;\n\t\t\tpointAfter.mK = betaK * tauK * pointCurrent.deltaK;\n\t\t}\n\n\t\t// Compute control points\n\t\tvar deltaX;\n\t\tfor (i = 0; i < pointsLen; ++i) {\n\t\t\tpointCurrent = pointsWithTangents[i];\n\t\t\tif (pointCurrent.model.skip) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tpointBefore = i > 0 ? pointsWithTangents[i - 1] : null;\n\t\t\tpointAfter = i < pointsLen - 1 ? pointsWithTangents[i + 1] : null;\n\t\t\tif (pointBefore && !pointBefore.model.skip) {\n\t\t\t\tdeltaX = (pointCurrent.model.x - pointBefore.model.x) / 3;\n\t\t\t\tpointCurrent.model.controlPointPreviousX = pointCurrent.model.x - deltaX;\n\t\t\t\tpointCurrent.model.controlPointPreviousY = pointCurrent.model.y - deltaX * pointCurrent.mK;\n\t\t\t}\n\t\t\tif (pointAfter && !pointAfter.model.skip) {\n\t\t\t\tdeltaX = (pointAfter.model.x - pointCurrent.model.x) / 3;\n\t\t\t\tpointCurrent.model.controlPointNextX = pointCurrent.model.x + deltaX;\n\t\t\t\tpointCurrent.model.controlPointNextY = pointCurrent.model.y + deltaX * pointCurrent.mK;\n\t\t\t}\n\t\t}\n\t};\n\thelpers$1.nextItem = function(collection, index, loop) {\n\t\tif (loop) {\n\t\t\treturn index >= collection.length - 1 ? collection[0] : collection[index + 1];\n\t\t}\n\t\treturn index >= collection.length - 1 ? collection[collection.length - 1] : collection[index + 1];\n\t};\n\thelpers$1.previousItem = function(collection, index, loop) {\n\t\tif (loop) {\n\t\t\treturn index <= 0 ? collection[collection.length - 1] : collection[index - 1];\n\t\t}\n\t\treturn index <= 0 ? collection[0] : collection[index - 1];\n\t};\n\t// Implementation of the nice number algorithm used in determining where axis labels will go\n\thelpers$1.niceNum = function(range, round) {\n\t\tvar exponent = Math.floor(helpers$1.log10(range));\n\t\tvar fraction = range / Math.pow(10, exponent);\n\t\tvar niceFraction;\n\n\t\tif (round) {\n\t\t\tif (fraction < 1.5) {\n\t\t\t\tniceFraction = 1;\n\t\t\t} else if (fraction < 3) {\n\t\t\t\tniceFraction = 2;\n\t\t\t} else if (fraction < 7) {\n\t\t\t\tniceFraction = 5;\n\t\t\t} else {\n\t\t\t\tniceFraction = 10;\n\t\t\t}\n\t\t} else if (fraction <= 1.0) {\n\t\t\tniceFraction = 1;\n\t\t} else if (fraction <= 2) {\n\t\t\tniceFraction = 2;\n\t\t} else if (fraction <= 5) {\n\t\t\tniceFraction = 5;\n\t\t} else {\n\t\t\tniceFraction = 10;\n\t\t}\n\n\t\treturn niceFraction * Math.pow(10, exponent);\n\t};\n\t// Request animation polyfill - https://www.paulirish.com/2011/requestanimationframe-for-smart-animating/\n\thelpers$1.requestAnimFrame = (function() {\n\t\tif (typeof window === 'undefined') {\n\t\t\treturn function(callback) {\n\t\t\t\tcallback();\n\t\t\t};\n\t\t}\n\t\treturn window.requestAnimationFrame ||\n\t\t\twindow.webkitRequestAnimationFrame ||\n\t\t\twindow.mozRequestAnimationFrame ||\n\t\t\twindow.oRequestAnimationFrame ||\n\t\t\twindow.msRequestAnimationFrame ||\n\t\t\tfunction(callback) {\n\t\t\t\treturn window.setTimeout(callback, 1000 / 60);\n\t\t\t};\n\t}());\n\t// -- DOM methods\n\thelpers$1.getRelativePosition = function(evt, chart) {\n\t\tvar mouseX, mouseY;\n\t\tvar e = evt.originalEvent || evt;\n\t\tvar canvas = evt.target || evt.srcElement;\n\t\tvar boundingRect = canvas.getBoundingClientRect();\n\n\t\tvar touches = e.touches;\n\t\tif (touches && touches.length > 0) {\n\t\t\tmouseX = touches[0].clientX;\n\t\t\tmouseY = touches[0].clientY;\n\n\t\t} else {\n\t\t\tmouseX = e.clientX;\n\t\t\tmouseY = e.clientY;\n\t\t}\n\n\t\t// Scale mouse coordinates into canvas coordinates\n\t\t// by following the pattern laid out by 'jerryj' in the comments of\n\t\t// https://www.html5canvastutorials.com/advanced/html5-canvas-mouse-coordinates/\n\t\tvar paddingLeft = parseFloat(helpers$1.getStyle(canvas, 'padding-left'));\n\t\tvar paddingTop = parseFloat(helpers$1.getStyle(canvas, 'padding-top'));\n\t\tvar paddingRight = parseFloat(helpers$1.getStyle(canvas, 'padding-right'));\n\t\tvar paddingBottom = parseFloat(helpers$1.getStyle(canvas, 'padding-bottom'));\n\t\tvar width = boundingRect.right - boundingRect.left - paddingLeft - paddingRight;\n\t\tvar height = boundingRect.bottom - boundingRect.top - paddingTop - paddingBottom;\n\n\t\t// We divide by the current device pixel ratio, because the canvas is scaled up by that amount in each direction. However\n\t\t// the backend model is in unscaled coordinates. Since we are going to deal with our model coordinates, we go back here\n\t\tmouseX = Math.round((mouseX - boundingRect.left - paddingLeft) / (width) * canvas.width / chart.currentDevicePixelRatio);\n\t\tmouseY = Math.round((mouseY - boundingRect.top - paddingTop) / (height) * canvas.height / chart.currentDevicePixelRatio);\n\n\t\treturn {\n\t\t\tx: mouseX,\n\t\t\ty: mouseY\n\t\t};\n\n\t};\n\n\t// Private helper function to convert max-width/max-height values that may be percentages into a number\n\tfunction parseMaxStyle(styleValue, node, parentProperty) {\n\t\tvar valueInPixels;\n\t\tif (typeof styleValue === 'string') {\n\t\t\tvalueInPixels = parseInt(styleValue, 10);\n\n\t\t\tif (styleValue.indexOf('%') !== -1) {\n\t\t\t\t// percentage * size in dimension\n\t\t\t\tvalueInPixels = valueInPixels / 100 * node.parentNode[parentProperty];\n\t\t\t}\n\t\t} else {\n\t\t\tvalueInPixels = styleValue;\n\t\t}\n\n\t\treturn valueInPixels;\n\t}\n\n\t/**\n\t * Returns if the given value contains an effective constraint.\n\t * @private\n\t */\n\tfunction isConstrainedValue(value) {\n\t\treturn value !== undefined && value !== null && value !== 'none';\n\t}\n\n\t/**\n\t * Returns the max width or height of the given DOM node in a cross-browser compatible fashion\n\t * @param {HTMLElement} domNode - the node to check the constraint on\n\t * @param {string} maxStyle - the style that defines the maximum for the direction we are using ('max-width' / 'max-height')\n\t * @param {string} percentageProperty - property of parent to use when calculating width as a percentage\n\t * @see {@link https://www.nathanaeljones.com/blog/2013/reading-max-width-cross-browser}\n\t */\n\tfunction getConstraintDimension(domNode, maxStyle, percentageProperty) {\n\t\tvar view = document.defaultView;\n\t\tvar parentNode = helpers$1._getParentNode(domNode);\n\t\tvar constrainedNode = view.getComputedStyle(domNode)[maxStyle];\n\t\tvar constrainedContainer = view.getComputedStyle(parentNode)[maxStyle];\n\t\tvar hasCNode = isConstrainedValue(constrainedNode);\n\t\tvar hasCContainer = isConstrainedValue(constrainedContainer);\n\t\tvar infinity = Number.POSITIVE_INFINITY;\n\n\t\tif (hasCNode || hasCContainer) {\n\t\t\treturn Math.min(\n\t\t\t\thasCNode ? parseMaxStyle(constrainedNode, domNode, percentageProperty) : infinity,\n\t\t\t\thasCContainer ? parseMaxStyle(constrainedContainer, parentNode, percentageProperty) : infinity);\n\t\t}\n\n\t\treturn 'none';\n\t}\n\t// returns Number or undefined if no constraint\n\thelpers$1.getConstraintWidth = function(domNode) {\n\t\treturn getConstraintDimension(domNode, 'max-width', 'clientWidth');\n\t};\n\t// returns Number or undefined if no constraint\n\thelpers$1.getConstraintHeight = function(domNode) {\n\t\treturn getConstraintDimension(domNode, 'max-height', 'clientHeight');\n\t};\n\t/**\n\t * @private\n \t */\n\thelpers$1._calculatePadding = function(container, padding, parentDimension) {\n\t\tpadding = helpers$1.getStyle(container, padding);\n\n\t\treturn padding.indexOf('%') > -1 ? parentDimension * parseInt(padding, 10) / 100 : parseInt(padding, 10);\n\t};\n\t/**\n\t * @private\n\t */\n\thelpers$1._getParentNode = function(domNode) {\n\t\tvar parent = domNode.parentNode;\n\t\tif (parent && parent.toString() === '[object ShadowRoot]') {\n\t\t\tparent = parent.host;\n\t\t}\n\t\treturn parent;\n\t};\n\thelpers$1.getMaximumWidth = function(domNode) {\n\t\tvar container = helpers$1._getParentNode(domNode);\n\t\tif (!container) {\n\t\t\treturn domNode.clientWidth;\n\t\t}\n\n\t\tvar clientWidth = container.clientWidth;\n\t\tvar paddingLeft = helpers$1._calculatePadding(container, 'padding-left', clientWidth);\n\t\tvar paddingRight = helpers$1._calculatePadding(container, 'padding-right', clientWidth);\n\n\t\tvar w = clientWidth - paddingLeft - paddingRight;\n\t\tvar cw = helpers$1.getConstraintWidth(domNode);\n\t\treturn isNaN(cw) ? w : Math.min(w, cw);\n\t};\n\thelpers$1.getMaximumHeight = function(domNode) {\n\t\tvar container = helpers$1._getParentNode(domNode);\n\t\tif (!container) {\n\t\t\treturn domNode.clientHeight;\n\t\t}\n\n\t\tvar clientHeight = container.clientHeight;\n\t\tvar paddingTop = helpers$1._calculatePadding(container, 'padding-top', clientHeight);\n\t\tvar paddingBottom = helpers$1._calculatePadding(container, 'padding-bottom', clientHeight);\n\n\t\tvar h = clientHeight - paddingTop - paddingBottom;\n\t\tvar ch = helpers$1.getConstraintHeight(domNode);\n\t\treturn isNaN(ch) ? h : Math.min(h, ch);\n\t};\n\thelpers$1.getStyle = function(el, property) {\n\t\treturn el.currentStyle ?\n\t\t\tel.currentStyle[property] :\n\t\t\tdocument.defaultView.getComputedStyle(el, null).getPropertyValue(property);\n\t};\n\thelpers$1.retinaScale = function(chart, forceRatio) {\n\t\tvar pixelRatio = chart.currentDevicePixelRatio = forceRatio || (typeof window !== 'undefined' && window.devicePixelRatio) || 1;\n\t\tif (pixelRatio === 1) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar canvas = chart.canvas;\n\t\tvar height = chart.height;\n\t\tvar width = chart.width;\n\n\t\tcanvas.height = height * pixelRatio;\n\t\tcanvas.width = width * pixelRatio;\n\t\tchart.ctx.scale(pixelRatio, pixelRatio);\n\n\t\t// If no style has been set on the canvas, the render size is used as display size,\n\t\t// making the chart visually bigger, so let's enforce it to the \"correct\" values.\n\t\t// See https://github.com/chartjs/Chart.js/issues/3575\n\t\tif (!canvas.style.height && !canvas.style.width) {\n\t\t\tcanvas.style.height = height + 'px';\n\t\t\tcanvas.style.width = width + 'px';\n\t\t}\n\t};\n\t// -- Canvas methods\n\thelpers$1.fontString = function(pixelSize, fontStyle, fontFamily) {\n\t\treturn fontStyle + ' ' + pixelSize + 'px ' + fontFamily;\n\t};\n\thelpers$1.longestText = function(ctx, font, arrayOfThings, cache) {\n\t\tcache = cache || {};\n\t\tvar data = cache.data = cache.data || {};\n\t\tvar gc = cache.garbageCollect = cache.garbageCollect || [];\n\n\t\tif (cache.font !== font) {\n\t\t\tdata = cache.data = {};\n\t\t\tgc = cache.garbageCollect = [];\n\t\t\tcache.font = font;\n\t\t}\n\n\t\tctx.font = font;\n\t\tvar longest = 0;\n\t\thelpers$1.each(arrayOfThings, function(thing) {\n\t\t\t// Undefined strings and arrays should not be measured\n\t\t\tif (thing !== undefined && thing !== null && helpers$1.isArray(thing) !== true) {\n\t\t\t\tlongest = helpers$1.measureText(ctx, data, gc, longest, thing);\n\t\t\t} else if (helpers$1.isArray(thing)) {\n\t\t\t\t// if it is an array lets measure each element\n\t\t\t\t// to do maybe simplify this function a bit so we can do this more recursively?\n\t\t\t\thelpers$1.each(thing, function(nestedThing) {\n\t\t\t\t\t// Undefined strings and arrays should not be measured\n\t\t\t\t\tif (nestedThing !== undefined && nestedThing !== null && !helpers$1.isArray(nestedThing)) {\n\t\t\t\t\t\tlongest = helpers$1.measureText(ctx, data, gc, longest, nestedThing);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\n\t\tvar gcLen = gc.length / 2;\n\t\tif (gcLen > arrayOfThings.length) {\n\t\t\tfor (var i = 0; i < gcLen; i++) {\n\t\t\t\tdelete data[gc[i]];\n\t\t\t}\n\t\t\tgc.splice(0, gcLen);\n\t\t}\n\t\treturn longest;\n\t};\n\thelpers$1.measureText = function(ctx, data, gc, longest, string) {\n\t\tvar textWidth = data[string];\n\t\tif (!textWidth) {\n\t\t\ttextWidth = data[string] = ctx.measureText(string).width;\n\t\t\tgc.push(string);\n\t\t}\n\t\tif (textWidth > longest) {\n\t\t\tlongest = textWidth;\n\t\t}\n\t\treturn longest;\n\t};\n\thelpers$1.numberOfLabelLines = function(arrayOfThings) {\n\t\tvar numberOfLines = 1;\n\t\thelpers$1.each(arrayOfThings, function(thing) {\n\t\t\tif (helpers$1.isArray(thing)) {\n\t\t\t\tif (thing.length > numberOfLines) {\n\t\t\t\t\tnumberOfLines = thing.length;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\treturn numberOfLines;\n\t};\n\n\thelpers$1.color = !chartjsColor ?\n\t\tfunction(value) {\n\t\t\tconsole.error('Color.js not found!');\n\t\t\treturn value;\n\t\t} :\n\t\tfunction(value) {\n\t\t\t/* global CanvasGradient */\n\t\t\tif (value instanceof CanvasGradient) {\n\t\t\t\tvalue = core_defaults.global.defaultColor;\n\t\t\t}\n\n\t\t\treturn chartjsColor(value);\n\t\t};\n\n\thelpers$1.getHoverColor = function(colorValue) {\n\t\t/* global CanvasPattern */\n\t\treturn (colorValue instanceof CanvasPattern || colorValue instanceof CanvasGradient) ?\n\t\t\tcolorValue :\n\t\t\thelpers$1.color(colorValue).saturate(0.5).darken(0.1).rgbString();\n\t};\n};\n\nfunction abstract() {\n\tthrow new Error(\n\t\t'This method is not implemented: either no adapter can ' +\n\t\t'be found or an incomplete integration was provided.'\n\t);\n}\n\n/**\n * Date adapter (current used by the time scale)\n * @namespace Chart._adapters._date\n * @memberof Chart._adapters\n * @private\n */\n\n/**\n * Currently supported unit string values.\n * @typedef {('millisecond'|'second'|'minute'|'hour'|'day'|'week'|'month'|'quarter'|'year')}\n * @memberof Chart._adapters._date\n * @name Unit\n */\n\n/**\n * @class\n */\nfunction DateAdapter(options) {\n\tthis.options = options || {};\n}\n\nhelpers$1.extend(DateAdapter.prototype, /** @lends DateAdapter */ {\n\t/**\n\t * Returns a map of time formats for the supported formatting units defined\n\t * in Unit as well as 'datetime' representing a detailed date/time string.\n\t * @returns {{string: string}}\n\t */\n\tformats: abstract,\n\n\t/**\n\t * Parses the given `value` and return the associated timestamp.\n\t * @param {any} value - the value to parse (usually comes from the data)\n\t * @param {string} [format] - the expected data format\n\t * @returns {(number|null)}\n\t * @function\n\t */\n\tparse: abstract,\n\n\t/**\n\t * Returns the formatted date in the specified `format` for a given `timestamp`.\n\t * @param {number} timestamp - the timestamp to format\n\t * @param {string} format - the date/time token\n\t * @return {string}\n\t * @function\n\t */\n\tformat: abstract,\n\n\t/**\n\t * Adds the specified `amount` of `unit` to the given `timestamp`.\n\t * @param {number} timestamp - the input timestamp\n\t * @param {number} amount - the amount to add\n\t * @param {Unit} unit - the unit as string\n\t * @return {number}\n\t * @function\n\t */\n\tadd: abstract,\n\n\t/**\n\t * Returns the number of `unit` between the given timestamps.\n\t * @param {number} max - the input timestamp (reference)\n\t * @param {number} min - the timestamp to substract\n\t * @param {Unit} unit - the unit as string\n\t * @return {number}\n\t * @function\n\t */\n\tdiff: abstract,\n\n\t/**\n\t * Returns start of `unit` for the given `timestamp`.\n\t * @param {number} timestamp - the input timestamp\n\t * @param {Unit} unit - the unit as string\n\t * @param {number} [weekday] - the ISO day of the week with 1 being Monday\n\t * and 7 being Sunday (only needed if param *unit* is `isoWeek`).\n\t * @function\n\t */\n\tstartOf: abstract,\n\n\t/**\n\t * Returns end of `unit` for the given `timestamp`.\n\t * @param {number} timestamp - the input timestamp\n\t * @param {Unit} unit - the unit as string\n\t * @function\n\t */\n\tendOf: abstract,\n\n\t// DEPRECATIONS\n\n\t/**\n\t * Provided for backward compatibility for scale.getValueForPixel(),\n\t * this method should be overridden only by the moment adapter.\n\t * @deprecated since version 2.8.0\n\t * @todo remove at version 3\n\t * @private\n\t */\n\t_create: function(value) {\n\t\treturn value;\n\t}\n});\n\nDateAdapter.override = function(members) {\n\thelpers$1.extend(DateAdapter.prototype, members);\n};\n\nvar _date = DateAdapter;\n\nvar core_adapters = {\n\t_date: _date\n};\n\n/**\n * Namespace to hold static tick generation functions\n * @namespace Chart.Ticks\n */\nvar core_ticks = {\n\t/**\n\t * Namespace to hold formatters for different types of ticks\n\t * @namespace Chart.Ticks.formatters\n\t */\n\tformatters: {\n\t\t/**\n\t\t * Formatter for value labels\n\t\t * @method Chart.Ticks.formatters.values\n\t\t * @param value the value to display\n\t\t * @return {string|string[]} the label to display\n\t\t */\n\t\tvalues: function(value) {\n\t\t\treturn helpers$1.isArray(value) ? value : '' + value;\n\t\t},\n\n\t\t/**\n\t\t * Formatter for linear numeric ticks\n\t\t * @method Chart.Ticks.formatters.linear\n\t\t * @param tickValue {number} the value to be formatted\n\t\t * @param index {number} the position of the tickValue parameter in the ticks array\n\t\t * @param ticks {number[]} the list of ticks being converted\n\t\t * @return {string} string representation of the tickValue parameter\n\t\t */\n\t\tlinear: function(tickValue, index, ticks) {\n\t\t\t// If we have lots of ticks, don't use the ones\n\t\t\tvar delta = ticks.length > 3 ? ticks[2] - ticks[1] : ticks[1] - ticks[0];\n\n\t\t\t// If we have a number like 2.5 as the delta, figure out how many decimal places we need\n\t\t\tif (Math.abs(delta) > 1) {\n\t\t\t\tif (tickValue !== Math.floor(tickValue)) {\n\t\t\t\t\t// not an integer\n\t\t\t\t\tdelta = tickValue - Math.floor(tickValue);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvar logDelta = helpers$1.log10(Math.abs(delta));\n\t\t\tvar tickString = '';\n\n\t\t\tif (tickValue !== 0) {\n\t\t\t\tvar maxTick = Math.max(Math.abs(ticks[0]), Math.abs(ticks[ticks.length - 1]));\n\t\t\t\tif (maxTick < 1e-4) { // all ticks are small numbers; use scientific notation\n\t\t\t\t\tvar logTick = helpers$1.log10(Math.abs(tickValue));\n\t\t\t\t\ttickString = tickValue.toExponential(Math.floor(logTick) - Math.floor(logDelta));\n\t\t\t\t} else {\n\t\t\t\t\tvar numDecimal = -1 * Math.floor(logDelta);\n\t\t\t\t\tnumDecimal = Math.max(Math.min(numDecimal, 20), 0); // toFixed has a max of 20 decimal places\n\t\t\t\t\ttickString = tickValue.toFixed(numDecimal);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\ttickString = '0'; // never show decimal places for 0\n\t\t\t}\n\n\t\t\treturn tickString;\n\t\t},\n\n\t\tlogarithmic: function(tickValue, index, ticks) {\n\t\t\tvar remain = tickValue / (Math.pow(10, Math.floor(helpers$1.log10(tickValue))));\n\n\t\t\tif (tickValue === 0) {\n\t\t\t\treturn '0';\n\t\t\t} else if (remain === 1 || remain === 2 || remain === 5 || index === 0 || index === ticks.length - 1) {\n\t\t\t\treturn tickValue.toExponential();\n\t\t\t}\n\t\t\treturn '';\n\t\t}\n\t}\n};\n\nvar valueOrDefault$9 = helpers$1.valueOrDefault;\nvar valueAtIndexOrDefault = helpers$1.valueAtIndexOrDefault;\n\ncore_defaults._set('scale', {\n\tdisplay: true,\n\tposition: 'left',\n\toffset: false,\n\n\t// grid line settings\n\tgridLines: {\n\t\tdisplay: true,\n\t\tcolor: 'rgba(0, 0, 0, 0.1)',\n\t\tlineWidth: 1,\n\t\tdrawBorder: true,\n\t\tdrawOnChartArea: true,\n\t\tdrawTicks: true,\n\t\ttickMarkLength: 10,\n\t\tzeroLineWidth: 1,\n\t\tzeroLineColor: 'rgba(0,0,0,0.25)',\n\t\tzeroLineBorderDash: [],\n\t\tzeroLineBorderDashOffset: 0.0,\n\t\toffsetGridLines: false,\n\t\tborderDash: [],\n\t\tborderDashOffset: 0.0\n\t},\n\n\t// scale label\n\tscaleLabel: {\n\t\t// display property\n\t\tdisplay: false,\n\n\t\t// actual label\n\t\tlabelString: '',\n\n\t\t// top/bottom padding\n\t\tpadding: {\n\t\t\ttop: 4,\n\t\t\tbottom: 4\n\t\t}\n\t},\n\n\t// label settings\n\tticks: {\n\t\tbeginAtZero: false,\n\t\tminRotation: 0,\n\t\tmaxRotation: 50,\n\t\tmirror: false,\n\t\tpadding: 0,\n\t\treverse: false,\n\t\tdisplay: true,\n\t\tautoSkip: true,\n\t\tautoSkipPadding: 0,\n\t\tlabelOffset: 0,\n\t\t// We pass through arrays to be rendered as multiline labels, we convert Others to strings here.\n\t\tcallback: core_ticks.formatters.values,\n\t\tminor: {},\n\t\tmajor: {}\n\t}\n});\n\nfunction labelsFromTicks(ticks) {\n\tvar labels = [];\n\tvar i, ilen;\n\n\tfor (i = 0, ilen = ticks.length; i < ilen; ++i) {\n\t\tlabels.push(ticks[i].label);\n\t}\n\n\treturn labels;\n}\n\nfunction getPixelForGridLine(scale, index, offsetGridLines) {\n\tvar lineValue = scale.getPixelForTick(index);\n\n\tif (offsetGridLines) {\n\t\tif (scale.getTicks().length === 1) {\n\t\t\tlineValue -= scale.isHorizontal() ?\n\t\t\t\tMath.max(lineValue - scale.left, scale.right - lineValue) :\n\t\t\t\tMath.max(lineValue - scale.top, scale.bottom - lineValue);\n\t\t} else if (index === 0) {\n\t\t\tlineValue -= (scale.getPixelForTick(1) - lineValue) / 2;\n\t\t} else {\n\t\t\tlineValue -= (lineValue - scale.getPixelForTick(index - 1)) / 2;\n\t\t}\n\t}\n\treturn lineValue;\n}\n\nfunction computeTextSize(context, tick, font) {\n\treturn helpers$1.isArray(tick) ?\n\t\thelpers$1.longestText(context, font, tick) :\n\t\tcontext.measureText(tick).width;\n}\n\nvar core_scale = core_element.extend({\n\t/**\n\t * Get the padding needed for the scale\n\t * @method getPadding\n\t * @private\n\t * @returns {Padding} the necessary padding\n\t */\n\tgetPadding: function() {\n\t\tvar me = this;\n\t\treturn {\n\t\t\tleft: me.paddingLeft || 0,\n\t\t\ttop: me.paddingTop || 0,\n\t\t\tright: me.paddingRight || 0,\n\t\t\tbottom: me.paddingBottom || 0\n\t\t};\n\t},\n\n\t/**\n\t * Returns the scale tick objects ({label, major})\n\t * @since 2.7\n\t */\n\tgetTicks: function() {\n\t\treturn this._ticks;\n\t},\n\n\t// These methods are ordered by lifecyle. Utilities then follow.\n\t// Any function defined here is inherited by all scale types.\n\t// Any function can be extended by the scale type\n\n\tmergeTicksOptions: function() {\n\t\tvar ticks = this.options.ticks;\n\t\tif (ticks.minor === false) {\n\t\t\tticks.minor = {\n\t\t\t\tdisplay: false\n\t\t\t};\n\t\t}\n\t\tif (ticks.major === false) {\n\t\t\tticks.major = {\n\t\t\t\tdisplay: false\n\t\t\t};\n\t\t}\n\t\tfor (var key in ticks) {\n\t\t\tif (key !== 'major' && key !== 'minor') {\n\t\t\t\tif (typeof ticks.minor[key] === 'undefined') {\n\t\t\t\t\tticks.minor[key] = ticks[key];\n\t\t\t\t}\n\t\t\t\tif (typeof ticks.major[key] === 'undefined') {\n\t\t\t\t\tticks.major[key] = ticks[key];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\tbeforeUpdate: function() {\n\t\thelpers$1.callback(this.options.beforeUpdate, [this]);\n\t},\n\n\tupdate: function(maxWidth, maxHeight, margins) {\n\t\tvar me = this;\n\t\tvar i, ilen, labels, label, ticks, tick;\n\n\t\t// Update Lifecycle - Probably don't want to ever extend or overwrite this function ;)\n\t\tme.beforeUpdate();\n\n\t\t// Absorb the master measurements\n\t\tme.maxWidth = maxWidth;\n\t\tme.maxHeight = maxHeight;\n\t\tme.margins = helpers$1.extend({\n\t\t\tleft: 0,\n\t\t\tright: 0,\n\t\t\ttop: 0,\n\t\t\tbottom: 0\n\t\t}, margins);\n\n\t\tme._maxLabelLines = 0;\n\t\tme.longestLabelWidth = 0;\n\t\tme.longestTextCache = me.longestTextCache || {};\n\n\t\t// Dimensions\n\t\tme.beforeSetDimensions();\n\t\tme.setDimensions();\n\t\tme.afterSetDimensions();\n\n\t\t// Data min/max\n\t\tme.beforeDataLimits();\n\t\tme.determineDataLimits();\n\t\tme.afterDataLimits();\n\n\t\t// Ticks - `this.ticks` is now DEPRECATED!\n\t\t// Internal ticks are now stored as objects in the PRIVATE `this._ticks` member\n\t\t// and must not be accessed directly from outside this class. `this.ticks` being\n\t\t// around for long time and not marked as private, we can't change its structure\n\t\t// without unexpected breaking changes. If you need to access the scale ticks,\n\t\t// use scale.getTicks() instead.\n\n\t\tme.beforeBuildTicks();\n\n\t\t// New implementations should return an array of objects but for BACKWARD COMPAT,\n\t\t// we still support no return (`this.ticks` internally set by calling this method).\n\t\tticks = me.buildTicks() || [];\n\n\t\t// Allow modification of ticks in callback.\n\t\tticks = me.afterBuildTicks(ticks) || ticks;\n\n\t\tme.beforeTickToLabelConversion();\n\n\t\t// New implementations should return the formatted tick labels but for BACKWARD\n\t\t// COMPAT, we still support no return (`this.ticks` internally changed by calling\n\t\t// this method and supposed to contain only string values).\n\t\tlabels = me.convertTicksToLabels(ticks) || me.ticks;\n\n\t\tme.afterTickToLabelConversion();\n\n\t\tme.ticks = labels; // BACKWARD COMPATIBILITY\n\n\t\t// IMPORTANT: from this point, we consider that `this.ticks` will NEVER change!\n\n\t\t// BACKWARD COMPAT: synchronize `_ticks` with labels (so potentially `this.ticks`)\n\t\tfor (i = 0, ilen = labels.length; i < ilen; ++i) {\n\t\t\tlabel = labels[i];\n\t\t\ttick = ticks[i];\n\t\t\tif (!tick) {\n\t\t\t\tticks.push(tick = {\n\t\t\t\t\tlabel: label,\n\t\t\t\t\tmajor: false\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\ttick.label = label;\n\t\t\t}\n\t\t}\n\n\t\tme._ticks = ticks;\n\n\t\t// Tick Rotation\n\t\tme.beforeCalculateTickRotation();\n\t\tme.calculateTickRotation();\n\t\tme.afterCalculateTickRotation();\n\t\t// Fit\n\t\tme.beforeFit();\n\t\tme.fit();\n\t\tme.afterFit();\n\t\t//\n\t\tme.afterUpdate();\n\n\t\treturn me.minSize;\n\n\t},\n\tafterUpdate: function() {\n\t\thelpers$1.callback(this.options.afterUpdate, [this]);\n\t},\n\n\t//\n\n\tbeforeSetDimensions: function() {\n\t\thelpers$1.callback(this.options.beforeSetDimensions, [this]);\n\t},\n\tsetDimensions: function() {\n\t\tvar me = this;\n\t\t// Set the unconstrained dimension before label rotation\n\t\tif (me.isHorizontal()) {\n\t\t\t// Reset position before calculating rotation\n\t\t\tme.width = me.maxWidth;\n\t\t\tme.left = 0;\n\t\t\tme.right = me.width;\n\t\t} else {\n\t\t\tme.height = me.maxHeight;\n\n\t\t\t// Reset position before calculating rotation\n\t\t\tme.top = 0;\n\t\t\tme.bottom = me.height;\n\t\t}\n\n\t\t// Reset padding\n\t\tme.paddingLeft = 0;\n\t\tme.paddingTop = 0;\n\t\tme.paddingRight = 0;\n\t\tme.paddingBottom = 0;\n\t},\n\tafterSetDimensions: function() {\n\t\thelpers$1.callback(this.options.afterSetDimensions, [this]);\n\t},\n\n\t// Data limits\n\tbeforeDataLimits: function() {\n\t\thelpers$1.callback(this.options.beforeDataLimits, [this]);\n\t},\n\tdetermineDataLimits: helpers$1.noop,\n\tafterDataLimits: function() {\n\t\thelpers$1.callback(this.options.afterDataLimits, [this]);\n\t},\n\n\t//\n\tbeforeBuildTicks: function() {\n\t\thelpers$1.callback(this.options.beforeBuildTicks, [this]);\n\t},\n\tbuildTicks: helpers$1.noop,\n\tafterBuildTicks: function(ticks) {\n\t\tvar me = this;\n\t\t// ticks is empty for old axis implementations here\n\t\tif (helpers$1.isArray(ticks) && ticks.length) {\n\t\t\treturn helpers$1.callback(me.options.afterBuildTicks, [me, ticks]);\n\t\t}\n\t\t// Support old implementations (that modified `this.ticks` directly in buildTicks)\n\t\tme.ticks = helpers$1.callback(me.options.afterBuildTicks, [me, me.ticks]) || me.ticks;\n\t\treturn ticks;\n\t},\n\n\tbeforeTickToLabelConversion: function() {\n\t\thelpers$1.callback(this.options.beforeTickToLabelConversion, [this]);\n\t},\n\tconvertTicksToLabels: function() {\n\t\tvar me = this;\n\t\t// Convert ticks to strings\n\t\tvar tickOpts = me.options.ticks;\n\t\tme.ticks = me.ticks.map(tickOpts.userCallback || tickOpts.callback, this);\n\t},\n\tafterTickToLabelConversion: function() {\n\t\thelpers$1.callback(this.options.afterTickToLabelConversion, [this]);\n\t},\n\n\t//\n\n\tbeforeCalculateTickRotation: function() {\n\t\thelpers$1.callback(this.options.beforeCalculateTickRotation, [this]);\n\t},\n\tcalculateTickRotation: function() {\n\t\tvar me = this;\n\t\tvar context = me.ctx;\n\t\tvar tickOpts = me.options.ticks;\n\t\tvar labels = labelsFromTicks(me._ticks);\n\n\t\t// Get the width of each grid by calculating the difference\n\t\t// between x offsets between 0 and 1.\n\t\tvar tickFont = helpers$1.options._parseFont(tickOpts);\n\t\tcontext.font = tickFont.string;\n\n\t\tvar labelRotation = tickOpts.minRotation || 0;\n\n\t\tif (labels.length && me.options.display && me.isHorizontal()) {\n\t\t\tvar originalLabelWidth = helpers$1.longestText(context, tickFont.string, labels, me.longestTextCache);\n\t\t\tvar labelWidth = originalLabelWidth;\n\t\t\tvar cosRotation, sinRotation;\n\n\t\t\t// Allow 3 pixels x2 padding either side for label readability\n\t\t\tvar tickWidth = me.getPixelForTick(1) - me.getPixelForTick(0) - 6;\n\n\t\t\t// Max label rotation can be set or default to 90 - also act as a loop counter\n\t\t\twhile (labelWidth > tickWidth && labelRotation < tickOpts.maxRotation) {\n\t\t\t\tvar angleRadians = helpers$1.toRadians(labelRotation);\n\t\t\t\tcosRotation = Math.cos(angleRadians);\n\t\t\t\tsinRotation = Math.sin(angleRadians);\n\n\t\t\t\tif (sinRotation * originalLabelWidth > me.maxHeight) {\n\t\t\t\t\t// go back one step\n\t\t\t\t\tlabelRotation--;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tlabelRotation++;\n\t\t\t\tlabelWidth = cosRotation * originalLabelWidth;\n\t\t\t}\n\t\t}\n\n\t\tme.labelRotation = labelRotation;\n\t},\n\tafterCalculateTickRotation: function() {\n\t\thelpers$1.callback(this.options.afterCalculateTickRotation, [this]);\n\t},\n\n\t//\n\n\tbeforeFit: function() {\n\t\thelpers$1.callback(this.options.beforeFit, [this]);\n\t},\n\tfit: function() {\n\t\tvar me = this;\n\t\t// Reset\n\t\tvar minSize = me.minSize = {\n\t\t\twidth: 0,\n\t\t\theight: 0\n\t\t};\n\n\t\tvar labels = labelsFromTicks(me._ticks);\n\n\t\tvar opts = me.options;\n\t\tvar tickOpts = opts.ticks;\n\t\tvar scaleLabelOpts = opts.scaleLabel;\n\t\tvar gridLineOpts = opts.gridLines;\n\t\tvar display = me._isVisible();\n\t\tvar position = opts.position;\n\t\tvar isHorizontal = me.isHorizontal();\n\n\t\tvar parseFont = helpers$1.options._parseFont;\n\t\tvar tickFont = parseFont(tickOpts);\n\t\tvar tickMarkLength = opts.gridLines.tickMarkLength;\n\n\t\t// Width\n\t\tif (isHorizontal) {\n\t\t\t// subtract the margins to line up with the chartArea if we are a full width scale\n\t\t\tminSize.width = me.isFullWidth() ? me.maxWidth - me.margins.left - me.margins.right : me.maxWidth;\n\t\t} else {\n\t\t\tminSize.width = display && gridLineOpts.drawTicks ? tickMarkLength : 0;\n\t\t}\n\n\t\t// height\n\t\tif (isHorizontal) {\n\t\t\tminSize.height = display && gridLineOpts.drawTicks ? tickMarkLength : 0;\n\t\t} else {\n\t\t\tminSize.height = me.maxHeight; // fill all the height\n\t\t}\n\n\t\t// Are we showing a title for the scale?\n\t\tif (scaleLabelOpts.display && display) {\n\t\t\tvar scaleLabelFont = parseFont(scaleLabelOpts);\n\t\t\tvar scaleLabelPadding = helpers$1.options.toPadding(scaleLabelOpts.padding);\n\t\t\tvar deltaHeight = scaleLabelFont.lineHeight + scaleLabelPadding.height;\n\n\t\t\tif (isHorizontal) {\n\t\t\t\tminSize.height += deltaHeight;\n\t\t\t} else {\n\t\t\t\tminSize.width += deltaHeight;\n\t\t\t}\n\t\t}\n\n\t\t// Don't bother fitting the ticks if we are not showing the labels\n\t\tif (tickOpts.display && display) {\n\t\t\tvar largestTextWidth = helpers$1.longestText(me.ctx, tickFont.string, labels, me.longestTextCache);\n\t\t\tvar tallestLabelHeightInLines = helpers$1.numberOfLabelLines(labels);\n\t\t\tvar lineSpace = tickFont.size * 0.5;\n\t\t\tvar tickPadding = me.options.ticks.padding;\n\n\t\t\t// Store max number of lines and widest label for _autoSkip\n\t\t\tme._maxLabelLines = tallestLabelHeightInLines;\n\t\t\tme.longestLabelWidth = largestTextWidth;\n\n\t\t\tif (isHorizontal) {\n\t\t\t\tvar angleRadians = helpers$1.toRadians(me.labelRotation);\n\t\t\t\tvar cosRotation = Math.cos(angleRadians);\n\t\t\t\tvar sinRotation = Math.sin(angleRadians);\n\n\t\t\t\t// TODO - improve this calculation\n\t\t\t\tvar labelHeight = (sinRotation * largestTextWidth)\n\t\t\t\t\t+ (tickFont.lineHeight * tallestLabelHeightInLines)\n\t\t\t\t\t+ lineSpace; // padding\n\n\t\t\t\tminSize.height = Math.min(me.maxHeight, minSize.height + labelHeight + tickPadding);\n\n\t\t\t\tme.ctx.font = tickFont.string;\n\t\t\t\tvar firstLabelWidth = computeTextSize(me.ctx, labels[0], tickFont.string);\n\t\t\t\tvar lastLabelWidth = computeTextSize(me.ctx, labels[labels.length - 1], tickFont.string);\n\t\t\t\tvar offsetLeft = me.getPixelForTick(0) - me.left;\n\t\t\t\tvar offsetRight = me.right - me.getPixelForTick(labels.length - 1);\n\t\t\t\tvar paddingLeft, paddingRight;\n\n\t\t\t\t// Ensure that our ticks are always inside the canvas. When rotated, ticks are right aligned\n\t\t\t\t// which means that the right padding is dominated by the font height\n\t\t\t\tif (me.labelRotation !== 0) {\n\t\t\t\t\tpaddingLeft = position === 'bottom' ? (cosRotation * firstLabelWidth) : (cosRotation * lineSpace);\n\t\t\t\t\tpaddingRight = position === 'bottom' ? (cosRotation * lineSpace) : (cosRotation * lastLabelWidth);\n\t\t\t\t} else {\n\t\t\t\t\tpaddingLeft = firstLabelWidth / 2;\n\t\t\t\t\tpaddingRight = lastLabelWidth / 2;\n\t\t\t\t}\n\t\t\t\tme.paddingLeft = Math.max(paddingLeft - offsetLeft, 0) + 3; // add 3 px to move away from canvas edges\n\t\t\t\tme.paddingRight = Math.max(paddingRight - offsetRight, 0) + 3;\n\t\t\t} else {\n\t\t\t\t// A vertical axis is more constrained by the width. Labels are the\n\t\t\t\t// dominant factor here, so get that length first and account for padding\n\t\t\t\tif (tickOpts.mirror) {\n\t\t\t\t\tlargestTextWidth = 0;\n\t\t\t\t} else {\n\t\t\t\t\t// use lineSpace for consistency with horizontal axis\n\t\t\t\t\t// tickPadding is not implemented for horizontal\n\t\t\t\t\tlargestTextWidth += tickPadding + lineSpace;\n\t\t\t\t}\n\n\t\t\t\tminSize.width = Math.min(me.maxWidth, minSize.width + largestTextWidth);\n\n\t\t\t\tme.paddingTop = tickFont.size / 2;\n\t\t\t\tme.paddingBottom = tickFont.size / 2;\n\t\t\t}\n\t\t}\n\n\t\tme.handleMargins();\n\n\t\tme.width = minSize.width;\n\t\tme.height = minSize.height;\n\t},\n\n\t/**\n\t * Handle margins and padding interactions\n\t * @private\n\t */\n\thandleMargins: function() {\n\t\tvar me = this;\n\t\tif (me.margins) {\n\t\t\tme.paddingLeft = Math.max(me.paddingLeft - me.margins.left, 0);\n\t\t\tme.paddingTop = Math.max(me.paddingTop - me.margins.top, 0);\n\t\t\tme.paddingRight = Math.max(me.paddingRight - me.margins.right, 0);\n\t\t\tme.paddingBottom = Math.max(me.paddingBottom - me.margins.bottom, 0);\n\t\t}\n\t},\n\n\tafterFit: function() {\n\t\thelpers$1.callback(this.options.afterFit, [this]);\n\t},\n\n\t// Shared Methods\n\tisHorizontal: function() {\n\t\treturn this.options.position === 'top' || this.options.position === 'bottom';\n\t},\n\tisFullWidth: function() {\n\t\treturn (this.options.fullWidth);\n\t},\n\n\t// Get the correct value. NaN bad inputs, If the value type is object get the x or y based on whether we are horizontal or not\n\tgetRightValue: function(rawValue) {\n\t\t// Null and undefined values first\n\t\tif (helpers$1.isNullOrUndef(rawValue)) {\n\t\t\treturn NaN;\n\t\t}\n\t\t// isNaN(object) returns true, so make sure NaN is checking for a number; Discard Infinite values\n\t\tif ((typeof rawValue === 'number' || rawValue instanceof Number) && !isFinite(rawValue)) {\n\t\t\treturn NaN;\n\t\t}\n\t\t// If it is in fact an object, dive in one more level\n\t\tif (rawValue) {\n\t\t\tif (this.isHorizontal()) {\n\t\t\t\tif (rawValue.x !== undefined) {\n\t\t\t\t\treturn this.getRightValue(rawValue.x);\n\t\t\t\t}\n\t\t\t} else if (rawValue.y !== undefined) {\n\t\t\t\treturn this.getRightValue(rawValue.y);\n\t\t\t}\n\t\t}\n\n\t\t// Value is good, return it\n\t\treturn rawValue;\n\t},\n\n\t/**\n\t * Used to get the value to display in the tooltip for the data at the given index\n\t * @param index\n\t * @param datasetIndex\n\t */\n\tgetLabelForIndex: helpers$1.noop,\n\n\t/**\n\t * Returns the location of the given data point. Value can either be an index or a numerical value\n\t * The coordinate (0, 0) is at the upper-left corner of the canvas\n\t * @param value\n\t * @param index\n\t * @param datasetIndex\n\t */\n\tgetPixelForValue: helpers$1.noop,\n\n\t/**\n\t * Used to get the data value from a given pixel. This is the inverse of getPixelForValue\n\t * The coordinate (0, 0) is at the upper-left corner of the canvas\n\t * @param pixel\n\t */\n\tgetValueForPixel: helpers$1.noop,\n\n\t/**\n\t * Returns the location of the tick at the given index\n\t * The coordinate (0, 0) is at the upper-left corner of the canvas\n\t */\n\tgetPixelForTick: function(index) {\n\t\tvar me = this;\n\t\tvar offset = me.options.offset;\n\t\tif (me.isHorizontal()) {\n\t\t\tvar innerWidth = me.width - (me.paddingLeft + me.paddingRight);\n\t\t\tvar tickWidth = innerWidth / Math.max((me._ticks.length - (offset ? 0 : 1)), 1);\n\t\t\tvar pixel = (tickWidth * index) + me.paddingLeft;\n\n\t\t\tif (offset) {\n\t\t\t\tpixel += tickWidth / 2;\n\t\t\t}\n\n\t\t\tvar finalVal = me.left + pixel;\n\t\t\tfinalVal += me.isFullWidth() ? me.margins.left : 0;\n\t\t\treturn finalVal;\n\t\t}\n\t\tvar innerHeight = me.height - (me.paddingTop + me.paddingBottom);\n\t\treturn me.top + (index * (innerHeight / (me._ticks.length - 1)));\n\t},\n\n\t/**\n\t * Utility for getting the pixel location of a percentage of scale\n\t * The coordinate (0, 0) is at the upper-left corner of the canvas\n\t */\n\tgetPixelForDecimal: function(decimal) {\n\t\tvar me = this;\n\t\tif (me.isHorizontal()) {\n\t\t\tvar innerWidth = me.width - (me.paddingLeft + me.paddingRight);\n\t\t\tvar valueOffset = (innerWidth * decimal) + me.paddingLeft;\n\n\t\t\tvar finalVal = me.left + valueOffset;\n\t\t\tfinalVal += me.isFullWidth() ? me.margins.left : 0;\n\t\t\treturn finalVal;\n\t\t}\n\t\treturn me.top + (decimal * me.height);\n\t},\n\n\t/**\n\t * Returns the pixel for the minimum chart value\n\t * The coordinate (0, 0) is at the upper-left corner of the canvas\n\t */\n\tgetBasePixel: function() {\n\t\treturn this.getPixelForValue(this.getBaseValue());\n\t},\n\n\tgetBaseValue: function() {\n\t\tvar me = this;\n\t\tvar min = me.min;\n\t\tvar max = me.max;\n\n\t\treturn me.beginAtZero ? 0 :\n\t\t\tmin < 0 && max < 0 ? max :\n\t\t\tmin > 0 && max > 0 ? min :\n\t\t\t0;\n\t},\n\n\t/**\n\t * Returns a subset of ticks to be plotted to avoid overlapping labels.\n\t * @private\n\t */\n\t_autoSkip: function(ticks) {\n\t\tvar me = this;\n\t\tvar isHorizontal = me.isHorizontal();\n\t\tvar optionTicks = me.options.ticks.minor;\n\t\tvar tickCount = ticks.length;\n\t\tvar skipRatio = false;\n\t\tvar maxTicks = optionTicks.maxTicksLimit;\n\n\t\t// Total space needed to display all ticks. First and last ticks are\n\t\t// drawn as their center at end of axis, so tickCount-1\n\t\tvar ticksLength = me._tickSize() * (tickCount - 1);\n\n\t\t// Axis length\n\t\tvar axisLength = isHorizontal\n\t\t\t? me.width - (me.paddingLeft + me.paddingRight)\n\t\t\t: me.height - (me.paddingTop + me.PaddingBottom);\n\n\t\tvar result = [];\n\t\tvar i, tick;\n\n\t\tif (ticksLength > axisLength) {\n\t\t\tskipRatio = 1 + Math.floor(ticksLength / axisLength);\n\t\t}\n\n\t\t// if they defined a max number of optionTicks,\n\t\t// increase skipRatio until that number is met\n\t\tif (tickCount > maxTicks) {\n\t\t\tskipRatio = Math.max(skipRatio, 1 + Math.floor(tickCount / maxTicks));\n\t\t}\n\n\t\tfor (i = 0; i < tickCount; i++) {\n\t\t\ttick = ticks[i];\n\n\t\t\tif (skipRatio > 1 && i % skipRatio > 0) {\n\t\t\t\t// leave tick in place but make sure it's not displayed (#4635)\n\t\t\t\tdelete tick.label;\n\t\t\t}\n\t\t\tresult.push(tick);\n\t\t}\n\t\treturn result;\n\t},\n\n\t/**\n\t * @private\n\t */\n\t_tickSize: function() {\n\t\tvar me = this;\n\t\tvar isHorizontal = me.isHorizontal();\n\t\tvar optionTicks = me.options.ticks.minor;\n\n\t\t// Calculate space needed by label in axis direction.\n\t\tvar rot = helpers$1.toRadians(me.labelRotation);\n\t\tvar cos = Math.abs(Math.cos(rot));\n\t\tvar sin = Math.abs(Math.sin(rot));\n\n\t\tvar padding = optionTicks.autoSkipPadding || 0;\n\t\tvar w = (me.longestLabelWidth + padding) || 0;\n\n\t\tvar tickFont = helpers$1.options._parseFont(optionTicks);\n\t\tvar h = (me._maxLabelLines * tickFont.lineHeight + padding) || 0;\n\n\t\t// Calculate space needed for 1 tick in axis direction.\n\t\treturn isHorizontal\n\t\t\t? h * cos > w * sin ? w / cos : h / sin\n\t\t\t: h * sin < w * cos ? h / cos : w / sin;\n\t},\n\n\t/**\n\t * @private\n\t */\n\t_isVisible: function() {\n\t\tvar me = this;\n\t\tvar chart = me.chart;\n\t\tvar display = me.options.display;\n\t\tvar i, ilen, meta;\n\n\t\tif (display !== 'auto') {\n\t\t\treturn !!display;\n\t\t}\n\n\t\t// When 'auto', the scale is visible if at least one associated dataset is visible.\n\t\tfor (i = 0, ilen = chart.data.datasets.length; i < ilen; ++i) {\n\t\t\tif (chart.isDatasetVisible(i)) {\n\t\t\t\tmeta = chart.getDatasetMeta(i);\n\t\t\t\tif (meta.xAxisID === me.id || meta.yAxisID === me.id) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t},\n\n\t/**\n\t * Actually draw the scale on the canvas\n\t * @param {object} chartArea - the area of the chart to draw full grid lines on\n\t */\n\tdraw: function(chartArea) {\n\t\tvar me = this;\n\t\tvar options = me.options;\n\n\t\tif (!me._isVisible()) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar chart = me.chart;\n\t\tvar context = me.ctx;\n\t\tvar globalDefaults = core_defaults.global;\n\t\tvar defaultFontColor = globalDefaults.defaultFontColor;\n\t\tvar optionTicks = options.ticks.minor;\n\t\tvar optionMajorTicks = options.ticks.major || optionTicks;\n\t\tvar gridLines = options.gridLines;\n\t\tvar scaleLabel = options.scaleLabel;\n\t\tvar position = options.position;\n\n\t\tvar isRotated = me.labelRotation !== 0;\n\t\tvar isMirrored = optionTicks.mirror;\n\t\tvar isHorizontal = me.isHorizontal();\n\n\t\tvar parseFont = helpers$1.options._parseFont;\n\t\tvar ticks = optionTicks.display && optionTicks.autoSkip ? me._autoSkip(me.getTicks()) : me.getTicks();\n\t\tvar tickFontColor = valueOrDefault$9(optionTicks.fontColor, defaultFontColor);\n\t\tvar tickFont = parseFont(optionTicks);\n\t\tvar lineHeight = tickFont.lineHeight;\n\t\tvar majorTickFontColor = valueOrDefault$9(optionMajorTicks.fontColor, defaultFontColor);\n\t\tvar majorTickFont = parseFont(optionMajorTicks);\n\t\tvar tickPadding = optionTicks.padding;\n\t\tvar labelOffset = optionTicks.labelOffset;\n\n\t\tvar tl = gridLines.drawTicks ? gridLines.tickMarkLength : 0;\n\n\t\tvar scaleLabelFontColor = valueOrDefault$9(scaleLabel.fontColor, defaultFontColor);\n\t\tvar scaleLabelFont = parseFont(scaleLabel);\n\t\tvar scaleLabelPadding = helpers$1.options.toPadding(scaleLabel.padding);\n\t\tvar labelRotationRadians = helpers$1.toRadians(me.labelRotation);\n\n\t\tvar itemsToDraw = [];\n\n\t\tvar axisWidth = gridLines.drawBorder ? valueAtIndexOrDefault(gridLines.lineWidth, 0, 0) : 0;\n\t\tvar alignPixel = helpers$1._alignPixel;\n\t\tvar borderValue, tickStart, tickEnd;\n\n\t\tif (position === 'top') {\n\t\t\tborderValue = alignPixel(chart, me.bottom, axisWidth);\n\t\t\ttickStart = me.bottom - tl;\n\t\t\ttickEnd = borderValue - axisWidth / 2;\n\t\t} else if (position === 'bottom') {\n\t\t\tborderValue = alignPixel(chart, me.top, axisWidth);\n\t\t\ttickStart = borderValue + axisWidth / 2;\n\t\t\ttickEnd = me.top + tl;\n\t\t} else if (position === 'left') {\n\t\t\tborderValue = alignPixel(chart, me.right, axisWidth);\n\t\t\ttickStart = me.right - tl;\n\t\t\ttickEnd = borderValue - axisWidth / 2;\n\t\t} else {\n\t\t\tborderValue = alignPixel(chart, me.left, axisWidth);\n\t\t\ttickStart = borderValue + axisWidth / 2;\n\t\t\ttickEnd = me.left + tl;\n\t\t}\n\n\t\tvar epsilon = 0.0000001; // 0.0000001 is margin in pixels for Accumulated error.\n\n\t\thelpers$1.each(ticks, function(tick, index) {\n\t\t\t// autoskipper skipped this tick (#4635)\n\t\t\tif (helpers$1.isNullOrUndef(tick.label)) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar label = tick.label;\n\t\t\tvar lineWidth, lineColor, borderDash, borderDashOffset;\n\t\t\tif (index === me.zeroLineIndex && options.offset === gridLines.offsetGridLines) {\n\t\t\t\t// Draw the first index specially\n\t\t\t\tlineWidth = gridLines.zeroLineWidth;\n\t\t\t\tlineColor = gridLines.zeroLineColor;\n\t\t\t\tborderDash = gridLines.zeroLineBorderDash || [];\n\t\t\t\tborderDashOffset = gridLines.zeroLineBorderDashOffset || 0.0;\n\t\t\t} else {\n\t\t\t\tlineWidth = valueAtIndexOrDefault(gridLines.lineWidth, index);\n\t\t\t\tlineColor = valueAtIndexOrDefault(gridLines.color, index);\n\t\t\t\tborderDash = gridLines.borderDash || [];\n\t\t\t\tborderDashOffset = gridLines.borderDashOffset || 0.0;\n\t\t\t}\n\n\t\t\t// Common properties\n\t\t\tvar tx1, ty1, tx2, ty2, x1, y1, x2, y2, labelX, labelY, textOffset, textAlign;\n\t\t\tvar labelCount = helpers$1.isArray(label) ? label.length : 1;\n\t\t\tvar lineValue = getPixelForGridLine(me, index, gridLines.offsetGridLines);\n\n\t\t\tif (isHorizontal) {\n\t\t\t\tvar labelYOffset = tl + tickPadding;\n\n\t\t\t\tif (lineValue < me.left - epsilon) {\n\t\t\t\t\tlineColor = 'rgba(0,0,0,0)';\n\t\t\t\t}\n\n\t\t\t\ttx1 = tx2 = x1 = x2 = alignPixel(chart, lineValue, lineWidth);\n\t\t\t\tty1 = tickStart;\n\t\t\t\tty2 = tickEnd;\n\t\t\t\tlabelX = me.getPixelForTick(index) + labelOffset; // x values for optionTicks (need to consider offsetLabel option)\n\n\t\t\t\tif (position === 'top') {\n\t\t\t\t\ty1 = alignPixel(chart, chartArea.top, axisWidth) + axisWidth / 2;\n\t\t\t\t\ty2 = chartArea.bottom;\n\t\t\t\t\ttextOffset = ((!isRotated ? 0.5 : 1) - labelCount) * lineHeight;\n\t\t\t\t\ttextAlign = !isRotated ? 'center' : 'left';\n\t\t\t\t\tlabelY = me.bottom - labelYOffset;\n\t\t\t\t} else {\n\t\t\t\t\ty1 = chartArea.top;\n\t\t\t\t\ty2 = alignPixel(chart, chartArea.bottom, axisWidth) - axisWidth / 2;\n\t\t\t\t\ttextOffset = (!isRotated ? 0.5 : 0) * lineHeight;\n\t\t\t\t\ttextAlign = !isRotated ? 'center' : 'right';\n\t\t\t\t\tlabelY = me.top + labelYOffset;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tvar labelXOffset = (isMirrored ? 0 : tl) + tickPadding;\n\n\t\t\t\tif (lineValue < me.top - epsilon) {\n\t\t\t\t\tlineColor = 'rgba(0,0,0,0)';\n\t\t\t\t}\n\n\t\t\t\ttx1 = tickStart;\n\t\t\t\ttx2 = tickEnd;\n\t\t\t\tty1 = ty2 = y1 = y2 = alignPixel(chart, lineValue, lineWidth);\n\t\t\t\tlabelY = me.getPixelForTick(index) + labelOffset;\n\t\t\t\ttextOffset = (1 - labelCount) * lineHeight / 2;\n\n\t\t\t\tif (position === 'left') {\n\t\t\t\t\tx1 = alignPixel(chart, chartArea.left, axisWidth) + axisWidth / 2;\n\t\t\t\t\tx2 = chartArea.right;\n\t\t\t\t\ttextAlign = isMirrored ? 'left' : 'right';\n\t\t\t\t\tlabelX = me.right - labelXOffset;\n\t\t\t\t} else {\n\t\t\t\t\tx1 = chartArea.left;\n\t\t\t\t\tx2 = alignPixel(chart, chartArea.right, axisWidth) - axisWidth / 2;\n\t\t\t\t\ttextAlign = isMirrored ? 'right' : 'left';\n\t\t\t\t\tlabelX = me.left + labelXOffset;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\titemsToDraw.push({\n\t\t\t\ttx1: tx1,\n\t\t\t\tty1: ty1,\n\t\t\t\ttx2: tx2,\n\t\t\t\tty2: ty2,\n\t\t\t\tx1: x1,\n\t\t\t\ty1: y1,\n\t\t\t\tx2: x2,\n\t\t\t\ty2: y2,\n\t\t\t\tlabelX: labelX,\n\t\t\t\tlabelY: labelY,\n\t\t\t\tglWidth: lineWidth,\n\t\t\t\tglColor: lineColor,\n\t\t\t\tglBorderDash: borderDash,\n\t\t\t\tglBorderDashOffset: borderDashOffset,\n\t\t\t\trotation: -1 * labelRotationRadians,\n\t\t\t\tlabel: label,\n\t\t\t\tmajor: tick.major,\n\t\t\t\ttextOffset: textOffset,\n\t\t\t\ttextAlign: textAlign\n\t\t\t});\n\t\t});\n\n\t\t// Draw all of the tick labels, tick marks, and grid lines at the correct places\n\t\thelpers$1.each(itemsToDraw, function(itemToDraw) {\n\t\t\tvar glWidth = itemToDraw.glWidth;\n\t\t\tvar glColor = itemToDraw.glColor;\n\n\t\t\tif (gridLines.display && glWidth && glColor) {\n\t\t\t\tcontext.save();\n\t\t\t\tcontext.lineWidth = glWidth;\n\t\t\t\tcontext.strokeStyle = glColor;\n\t\t\t\tif (context.setLineDash) {\n\t\t\t\t\tcontext.setLineDash(itemToDraw.glBorderDash);\n\t\t\t\t\tcontext.lineDashOffset = itemToDraw.glBorderDashOffset;\n\t\t\t\t}\n\n\t\t\t\tcontext.beginPath();\n\n\t\t\t\tif (gridLines.drawTicks) {\n\t\t\t\t\tcontext.moveTo(itemToDraw.tx1, itemToDraw.ty1);\n\t\t\t\t\tcontext.lineTo(itemToDraw.tx2, itemToDraw.ty2);\n\t\t\t\t}\n\n\t\t\t\tif (gridLines.drawOnChartArea) {\n\t\t\t\t\tcontext.moveTo(itemToDraw.x1, itemToDraw.y1);\n\t\t\t\t\tcontext.lineTo(itemToDraw.x2, itemToDraw.y2);\n\t\t\t\t}\n\n\t\t\t\tcontext.stroke();\n\t\t\t\tcontext.restore();\n\t\t\t}\n\n\t\t\tif (optionTicks.display) {\n\t\t\t\t// Make sure we draw text in the correct color and font\n\t\t\t\tcontext.save();\n\t\t\t\tcontext.translate(itemToDraw.labelX, itemToDraw.labelY);\n\t\t\t\tcontext.rotate(itemToDraw.rotation);\n\t\t\t\tcontext.font = itemToDraw.major ? majorTickFont.string : tickFont.string;\n\t\t\t\tcontext.fillStyle = itemToDraw.major ? majorTickFontColor : tickFontColor;\n\t\t\t\tcontext.textBaseline = 'middle';\n\t\t\t\tcontext.textAlign = itemToDraw.textAlign;\n\n\t\t\t\tvar label = itemToDraw.label;\n\t\t\t\tvar y = itemToDraw.textOffset;\n\t\t\t\tif (helpers$1.isArray(label)) {\n\t\t\t\t\tfor (var i = 0; i < label.length; ++i) {\n\t\t\t\t\t\t// We just make sure the multiline element is a string here..\n\t\t\t\t\t\tcontext.fillText('' + label[i], 0, y);\n\t\t\t\t\t\ty += lineHeight;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tcontext.fillText(label, 0, y);\n\t\t\t\t}\n\t\t\t\tcontext.restore();\n\t\t\t}\n\t\t});\n\n\t\tif (scaleLabel.display) {\n\t\t\t// Draw the scale label\n\t\t\tvar scaleLabelX;\n\t\t\tvar scaleLabelY;\n\t\t\tvar rotation = 0;\n\t\t\tvar halfLineHeight = scaleLabelFont.lineHeight / 2;\n\n\t\t\tif (isHorizontal) {\n\t\t\t\tscaleLabelX = me.left + ((me.right - me.left) / 2); // midpoint of the width\n\t\t\t\tscaleLabelY = position === 'bottom'\n\t\t\t\t\t? me.bottom - halfLineHeight - scaleLabelPadding.bottom\n\t\t\t\t\t: me.top + halfLineHeight + scaleLabelPadding.top;\n\t\t\t} else {\n\t\t\t\tvar isLeft = position === 'left';\n\t\t\t\tscaleLabelX = isLeft\n\t\t\t\t\t? me.left + halfLineHeight + scaleLabelPadding.top\n\t\t\t\t\t: me.right - halfLineHeight - scaleLabelPadding.top;\n\t\t\t\tscaleLabelY = me.top + ((me.bottom - me.top) / 2);\n\t\t\t\trotation = isLeft ? -0.5 * Math.PI : 0.5 * Math.PI;\n\t\t\t}\n\n\t\t\tcontext.save();\n\t\t\tcontext.translate(scaleLabelX, scaleLabelY);\n\t\t\tcontext.rotate(rotation);\n\t\t\tcontext.textAlign = 'center';\n\t\t\tcontext.textBaseline = 'middle';\n\t\t\tcontext.fillStyle = scaleLabelFontColor; // render in correct colour\n\t\t\tcontext.font = scaleLabelFont.string;\n\t\t\tcontext.fillText(scaleLabel.labelString, 0, 0);\n\t\t\tcontext.restore();\n\t\t}\n\n\t\tif (axisWidth) {\n\t\t\t// Draw the line at the edge of the axis\n\t\t\tvar firstLineWidth = axisWidth;\n\t\t\tvar lastLineWidth = valueAtIndexOrDefault(gridLines.lineWidth, ticks.length - 1, 0);\n\t\t\tvar x1, x2, y1, y2;\n\n\t\t\tif (isHorizontal) {\n\t\t\t\tx1 = alignPixel(chart, me.left, firstLineWidth) - firstLineWidth / 2;\n\t\t\t\tx2 = alignPixel(chart, me.right, lastLineWidth) + lastLineWidth / 2;\n\t\t\t\ty1 = y2 = borderValue;\n\t\t\t} else {\n\t\t\t\ty1 = alignPixel(chart, me.top, firstLineWidth) - firstLineWidth / 2;\n\t\t\t\ty2 = alignPixel(chart, me.bottom, lastLineWidth) + lastLineWidth / 2;\n\t\t\t\tx1 = x2 = borderValue;\n\t\t\t}\n\n\t\t\tcontext.lineWidth = axisWidth;\n\t\t\tcontext.strokeStyle = valueAtIndexOrDefault(gridLines.color, 0);\n\t\t\tcontext.beginPath();\n\t\t\tcontext.moveTo(x1, y1);\n\t\t\tcontext.lineTo(x2, y2);\n\t\t\tcontext.stroke();\n\t\t}\n\t}\n});\n\nvar defaultConfig = {\n\tposition: 'bottom'\n};\n\nvar scale_category = core_scale.extend({\n\t/**\n\t* Internal function to get the correct labels. If data.xLabels or data.yLabels are defined, use those\n\t* else fall back to data.labels\n\t* @private\n\t*/\n\tgetLabels: function() {\n\t\tvar data = this.chart.data;\n\t\treturn this.options.labels || (this.isHorizontal() ? data.xLabels : data.yLabels) || data.labels;\n\t},\n\n\tdetermineDataLimits: function() {\n\t\tvar me = this;\n\t\tvar labels = me.getLabels();\n\t\tme.minIndex = 0;\n\t\tme.maxIndex = labels.length - 1;\n\t\tvar findIndex;\n\n\t\tif (me.options.ticks.min !== undefined) {\n\t\t\t// user specified min value\n\t\t\tfindIndex = labels.indexOf(me.options.ticks.min);\n\t\t\tme.minIndex = findIndex !== -1 ? findIndex : me.minIndex;\n\t\t}\n\n\t\tif (me.options.ticks.max !== undefined) {\n\t\t\t// user specified max value\n\t\t\tfindIndex = labels.indexOf(me.options.ticks.max);\n\t\t\tme.maxIndex = findIndex !== -1 ? findIndex : me.maxIndex;\n\t\t}\n\n\t\tme.min = labels[me.minIndex];\n\t\tme.max = labels[me.maxIndex];\n\t},\n\n\tbuildTicks: function() {\n\t\tvar me = this;\n\t\tvar labels = me.getLabels();\n\t\t// If we are viewing some subset of labels, slice the original array\n\t\tme.ticks = (me.minIndex === 0 && me.maxIndex === labels.length - 1) ? labels : labels.slice(me.minIndex, me.maxIndex + 1);\n\t},\n\n\tgetLabelForIndex: function(index, datasetIndex) {\n\t\tvar me = this;\n\t\tvar chart = me.chart;\n\n\t\tif (chart.getDatasetMeta(datasetIndex).controller._getValueScaleId() === me.id) {\n\t\t\treturn me.getRightValue(chart.data.datasets[datasetIndex].data[index]);\n\t\t}\n\n\t\treturn me.ticks[index - me.minIndex];\n\t},\n\n\t// Used to get data value locations. Value can either be an index or a numerical value\n\tgetPixelForValue: function(value, index) {\n\t\tvar me = this;\n\t\tvar offset = me.options.offset;\n\t\t// 1 is added because we need the length but we have the indexes\n\t\tvar offsetAmt = Math.max((me.maxIndex + 1 - me.minIndex - (offset ? 0 : 1)), 1);\n\n\t\t// If value is a data object, then index is the index in the data array,\n\t\t// not the index of the scale. We need to change that.\n\t\tvar valueCategory;\n\t\tif (value !== undefined && value !== null) {\n\t\t\tvalueCategory = me.isHorizontal() ? value.x : value.y;\n\t\t}\n\t\tif (valueCategory !== undefined || (value !== undefined && isNaN(index))) {\n\t\t\tvar labels = me.getLabels();\n\t\t\tvalue = valueCategory || value;\n\t\t\tvar idx = labels.indexOf(value);\n\t\t\tindex = idx !== -1 ? idx : index;\n\t\t}\n\n\t\tif (me.isHorizontal()) {\n\t\t\tvar valueWidth = me.width / offsetAmt;\n\t\t\tvar widthOffset = (valueWidth * (index - me.minIndex));\n\n\t\t\tif (offset) {\n\t\t\t\twidthOffset += (valueWidth / 2);\n\t\t\t}\n\n\t\t\treturn me.left + widthOffset;\n\t\t}\n\t\tvar valueHeight = me.height / offsetAmt;\n\t\tvar heightOffset = (valueHeight * (index - me.minIndex));\n\n\t\tif (offset) {\n\t\t\theightOffset += (valueHeight / 2);\n\t\t}\n\n\t\treturn me.top + heightOffset;\n\t},\n\n\tgetPixelForTick: function(index) {\n\t\treturn this.getPixelForValue(this.ticks[index], index + this.minIndex, null);\n\t},\n\n\tgetValueForPixel: function(pixel) {\n\t\tvar me = this;\n\t\tvar offset = me.options.offset;\n\t\tvar value;\n\t\tvar offsetAmt = Math.max((me._ticks.length - (offset ? 0 : 1)), 1);\n\t\tvar horz = me.isHorizontal();\n\t\tvar valueDimension = (horz ? me.width : me.height) / offsetAmt;\n\n\t\tpixel -= horz ? me.left : me.top;\n\n\t\tif (offset) {\n\t\t\tpixel -= (valueDimension / 2);\n\t\t}\n\n\t\tif (pixel <= 0) {\n\t\t\tvalue = 0;\n\t\t} else {\n\t\t\tvalue = Math.round(pixel / valueDimension);\n\t\t}\n\n\t\treturn value + me.minIndex;\n\t},\n\n\tgetBasePixel: function() {\n\t\treturn this.bottom;\n\t}\n});\n\n// INTERNAL: static default options, registered in src/index.js\nvar _defaults = defaultConfig;\nscale_category._defaults = _defaults;\n\nvar noop = helpers$1.noop;\nvar isNullOrUndef = helpers$1.isNullOrUndef;\n\n/**\n * Generate a set of linear ticks\n * @param generationOptions the options used to generate the ticks\n * @param dataRange the range of the data\n * @returns {number[]} array of tick values\n */\nfunction generateTicks(generationOptions, dataRange) {\n\tvar ticks = [];\n\t// To get a \"nice\" value for the tick spacing, we will use the appropriately named\n\t// \"nice number\" algorithm. See https://stackoverflow.com/questions/8506881/nice-label-algorithm-for-charts-with-minimum-ticks\n\t// for details.\n\n\tvar MIN_SPACING = 1e-14;\n\tvar stepSize = generationOptions.stepSize;\n\tvar unit = stepSize || 1;\n\tvar maxNumSpaces = generationOptions.maxTicks - 1;\n\tvar min = generationOptions.min;\n\tvar max = generationOptions.max;\n\tvar precision = generationOptions.precision;\n\tvar rmin = dataRange.min;\n\tvar rmax = dataRange.max;\n\tvar spacing = helpers$1.niceNum((rmax - rmin) / maxNumSpaces / unit) * unit;\n\tvar factor, niceMin, niceMax, numSpaces;\n\n\t// Beyond MIN_SPACING floating point numbers being to lose precision\n\t// such that we can't do the math necessary to generate ticks\n\tif (spacing < MIN_SPACING && isNullOrUndef(min) && isNullOrUndef(max)) {\n\t\treturn [rmin, rmax];\n\t}\n\n\tnumSpaces = Math.ceil(rmax / spacing) - Math.floor(rmin / spacing);\n\tif (numSpaces > maxNumSpaces) {\n\t\t// If the calculated num of spaces exceeds maxNumSpaces, recalculate it\n\t\tspacing = helpers$1.niceNum(numSpaces * spacing / maxNumSpaces / unit) * unit;\n\t}\n\n\tif (stepSize || isNullOrUndef(precision)) {\n\t\t// If a precision is not specified, calculate factor based on spacing\n\t\tfactor = Math.pow(10, helpers$1._decimalPlaces(spacing));\n\t} else {\n\t\t// If the user specified a precision, round to that number of decimal places\n\t\tfactor = Math.pow(10, precision);\n\t\tspacing = Math.ceil(spacing * factor) / factor;\n\t}\n\n\tniceMin = Math.floor(rmin / spacing) * spacing;\n\tniceMax = Math.ceil(rmax / spacing) * spacing;\n\n\t// If min, max and stepSize is set and they make an evenly spaced scale use it.\n\tif (stepSize) {\n\t\t// If very close to our whole number, use it.\n\t\tif (!isNullOrUndef(min) && helpers$1.almostWhole(min / spacing, spacing / 1000)) {\n\t\t\tniceMin = min;\n\t\t}\n\t\tif (!isNullOrUndef(max) && helpers$1.almostWhole(max / spacing, spacing / 1000)) {\n\t\t\tniceMax = max;\n\t\t}\n\t}\n\n\tnumSpaces = (niceMax - niceMin) / spacing;\n\t// If very close to our rounded value, use it.\n\tif (helpers$1.almostEquals(numSpaces, Math.round(numSpaces), spacing / 1000)) {\n\t\tnumSpaces = Math.round(numSpaces);\n\t} else {\n\t\tnumSpaces = Math.ceil(numSpaces);\n\t}\n\n\tniceMin = Math.round(niceMin * factor) / factor;\n\tniceMax = Math.round(niceMax * factor) / factor;\n\tticks.push(isNullOrUndef(min) ? niceMin : min);\n\tfor (var j = 1; j < numSpaces; ++j) {\n\t\tticks.push(Math.round((niceMin + j * spacing) * factor) / factor);\n\t}\n\tticks.push(isNullOrUndef(max) ? niceMax : max);\n\n\treturn ticks;\n}\n\nvar scale_linearbase = core_scale.extend({\n\tgetRightValue: function(value) {\n\t\tif (typeof value === 'string') {\n\t\t\treturn +value;\n\t\t}\n\t\treturn core_scale.prototype.getRightValue.call(this, value);\n\t},\n\n\thandleTickRangeOptions: function() {\n\t\tvar me = this;\n\t\tvar opts = me.options;\n\t\tvar tickOpts = opts.ticks;\n\n\t\t// If we are forcing it to begin at 0, but 0 will already be rendered on the chart,\n\t\t// do nothing since that would make the chart weird. If the user really wants a weird chart\n\t\t// axis, they can manually override it\n\t\tif (tickOpts.beginAtZero) {\n\t\t\tvar minSign = helpers$1.sign(me.min);\n\t\t\tvar maxSign = helpers$1.sign(me.max);\n\n\t\t\tif (minSign < 0 && maxSign < 0) {\n\t\t\t\t// move the top up to 0\n\t\t\t\tme.max = 0;\n\t\t\t} else if (minSign > 0 && maxSign > 0) {\n\t\t\t\t// move the bottom down to 0\n\t\t\t\tme.min = 0;\n\t\t\t}\n\t\t}\n\n\t\tvar setMin = tickOpts.min !== undefined || tickOpts.suggestedMin !== undefined;\n\t\tvar setMax = tickOpts.max !== undefined || tickOpts.suggestedMax !== undefined;\n\n\t\tif (tickOpts.min !== undefined) {\n\t\t\tme.min = tickOpts.min;\n\t\t} else if (tickOpts.suggestedMin !== undefined) {\n\t\t\tif (me.min === null) {\n\t\t\t\tme.min = tickOpts.suggestedMin;\n\t\t\t} else {\n\t\t\t\tme.min = Math.min(me.min, tickOpts.suggestedMin);\n\t\t\t}\n\t\t}\n\n\t\tif (tickOpts.max !== undefined) {\n\t\t\tme.max = tickOpts.max;\n\t\t} else if (tickOpts.suggestedMax !== undefined) {\n\t\t\tif (me.max === null) {\n\t\t\t\tme.max = tickOpts.suggestedMax;\n\t\t\t} else {\n\t\t\t\tme.max = Math.max(me.max, tickOpts.suggestedMax);\n\t\t\t}\n\t\t}\n\n\t\tif (setMin !== setMax) {\n\t\t\t// We set the min or the max but not both.\n\t\t\t// So ensure that our range is good\n\t\t\t// Inverted or 0 length range can happen when\n\t\t\t// ticks.min is set, and no datasets are visible\n\t\t\tif (me.min >= me.max) {\n\t\t\t\tif (setMin) {\n\t\t\t\t\tme.max = me.min + 1;\n\t\t\t\t} else {\n\t\t\t\t\tme.min = me.max - 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (me.min === me.max) {\n\t\t\tme.max++;\n\n\t\t\tif (!tickOpts.beginAtZero) {\n\t\t\t\tme.min--;\n\t\t\t}\n\t\t}\n\t},\n\n\tgetTickLimit: function() {\n\t\tvar me = this;\n\t\tvar tickOpts = me.options.ticks;\n\t\tvar stepSize = tickOpts.stepSize;\n\t\tvar maxTicksLimit = tickOpts.maxTicksLimit;\n\t\tvar maxTicks;\n\n\t\tif (stepSize) {\n\t\t\tmaxTicks = Math.ceil(me.max / stepSize) - Math.floor(me.min / stepSize) + 1;\n\t\t} else {\n\t\t\tmaxTicks = me._computeTickLimit();\n\t\t\tmaxTicksLimit = maxTicksLimit || 11;\n\t\t}\n\n\t\tif (maxTicksLimit) {\n\t\t\tmaxTicks = Math.min(maxTicksLimit, maxTicks);\n\t\t}\n\n\t\treturn maxTicks;\n\t},\n\n\t_computeTickLimit: function() {\n\t\treturn Number.POSITIVE_INFINITY;\n\t},\n\n\thandleDirectionalChanges: noop,\n\n\tbuildTicks: function() {\n\t\tvar me = this;\n\t\tvar opts = me.options;\n\t\tvar tickOpts = opts.ticks;\n\n\t\t// Figure out what the max number of ticks we can support it is based on the size of\n\t\t// the axis area. For now, we say that the minimum tick spacing in pixels must be 40\n\t\t// We also limit the maximum number of ticks to 11 which gives a nice 10 squares on\n\t\t// the graph. Make sure we always have at least 2 ticks\n\t\tvar maxTicks = me.getTickLimit();\n\t\tmaxTicks = Math.max(2, maxTicks);\n\n\t\tvar numericGeneratorOptions = {\n\t\t\tmaxTicks: maxTicks,\n\t\t\tmin: tickOpts.min,\n\t\t\tmax: tickOpts.max,\n\t\t\tprecision: tickOpts.precision,\n\t\t\tstepSize: helpers$1.valueOrDefault(tickOpts.fixedStepSize, tickOpts.stepSize)\n\t\t};\n\t\tvar ticks = me.ticks = generateTicks(numericGeneratorOptions, me);\n\n\t\tme.handleDirectionalChanges();\n\n\t\t// At this point, we need to update our max and min given the tick values since we have expanded the\n\t\t// range of the scale\n\t\tme.max = helpers$1.max(ticks);\n\t\tme.min = helpers$1.min(ticks);\n\n\t\tif (tickOpts.reverse) {\n\t\t\tticks.reverse();\n\n\t\t\tme.start = me.max;\n\t\t\tme.end = me.min;\n\t\t} else {\n\t\t\tme.start = me.min;\n\t\t\tme.end = me.max;\n\t\t}\n\t},\n\n\tconvertTicksToLabels: function() {\n\t\tvar me = this;\n\t\tme.ticksAsNumbers = me.ticks.slice();\n\t\tme.zeroLineIndex = me.ticks.indexOf(0);\n\n\t\tcore_scale.prototype.convertTicksToLabels.call(me);\n\t}\n});\n\nvar defaultConfig$1 = {\n\tposition: 'left',\n\tticks: {\n\t\tcallback: core_ticks.formatters.linear\n\t}\n};\n\nvar scale_linear = scale_linearbase.extend({\n\tdetermineDataLimits: function() {\n\t\tvar me = this;\n\t\tvar opts = me.options;\n\t\tvar chart = me.chart;\n\t\tvar data = chart.data;\n\t\tvar datasets = data.datasets;\n\t\tvar isHorizontal = me.isHorizontal();\n\t\tvar DEFAULT_MIN = 0;\n\t\tvar DEFAULT_MAX = 1;\n\n\t\tfunction IDMatches(meta) {\n\t\t\treturn isHorizontal ? meta.xAxisID === me.id : meta.yAxisID === me.id;\n\t\t}\n\n\t\t// First Calculate the range\n\t\tme.min = null;\n\t\tme.max = null;\n\n\t\tvar hasStacks = opts.stacked;\n\t\tif (hasStacks === undefined) {\n\t\t\thelpers$1.each(datasets, function(dataset, datasetIndex) {\n\t\t\t\tif (hasStacks) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tvar meta = chart.getDatasetMeta(datasetIndex);\n\t\t\t\tif (chart.isDatasetVisible(datasetIndex) && IDMatches(meta) &&\n\t\t\t\t\tmeta.stack !== undefined) {\n\t\t\t\t\thasStacks = true;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\tif (opts.stacked || hasStacks) {\n\t\t\tvar valuesPerStack = {};\n\n\t\t\thelpers$1.each(datasets, function(dataset, datasetIndex) {\n\t\t\t\tvar meta = chart.getDatasetMeta(datasetIndex);\n\t\t\t\tvar key = [\n\t\t\t\t\tmeta.type,\n\t\t\t\t\t// we have a separate stack for stack=undefined datasets when the opts.stacked is undefined\n\t\t\t\t\t((opts.stacked === undefined && meta.stack === undefined) ? datasetIndex : ''),\n\t\t\t\t\tmeta.stack\n\t\t\t\t].join('.');\n\n\t\t\t\tif (valuesPerStack[key] === undefined) {\n\t\t\t\t\tvaluesPerStack[key] = {\n\t\t\t\t\t\tpositiveValues: [],\n\t\t\t\t\t\tnegativeValues: []\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\t// Store these per type\n\t\t\t\tvar positiveValues = valuesPerStack[key].positiveValues;\n\t\t\t\tvar negativeValues = valuesPerStack[key].negativeValues;\n\n\t\t\t\tif (chart.isDatasetVisible(datasetIndex) && IDMatches(meta)) {\n\t\t\t\t\thelpers$1.each(dataset.data, function(rawValue, index) {\n\t\t\t\t\t\tvar value = +me.getRightValue(rawValue);\n\t\t\t\t\t\tif (isNaN(value) || meta.data[index].hidden) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tpositiveValues[index] = positiveValues[index] || 0;\n\t\t\t\t\t\tnegativeValues[index] = negativeValues[index] || 0;\n\n\t\t\t\t\t\tif (opts.relativePoints) {\n\t\t\t\t\t\t\tpositiveValues[index] = 100;\n\t\t\t\t\t\t} else if (value < 0) {\n\t\t\t\t\t\t\tnegativeValues[index] += value;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tpositiveValues[index] += value;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\n\t\t\thelpers$1.each(valuesPerStack, function(valuesForType) {\n\t\t\t\tvar values = valuesForType.positiveValues.concat(valuesForType.negativeValues);\n\t\t\t\tvar minVal = helpers$1.min(values);\n\t\t\t\tvar maxVal = helpers$1.max(values);\n\t\t\t\tme.min = me.min === null ? minVal : Math.min(me.min, minVal);\n\t\t\t\tme.max = me.max === null ? maxVal : Math.max(me.max, maxVal);\n\t\t\t});\n\n\t\t} else {\n\t\t\thelpers$1.each(datasets, function(dataset, datasetIndex) {\n\t\t\t\tvar meta = chart.getDatasetMeta(datasetIndex);\n\t\t\t\tif (chart.isDatasetVisible(datasetIndex) && IDMatches(meta)) {\n\t\t\t\t\thelpers$1.each(dataset.data, function(rawValue, index) {\n\t\t\t\t\t\tvar value = +me.getRightValue(rawValue);\n\t\t\t\t\t\tif (isNaN(value) || meta.data[index].hidden) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (me.min === null) {\n\t\t\t\t\t\t\tme.min = value;\n\t\t\t\t\t\t} else if (value < me.min) {\n\t\t\t\t\t\t\tme.min = value;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (me.max === null) {\n\t\t\t\t\t\t\tme.max = value;\n\t\t\t\t\t\t} else if (value > me.max) {\n\t\t\t\t\t\t\tme.max = value;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\tme.min = isFinite(me.min) && !isNaN(me.min) ? me.min : DEFAULT_MIN;\n\t\tme.max = isFinite(me.max) && !isNaN(me.max) ? me.max : DEFAULT_MAX;\n\n\t\t// Common base implementation to handle ticks.min, ticks.max, ticks.beginAtZero\n\t\tthis.handleTickRangeOptions();\n\t},\n\n\t// Returns the maximum number of ticks based on the scale dimension\n\t_computeTickLimit: function() {\n\t\tvar me = this;\n\t\tvar tickFont;\n\n\t\tif (me.isHorizontal()) {\n\t\t\treturn Math.ceil(me.width / 40);\n\t\t}\n\t\ttickFont = helpers$1.options._parseFont(me.options.ticks);\n\t\treturn Math.ceil(me.height / tickFont.lineHeight);\n\t},\n\n\t// Called after the ticks are built. We need\n\thandleDirectionalChanges: function() {\n\t\tif (!this.isHorizontal()) {\n\t\t\t// We are in a vertical orientation. The top value is the highest. So reverse the array\n\t\t\tthis.ticks.reverse();\n\t\t}\n\t},\n\n\tgetLabelForIndex: function(index, datasetIndex) {\n\t\treturn +this.getRightValue(this.chart.data.datasets[datasetIndex].data[index]);\n\t},\n\n\t// Utils\n\tgetPixelForValue: function(value) {\n\t\t// This must be called after fit has been run so that\n\t\t// this.left, this.top, this.right, and this.bottom have been defined\n\t\tvar me = this;\n\t\tvar start = me.start;\n\n\t\tvar rightValue = +me.getRightValue(value);\n\t\tvar pixel;\n\t\tvar range = me.end - start;\n\n\t\tif (me.isHorizontal()) {\n\t\t\tpixel = me.left + (me.width / range * (rightValue - start));\n\t\t} else {\n\t\t\tpixel = me.bottom - (me.height / range * (rightValue - start));\n\t\t}\n\t\treturn pixel;\n\t},\n\n\tgetValueForPixel: function(pixel) {\n\t\tvar me = this;\n\t\tvar isHorizontal = me.isHorizontal();\n\t\tvar innerDimension = isHorizontal ? me.width : me.height;\n\t\tvar offset = (isHorizontal ? pixel - me.left : me.bottom - pixel) / innerDimension;\n\t\treturn me.start + ((me.end - me.start) * offset);\n\t},\n\n\tgetPixelForTick: function(index) {\n\t\treturn this.getPixelForValue(this.ticksAsNumbers[index]);\n\t}\n});\n\n// INTERNAL: static default options, registered in src/index.js\nvar _defaults$1 = defaultConfig$1;\nscale_linear._defaults = _defaults$1;\n\nvar valueOrDefault$a = helpers$1.valueOrDefault;\n\n/**\n * Generate a set of logarithmic ticks\n * @param generationOptions the options used to generate the ticks\n * @param dataRange the range of the data\n * @returns {number[]} array of tick values\n */\nfunction generateTicks$1(generationOptions, dataRange) {\n\tvar ticks = [];\n\n\tvar tickVal = valueOrDefault$a(generationOptions.min, Math.pow(10, Math.floor(helpers$1.log10(dataRange.min))));\n\n\tvar endExp = Math.floor(helpers$1.log10(dataRange.max));\n\tvar endSignificand = Math.ceil(dataRange.max / Math.pow(10, endExp));\n\tvar exp, significand;\n\n\tif (tickVal === 0) {\n\t\texp = Math.floor(helpers$1.log10(dataRange.minNotZero));\n\t\tsignificand = Math.floor(dataRange.minNotZero / Math.pow(10, exp));\n\n\t\tticks.push(tickVal);\n\t\ttickVal = significand * Math.pow(10, exp);\n\t} else {\n\t\texp = Math.floor(helpers$1.log10(tickVal));\n\t\tsignificand = Math.floor(tickVal / Math.pow(10, exp));\n\t}\n\tvar precision = exp < 0 ? Math.pow(10, Math.abs(exp)) : 1;\n\n\tdo {\n\t\tticks.push(tickVal);\n\n\t\t++significand;\n\t\tif (significand === 10) {\n\t\t\tsignificand = 1;\n\t\t\t++exp;\n\t\t\tprecision = exp >= 0 ? 1 : precision;\n\t\t}\n\n\t\ttickVal = Math.round(significand * Math.pow(10, exp) * precision) / precision;\n\t} while (exp < endExp || (exp === endExp && significand < endSignificand));\n\n\tvar lastTick = valueOrDefault$a(generationOptions.max, tickVal);\n\tticks.push(lastTick);\n\n\treturn ticks;\n}\n\nvar defaultConfig$2 = {\n\tposition: 'left',\n\n\t// label settings\n\tticks: {\n\t\tcallback: core_ticks.formatters.logarithmic\n\t}\n};\n\n// TODO(v3): change this to positiveOrDefault\nfunction nonNegativeOrDefault(value, defaultValue) {\n\treturn helpers$1.isFinite(value) && value >= 0 ? value : defaultValue;\n}\n\nvar scale_logarithmic = core_scale.extend({\n\tdetermineDataLimits: function() {\n\t\tvar me = this;\n\t\tvar opts = me.options;\n\t\tvar chart = me.chart;\n\t\tvar data = chart.data;\n\t\tvar datasets = data.datasets;\n\t\tvar isHorizontal = me.isHorizontal();\n\t\tfunction IDMatches(meta) {\n\t\t\treturn isHorizontal ? meta.xAxisID === me.id : meta.yAxisID === me.id;\n\t\t}\n\n\t\t// Calculate Range\n\t\tme.min = null;\n\t\tme.max = null;\n\t\tme.minNotZero = null;\n\n\t\tvar hasStacks = opts.stacked;\n\t\tif (hasStacks === undefined) {\n\t\t\thelpers$1.each(datasets, function(dataset, datasetIndex) {\n\t\t\t\tif (hasStacks) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tvar meta = chart.getDatasetMeta(datasetIndex);\n\t\t\t\tif (chart.isDatasetVisible(datasetIndex) && IDMatches(meta) &&\n\t\t\t\t\tmeta.stack !== undefined) {\n\t\t\t\t\thasStacks = true;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\tif (opts.stacked || hasStacks) {\n\t\t\tvar valuesPerStack = {};\n\n\t\t\thelpers$1.each(datasets, function(dataset, datasetIndex) {\n\t\t\t\tvar meta = chart.getDatasetMeta(datasetIndex);\n\t\t\t\tvar key = [\n\t\t\t\t\tmeta.type,\n\t\t\t\t\t// we have a separate stack for stack=undefined datasets when the opts.stacked is undefined\n\t\t\t\t\t((opts.stacked === undefined && meta.stack === undefined) ? datasetIndex : ''),\n\t\t\t\t\tmeta.stack\n\t\t\t\t].join('.');\n\n\t\t\t\tif (chart.isDatasetVisible(datasetIndex) && IDMatches(meta)) {\n\t\t\t\t\tif (valuesPerStack[key] === undefined) {\n\t\t\t\t\t\tvaluesPerStack[key] = [];\n\t\t\t\t\t}\n\n\t\t\t\t\thelpers$1.each(dataset.data, function(rawValue, index) {\n\t\t\t\t\t\tvar values = valuesPerStack[key];\n\t\t\t\t\t\tvar value = +me.getRightValue(rawValue);\n\t\t\t\t\t\t// invalid, hidden and negative values are ignored\n\t\t\t\t\t\tif (isNaN(value) || meta.data[index].hidden || value < 0) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvalues[index] = values[index] || 0;\n\t\t\t\t\t\tvalues[index] += value;\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\n\t\t\thelpers$1.each(valuesPerStack, function(valuesForType) {\n\t\t\t\tif (valuesForType.length > 0) {\n\t\t\t\t\tvar minVal = helpers$1.min(valuesForType);\n\t\t\t\t\tvar maxVal = helpers$1.max(valuesForType);\n\t\t\t\t\tme.min = me.min === null ? minVal : Math.min(me.min, minVal);\n\t\t\t\t\tme.max = me.max === null ? maxVal : Math.max(me.max, maxVal);\n\t\t\t\t}\n\t\t\t});\n\n\t\t} else {\n\t\t\thelpers$1.each(datasets, function(dataset, datasetIndex) {\n\t\t\t\tvar meta = chart.getDatasetMeta(datasetIndex);\n\t\t\t\tif (chart.isDatasetVisible(datasetIndex) && IDMatches(meta)) {\n\t\t\t\t\thelpers$1.each(dataset.data, function(rawValue, index) {\n\t\t\t\t\t\tvar value = +me.getRightValue(rawValue);\n\t\t\t\t\t\t// invalid, hidden and negative values are ignored\n\t\t\t\t\t\tif (isNaN(value) || meta.data[index].hidden || value < 0) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (me.min === null) {\n\t\t\t\t\t\t\tme.min = value;\n\t\t\t\t\t\t} else if (value < me.min) {\n\t\t\t\t\t\t\tme.min = value;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (me.max === null) {\n\t\t\t\t\t\t\tme.max = value;\n\t\t\t\t\t\t} else if (value > me.max) {\n\t\t\t\t\t\t\tme.max = value;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (value !== 0 && (me.minNotZero === null || value < me.minNotZero)) {\n\t\t\t\t\t\t\tme.minNotZero = value;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\t// Common base implementation to handle ticks.min, ticks.max\n\t\tthis.handleTickRangeOptions();\n\t},\n\n\thandleTickRangeOptions: function() {\n\t\tvar me = this;\n\t\tvar tickOpts = me.options.ticks;\n\t\tvar DEFAULT_MIN = 1;\n\t\tvar DEFAULT_MAX = 10;\n\n\t\tme.min = nonNegativeOrDefault(tickOpts.min, me.min);\n\t\tme.max = nonNegativeOrDefault(tickOpts.max, me.max);\n\n\t\tif (me.min === me.max) {\n\t\t\tif (me.min !== 0 && me.min !== null) {\n\t\t\t\tme.min = Math.pow(10, Math.floor(helpers$1.log10(me.min)) - 1);\n\t\t\t\tme.max = Math.pow(10, Math.floor(helpers$1.log10(me.max)) + 1);\n\t\t\t} else {\n\t\t\t\tme.min = DEFAULT_MIN;\n\t\t\t\tme.max = DEFAULT_MAX;\n\t\t\t}\n\t\t}\n\t\tif (me.min === null) {\n\t\t\tme.min = Math.pow(10, Math.floor(helpers$1.log10(me.max)) - 1);\n\t\t}\n\t\tif (me.max === null) {\n\t\t\tme.max = me.min !== 0\n\t\t\t\t? Math.pow(10, Math.floor(helpers$1.log10(me.min)) + 1)\n\t\t\t\t: DEFAULT_MAX;\n\t\t}\n\t\tif (me.minNotZero === null) {\n\t\t\tif (me.min > 0) {\n\t\t\t\tme.minNotZero = me.min;\n\t\t\t} else if (me.max < 1) {\n\t\t\t\tme.minNotZero = Math.pow(10, Math.floor(helpers$1.log10(me.max)));\n\t\t\t} else {\n\t\t\t\tme.minNotZero = DEFAULT_MIN;\n\t\t\t}\n\t\t}\n\t},\n\n\tbuildTicks: function() {\n\t\tvar me = this;\n\t\tvar tickOpts = me.options.ticks;\n\t\tvar reverse = !me.isHorizontal();\n\n\t\tvar generationOptions = {\n\t\t\tmin: nonNegativeOrDefault(tickOpts.min),\n\t\t\tmax: nonNegativeOrDefault(tickOpts.max)\n\t\t};\n\t\tvar ticks = me.ticks = generateTicks$1(generationOptions, me);\n\n\t\t// At this point, we need to update our max and min given the tick values since we have expanded the\n\t\t// range of the scale\n\t\tme.max = helpers$1.max(ticks);\n\t\tme.min = helpers$1.min(ticks);\n\n\t\tif (tickOpts.reverse) {\n\t\t\treverse = !reverse;\n\t\t\tme.start = me.max;\n\t\t\tme.end = me.min;\n\t\t} else {\n\t\t\tme.start = me.min;\n\t\t\tme.end = me.max;\n\t\t}\n\t\tif (reverse) {\n\t\t\tticks.reverse();\n\t\t}\n\t},\n\n\tconvertTicksToLabels: function() {\n\t\tthis.tickValues = this.ticks.slice();\n\n\t\tcore_scale.prototype.convertTicksToLabels.call(this);\n\t},\n\n\t// Get the correct tooltip label\n\tgetLabelForIndex: function(index, datasetIndex) {\n\t\treturn +this.getRightValue(this.chart.data.datasets[datasetIndex].data[index]);\n\t},\n\n\tgetPixelForTick: function(index) {\n\t\treturn this.getPixelForValue(this.tickValues[index]);\n\t},\n\n\t/**\n\t * Returns the value of the first tick.\n\t * @param {number} value - The minimum not zero value.\n\t * @return {number} The first tick value.\n\t * @private\n\t */\n\t_getFirstTickValue: function(value) {\n\t\tvar exp = Math.floor(helpers$1.log10(value));\n\t\tvar significand = Math.floor(value / Math.pow(10, exp));\n\n\t\treturn significand * Math.pow(10, exp);\n\t},\n\n\tgetPixelForValue: function(value) {\n\t\tvar me = this;\n\t\tvar tickOpts = me.options.ticks;\n\t\tvar reverse = tickOpts.reverse;\n\t\tvar log10 = helpers$1.log10;\n\t\tvar firstTickValue = me._getFirstTickValue(me.minNotZero);\n\t\tvar offset = 0;\n\t\tvar innerDimension, pixel, start, end, sign;\n\n\t\tvalue = +me.getRightValue(value);\n\t\tif (reverse) {\n\t\t\tstart = me.end;\n\t\t\tend = me.start;\n\t\t\tsign = -1;\n\t\t} else {\n\t\t\tstart = me.start;\n\t\t\tend = me.end;\n\t\t\tsign = 1;\n\t\t}\n\t\tif (me.isHorizontal()) {\n\t\t\tinnerDimension = me.width;\n\t\t\tpixel = reverse ? me.right : me.left;\n\t\t} else {\n\t\t\tinnerDimension = me.height;\n\t\t\tsign *= -1; // invert, since the upper-left corner of the canvas is at pixel (0, 0)\n\t\t\tpixel = reverse ? me.top : me.bottom;\n\t\t}\n\t\tif (value !== start) {\n\t\t\tif (start === 0) { // include zero tick\n\t\t\t\toffset = valueOrDefault$a(tickOpts.fontSize, core_defaults.global.defaultFontSize);\n\t\t\t\tinnerDimension -= offset;\n\t\t\t\tstart = firstTickValue;\n\t\t\t}\n\t\t\tif (value !== 0) {\n\t\t\t\toffset += innerDimension / (log10(end) - log10(start)) * (log10(value) - log10(start));\n\t\t\t}\n\t\t\tpixel += sign * offset;\n\t\t}\n\t\treturn pixel;\n\t},\n\n\tgetValueForPixel: function(pixel) {\n\t\tvar me = this;\n\t\tvar tickOpts = me.options.ticks;\n\t\tvar reverse = tickOpts.reverse;\n\t\tvar log10 = helpers$1.log10;\n\t\tvar firstTickValue = me._getFirstTickValue(me.minNotZero);\n\t\tvar innerDimension, start, end, value;\n\n\t\tif (reverse) {\n\t\t\tstart = me.end;\n\t\t\tend = me.start;\n\t\t} else {\n\t\t\tstart = me.start;\n\t\t\tend = me.end;\n\t\t}\n\t\tif (me.isHorizontal()) {\n\t\t\tinnerDimension = me.width;\n\t\t\tvalue = reverse ? me.right - pixel : pixel - me.left;\n\t\t} else {\n\t\t\tinnerDimension = me.height;\n\t\t\tvalue = reverse ? pixel - me.top : me.bottom - pixel;\n\t\t}\n\t\tif (value !== start) {\n\t\t\tif (start === 0) { // include zero tick\n\t\t\t\tvar offset = valueOrDefault$a(tickOpts.fontSize, core_defaults.global.defaultFontSize);\n\t\t\t\tvalue -= offset;\n\t\t\t\tinnerDimension -= offset;\n\t\t\t\tstart = firstTickValue;\n\t\t\t}\n\t\t\tvalue *= log10(end) - log10(start);\n\t\t\tvalue /= innerDimension;\n\t\t\tvalue = Math.pow(10, log10(start) + value);\n\t\t}\n\t\treturn value;\n\t}\n});\n\n// INTERNAL: static default options, registered in src/index.js\nvar _defaults$2 = defaultConfig$2;\nscale_logarithmic._defaults = _defaults$2;\n\nvar valueOrDefault$b = helpers$1.valueOrDefault;\nvar valueAtIndexOrDefault$1 = helpers$1.valueAtIndexOrDefault;\nvar resolve$7 = helpers$1.options.resolve;\n\nvar defaultConfig$3 = {\n\tdisplay: true,\n\n\t// Boolean - Whether to animate scaling the chart from the centre\n\tanimate: true,\n\tposition: 'chartArea',\n\n\tangleLines: {\n\t\tdisplay: true,\n\t\tcolor: 'rgba(0, 0, 0, 0.1)',\n\t\tlineWidth: 1,\n\t\tborderDash: [],\n\t\tborderDashOffset: 0.0\n\t},\n\n\tgridLines: {\n\t\tcircular: false\n\t},\n\n\t// label settings\n\tticks: {\n\t\t// Boolean - Show a backdrop to the scale label\n\t\tshowLabelBackdrop: true,\n\n\t\t// String - The colour of the label backdrop\n\t\tbackdropColor: 'rgba(255,255,255,0.75)',\n\n\t\t// Number - The backdrop padding above & below the label in pixels\n\t\tbackdropPaddingY: 2,\n\n\t\t// Number - The backdrop padding to the side of the label in pixels\n\t\tbackdropPaddingX: 2,\n\n\t\tcallback: core_ticks.formatters.linear\n\t},\n\n\tpointLabels: {\n\t\t// Boolean - if true, show point labels\n\t\tdisplay: true,\n\n\t\t// Number - Point label font size in pixels\n\t\tfontSize: 10,\n\n\t\t// Function - Used to convert point labels\n\t\tcallback: function(label) {\n\t\t\treturn label;\n\t\t}\n\t}\n};\n\nfunction getValueCount(scale) {\n\tvar opts = scale.options;\n\treturn opts.angleLines.display || opts.pointLabels.display ? scale.chart.data.labels.length : 0;\n}\n\nfunction getTickBackdropHeight(opts) {\n\tvar tickOpts = opts.ticks;\n\n\tif (tickOpts.display && opts.display) {\n\t\treturn valueOrDefault$b(tickOpts.fontSize, core_defaults.global.defaultFontSize) + tickOpts.backdropPaddingY * 2;\n\t}\n\treturn 0;\n}\n\nfunction measureLabelSize(ctx, lineHeight, label) {\n\tif (helpers$1.isArray(label)) {\n\t\treturn {\n\t\t\tw: helpers$1.longestText(ctx, ctx.font, label),\n\t\t\th: label.length * lineHeight\n\t\t};\n\t}\n\n\treturn {\n\t\tw: ctx.measureText(label).width,\n\t\th: lineHeight\n\t};\n}\n\nfunction determineLimits(angle, pos, size, min, max) {\n\tif (angle === min || angle === max) {\n\t\treturn {\n\t\t\tstart: pos - (size / 2),\n\t\t\tend: pos + (size / 2)\n\t\t};\n\t} else if (angle < min || angle > max) {\n\t\treturn {\n\t\t\tstart: pos - size,\n\t\t\tend: pos\n\t\t};\n\t}\n\n\treturn {\n\t\tstart: pos,\n\t\tend: pos + size\n\t};\n}\n\n/**\n * Helper function to fit a radial linear scale with point labels\n */\nfunction fitWithPointLabels(scale) {\n\n\t// Right, this is really confusing and there is a lot of maths going on here\n\t// The gist of the problem is here: https://gist.github.com/nnnick/696cc9c55f4b0beb8fe9\n\t//\n\t// Reaction: https://dl.dropboxusercontent.com/u/34601363/toomuchscience.gif\n\t//\n\t// Solution:\n\t//\n\t// We assume the radius of the polygon is half the size of the canvas at first\n\t// at each index we check if the text overlaps.\n\t//\n\t// Where it does, we store that angle and that index.\n\t//\n\t// After finding the largest index and angle we calculate how much we need to remove\n\t// from the shape radius to move the point inwards by that x.\n\t//\n\t// We average the left and right distances to get the maximum shape radius that can fit in the box\n\t// along with labels.\n\t//\n\t// Once we have that, we can find the centre point for the chart, by taking the x text protrusion\n\t// on each side, removing that from the size, halving it and adding the left x protrusion width.\n\t//\n\t// This will mean we have a shape fitted to the canvas, as large as it can be with the labels\n\t// and position it in the most space efficient manner\n\t//\n\t// https://dl.dropboxusercontent.com/u/34601363/yeahscience.gif\n\n\tvar plFont = helpers$1.options._parseFont(scale.options.pointLabels);\n\n\t// Get maximum radius of the polygon. Either half the height (minus the text width) or half the width.\n\t// Use this to calculate the offset + change. - Make sure L/R protrusion is at least 0 to stop issues with centre points\n\tvar furthestLimits = {\n\t\tl: 0,\n\t\tr: scale.width,\n\t\tt: 0,\n\t\tb: scale.height - scale.paddingTop\n\t};\n\tvar furthestAngles = {};\n\tvar i, textSize, pointPosition;\n\n\tscale.ctx.font = plFont.string;\n\tscale._pointLabelSizes = [];\n\n\tvar valueCount = getValueCount(scale);\n\tfor (i = 0; i < valueCount; i++) {\n\t\tpointPosition = scale.getPointPosition(i, scale.drawingArea + 5);\n\t\ttextSize = measureLabelSize(scale.ctx, plFont.lineHeight, scale.pointLabels[i] || '');\n\t\tscale._pointLabelSizes[i] = textSize;\n\n\t\t// Add quarter circle to make degree 0 mean top of circle\n\t\tvar angleRadians = scale.getIndexAngle(i);\n\t\tvar angle = helpers$1.toDegrees(angleRadians) % 360;\n\t\tvar hLimits = determineLimits(angle, pointPosition.x, textSize.w, 0, 180);\n\t\tvar vLimits = determineLimits(angle, pointPosition.y, textSize.h, 90, 270);\n\n\t\tif (hLimits.start < furthestLimits.l) {\n\t\t\tfurthestLimits.l = hLimits.start;\n\t\t\tfurthestAngles.l = angleRadians;\n\t\t}\n\n\t\tif (hLimits.end > furthestLimits.r) {\n\t\t\tfurthestLimits.r = hLimits.end;\n\t\t\tfurthestAngles.r = angleRadians;\n\t\t}\n\n\t\tif (vLimits.start < furthestLimits.t) {\n\t\t\tfurthestLimits.t = vLimits.start;\n\t\t\tfurthestAngles.t = angleRadians;\n\t\t}\n\n\t\tif (vLimits.end > furthestLimits.b) {\n\t\t\tfurthestLimits.b = vLimits.end;\n\t\t\tfurthestAngles.b = angleRadians;\n\t\t}\n\t}\n\n\tscale.setReductions(scale.drawingArea, furthestLimits, furthestAngles);\n}\n\nfunction getTextAlignForAngle(angle) {\n\tif (angle === 0 || angle === 180) {\n\t\treturn 'center';\n\t} else if (angle < 180) {\n\t\treturn 'left';\n\t}\n\n\treturn 'right';\n}\n\nfunction fillText(ctx, text, position, lineHeight) {\n\tvar y = position.y + lineHeight / 2;\n\tvar i, ilen;\n\n\tif (helpers$1.isArray(text)) {\n\t\tfor (i = 0, ilen = text.length; i < ilen; ++i) {\n\t\t\tctx.fillText(text[i], position.x, y);\n\t\t\ty += lineHeight;\n\t\t}\n\t} else {\n\t\tctx.fillText(text, position.x, y);\n\t}\n}\n\nfunction adjustPointPositionForLabelHeight(angle, textSize, position) {\n\tif (angle === 90 || angle === 270) {\n\t\tposition.y -= (textSize.h / 2);\n\t} else if (angle > 270 || angle < 90) {\n\t\tposition.y -= textSize.h;\n\t}\n}\n\nfunction drawPointLabels(scale) {\n\tvar ctx = scale.ctx;\n\tvar opts = scale.options;\n\tvar angleLineOpts = opts.angleLines;\n\tvar gridLineOpts = opts.gridLines;\n\tvar pointLabelOpts = opts.pointLabels;\n\tvar lineWidth = valueOrDefault$b(angleLineOpts.lineWidth, gridLineOpts.lineWidth);\n\tvar lineColor = valueOrDefault$b(angleLineOpts.color, gridLineOpts.color);\n\tvar tickBackdropHeight = getTickBackdropHeight(opts);\n\n\tctx.save();\n\tctx.lineWidth = lineWidth;\n\tctx.strokeStyle = lineColor;\n\tif (ctx.setLineDash) {\n\t\tctx.setLineDash(resolve$7([angleLineOpts.borderDash, gridLineOpts.borderDash, []]));\n\t\tctx.lineDashOffset = resolve$7([angleLineOpts.borderDashOffset, gridLineOpts.borderDashOffset, 0.0]);\n\t}\n\n\tvar outerDistance = scale.getDistanceFromCenterForValue(opts.ticks.reverse ? scale.min : scale.max);\n\n\t// Point Label Font\n\tvar plFont = helpers$1.options._parseFont(pointLabelOpts);\n\n\tctx.font = plFont.string;\n\tctx.textBaseline = 'middle';\n\n\tfor (var i = getValueCount(scale) - 1; i >= 0; i--) {\n\t\tif (angleLineOpts.display && lineWidth && lineColor) {\n\t\t\tvar outerPosition = scale.getPointPosition(i, outerDistance);\n\t\t\tctx.beginPath();\n\t\t\tctx.moveTo(scale.xCenter, scale.yCenter);\n\t\t\tctx.lineTo(outerPosition.x, outerPosition.y);\n\t\t\tctx.stroke();\n\t\t}\n\n\t\tif (pointLabelOpts.display) {\n\t\t\t// Extra pixels out for some label spacing\n\t\t\tvar extra = (i === 0 ? tickBackdropHeight / 2 : 0);\n\t\t\tvar pointLabelPosition = scale.getPointPosition(i, outerDistance + extra + 5);\n\n\t\t\t// Keep this in loop since we may support array properties here\n\t\t\tvar pointLabelFontColor = valueAtIndexOrDefault$1(pointLabelOpts.fontColor, i, core_defaults.global.defaultFontColor);\n\t\t\tctx.fillStyle = pointLabelFontColor;\n\n\t\t\tvar angleRadians = scale.getIndexAngle(i);\n\t\t\tvar angle = helpers$1.toDegrees(angleRadians);\n\t\t\tctx.textAlign = getTextAlignForAngle(angle);\n\t\t\tadjustPointPositionForLabelHeight(angle, scale._pointLabelSizes[i], pointLabelPosition);\n\t\t\tfillText(ctx, scale.pointLabels[i] || '', pointLabelPosition, plFont.lineHeight);\n\t\t}\n\t}\n\tctx.restore();\n}\n\nfunction drawRadiusLine(scale, gridLineOpts, radius, index) {\n\tvar ctx = scale.ctx;\n\tvar circular = gridLineOpts.circular;\n\tvar valueCount = getValueCount(scale);\n\tvar lineColor = valueAtIndexOrDefault$1(gridLineOpts.color, index - 1);\n\tvar lineWidth = valueAtIndexOrDefault$1(gridLineOpts.lineWidth, index - 1);\n\tvar pointPosition;\n\n\tif ((!circular && !valueCount) || !lineColor || !lineWidth) {\n\t\treturn;\n\t}\n\n\tctx.save();\n\tctx.strokeStyle = lineColor;\n\tctx.lineWidth = lineWidth;\n\tif (ctx.setLineDash) {\n\t\tctx.setLineDash(gridLineOpts.borderDash || []);\n\t\tctx.lineDashOffset = gridLineOpts.borderDashOffset || 0.0;\n\t}\n\n\tctx.beginPath();\n\tif (circular) {\n\t\t// Draw circular arcs between the points\n\t\tctx.arc(scale.xCenter, scale.yCenter, radius, 0, Math.PI * 2);\n\t} else {\n\t\t// Draw straight lines connecting each index\n\t\tpointPosition = scale.getPointPosition(0, radius);\n\t\tctx.moveTo(pointPosition.x, pointPosition.y);\n\n\t\tfor (var i = 1; i < valueCount; i++) {\n\t\t\tpointPosition = scale.getPointPosition(i, radius);\n\t\t\tctx.lineTo(pointPosition.x, pointPosition.y);\n\t\t}\n\t}\n\tctx.closePath();\n\tctx.stroke();\n\tctx.restore();\n}\n\nfunction numberOrZero(param) {\n\treturn helpers$1.isNumber(param) ? param : 0;\n}\n\nvar scale_radialLinear = scale_linearbase.extend({\n\tsetDimensions: function() {\n\t\tvar me = this;\n\n\t\t// Set the unconstrained dimension before label rotation\n\t\tme.width = me.maxWidth;\n\t\tme.height = me.maxHeight;\n\t\tme.paddingTop = getTickBackdropHeight(me.options) / 2;\n\t\tme.xCenter = Math.floor(me.width / 2);\n\t\tme.yCenter = Math.floor((me.height - me.paddingTop) / 2);\n\t\tme.drawingArea = Math.min(me.height - me.paddingTop, me.width) / 2;\n\t},\n\n\tdetermineDataLimits: function() {\n\t\tvar me = this;\n\t\tvar chart = me.chart;\n\t\tvar min = Number.POSITIVE_INFINITY;\n\t\tvar max = Number.NEGATIVE_INFINITY;\n\n\t\thelpers$1.each(chart.data.datasets, function(dataset, datasetIndex) {\n\t\t\tif (chart.isDatasetVisible(datasetIndex)) {\n\t\t\t\tvar meta = chart.getDatasetMeta(datasetIndex);\n\n\t\t\t\thelpers$1.each(dataset.data, function(rawValue, index) {\n\t\t\t\t\tvar value = +me.getRightValue(rawValue);\n\t\t\t\t\tif (isNaN(value) || meta.data[index].hidden) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tmin = Math.min(value, min);\n\t\t\t\t\tmax = Math.max(value, max);\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\n\t\tme.min = (min === Number.POSITIVE_INFINITY ? 0 : min);\n\t\tme.max = (max === Number.NEGATIVE_INFINITY ? 0 : max);\n\n\t\t// Common base implementation to handle ticks.min, ticks.max, ticks.beginAtZero\n\t\tme.handleTickRangeOptions();\n\t},\n\n\t// Returns the maximum number of ticks based on the scale dimension\n\t_computeTickLimit: function() {\n\t\treturn Math.ceil(this.drawingArea / getTickBackdropHeight(this.options));\n\t},\n\n\tconvertTicksToLabels: function() {\n\t\tvar me = this;\n\n\t\tscale_linearbase.prototype.convertTicksToLabels.call(me);\n\n\t\t// Point labels\n\t\tme.pointLabels = me.chart.data.labels.map(me.options.pointLabels.callback, me);\n\t},\n\n\tgetLabelForIndex: function(index, datasetIndex) {\n\t\treturn +this.getRightValue(this.chart.data.datasets[datasetIndex].data[index]);\n\t},\n\n\tfit: function() {\n\t\tvar me = this;\n\t\tvar opts = me.options;\n\n\t\tif (opts.display && opts.pointLabels.display) {\n\t\t\tfitWithPointLabels(me);\n\t\t} else {\n\t\t\tme.setCenterPoint(0, 0, 0, 0);\n\t\t}\n\t},\n\n\t/**\n\t * Set radius reductions and determine new radius and center point\n\t * @private\n\t */\n\tsetReductions: function(largestPossibleRadius, furthestLimits, furthestAngles) {\n\t\tvar me = this;\n\t\tvar radiusReductionLeft = furthestLimits.l / Math.sin(furthestAngles.l);\n\t\tvar radiusReductionRight = Math.max(furthestLimits.r - me.width, 0) / Math.sin(furthestAngles.r);\n\t\tvar radiusReductionTop = -furthestLimits.t / Math.cos(furthestAngles.t);\n\t\tvar radiusReductionBottom = -Math.max(furthestLimits.b - (me.height - me.paddingTop), 0) / Math.cos(furthestAngles.b);\n\n\t\tradiusReductionLeft = numberOrZero(radiusReductionLeft);\n\t\tradiusReductionRight = numberOrZero(radiusReductionRight);\n\t\tradiusReductionTop = numberOrZero(radiusReductionTop);\n\t\tradiusReductionBottom = numberOrZero(radiusReductionBottom);\n\n\t\tme.drawingArea = Math.min(\n\t\t\tMath.floor(largestPossibleRadius - (radiusReductionLeft + radiusReductionRight) / 2),\n\t\t\tMath.floor(largestPossibleRadius - (radiusReductionTop + radiusReductionBottom) / 2));\n\t\tme.setCenterPoint(radiusReductionLeft, radiusReductionRight, radiusReductionTop, radiusReductionBottom);\n\t},\n\n\tsetCenterPoint: function(leftMovement, rightMovement, topMovement, bottomMovement) {\n\t\tvar me = this;\n\t\tvar maxRight = me.width - rightMovement - me.drawingArea;\n\t\tvar maxLeft = leftMovement + me.drawingArea;\n\t\tvar maxTop = topMovement + me.drawingArea;\n\t\tvar maxBottom = (me.height - me.paddingTop) - bottomMovement - me.drawingArea;\n\n\t\tme.xCenter = Math.floor(((maxLeft + maxRight) / 2) + me.left);\n\t\tme.yCenter = Math.floor(((maxTop + maxBottom) / 2) + me.top + me.paddingTop);\n\t},\n\n\tgetIndexAngle: function(index) {\n\t\tvar angleMultiplier = (Math.PI * 2) / getValueCount(this);\n\t\tvar startAngle = this.chart.options && this.chart.options.startAngle ?\n\t\t\tthis.chart.options.startAngle :\n\t\t\t0;\n\n\t\tvar startAngleRadians = startAngle * Math.PI * 2 / 360;\n\n\t\t// Start from the top instead of right, so remove a quarter of the circle\n\t\treturn index * angleMultiplier + startAngleRadians;\n\t},\n\n\tgetDistanceFromCenterForValue: function(value) {\n\t\tvar me = this;\n\n\t\tif (value === null) {\n\t\t\treturn 0; // null always in center\n\t\t}\n\n\t\t// Take into account half font size + the yPadding of the top value\n\t\tvar scalingFactor = me.drawingArea / (me.max - me.min);\n\t\tif (me.options.ticks.reverse) {\n\t\t\treturn (me.max - value) * scalingFactor;\n\t\t}\n\t\treturn (value - me.min) * scalingFactor;\n\t},\n\n\tgetPointPosition: function(index, distanceFromCenter) {\n\t\tvar me = this;\n\t\tvar thisAngle = me.getIndexAngle(index) - (Math.PI / 2);\n\t\treturn {\n\t\t\tx: Math.cos(thisAngle) * distanceFromCenter + me.xCenter,\n\t\t\ty: Math.sin(thisAngle) * distanceFromCenter + me.yCenter\n\t\t};\n\t},\n\n\tgetPointPositionForValue: function(index, value) {\n\t\treturn this.getPointPosition(index, this.getDistanceFromCenterForValue(value));\n\t},\n\n\tgetBasePosition: function() {\n\t\tvar me = this;\n\t\tvar min = me.min;\n\t\tvar max = me.max;\n\n\t\treturn me.getPointPositionForValue(0,\n\t\t\tme.beginAtZero ? 0 :\n\t\t\tmin < 0 && max < 0 ? max :\n\t\t\tmin > 0 && max > 0 ? min :\n\t\t\t0);\n\t},\n\n\tdraw: function() {\n\t\tvar me = this;\n\t\tvar opts = me.options;\n\t\tvar gridLineOpts = opts.gridLines;\n\t\tvar tickOpts = opts.ticks;\n\n\t\tif (opts.display) {\n\t\t\tvar ctx = me.ctx;\n\t\t\tvar startAngle = this.getIndexAngle(0);\n\t\t\tvar tickFont = helpers$1.options._parseFont(tickOpts);\n\n\t\t\tif (opts.angleLines.display || opts.pointLabels.display) {\n\t\t\t\tdrawPointLabels(me);\n\t\t\t}\n\n\t\t\thelpers$1.each(me.ticks, function(label, index) {\n\t\t\t\t// Don't draw a centre value (if it is minimum)\n\t\t\t\tif (index > 0 || tickOpts.reverse) {\n\t\t\t\t\tvar yCenterOffset = me.getDistanceFromCenterForValue(me.ticksAsNumbers[index]);\n\n\t\t\t\t\t// Draw circular lines around the scale\n\t\t\t\t\tif (gridLineOpts.display && index !== 0) {\n\t\t\t\t\t\tdrawRadiusLine(me, gridLineOpts, yCenterOffset, index);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (tickOpts.display) {\n\t\t\t\t\t\tvar tickFontColor = valueOrDefault$b(tickOpts.fontColor, core_defaults.global.defaultFontColor);\n\t\t\t\t\t\tctx.font = tickFont.string;\n\n\t\t\t\t\t\tctx.save();\n\t\t\t\t\t\tctx.translate(me.xCenter, me.yCenter);\n\t\t\t\t\t\tctx.rotate(startAngle);\n\n\t\t\t\t\t\tif (tickOpts.showLabelBackdrop) {\n\t\t\t\t\t\t\tvar labelWidth = ctx.measureText(label).width;\n\t\t\t\t\t\t\tctx.fillStyle = tickOpts.backdropColor;\n\t\t\t\t\t\t\tctx.fillRect(\n\t\t\t\t\t\t\t\t-labelWidth / 2 - tickOpts.backdropPaddingX,\n\t\t\t\t\t\t\t\t-yCenterOffset - tickFont.size / 2 - tickOpts.backdropPaddingY,\n\t\t\t\t\t\t\t\tlabelWidth + tickOpts.backdropPaddingX * 2,\n\t\t\t\t\t\t\t\ttickFont.size + tickOpts.backdropPaddingY * 2\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tctx.textAlign = 'center';\n\t\t\t\t\t\tctx.textBaseline = 'middle';\n\t\t\t\t\t\tctx.fillStyle = tickFontColor;\n\t\t\t\t\t\tctx.fillText(label, 0, -yCenterOffset);\n\t\t\t\t\t\tctx.restore();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n});\n\n// INTERNAL: static default options, registered in src/index.js\nvar _defaults$3 = defaultConfig$3;\nscale_radialLinear._defaults = _defaults$3;\n\nvar valueOrDefault$c = helpers$1.valueOrDefault;\n\n// Integer constants are from the ES6 spec.\nvar MIN_INTEGER = Number.MIN_SAFE_INTEGER || -9007199254740991;\nvar MAX_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991;\n\nvar INTERVALS = {\n\tmillisecond: {\n\t\tcommon: true,\n\t\tsize: 1,\n\t\tsteps: [1, 2, 5, 10, 20, 50, 100, 250, 500]\n\t},\n\tsecond: {\n\t\tcommon: true,\n\t\tsize: 1000,\n\t\tsteps: [1, 2, 5, 10, 15, 30]\n\t},\n\tminute: {\n\t\tcommon: true,\n\t\tsize: 60000,\n\t\tsteps: [1, 2, 5, 10, 15, 30]\n\t},\n\thour: {\n\t\tcommon: true,\n\t\tsize: 3600000,\n\t\tsteps: [1, 2, 3, 6, 12]\n\t},\n\tday: {\n\t\tcommon: true,\n\t\tsize: 86400000,\n\t\tsteps: [1, 2, 5]\n\t},\n\tweek: {\n\t\tcommon: false,\n\t\tsize: 604800000,\n\t\tsteps: [1, 2, 3, 4]\n\t},\n\tmonth: {\n\t\tcommon: true,\n\t\tsize: 2.628e9,\n\t\tsteps: [1, 2, 3]\n\t},\n\tquarter: {\n\t\tcommon: false,\n\t\tsize: 7.884e9,\n\t\tsteps: [1, 2, 3, 4]\n\t},\n\tyear: {\n\t\tcommon: true,\n\t\tsize: 3.154e10\n\t}\n};\n\nvar UNITS = Object.keys(INTERVALS);\n\nfunction sorter(a, b) {\n\treturn a - b;\n}\n\nfunction arrayUnique(items) {\n\tvar hash = {};\n\tvar out = [];\n\tvar i, ilen, item;\n\n\tfor (i = 0, ilen = items.length; i < ilen; ++i) {\n\t\titem = items[i];\n\t\tif (!hash[item]) {\n\t\t\thash[item] = true;\n\t\t\tout.push(item);\n\t\t}\n\t}\n\n\treturn out;\n}\n\n/**\n * Returns an array of {time, pos} objects used to interpolate a specific `time` or position\n * (`pos`) on the scale, by searching entries before and after the requested value. `pos` is\n * a decimal between 0 and 1: 0 being the start of the scale (left or top) and 1 the other\n * extremity (left + width or top + height). Note that it would be more optimized to directly\n * store pre-computed pixels, but the scale dimensions are not guaranteed at the time we need\n * to create the lookup table. The table ALWAYS contains at least two items: min and max.\n *\n * @param {number[]} timestamps - timestamps sorted from lowest to highest.\n * @param {string} distribution - If 'linear', timestamps will be spread linearly along the min\n * and max range, so basically, the table will contains only two items: {min, 0} and {max, 1}.\n * If 'series', timestamps will be positioned at the same distance from each other. In this\n * case, only timestamps that break the time linearity are registered, meaning that in the\n * best case, all timestamps are linear, the table contains only min and max.\n */\nfunction buildLookupTable(timestamps, min, max, distribution) {\n\tif (distribution === 'linear' || !timestamps.length) {\n\t\treturn [\n\t\t\t{time: min, pos: 0},\n\t\t\t{time: max, pos: 1}\n\t\t];\n\t}\n\n\tvar table = [];\n\tvar items = [min];\n\tvar i, ilen, prev, curr, next;\n\n\tfor (i = 0, ilen = timestamps.length; i < ilen; ++i) {\n\t\tcurr = timestamps[i];\n\t\tif (curr > min && curr < max) {\n\t\t\titems.push(curr);\n\t\t}\n\t}\n\n\titems.push(max);\n\n\tfor (i = 0, ilen = items.length; i < ilen; ++i) {\n\t\tnext = items[i + 1];\n\t\tprev = items[i - 1];\n\t\tcurr = items[i];\n\n\t\t// only add points that breaks the scale linearity\n\t\tif (prev === undefined || next === undefined || Math.round((next + prev) / 2) !== curr) {\n\t\t\ttable.push({time: curr, pos: i / (ilen - 1)});\n\t\t}\n\t}\n\n\treturn table;\n}\n\n// @see adapted from https://www.anujgakhar.com/2014/03/01/binary-search-in-javascript/\nfunction lookup(table, key, value) {\n\tvar lo = 0;\n\tvar hi = table.length - 1;\n\tvar mid, i0, i1;\n\n\twhile (lo >= 0 && lo <= hi) {\n\t\tmid = (lo + hi) >> 1;\n\t\ti0 = table[mid - 1] || null;\n\t\ti1 = table[mid];\n\n\t\tif (!i0) {\n\t\t\t// given value is outside table (before first item)\n\t\t\treturn {lo: null, hi: i1};\n\t\t} else if (i1[key] < value) {\n\t\t\tlo = mid + 1;\n\t\t} else if (i0[key] > value) {\n\t\t\thi = mid - 1;\n\t\t} else {\n\t\t\treturn {lo: i0, hi: i1};\n\t\t}\n\t}\n\n\t// given value is outside table (after last item)\n\treturn {lo: i1, hi: null};\n}\n\n/**\n * Linearly interpolates the given source `value` using the table items `skey` values and\n * returns the associated `tkey` value. For example, interpolate(table, 'time', 42, 'pos')\n * returns the position for a timestamp equal to 42. If value is out of bounds, values at\n * index [0, 1] or [n - 1, n] are used for the interpolation.\n */\nfunction interpolate$1(table, skey, sval, tkey) {\n\tvar range = lookup(table, skey, sval);\n\n\t// Note: the lookup table ALWAYS contains at least 2 items (min and max)\n\tvar prev = !range.lo ? table[0] : !range.hi ? table[table.length - 2] : range.lo;\n\tvar next = !range.lo ? table[1] : !range.hi ? table[table.length - 1] : range.hi;\n\n\tvar span = next[skey] - prev[skey];\n\tvar ratio = span ? (sval - prev[skey]) / span : 0;\n\tvar offset = (next[tkey] - prev[tkey]) * ratio;\n\n\treturn prev[tkey] + offset;\n}\n\nfunction toTimestamp(scale, input) {\n\tvar adapter = scale._adapter;\n\tvar options = scale.options.time;\n\tvar parser = options.parser;\n\tvar format = parser || options.format;\n\tvar value = input;\n\n\tif (typeof parser === 'function') {\n\t\tvalue = parser(value);\n\t}\n\n\t// Only parse if its not a timestamp already\n\tif (!helpers$1.isFinite(value)) {\n\t\tvalue = typeof format === 'string'\n\t\t\t? adapter.parse(value, format)\n\t\t\t: adapter.parse(value);\n\t}\n\n\tif (value !== null) {\n\t\treturn +value;\n\t}\n\n\t// Labels are in an incompatible format and no `parser` has been provided.\n\t// The user might still use the deprecated `format` option for parsing.\n\tif (!parser && typeof format === 'function') {\n\t\tvalue = format(input);\n\n\t\t// `format` could return something else than a timestamp, if so, parse it\n\t\tif (!helpers$1.isFinite(value)) {\n\t\t\tvalue = adapter.parse(value);\n\t\t}\n\t}\n\n\treturn value;\n}\n\nfunction parse(scale, input) {\n\tif (helpers$1.isNullOrUndef(input)) {\n\t\treturn null;\n\t}\n\n\tvar options = scale.options.time;\n\tvar value = toTimestamp(scale, scale.getRightValue(input));\n\tif (value === null) {\n\t\treturn value;\n\t}\n\n\tif (options.round) {\n\t\tvalue = +scale._adapter.startOf(value, options.round);\n\t}\n\n\treturn value;\n}\n\n/**\n * Returns the number of unit to skip to be able to display up to `capacity` number of ticks\n * in `unit` for the given `min` / `max` range and respecting the interval steps constraints.\n */\nfunction determineStepSize(min, max, unit, capacity) {\n\tvar range = max - min;\n\tvar interval = INTERVALS[unit];\n\tvar milliseconds = interval.size;\n\tvar steps = interval.steps;\n\tvar i, ilen, factor;\n\n\tif (!steps) {\n\t\treturn Math.ceil(range / (capacity * milliseconds));\n\t}\n\n\tfor (i = 0, ilen = steps.length; i < ilen; ++i) {\n\t\tfactor = steps[i];\n\t\tif (Math.ceil(range / (milliseconds * factor)) <= capacity) {\n\t\t\tbreak;\n\t\t}\n\t}\n\n\treturn factor;\n}\n\n/**\n * Figures out what unit results in an appropriate number of auto-generated ticks\n */\nfunction determineUnitForAutoTicks(minUnit, min, max, capacity) {\n\tvar ilen = UNITS.length;\n\tvar i, interval, factor;\n\n\tfor (i = UNITS.indexOf(minUnit); i < ilen - 1; ++i) {\n\t\tinterval = INTERVALS[UNITS[i]];\n\t\tfactor = interval.steps ? interval.steps[interval.steps.length - 1] : MAX_INTEGER;\n\n\t\tif (interval.common && Math.ceil((max - min) / (factor * interval.size)) <= capacity) {\n\t\t\treturn UNITS[i];\n\t\t}\n\t}\n\n\treturn UNITS[ilen - 1];\n}\n\n/**\n * Figures out what unit to format a set of ticks with\n */\nfunction determineUnitForFormatting(scale, ticks, minUnit, min, max) {\n\tvar ilen = UNITS.length;\n\tvar i, unit;\n\n\tfor (i = ilen - 1; i >= UNITS.indexOf(minUnit); i--) {\n\t\tunit = UNITS[i];\n\t\tif (INTERVALS[unit].common && scale._adapter.diff(max, min, unit) >= ticks.length) {\n\t\t\treturn unit;\n\t\t}\n\t}\n\n\treturn UNITS[minUnit ? UNITS.indexOf(minUnit) : 0];\n}\n\nfunction determineMajorUnit(unit) {\n\tfor (var i = UNITS.indexOf(unit) + 1, ilen = UNITS.length; i < ilen; ++i) {\n\t\tif (INTERVALS[UNITS[i]].common) {\n\t\t\treturn UNITS[i];\n\t\t}\n\t}\n}\n\n/**\n * Generates a maximum of `capacity` timestamps between min and max, rounded to the\n * `minor` unit, aligned on the `major` unit and using the given scale time `options`.\n * Important: this method can return ticks outside the min and max range, it's the\n * responsibility of the calling code to clamp values if needed.\n */\nfunction generate(scale, min, max, capacity) {\n\tvar adapter = scale._adapter;\n\tvar options = scale.options;\n\tvar timeOpts = options.time;\n\tvar minor = timeOpts.unit || determineUnitForAutoTicks(timeOpts.minUnit, min, max, capacity);\n\tvar major = determineMajorUnit(minor);\n\tvar stepSize = valueOrDefault$c(timeOpts.stepSize, timeOpts.unitStepSize);\n\tvar weekday = minor === 'week' ? timeOpts.isoWeekday : false;\n\tvar majorTicksEnabled = options.ticks.major.enabled;\n\tvar interval = INTERVALS[minor];\n\tvar first = min;\n\tvar last = max;\n\tvar ticks = [];\n\tvar time;\n\n\tif (!stepSize) {\n\t\tstepSize = determineStepSize(min, max, minor, capacity);\n\t}\n\n\t// For 'week' unit, handle the first day of week option\n\tif (weekday) {\n\t\tfirst = +adapter.startOf(first, 'isoWeek', weekday);\n\t\tlast = +adapter.startOf(last, 'isoWeek', weekday);\n\t}\n\n\t// Align first/last ticks on unit\n\tfirst = +adapter.startOf(first, weekday ? 'day' : minor);\n\tlast = +adapter.startOf(last, weekday ? 'day' : minor);\n\n\t// Make sure that the last tick include max\n\tif (last < max) {\n\t\tlast = +adapter.add(last, 1, minor);\n\t}\n\n\ttime = first;\n\n\tif (majorTicksEnabled && major && !weekday && !timeOpts.round) {\n\t\t// Align the first tick on the previous `minor` unit aligned on the `major` unit:\n\t\t// we first aligned time on the previous `major` unit then add the number of full\n\t\t// stepSize there is between first and the previous major time.\n\t\ttime = +adapter.startOf(time, major);\n\t\ttime = +adapter.add(time, ~~((first - time) / (interval.size * stepSize)) * stepSize, minor);\n\t}\n\n\tfor (; time < last; time = +adapter.add(time, stepSize, minor)) {\n\t\tticks.push(+time);\n\t}\n\n\tticks.push(+time);\n\n\treturn ticks;\n}\n\n/**\n * Returns the start and end offsets from edges in the form of {start, end}\n * where each value is a relative width to the scale and ranges between 0 and 1.\n * They add extra margins on the both sides by scaling down the original scale.\n * Offsets are added when the `offset` option is true.\n */\nfunction computeOffsets(table, ticks, min, max, options) {\n\tvar start = 0;\n\tvar end = 0;\n\tvar first, last;\n\n\tif (options.offset && ticks.length) {\n\t\tif (!options.time.min) {\n\t\t\tfirst = interpolate$1(table, 'time', ticks[0], 'pos');\n\t\t\tif (ticks.length === 1) {\n\t\t\t\tstart = 1 - first;\n\t\t\t} else {\n\t\t\t\tstart = (interpolate$1(table, 'time', ticks[1], 'pos') - first) / 2;\n\t\t\t}\n\t\t}\n\t\tif (!options.time.max) {\n\t\t\tlast = interpolate$1(table, 'time', ticks[ticks.length - 1], 'pos');\n\t\t\tif (ticks.length === 1) {\n\t\t\t\tend = last;\n\t\t\t} else {\n\t\t\t\tend = (last - interpolate$1(table, 'time', ticks[ticks.length - 2], 'pos')) / 2;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn {start: start, end: end};\n}\n\nfunction ticksFromTimestamps(scale, values, majorUnit) {\n\tvar ticks = [];\n\tvar i, ilen, value, major;\n\n\tfor (i = 0, ilen = values.length; i < ilen; ++i) {\n\t\tvalue = values[i];\n\t\tmajor = majorUnit ? value === +scale._adapter.startOf(value, majorUnit) : false;\n\n\t\tticks.push({\n\t\t\tvalue: value,\n\t\t\tmajor: major\n\t\t});\n\t}\n\n\treturn ticks;\n}\n\nvar defaultConfig$4 = {\n\tposition: 'bottom',\n\n\t/**\n\t * Data distribution along the scale:\n\t * - 'linear': data are spread according to their time (distances can vary),\n\t * - 'series': data are spread at the same distance from each other.\n\t * @see https://github.com/chartjs/Chart.js/pull/4507\n\t * @since 2.7.0\n\t */\n\tdistribution: 'linear',\n\n\t/**\n\t * Scale boundary strategy (bypassed by min/max time options)\n\t * - `data`: make sure data are fully visible, ticks outside are removed\n\t * - `ticks`: make sure ticks are fully visible, data outside are truncated\n\t * @see https://github.com/chartjs/Chart.js/pull/4556\n\t * @since 2.7.0\n\t */\n\tbounds: 'data',\n\n\tadapters: {},\n\ttime: {\n\t\tparser: false, // false == a pattern string from https://momentjs.com/docs/#/parsing/string-format/ or a custom callback that converts its argument to a moment\n\t\tformat: false, // DEPRECATED false == date objects, moment object, callback or a pattern string from https://momentjs.com/docs/#/parsing/string-format/\n\t\tunit: false, // false == automatic or override with week, month, year, etc.\n\t\tround: false, // none, or override with week, month, year, etc.\n\t\tdisplayFormat: false, // DEPRECATED\n\t\tisoWeekday: false, // override week start day - see https://momentjs.com/docs/#/get-set/iso-weekday/\n\t\tminUnit: 'millisecond',\n\t\tdisplayFormats: {}\n\t},\n\tticks: {\n\t\tautoSkip: false,\n\n\t\t/**\n\t\t * Ticks generation input values:\n\t\t * - 'auto': generates \"optimal\" ticks based on scale size and time options.\n\t\t * - 'data': generates ticks from data (including labels from data {t|x|y} objects).\n\t\t * - 'labels': generates ticks from user given `data.labels` values ONLY.\n\t\t * @see https://github.com/chartjs/Chart.js/pull/4507\n\t\t * @since 2.7.0\n\t\t */\n\t\tsource: 'auto',\n\n\t\tmajor: {\n\t\t\tenabled: false\n\t\t}\n\t}\n};\n\nvar scale_time = core_scale.extend({\n\tinitialize: function() {\n\t\tthis.mergeTicksOptions();\n\t\tcore_scale.prototype.initialize.call(this);\n\t},\n\n\tupdate: function() {\n\t\tvar me = this;\n\t\tvar options = me.options;\n\t\tvar time = options.time || (options.time = {});\n\t\tvar adapter = me._adapter = new core_adapters._date(options.adapters.date);\n\n\t\t// DEPRECATIONS: output a message only one time per update\n\t\tif (time.format) {\n\t\t\tconsole.warn('options.time.format is deprecated and replaced by options.time.parser.');\n\t\t}\n\n\t\t// Backward compatibility: before introducing adapter, `displayFormats` was\n\t\t// supposed to contain *all* unit/string pairs but this can't be resolved\n\t\t// when loading the scale (adapters are loaded afterward), so let's populate\n\t\t// missing formats on update\n\t\thelpers$1.mergeIf(time.displayFormats, adapter.formats());\n\n\t\treturn core_scale.prototype.update.apply(me, arguments);\n\t},\n\n\t/**\n\t * Allows data to be referenced via 't' attribute\n\t */\n\tgetRightValue: function(rawValue) {\n\t\tif (rawValue && rawValue.t !== undefined) {\n\t\t\trawValue = rawValue.t;\n\t\t}\n\t\treturn core_scale.prototype.getRightValue.call(this, rawValue);\n\t},\n\n\tdetermineDataLimits: function() {\n\t\tvar me = this;\n\t\tvar chart = me.chart;\n\t\tvar adapter = me._adapter;\n\t\tvar timeOpts = me.options.time;\n\t\tvar unit = timeOpts.unit || 'day';\n\t\tvar min = MAX_INTEGER;\n\t\tvar max = MIN_INTEGER;\n\t\tvar timestamps = [];\n\t\tvar datasets = [];\n\t\tvar labels = [];\n\t\tvar i, j, ilen, jlen, data, timestamp;\n\t\tvar dataLabels = chart.data.labels || [];\n\n\t\t// Convert labels to timestamps\n\t\tfor (i = 0, ilen = dataLabels.length; i < ilen; ++i) {\n\t\t\tlabels.push(parse(me, dataLabels[i]));\n\t\t}\n\n\t\t// Convert data to timestamps\n\t\tfor (i = 0, ilen = (chart.data.datasets || []).length; i < ilen; ++i) {\n\t\t\tif (chart.isDatasetVisible(i)) {\n\t\t\t\tdata = chart.data.datasets[i].data;\n\n\t\t\t\t// Let's consider that all data have the same format.\n\t\t\t\tif (helpers$1.isObject(data[0])) {\n\t\t\t\t\tdatasets[i] = [];\n\n\t\t\t\t\tfor (j = 0, jlen = data.length; j < jlen; ++j) {\n\t\t\t\t\t\ttimestamp = parse(me, data[j]);\n\t\t\t\t\t\ttimestamps.push(timestamp);\n\t\t\t\t\t\tdatasets[i][j] = timestamp;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tfor (j = 0, jlen = labels.length; j < jlen; ++j) {\n\t\t\t\t\t\ttimestamps.push(labels[j]);\n\t\t\t\t\t}\n\t\t\t\t\tdatasets[i] = labels.slice(0);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tdatasets[i] = [];\n\t\t\t}\n\t\t}\n\n\t\tif (labels.length) {\n\t\t\t// Sort labels **after** data have been converted\n\t\t\tlabels = arrayUnique(labels).sort(sorter);\n\t\t\tmin = Math.min(min, labels[0]);\n\t\t\tmax = Math.max(max, labels[labels.length - 1]);\n\t\t}\n\n\t\tif (timestamps.length) {\n\t\t\ttimestamps = arrayUnique(timestamps).sort(sorter);\n\t\t\tmin = Math.min(min, timestamps[0]);\n\t\t\tmax = Math.max(max, timestamps[timestamps.length - 1]);\n\t\t}\n\n\t\tmin = parse(me, timeOpts.min) || min;\n\t\tmax = parse(me, timeOpts.max) || max;\n\n\t\t// In case there is no valid min/max, set limits based on unit time option\n\t\tmin = min === MAX_INTEGER ? +adapter.startOf(Date.now(), unit) : min;\n\t\tmax = max === MIN_INTEGER ? +adapter.endOf(Date.now(), unit) + 1 : max;\n\n\t\t// Make sure that max is strictly higher than min (required by the lookup table)\n\t\tme.min = Math.min(min, max);\n\t\tme.max = Math.max(min + 1, max);\n\n\t\t// PRIVATE\n\t\tme._horizontal = me.isHorizontal();\n\t\tme._table = [];\n\t\tme._timestamps = {\n\t\t\tdata: timestamps,\n\t\t\tdatasets: datasets,\n\t\t\tlabels: labels\n\t\t};\n\t},\n\n\tbuildTicks: function() {\n\t\tvar me = this;\n\t\tvar min = me.min;\n\t\tvar max = me.max;\n\t\tvar options = me.options;\n\t\tvar timeOpts = options.time;\n\t\tvar timestamps = [];\n\t\tvar ticks = [];\n\t\tvar i, ilen, timestamp;\n\n\t\tswitch (options.ticks.source) {\n\t\tcase 'data':\n\t\t\ttimestamps = me._timestamps.data;\n\t\t\tbreak;\n\t\tcase 'labels':\n\t\t\ttimestamps = me._timestamps.labels;\n\t\t\tbreak;\n\t\tcase 'auto':\n\t\tdefault:\n\t\t\ttimestamps = generate(me, min, max, me.getLabelCapacity(min), options);\n\t\t}\n\n\t\tif (options.bounds === 'ticks' && timestamps.length) {\n\t\t\tmin = timestamps[0];\n\t\t\tmax = timestamps[timestamps.length - 1];\n\t\t}\n\n\t\t// Enforce limits with user min/max options\n\t\tmin = parse(me, timeOpts.min) || min;\n\t\tmax = parse(me, timeOpts.max) || max;\n\n\t\t// Remove ticks outside the min/max range\n\t\tfor (i = 0, ilen = timestamps.length; i < ilen; ++i) {\n\t\t\ttimestamp = timestamps[i];\n\t\t\tif (timestamp >= min && timestamp <= max) {\n\t\t\t\tticks.push(timestamp);\n\t\t\t}\n\t\t}\n\n\t\tme.min = min;\n\t\tme.max = max;\n\n\t\t// PRIVATE\n\t\tme._unit = timeOpts.unit || determineUnitForFormatting(me, ticks, timeOpts.minUnit, me.min, me.max);\n\t\tme._majorUnit = determineMajorUnit(me._unit);\n\t\tme._table = buildLookupTable(me._timestamps.data, min, max, options.distribution);\n\t\tme._offsets = computeOffsets(me._table, ticks, min, max, options);\n\n\t\tif (options.ticks.reverse) {\n\t\t\tticks.reverse();\n\t\t}\n\n\t\treturn ticksFromTimestamps(me, ticks, me._majorUnit);\n\t},\n\n\tgetLabelForIndex: function(index, datasetIndex) {\n\t\tvar me = this;\n\t\tvar adapter = me._adapter;\n\t\tvar data = me.chart.data;\n\t\tvar timeOpts = me.options.time;\n\t\tvar label = data.labels && index < data.labels.length ? data.labels[index] : '';\n\t\tvar value = data.datasets[datasetIndex].data[index];\n\n\t\tif (helpers$1.isObject(value)) {\n\t\t\tlabel = me.getRightValue(value);\n\t\t}\n\t\tif (timeOpts.tooltipFormat) {\n\t\t\treturn adapter.format(toTimestamp(me, label), timeOpts.tooltipFormat);\n\t\t}\n\t\tif (typeof label === 'string') {\n\t\t\treturn label;\n\t\t}\n\t\treturn adapter.format(toTimestamp(me, label), timeOpts.displayFormats.datetime);\n\t},\n\n\t/**\n\t * Function to format an individual tick mark\n\t * @private\n\t */\n\ttickFormatFunction: function(time, index, ticks, format) {\n\t\tvar me = this;\n\t\tvar adapter = me._adapter;\n\t\tvar options = me.options;\n\t\tvar formats = options.time.displayFormats;\n\t\tvar minorFormat = formats[me._unit];\n\t\tvar majorUnit = me._majorUnit;\n\t\tvar majorFormat = formats[majorUnit];\n\t\tvar majorTime = +adapter.startOf(time, majorUnit);\n\t\tvar majorTickOpts = options.ticks.major;\n\t\tvar major = majorTickOpts.enabled && majorUnit && majorFormat && time === majorTime;\n\t\tvar label = adapter.format(time, format ? format : major ? majorFormat : minorFormat);\n\t\tvar tickOpts = major ? majorTickOpts : options.ticks.minor;\n\t\tvar formatter = valueOrDefault$c(tickOpts.callback, tickOpts.userCallback);\n\n\t\treturn formatter ? formatter(label, index, ticks) : label;\n\t},\n\n\tconvertTicksToLabels: function(ticks) {\n\t\tvar labels = [];\n\t\tvar i, ilen;\n\n\t\tfor (i = 0, ilen = ticks.length; i < ilen; ++i) {\n\t\t\tlabels.push(this.tickFormatFunction(ticks[i].value, i, ticks));\n\t\t}\n\n\t\treturn labels;\n\t},\n\n\t/**\n\t * @private\n\t */\n\tgetPixelForOffset: function(time) {\n\t\tvar me = this;\n\t\tvar isReverse = me.options.ticks.reverse;\n\t\tvar size = me._horizontal ? me.width : me.height;\n\t\tvar start = me._horizontal ? isReverse ? me.right : me.left : isReverse ? me.bottom : me.top;\n\t\tvar pos = interpolate$1(me._table, 'time', time, 'pos');\n\t\tvar offset = size * (me._offsets.start + pos) / (me._offsets.start + 1 + me._offsets.end);\n\n\t\treturn isReverse ? start - offset : start + offset;\n\t},\n\n\tgetPixelForValue: function(value, index, datasetIndex) {\n\t\tvar me = this;\n\t\tvar time = null;\n\n\t\tif (index !== undefined && datasetIndex !== undefined) {\n\t\t\ttime = me._timestamps.datasets[datasetIndex][index];\n\t\t}\n\n\t\tif (time === null) {\n\t\t\ttime = parse(me, value);\n\t\t}\n\n\t\tif (time !== null) {\n\t\t\treturn me.getPixelForOffset(time);\n\t\t}\n\t},\n\n\tgetPixelForTick: function(index) {\n\t\tvar ticks = this.getTicks();\n\t\treturn index >= 0 && index < ticks.length ?\n\t\t\tthis.getPixelForOffset(ticks[index].value) :\n\t\t\tnull;\n\t},\n\n\tgetValueForPixel: function(pixel) {\n\t\tvar me = this;\n\t\tvar size = me._horizontal ? me.width : me.height;\n\t\tvar start = me._horizontal ? me.left : me.top;\n\t\tvar pos = (size ? (pixel - start) / size : 0) * (me._offsets.start + 1 + me._offsets.start) - me._offsets.end;\n\t\tvar time = interpolate$1(me._table, 'pos', pos, 'time');\n\n\t\t// DEPRECATION, we should return time directly\n\t\treturn me._adapter._create(time);\n\t},\n\n\t/**\n\t * Crude approximation of what the label width might be\n\t * @private\n\t */\n\tgetLabelWidth: function(label) {\n\t\tvar me = this;\n\t\tvar ticksOpts = me.options.ticks;\n\t\tvar tickLabelWidth = me.ctx.measureText(label).width;\n\t\tvar angle = helpers$1.toRadians(ticksOpts.maxRotation);\n\t\tvar cosRotation = Math.cos(angle);\n\t\tvar sinRotation = Math.sin(angle);\n\t\tvar tickFontSize = valueOrDefault$c(ticksOpts.fontSize, core_defaults.global.defaultFontSize);\n\n\t\treturn (tickLabelWidth * cosRotation) + (tickFontSize * sinRotation);\n\t},\n\n\t/**\n\t * @private\n\t */\n\tgetLabelCapacity: function(exampleTime) {\n\t\tvar me = this;\n\n\t\t// pick the longest format (milliseconds) for guestimation\n\t\tvar format = me.options.time.displayFormats.millisecond;\n\t\tvar exampleLabel = me.tickFormatFunction(exampleTime, 0, [], format);\n\t\tvar tickLabelWidth = me.getLabelWidth(exampleLabel);\n\t\tvar innerWidth = me.isHorizontal() ? me.width : me.height;\n\t\tvar capacity = Math.floor(innerWidth / tickLabelWidth);\n\n\t\treturn capacity > 0 ? capacity : 1;\n\t}\n});\n\n// INTERNAL: static default options, registered in src/index.js\nvar _defaults$4 = defaultConfig$4;\nscale_time._defaults = _defaults$4;\n\nvar scales = {\n\tcategory: scale_category,\n\tlinear: scale_linear,\n\tlogarithmic: scale_logarithmic,\n\tradialLinear: scale_radialLinear,\n\ttime: scale_time\n};\n\nvar FORMATS = {\n\tdatetime: 'MMM D, YYYY, h:mm:ss a',\n\tmillisecond: 'h:mm:ss.SSS a',\n\tsecond: 'h:mm:ss a',\n\tminute: 'h:mm a',\n\thour: 'hA',\n\tday: 'MMM D',\n\tweek: 'll',\n\tmonth: 'MMM YYYY',\n\tquarter: '[Q]Q - YYYY',\n\tyear: 'YYYY'\n};\n\ncore_adapters._date.override(typeof moment === 'function' ? {\n\t_id: 'moment', // DEBUG ONLY\n\n\tformats: function() {\n\t\treturn FORMATS;\n\t},\n\n\tparse: function(value, format) {\n\t\tif (typeof value === 'string' && typeof format === 'string') {\n\t\t\tvalue = moment(value, format);\n\t\t} else if (!(value instanceof moment)) {\n\t\t\tvalue = moment(value);\n\t\t}\n\t\treturn value.isValid() ? value.valueOf() : null;\n\t},\n\n\tformat: function(time, format) {\n\t\treturn moment(time).format(format);\n\t},\n\n\tadd: function(time, amount, unit) {\n\t\treturn moment(time).add(amount, unit).valueOf();\n\t},\n\n\tdiff: function(max, min, unit) {\n\t\treturn moment.duration(moment(max).diff(moment(min))).as(unit);\n\t},\n\n\tstartOf: function(time, unit, weekday) {\n\t\ttime = moment(time);\n\t\tif (unit === 'isoWeek') {\n\t\t\treturn time.isoWeekday(weekday).valueOf();\n\t\t}\n\t\treturn time.startOf(unit).valueOf();\n\t},\n\n\tendOf: function(time, unit) {\n\t\treturn moment(time).endOf(unit).valueOf();\n\t},\n\n\t// DEPRECATIONS\n\n\t/**\n\t * Provided for backward compatibility with scale.getValueForPixel().\n\t * @deprecated since version 2.8.0\n\t * @todo remove at version 3\n\t * @private\n\t */\n\t_create: function(time) {\n\t\treturn moment(time);\n\t},\n} : {});\n\ncore_defaults._set('global', {\n\tplugins: {\n\t\tfiller: {\n\t\t\tpropagate: true\n\t\t}\n\t}\n});\n\nvar mappers = {\n\tdataset: function(source) {\n\t\tvar index = source.fill;\n\t\tvar chart = source.chart;\n\t\tvar meta = chart.getDatasetMeta(index);\n\t\tvar visible = meta && chart.isDatasetVisible(index);\n\t\tvar points = (visible && meta.dataset._children) || [];\n\t\tvar length = points.length || 0;\n\n\t\treturn !length ? null : function(point, i) {\n\t\t\treturn (i < length && points[i]._view) || null;\n\t\t};\n\t},\n\n\tboundary: function(source) {\n\t\tvar boundary = source.boundary;\n\t\tvar x = boundary ? boundary.x : null;\n\t\tvar y = boundary ? boundary.y : null;\n\n\t\treturn function(point) {\n\t\t\treturn {\n\t\t\t\tx: x === null ? point.x : x,\n\t\t\t\ty: y === null ? point.y : y,\n\t\t\t};\n\t\t};\n\t}\n};\n\n// @todo if (fill[0] === '#')\nfunction decodeFill(el, index, count) {\n\tvar model = el._model || {};\n\tvar fill = model.fill;\n\tvar target;\n\n\tif (fill === undefined) {\n\t\tfill = !!model.backgroundColor;\n\t}\n\n\tif (fill === false || fill === null) {\n\t\treturn false;\n\t}\n\n\tif (fill === true) {\n\t\treturn 'origin';\n\t}\n\n\ttarget = parseFloat(fill, 10);\n\tif (isFinite(target) && Math.floor(target) === target) {\n\t\tif (fill[0] === '-' || fill[0] === '+') {\n\t\t\ttarget = index + target;\n\t\t}\n\n\t\tif (target === index || target < 0 || target >= count) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn target;\n\t}\n\n\tswitch (fill) {\n\t// compatibility\n\tcase 'bottom':\n\t\treturn 'start';\n\tcase 'top':\n\t\treturn 'end';\n\tcase 'zero':\n\t\treturn 'origin';\n\t// supported boundaries\n\tcase 'origin':\n\tcase 'start':\n\tcase 'end':\n\t\treturn fill;\n\t// invalid fill values\n\tdefault:\n\t\treturn false;\n\t}\n}\n\nfunction computeBoundary(source) {\n\tvar model = source.el._model || {};\n\tvar scale = source.el._scale || {};\n\tvar fill = source.fill;\n\tvar target = null;\n\tvar horizontal;\n\n\tif (isFinite(fill)) {\n\t\treturn null;\n\t}\n\n\t// Backward compatibility: until v3, we still need to support boundary values set on\n\t// the model (scaleTop, scaleBottom and scaleZero) because some external plugins and\n\t// controllers might still use it (e.g. the Smith chart).\n\n\tif (fill === 'start') {\n\t\ttarget = model.scaleBottom === undefined ? scale.bottom : model.scaleBottom;\n\t} else if (fill === 'end') {\n\t\ttarget = model.scaleTop === undefined ? scale.top : model.scaleTop;\n\t} else if (model.scaleZero !== undefined) {\n\t\ttarget = model.scaleZero;\n\t} else if (scale.getBasePosition) {\n\t\ttarget = scale.getBasePosition();\n\t} else if (scale.getBasePixel) {\n\t\ttarget = scale.getBasePixel();\n\t}\n\n\tif (target !== undefined && target !== null) {\n\t\tif (target.x !== undefined && target.y !== undefined) {\n\t\t\treturn target;\n\t\t}\n\n\t\tif (helpers$1.isFinite(target)) {\n\t\t\thorizontal = scale.isHorizontal();\n\t\t\treturn {\n\t\t\t\tx: horizontal ? target : null,\n\t\t\t\ty: horizontal ? null : target\n\t\t\t};\n\t\t}\n\t}\n\n\treturn null;\n}\n\nfunction resolveTarget(sources, index, propagate) {\n\tvar source = sources[index];\n\tvar fill = source.fill;\n\tvar visited = [index];\n\tvar target;\n\n\tif (!propagate) {\n\t\treturn fill;\n\t}\n\n\twhile (fill !== false && visited.indexOf(fill) === -1) {\n\t\tif (!isFinite(fill)) {\n\t\t\treturn fill;\n\t\t}\n\n\t\ttarget = sources[fill];\n\t\tif (!target) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (target.visible) {\n\t\t\treturn fill;\n\t\t}\n\n\t\tvisited.push(fill);\n\t\tfill = target.fill;\n\t}\n\n\treturn false;\n}\n\nfunction createMapper(source) {\n\tvar fill = source.fill;\n\tvar type = 'dataset';\n\n\tif (fill === false) {\n\t\treturn null;\n\t}\n\n\tif (!isFinite(fill)) {\n\t\ttype = 'boundary';\n\t}\n\n\treturn mappers[type](source);\n}\n\nfunction isDrawable(point) {\n\treturn point && !point.skip;\n}\n\nfunction drawArea(ctx, curve0, curve1, len0, len1) {\n\tvar i;\n\n\tif (!len0 || !len1) {\n\t\treturn;\n\t}\n\n\t// building first area curve (normal)\n\tctx.moveTo(curve0[0].x, curve0[0].y);\n\tfor (i = 1; i < len0; ++i) {\n\t\thelpers$1.canvas.lineTo(ctx, curve0[i - 1], curve0[i]);\n\t}\n\n\t// joining the two area curves\n\tctx.lineTo(curve1[len1 - 1].x, curve1[len1 - 1].y);\n\n\t// building opposite area curve (reverse)\n\tfor (i = len1 - 1; i > 0; --i) {\n\t\thelpers$1.canvas.lineTo(ctx, curve1[i], curve1[i - 1], true);\n\t}\n}\n\nfunction doFill(ctx, points, mapper, view, color, loop) {\n\tvar count = points.length;\n\tvar span = view.spanGaps;\n\tvar curve0 = [];\n\tvar curve1 = [];\n\tvar len0 = 0;\n\tvar len1 = 0;\n\tvar i, ilen, index, p0, p1, d0, d1;\n\n\tctx.beginPath();\n\n\tfor (i = 0, ilen = (count + !!loop); i < ilen; ++i) {\n\t\tindex = i % count;\n\t\tp0 = points[index]._view;\n\t\tp1 = mapper(p0, index, view);\n\t\td0 = isDrawable(p0);\n\t\td1 = isDrawable(p1);\n\n\t\tif (d0 && d1) {\n\t\t\tlen0 = curve0.push(p0);\n\t\t\tlen1 = curve1.push(p1);\n\t\t} else if (len0 && len1) {\n\t\t\tif (!span) {\n\t\t\t\tdrawArea(ctx, curve0, curve1, len0, len1);\n\t\t\t\tlen0 = len1 = 0;\n\t\t\t\tcurve0 = [];\n\t\t\t\tcurve1 = [];\n\t\t\t} else {\n\t\t\t\tif (d0) {\n\t\t\t\t\tcurve0.push(p0);\n\t\t\t\t}\n\t\t\t\tif (d1) {\n\t\t\t\t\tcurve1.push(p1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tdrawArea(ctx, curve0, curve1, len0, len1);\n\n\tctx.closePath();\n\tctx.fillStyle = color;\n\tctx.fill();\n}\n\nvar plugin_filler = {\n\tid: 'filler',\n\n\tafterDatasetsUpdate: function(chart, options) {\n\t\tvar count = (chart.data.datasets || []).length;\n\t\tvar propagate = options.propagate;\n\t\tvar sources = [];\n\t\tvar meta, i, el, source;\n\n\t\tfor (i = 0; i < count; ++i) {\n\t\t\tmeta = chart.getDatasetMeta(i);\n\t\t\tel = meta.dataset;\n\t\t\tsource = null;\n\n\t\t\tif (el && el._model && el instanceof elements.Line) {\n\t\t\t\tsource = {\n\t\t\t\t\tvisible: chart.isDatasetVisible(i),\n\t\t\t\t\tfill: decodeFill(el, i, count),\n\t\t\t\t\tchart: chart,\n\t\t\t\t\tel: el\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tmeta.$filler = source;\n\t\t\tsources.push(source);\n\t\t}\n\n\t\tfor (i = 0; i < count; ++i) {\n\t\t\tsource = sources[i];\n\t\t\tif (!source) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tsource.fill = resolveTarget(sources, i, propagate);\n\t\t\tsource.boundary = computeBoundary(source);\n\t\t\tsource.mapper = createMapper(source);\n\t\t}\n\t},\n\n\tbeforeDatasetDraw: function(chart, args) {\n\t\tvar meta = args.meta.$filler;\n\t\tif (!meta) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar ctx = chart.ctx;\n\t\tvar el = meta.el;\n\t\tvar view = el._view;\n\t\tvar points = el._children || [];\n\t\tvar mapper = meta.mapper;\n\t\tvar color = view.backgroundColor || core_defaults.global.defaultColor;\n\n\t\tif (mapper && color && points.length) {\n\t\t\thelpers$1.canvas.clipArea(ctx, chart.chartArea);\n\t\t\tdoFill(ctx, points, mapper, view, color, el._loop);\n\t\t\thelpers$1.canvas.unclipArea(ctx);\n\t\t}\n\t}\n};\n\nvar noop$1 = helpers$1.noop;\nvar valueOrDefault$d = helpers$1.valueOrDefault;\n\ncore_defaults._set('global', {\n\tlegend: {\n\t\tdisplay: true,\n\t\tposition: 'top',\n\t\tfullWidth: true,\n\t\treverse: false,\n\t\tweight: 1000,\n\n\t\t// a callback that will handle\n\t\tonClick: function(e, legendItem) {\n\t\t\tvar index = legendItem.datasetIndex;\n\t\t\tvar ci = this.chart;\n\t\t\tvar meta = ci.getDatasetMeta(index);\n\n\t\t\t// See controller.isDatasetVisible comment\n\t\t\tmeta.hidden = meta.hidden === null ? !ci.data.datasets[index].hidden : null;\n\n\t\t\t// We hid a dataset ... rerender the chart\n\t\t\tci.update();\n\t\t},\n\n\t\tonHover: null,\n\t\tonLeave: null,\n\n\t\tlabels: {\n\t\t\tboxWidth: 40,\n\t\t\tpadding: 10,\n\t\t\t// Generates labels shown in the legend\n\t\t\t// Valid properties to return:\n\t\t\t// text : text to display\n\t\t\t// fillStyle : fill of coloured box\n\t\t\t// strokeStyle: stroke of coloured box\n\t\t\t// hidden : if this legend item refers to a hidden item\n\t\t\t// lineCap : cap style for line\n\t\t\t// lineDash\n\t\t\t// lineDashOffset :\n\t\t\t// lineJoin :\n\t\t\t// lineWidth :\n\t\t\tgenerateLabels: function(chart) {\n\t\t\t\tvar data = chart.data;\n\t\t\t\treturn helpers$1.isArray(data.datasets) ? data.datasets.map(function(dataset, i) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\ttext: dataset.label,\n\t\t\t\t\t\tfillStyle: (!helpers$1.isArray(dataset.backgroundColor) ? dataset.backgroundColor : dataset.backgroundColor[0]),\n\t\t\t\t\t\thidden: !chart.isDatasetVisible(i),\n\t\t\t\t\t\tlineCap: dataset.borderCapStyle,\n\t\t\t\t\t\tlineDash: dataset.borderDash,\n\t\t\t\t\t\tlineDashOffset: dataset.borderDashOffset,\n\t\t\t\t\t\tlineJoin: dataset.borderJoinStyle,\n\t\t\t\t\t\tlineWidth: dataset.borderWidth,\n\t\t\t\t\t\tstrokeStyle: dataset.borderColor,\n\t\t\t\t\t\tpointStyle: dataset.pointStyle,\n\n\t\t\t\t\t\t// Below is extra data used for toggling the datasets\n\t\t\t\t\t\tdatasetIndex: i\n\t\t\t\t\t};\n\t\t\t\t}, this) : [];\n\t\t\t}\n\t\t}\n\t},\n\n\tlegendCallback: function(chart) {\n\t\tvar text = [];\n\t\ttext.push('');\n\t\treturn text.join('');\n\t}\n});\n\n/**\n * Helper function to get the box width based on the usePointStyle option\n * @param {object} labelopts - the label options on the legend\n * @param {number} fontSize - the label font size\n * @return {number} width of the color box area\n */\nfunction getBoxWidth(labelOpts, fontSize) {\n\treturn labelOpts.usePointStyle && labelOpts.boxWidth > fontSize ?\n\t\tfontSize :\n\t\tlabelOpts.boxWidth;\n}\n\n/**\n * IMPORTANT: this class is exposed publicly as Chart.Legend, backward compatibility required!\n */\nvar Legend = core_element.extend({\n\n\tinitialize: function(config) {\n\t\thelpers$1.extend(this, config);\n\n\t\t// Contains hit boxes for each dataset (in dataset order)\n\t\tthis.legendHitBoxes = [];\n\n\t\t/**\n \t\t * @private\n \t\t */\n\t\tthis._hoveredItem = null;\n\n\t\t// Are we in doughnut mode which has a different data type\n\t\tthis.doughnutMode = false;\n\t},\n\n\t// These methods are ordered by lifecycle. Utilities then follow.\n\t// Any function defined here is inherited by all legend types.\n\t// Any function can be extended by the legend type\n\n\tbeforeUpdate: noop$1,\n\tupdate: function(maxWidth, maxHeight, margins) {\n\t\tvar me = this;\n\n\t\t// Update Lifecycle - Probably don't want to ever extend or overwrite this function ;)\n\t\tme.beforeUpdate();\n\n\t\t// Absorb the master measurements\n\t\tme.maxWidth = maxWidth;\n\t\tme.maxHeight = maxHeight;\n\t\tme.margins = margins;\n\n\t\t// Dimensions\n\t\tme.beforeSetDimensions();\n\t\tme.setDimensions();\n\t\tme.afterSetDimensions();\n\t\t// Labels\n\t\tme.beforeBuildLabels();\n\t\tme.buildLabels();\n\t\tme.afterBuildLabels();\n\n\t\t// Fit\n\t\tme.beforeFit();\n\t\tme.fit();\n\t\tme.afterFit();\n\t\t//\n\t\tme.afterUpdate();\n\n\t\treturn me.minSize;\n\t},\n\tafterUpdate: noop$1,\n\n\t//\n\n\tbeforeSetDimensions: noop$1,\n\tsetDimensions: function() {\n\t\tvar me = this;\n\t\t// Set the unconstrained dimension before label rotation\n\t\tif (me.isHorizontal()) {\n\t\t\t// Reset position before calculating rotation\n\t\t\tme.width = me.maxWidth;\n\t\t\tme.left = 0;\n\t\t\tme.right = me.width;\n\t\t} else {\n\t\t\tme.height = me.maxHeight;\n\n\t\t\t// Reset position before calculating rotation\n\t\t\tme.top = 0;\n\t\t\tme.bottom = me.height;\n\t\t}\n\n\t\t// Reset padding\n\t\tme.paddingLeft = 0;\n\t\tme.paddingTop = 0;\n\t\tme.paddingRight = 0;\n\t\tme.paddingBottom = 0;\n\n\t\t// Reset minSize\n\t\tme.minSize = {\n\t\t\twidth: 0,\n\t\t\theight: 0\n\t\t};\n\t},\n\tafterSetDimensions: noop$1,\n\n\t//\n\n\tbeforeBuildLabels: noop$1,\n\tbuildLabels: function() {\n\t\tvar me = this;\n\t\tvar labelOpts = me.options.labels || {};\n\t\tvar legendItems = helpers$1.callback(labelOpts.generateLabels, [me.chart], me) || [];\n\n\t\tif (labelOpts.filter) {\n\t\t\tlegendItems = legendItems.filter(function(item) {\n\t\t\t\treturn labelOpts.filter(item, me.chart.data);\n\t\t\t});\n\t\t}\n\n\t\tif (me.options.reverse) {\n\t\t\tlegendItems.reverse();\n\t\t}\n\n\t\tme.legendItems = legendItems;\n\t},\n\tafterBuildLabels: noop$1,\n\n\t//\n\n\tbeforeFit: noop$1,\n\tfit: function() {\n\t\tvar me = this;\n\t\tvar opts = me.options;\n\t\tvar labelOpts = opts.labels;\n\t\tvar display = opts.display;\n\n\t\tvar ctx = me.ctx;\n\n\t\tvar labelFont = helpers$1.options._parseFont(labelOpts);\n\t\tvar fontSize = labelFont.size;\n\n\t\t// Reset hit boxes\n\t\tvar hitboxes = me.legendHitBoxes = [];\n\n\t\tvar minSize = me.minSize;\n\t\tvar isHorizontal = me.isHorizontal();\n\n\t\tif (isHorizontal) {\n\t\t\tminSize.width = me.maxWidth; // fill all the width\n\t\t\tminSize.height = display ? 10 : 0;\n\t\t} else {\n\t\t\tminSize.width = display ? 10 : 0;\n\t\t\tminSize.height = me.maxHeight; // fill all the height\n\t\t}\n\n\t\t// Increase sizes here\n\t\tif (display) {\n\t\t\tctx.font = labelFont.string;\n\n\t\t\tif (isHorizontal) {\n\t\t\t\t// Labels\n\n\t\t\t\t// Width of each line of legend boxes. Labels wrap onto multiple lines when there are too many to fit on one\n\t\t\t\tvar lineWidths = me.lineWidths = [0];\n\t\t\t\tvar totalHeight = 0;\n\n\t\t\t\tctx.textAlign = 'left';\n\t\t\t\tctx.textBaseline = 'top';\n\n\t\t\t\thelpers$1.each(me.legendItems, function(legendItem, i) {\n\t\t\t\t\tvar boxWidth = getBoxWidth(labelOpts, fontSize);\n\t\t\t\t\tvar width = boxWidth + (fontSize / 2) + ctx.measureText(legendItem.text).width;\n\n\t\t\t\t\tif (i === 0 || lineWidths[lineWidths.length - 1] + width + labelOpts.padding > minSize.width) {\n\t\t\t\t\t\ttotalHeight += fontSize + labelOpts.padding;\n\t\t\t\t\t\tlineWidths[lineWidths.length - (i > 0 ? 0 : 1)] = labelOpts.padding;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Store the hitbox width and height here. Final position will be updated in `draw`\n\t\t\t\t\thitboxes[i] = {\n\t\t\t\t\t\tleft: 0,\n\t\t\t\t\t\ttop: 0,\n\t\t\t\t\t\twidth: width,\n\t\t\t\t\t\theight: fontSize\n\t\t\t\t\t};\n\n\t\t\t\t\tlineWidths[lineWidths.length - 1] += width + labelOpts.padding;\n\t\t\t\t});\n\n\t\t\t\tminSize.height += totalHeight;\n\n\t\t\t} else {\n\t\t\t\tvar vPadding = labelOpts.padding;\n\t\t\t\tvar columnWidths = me.columnWidths = [];\n\t\t\t\tvar totalWidth = labelOpts.padding;\n\t\t\t\tvar currentColWidth = 0;\n\t\t\t\tvar currentColHeight = 0;\n\t\t\t\tvar itemHeight = fontSize + vPadding;\n\n\t\t\t\thelpers$1.each(me.legendItems, function(legendItem, i) {\n\t\t\t\t\tvar boxWidth = getBoxWidth(labelOpts, fontSize);\n\t\t\t\t\tvar itemWidth = boxWidth + (fontSize / 2) + ctx.measureText(legendItem.text).width;\n\n\t\t\t\t\t// If too tall, go to new column\n\t\t\t\t\tif (i > 0 && currentColHeight + itemHeight > minSize.height - vPadding) {\n\t\t\t\t\t\ttotalWidth += currentColWidth + labelOpts.padding;\n\t\t\t\t\t\tcolumnWidths.push(currentColWidth); // previous column width\n\n\t\t\t\t\t\tcurrentColWidth = 0;\n\t\t\t\t\t\tcurrentColHeight = 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Get max width\n\t\t\t\t\tcurrentColWidth = Math.max(currentColWidth, itemWidth);\n\t\t\t\t\tcurrentColHeight += itemHeight;\n\n\t\t\t\t\t// Store the hitbox width and height here. Final position will be updated in `draw`\n\t\t\t\t\thitboxes[i] = {\n\t\t\t\t\t\tleft: 0,\n\t\t\t\t\t\ttop: 0,\n\t\t\t\t\t\twidth: itemWidth,\n\t\t\t\t\t\theight: fontSize\n\t\t\t\t\t};\n\t\t\t\t});\n\n\t\t\t\ttotalWidth += currentColWidth;\n\t\t\t\tcolumnWidths.push(currentColWidth);\n\t\t\t\tminSize.width += totalWidth;\n\t\t\t}\n\t\t}\n\n\t\tme.width = minSize.width;\n\t\tme.height = minSize.height;\n\t},\n\tafterFit: noop$1,\n\n\t// Shared Methods\n\tisHorizontal: function() {\n\t\treturn this.options.position === 'top' || this.options.position === 'bottom';\n\t},\n\n\t// Actually draw the legend on the canvas\n\tdraw: function() {\n\t\tvar me = this;\n\t\tvar opts = me.options;\n\t\tvar labelOpts = opts.labels;\n\t\tvar globalDefaults = core_defaults.global;\n\t\tvar defaultColor = globalDefaults.defaultColor;\n\t\tvar lineDefault = globalDefaults.elements.line;\n\t\tvar legendWidth = me.width;\n\t\tvar lineWidths = me.lineWidths;\n\n\t\tif (opts.display) {\n\t\t\tvar ctx = me.ctx;\n\t\t\tvar fontColor = valueOrDefault$d(labelOpts.fontColor, globalDefaults.defaultFontColor);\n\t\t\tvar labelFont = helpers$1.options._parseFont(labelOpts);\n\t\t\tvar fontSize = labelFont.size;\n\t\t\tvar cursor;\n\n\t\t\t// Canvas setup\n\t\t\tctx.textAlign = 'left';\n\t\t\tctx.textBaseline = 'middle';\n\t\t\tctx.lineWidth = 0.5;\n\t\t\tctx.strokeStyle = fontColor; // for strikethrough effect\n\t\t\tctx.fillStyle = fontColor; // render in correct colour\n\t\t\tctx.font = labelFont.string;\n\n\t\t\tvar boxWidth = getBoxWidth(labelOpts, fontSize);\n\t\t\tvar hitboxes = me.legendHitBoxes;\n\n\t\t\t// current position\n\t\t\tvar drawLegendBox = function(x, y, legendItem) {\n\t\t\t\tif (isNaN(boxWidth) || boxWidth <= 0) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Set the ctx for the box\n\t\t\t\tctx.save();\n\n\t\t\t\tvar lineWidth = valueOrDefault$d(legendItem.lineWidth, lineDefault.borderWidth);\n\t\t\t\tctx.fillStyle = valueOrDefault$d(legendItem.fillStyle, defaultColor);\n\t\t\t\tctx.lineCap = valueOrDefault$d(legendItem.lineCap, lineDefault.borderCapStyle);\n\t\t\t\tctx.lineDashOffset = valueOrDefault$d(legendItem.lineDashOffset, lineDefault.borderDashOffset);\n\t\t\t\tctx.lineJoin = valueOrDefault$d(legendItem.lineJoin, lineDefault.borderJoinStyle);\n\t\t\t\tctx.lineWidth = lineWidth;\n\t\t\t\tctx.strokeStyle = valueOrDefault$d(legendItem.strokeStyle, defaultColor);\n\n\t\t\t\tif (ctx.setLineDash) {\n\t\t\t\t\t// IE 9 and 10 do not support line dash\n\t\t\t\t\tctx.setLineDash(valueOrDefault$d(legendItem.lineDash, lineDefault.borderDash));\n\t\t\t\t}\n\n\t\t\t\tif (opts.labels && opts.labels.usePointStyle) {\n\t\t\t\t\t// Recalculate x and y for drawPoint() because its expecting\n\t\t\t\t\t// x and y to be center of figure (instead of top left)\n\t\t\t\t\tvar radius = boxWidth * Math.SQRT2 / 2;\n\t\t\t\t\tvar centerX = x + boxWidth / 2;\n\t\t\t\t\tvar centerY = y + fontSize / 2;\n\n\t\t\t\t\t// Draw pointStyle as legend symbol\n\t\t\t\t\thelpers$1.canvas.drawPoint(ctx, legendItem.pointStyle, radius, centerX, centerY);\n\t\t\t\t} else {\n\t\t\t\t\t// Draw box as legend symbol\n\t\t\t\t\tif (lineWidth !== 0) {\n\t\t\t\t\t\tctx.strokeRect(x, y, boxWidth, fontSize);\n\t\t\t\t\t}\n\t\t\t\t\tctx.fillRect(x, y, boxWidth, fontSize);\n\t\t\t\t}\n\n\t\t\t\tctx.restore();\n\t\t\t};\n\t\t\tvar fillText = function(x, y, legendItem, textWidth) {\n\t\t\t\tvar halfFontSize = fontSize / 2;\n\t\t\t\tvar xLeft = boxWidth + halfFontSize + x;\n\t\t\t\tvar yMiddle = y + halfFontSize;\n\n\t\t\t\tctx.fillText(legendItem.text, xLeft, yMiddle);\n\n\t\t\t\tif (legendItem.hidden) {\n\t\t\t\t\t// Strikethrough the text if hidden\n\t\t\t\t\tctx.beginPath();\n\t\t\t\t\tctx.lineWidth = 2;\n\t\t\t\t\tctx.moveTo(xLeft, yMiddle);\n\t\t\t\t\tctx.lineTo(xLeft + textWidth, yMiddle);\n\t\t\t\t\tctx.stroke();\n\t\t\t\t}\n\t\t\t};\n\n\t\t\t// Horizontal\n\t\t\tvar isHorizontal = me.isHorizontal();\n\t\t\tif (isHorizontal) {\n\t\t\t\tcursor = {\n\t\t\t\t\tx: me.left + ((legendWidth - lineWidths[0]) / 2) + labelOpts.padding,\n\t\t\t\t\ty: me.top + labelOpts.padding,\n\t\t\t\t\tline: 0\n\t\t\t\t};\n\t\t\t} else {\n\t\t\t\tcursor = {\n\t\t\t\t\tx: me.left + labelOpts.padding,\n\t\t\t\t\ty: me.top + labelOpts.padding,\n\t\t\t\t\tline: 0\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tvar itemHeight = fontSize + labelOpts.padding;\n\t\t\thelpers$1.each(me.legendItems, function(legendItem, i) {\n\t\t\t\tvar textWidth = ctx.measureText(legendItem.text).width;\n\t\t\t\tvar width = boxWidth + (fontSize / 2) + textWidth;\n\t\t\t\tvar x = cursor.x;\n\t\t\t\tvar y = cursor.y;\n\n\t\t\t\t// Use (me.left + me.minSize.width) and (me.top + me.minSize.height)\n\t\t\t\t// instead of me.right and me.bottom because me.width and me.height\n\t\t\t\t// may have been changed since me.minSize was calculated\n\t\t\t\tif (isHorizontal) {\n\t\t\t\t\tif (i > 0 && x + width + labelOpts.padding > me.left + me.minSize.width) {\n\t\t\t\t\t\ty = cursor.y += itemHeight;\n\t\t\t\t\t\tcursor.line++;\n\t\t\t\t\t\tx = cursor.x = me.left + ((legendWidth - lineWidths[cursor.line]) / 2) + labelOpts.padding;\n\t\t\t\t\t}\n\t\t\t\t} else if (i > 0 && y + itemHeight > me.top + me.minSize.height) {\n\t\t\t\t\tx = cursor.x = x + me.columnWidths[cursor.line] + labelOpts.padding;\n\t\t\t\t\ty = cursor.y = me.top + labelOpts.padding;\n\t\t\t\t\tcursor.line++;\n\t\t\t\t}\n\n\t\t\t\tdrawLegendBox(x, y, legendItem);\n\n\t\t\t\thitboxes[i].left = x;\n\t\t\t\thitboxes[i].top = y;\n\n\t\t\t\t// Fill the actual label\n\t\t\t\tfillText(x, y, legendItem, textWidth);\n\n\t\t\t\tif (isHorizontal) {\n\t\t\t\t\tcursor.x += width + labelOpts.padding;\n\t\t\t\t} else {\n\t\t\t\t\tcursor.y += itemHeight;\n\t\t\t\t}\n\n\t\t\t});\n\t\t}\n\t},\n\n\t/**\n\t * @private\n\t */\n\t_getLegendItemAt: function(x, y) {\n\t\tvar me = this;\n\t\tvar i, hitBox, lh;\n\n\t\tif (x >= me.left && x <= me.right && y >= me.top && y <= me.bottom) {\n\t\t\t// See if we are touching one of the dataset boxes\n\t\t\tlh = me.legendHitBoxes;\n\t\t\tfor (i = 0; i < lh.length; ++i) {\n\t\t\t\thitBox = lh[i];\n\n\t\t\t\tif (x >= hitBox.left && x <= hitBox.left + hitBox.width && y >= hitBox.top && y <= hitBox.top + hitBox.height) {\n\t\t\t\t\t// Touching an element\n\t\t\t\t\treturn me.legendItems[i];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t},\n\n\t/**\n\t * Handle an event\n\t * @private\n\t * @param {IEvent} event - The event to handle\n\t */\n\thandleEvent: function(e) {\n\t\tvar me = this;\n\t\tvar opts = me.options;\n\t\tvar type = e.type === 'mouseup' ? 'click' : e.type;\n\t\tvar hoveredItem;\n\n\t\tif (type === 'mousemove') {\n\t\t\tif (!opts.onHover && !opts.onLeave) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t} else if (type === 'click') {\n\t\t\tif (!opts.onClick) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t} else {\n\t\t\treturn;\n\t\t}\n\n\t\t// Chart event already has relative position in it\n\t\thoveredItem = me._getLegendItemAt(e.x, e.y);\n\n\t\tif (type === 'click') {\n\t\t\tif (hoveredItem && opts.onClick) {\n\t\t\t\t// use e.native for backwards compatibility\n\t\t\t\topts.onClick.call(me, e.native, hoveredItem);\n\t\t\t}\n\t\t} else {\n\t\t\tif (opts.onLeave && hoveredItem !== me._hoveredItem) {\n\t\t\t\tif (me._hoveredItem) {\n\t\t\t\t\topts.onLeave.call(me, e.native, me._hoveredItem);\n\t\t\t\t}\n\t\t\t\tme._hoveredItem = hoveredItem;\n\t\t\t}\n\n\t\t\tif (opts.onHover && hoveredItem) {\n\t\t\t\t// use e.native for backwards compatibility\n\t\t\t\topts.onHover.call(me, e.native, hoveredItem);\n\t\t\t}\n\t\t}\n\t}\n});\n\nfunction createNewLegendAndAttach(chart, legendOpts) {\n\tvar legend = new Legend({\n\t\tctx: chart.ctx,\n\t\toptions: legendOpts,\n\t\tchart: chart\n\t});\n\n\tcore_layouts.configure(chart, legend, legendOpts);\n\tcore_layouts.addBox(chart, legend);\n\tchart.legend = legend;\n}\n\nvar plugin_legend = {\n\tid: 'legend',\n\n\t/**\n\t * Backward compatibility: since 2.1.5, the legend is registered as a plugin, making\n\t * Chart.Legend obsolete. To avoid a breaking change, we export the Legend as part of\n\t * the plugin, which one will be re-exposed in the chart.js file.\n\t * https://github.com/chartjs/Chart.js/pull/2640\n\t * @private\n\t */\n\t_element: Legend,\n\n\tbeforeInit: function(chart) {\n\t\tvar legendOpts = chart.options.legend;\n\n\t\tif (legendOpts) {\n\t\t\tcreateNewLegendAndAttach(chart, legendOpts);\n\t\t}\n\t},\n\n\tbeforeUpdate: function(chart) {\n\t\tvar legendOpts = chart.options.legend;\n\t\tvar legend = chart.legend;\n\n\t\tif (legendOpts) {\n\t\t\thelpers$1.mergeIf(legendOpts, core_defaults.global.legend);\n\n\t\t\tif (legend) {\n\t\t\t\tcore_layouts.configure(chart, legend, legendOpts);\n\t\t\t\tlegend.options = legendOpts;\n\t\t\t} else {\n\t\t\t\tcreateNewLegendAndAttach(chart, legendOpts);\n\t\t\t}\n\t\t} else if (legend) {\n\t\t\tcore_layouts.removeBox(chart, legend);\n\t\t\tdelete chart.legend;\n\t\t}\n\t},\n\n\tafterEvent: function(chart, e) {\n\t\tvar legend = chart.legend;\n\t\tif (legend) {\n\t\t\tlegend.handleEvent(e);\n\t\t}\n\t}\n};\n\nvar noop$2 = helpers$1.noop;\n\ncore_defaults._set('global', {\n\ttitle: {\n\t\tdisplay: false,\n\t\tfontStyle: 'bold',\n\t\tfullWidth: true,\n\t\tpadding: 10,\n\t\tposition: 'top',\n\t\ttext: '',\n\t\tweight: 2000 // by default greater than legend (1000) to be above\n\t}\n});\n\n/**\n * IMPORTANT: this class is exposed publicly as Chart.Legend, backward compatibility required!\n */\nvar Title = core_element.extend({\n\tinitialize: function(config) {\n\t\tvar me = this;\n\t\thelpers$1.extend(me, config);\n\n\t\t// Contains hit boxes for each dataset (in dataset order)\n\t\tme.legendHitBoxes = [];\n\t},\n\n\t// These methods are ordered by lifecycle. Utilities then follow.\n\n\tbeforeUpdate: noop$2,\n\tupdate: function(maxWidth, maxHeight, margins) {\n\t\tvar me = this;\n\n\t\t// Update Lifecycle - Probably don't want to ever extend or overwrite this function ;)\n\t\tme.beforeUpdate();\n\n\t\t// Absorb the master measurements\n\t\tme.maxWidth = maxWidth;\n\t\tme.maxHeight = maxHeight;\n\t\tme.margins = margins;\n\n\t\t// Dimensions\n\t\tme.beforeSetDimensions();\n\t\tme.setDimensions();\n\t\tme.afterSetDimensions();\n\t\t// Labels\n\t\tme.beforeBuildLabels();\n\t\tme.buildLabels();\n\t\tme.afterBuildLabels();\n\n\t\t// Fit\n\t\tme.beforeFit();\n\t\tme.fit();\n\t\tme.afterFit();\n\t\t//\n\t\tme.afterUpdate();\n\n\t\treturn me.minSize;\n\n\t},\n\tafterUpdate: noop$2,\n\n\t//\n\n\tbeforeSetDimensions: noop$2,\n\tsetDimensions: function() {\n\t\tvar me = this;\n\t\t// Set the unconstrained dimension before label rotation\n\t\tif (me.isHorizontal()) {\n\t\t\t// Reset position before calculating rotation\n\t\t\tme.width = me.maxWidth;\n\t\t\tme.left = 0;\n\t\t\tme.right = me.width;\n\t\t} else {\n\t\t\tme.height = me.maxHeight;\n\n\t\t\t// Reset position before calculating rotation\n\t\t\tme.top = 0;\n\t\t\tme.bottom = me.height;\n\t\t}\n\n\t\t// Reset padding\n\t\tme.paddingLeft = 0;\n\t\tme.paddingTop = 0;\n\t\tme.paddingRight = 0;\n\t\tme.paddingBottom = 0;\n\n\t\t// Reset minSize\n\t\tme.minSize = {\n\t\t\twidth: 0,\n\t\t\theight: 0\n\t\t};\n\t},\n\tafterSetDimensions: noop$2,\n\n\t//\n\n\tbeforeBuildLabels: noop$2,\n\tbuildLabels: noop$2,\n\tafterBuildLabels: noop$2,\n\n\t//\n\n\tbeforeFit: noop$2,\n\tfit: function() {\n\t\tvar me = this;\n\t\tvar opts = me.options;\n\t\tvar display = opts.display;\n\t\tvar minSize = me.minSize;\n\t\tvar lineCount = helpers$1.isArray(opts.text) ? opts.text.length : 1;\n\t\tvar fontOpts = helpers$1.options._parseFont(opts);\n\t\tvar textSize = display ? (lineCount * fontOpts.lineHeight) + (opts.padding * 2) : 0;\n\n\t\tif (me.isHorizontal()) {\n\t\t\tminSize.width = me.maxWidth; // fill all the width\n\t\t\tminSize.height = textSize;\n\t\t} else {\n\t\t\tminSize.width = textSize;\n\t\t\tminSize.height = me.maxHeight; // fill all the height\n\t\t}\n\n\t\tme.width = minSize.width;\n\t\tme.height = minSize.height;\n\n\t},\n\tafterFit: noop$2,\n\n\t// Shared Methods\n\tisHorizontal: function() {\n\t\tvar pos = this.options.position;\n\t\treturn pos === 'top' || pos === 'bottom';\n\t},\n\n\t// Actually draw the title block on the canvas\n\tdraw: function() {\n\t\tvar me = this;\n\t\tvar ctx = me.ctx;\n\t\tvar opts = me.options;\n\n\t\tif (opts.display) {\n\t\t\tvar fontOpts = helpers$1.options._parseFont(opts);\n\t\t\tvar lineHeight = fontOpts.lineHeight;\n\t\t\tvar offset = lineHeight / 2 + opts.padding;\n\t\t\tvar rotation = 0;\n\t\t\tvar top = me.top;\n\t\t\tvar left = me.left;\n\t\t\tvar bottom = me.bottom;\n\t\t\tvar right = me.right;\n\t\t\tvar maxWidth, titleX, titleY;\n\n\t\t\tctx.fillStyle = helpers$1.valueOrDefault(opts.fontColor, core_defaults.global.defaultFontColor); // render in correct colour\n\t\t\tctx.font = fontOpts.string;\n\n\t\t\t// Horizontal\n\t\t\tif (me.isHorizontal()) {\n\t\t\t\ttitleX = left + ((right - left) / 2); // midpoint of the width\n\t\t\t\ttitleY = top + offset;\n\t\t\t\tmaxWidth = right - left;\n\t\t\t} else {\n\t\t\t\ttitleX = opts.position === 'left' ? left + offset : right - offset;\n\t\t\t\ttitleY = top + ((bottom - top) / 2);\n\t\t\t\tmaxWidth = bottom - top;\n\t\t\t\trotation = Math.PI * (opts.position === 'left' ? -0.5 : 0.5);\n\t\t\t}\n\n\t\t\tctx.save();\n\t\t\tctx.translate(titleX, titleY);\n\t\t\tctx.rotate(rotation);\n\t\t\tctx.textAlign = 'center';\n\t\t\tctx.textBaseline = 'middle';\n\n\t\t\tvar text = opts.text;\n\t\t\tif (helpers$1.isArray(text)) {\n\t\t\t\tvar y = 0;\n\t\t\t\tfor (var i = 0; i < text.length; ++i) {\n\t\t\t\t\tctx.fillText(text[i], 0, y, maxWidth);\n\t\t\t\t\ty += lineHeight;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tctx.fillText(text, 0, 0, maxWidth);\n\t\t\t}\n\n\t\t\tctx.restore();\n\t\t}\n\t}\n});\n\nfunction createNewTitleBlockAndAttach(chart, titleOpts) {\n\tvar title = new Title({\n\t\tctx: chart.ctx,\n\t\toptions: titleOpts,\n\t\tchart: chart\n\t});\n\n\tcore_layouts.configure(chart, title, titleOpts);\n\tcore_layouts.addBox(chart, title);\n\tchart.titleBlock = title;\n}\n\nvar plugin_title = {\n\tid: 'title',\n\n\t/**\n\t * Backward compatibility: since 2.1.5, the title is registered as a plugin, making\n\t * Chart.Title obsolete. To avoid a breaking change, we export the Title as part of\n\t * the plugin, which one will be re-exposed in the chart.js file.\n\t * https://github.com/chartjs/Chart.js/pull/2640\n\t * @private\n\t */\n\t_element: Title,\n\n\tbeforeInit: function(chart) {\n\t\tvar titleOpts = chart.options.title;\n\n\t\tif (titleOpts) {\n\t\t\tcreateNewTitleBlockAndAttach(chart, titleOpts);\n\t\t}\n\t},\n\n\tbeforeUpdate: function(chart) {\n\t\tvar titleOpts = chart.options.title;\n\t\tvar titleBlock = chart.titleBlock;\n\n\t\tif (titleOpts) {\n\t\t\thelpers$1.mergeIf(titleOpts, core_defaults.global.title);\n\n\t\t\tif (titleBlock) {\n\t\t\t\tcore_layouts.configure(chart, titleBlock, titleOpts);\n\t\t\t\ttitleBlock.options = titleOpts;\n\t\t\t} else {\n\t\t\t\tcreateNewTitleBlockAndAttach(chart, titleOpts);\n\t\t\t}\n\t\t} else if (titleBlock) {\n\t\t\tcore_layouts.removeBox(chart, titleBlock);\n\t\t\tdelete chart.titleBlock;\n\t\t}\n\t}\n};\n\nvar plugins = {};\nvar filler = plugin_filler;\nvar legend = plugin_legend;\nvar title = plugin_title;\nplugins.filler = filler;\nplugins.legend = legend;\nplugins.title = title;\n\n/**\n * @namespace Chart\n */\n\n\ncore_controller.helpers = helpers$1;\n\n// @todo dispatch these helpers into appropriated helpers/helpers.* file and write unit tests!\ncore_helpers(core_controller);\n\ncore_controller._adapters = core_adapters;\ncore_controller.Animation = core_animation;\ncore_controller.animationService = core_animations;\ncore_controller.controllers = controllers;\ncore_controller.DatasetController = core_datasetController;\ncore_controller.defaults = core_defaults;\ncore_controller.Element = core_element;\ncore_controller.elements = elements;\ncore_controller.Interaction = core_interaction;\ncore_controller.layouts = core_layouts;\ncore_controller.platform = platform;\ncore_controller.plugins = core_plugins;\ncore_controller.Scale = core_scale;\ncore_controller.scaleService = core_scaleService;\ncore_controller.Ticks = core_ticks;\ncore_controller.Tooltip = core_tooltip;\n\n// Register built-in scales\n\ncore_controller.helpers.each(scales, function(scale, type) {\n\tcore_controller.scaleService.registerScaleType(type, scale, scale._defaults);\n});\n\n// Load to register built-in adapters (as side effects)\n\n\n// Loading built-in plugins\n\nfor (var k in plugins) {\n\tif (plugins.hasOwnProperty(k)) {\n\t\tcore_controller.plugins.register(plugins[k]);\n\t}\n}\n\ncore_controller.platform.initialize();\n\nvar src = core_controller;\nif (typeof window !== 'undefined') {\n\twindow.Chart = core_controller;\n}\n\n// DEPRECATIONS\n\n/**\n * Provided for backward compatibility, not available anymore\n * @namespace Chart.Chart\n * @deprecated since version 2.8.0\n * @todo remove at version 3\n * @private\n */\ncore_controller.Chart = core_controller;\n\n/**\n * Provided for backward compatibility, not available anymore\n * @namespace Chart.Legend\n * @deprecated since version 2.1.5\n * @todo remove at version 3\n * @private\n */\ncore_controller.Legend = plugins.legend._element;\n\n/**\n * Provided for backward compatibility, not available anymore\n * @namespace Chart.Title\n * @deprecated since version 2.1.5\n * @todo remove at version 3\n * @private\n */\ncore_controller.Title = plugins.title._element;\n\n/**\n * Provided for backward compatibility, use Chart.plugins instead\n * @namespace Chart.pluginService\n * @deprecated since version 2.1.5\n * @todo remove at version 3\n * @private\n */\ncore_controller.pluginService = core_controller.plugins;\n\n/**\n * Provided for backward compatibility, inheriting from Chart.PlugingBase has no\n * effect, instead simply create/register plugins via plain JavaScript objects.\n * @interface Chart.PluginBase\n * @deprecated since version 2.5.0\n * @todo remove at version 3\n * @private\n */\ncore_controller.PluginBase = core_controller.Element.extend({});\n\n/**\n * Provided for backward compatibility, use Chart.helpers.canvas instead.\n * @namespace Chart.canvasHelpers\n * @deprecated since version 2.6.0\n * @todo remove at version 3\n * @private\n */\ncore_controller.canvasHelpers = core_controller.helpers.canvas;\n\n/**\n * Provided for backward compatibility, use Chart.layouts instead.\n * @namespace Chart.layoutService\n * @deprecated since version 2.7.3\n * @todo remove at version 3\n * @private\n */\ncore_controller.layoutService = core_controller.layouts;\n\n/**\n * Provided for backward compatibility, not available anymore.\n * @namespace Chart.LinearScaleBase\n * @deprecated since version 2.8\n * @todo remove at version 3\n * @private\n */\ncore_controller.LinearScaleBase = scale_linearbase;\n\n/**\n * Provided for backward compatibility, instead we should create a new Chart\n * by setting the type in the config (`new Chart(id, {type: '{chart-type}'}`).\n * @deprecated since version 2.8.0\n * @todo remove at version 3\n */\ncore_controller.helpers.each(\n\t[\n\t\t'Bar',\n\t\t'Bubble',\n\t\t'Doughnut',\n\t\t'Line',\n\t\t'PolarArea',\n\t\t'Radar',\n\t\t'Scatter'\n\t],\n\tfunction(klass) {\n\t\tcore_controller[klass] = function(ctx, cfg) {\n\t\t\treturn new core_controller(ctx, core_controller.helpers.merge(cfg || {}, {\n\t\t\t\ttype: klass.charAt(0).toLowerCase() + klass.slice(1)\n\t\t\t}));\n\t\t};\n\t}\n);\n\nreturn src;\n\n})));\n","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{attrs:{\"id\":\"extra-component-chartjs-demo\"}},[_vm._m(0),_c('div',{staticClass:\"vx-row\"},[_c('div',{staticClass:\"vx-col w-full md:w-1/2\"},[_c('chartjs-line-chart')],1),_c('div',{staticClass:\"vx-col w-full md:w-1/2\"},[_c('chartjs-bar-chart')],1),_c('div',{staticClass:\"vx-col w-full md:w-1/2\"},[_c('chartjs-horizontal-bar-chart')],1),_c('div',{staticClass:\"vx-col w-full md:w-1/2\"},[_c('chartjs-pie-chart')],1),_c('div',{staticClass:\"vx-col w-full md:w-1/2\"},[_c('chartjs-doughnut-chart')],1),_c('div',{staticClass:\"vx-col w-full md:w-1/2\"},[_c('chartjs-radar-chart')],1),_c('div',{staticClass:\"vx-col w-full md:w-1/2\"},[_c('chartjs-polar-area-chart')],1),_c('div',{staticClass:\"vx-col w-full md:w-1/2\"},[_c('chartjs-bubble-chart')],1),_c('div',{staticClass:\"vx-col w-full\"},[_c('chartjs-scatter-chart')],1)])])\n}\nvar staticRenderFns = [function (){var _vm=this,_c=_vm._self._c;return _c('p',{staticClass:\"mb-4\"},[_vm._v(\"You can easily create reuseable chart components. \"),_c('a',{attrs:{\"href\":\"https://vue-chartjs.org/\",\"target\":\"_blank\",\"rel\":\"nofollow\"}},[_vm._v(\"vue-chartjs\")]),_vm._v(\" is a wrapper for Chart.js. Read full documnetation \"),_c('a',{attrs:{\"href\":\"https://vue-chartjs.org/guide/\",\"target\":\"_blank\",\"rel\":\"nofollow\"}},[_vm._v(\"here\")])])\n}]\n\nexport { render, staticRenderFns }","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('vx-card',{staticClass:\"mb-base\",attrs:{\"title\":\"Bar Chart\",\"code-toggler\":\"\"}},[_c('div',{staticClass:\"mt-5\"},[_c('chartjs-component-bar-chart',{attrs:{\"height\":250,\"data\":_vm.data,\"options\":_vm.options}})],1),_c('template',{slot:\"codeContainer\"},[_vm._v(\"\\n\\n \")])],2)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","function dataHandler(newData, oldData) {\n if (oldData) {\n var chart = this.$data._chart;\n var newDatasetLabels = newData.datasets.map(function (dataset) {\n return dataset.label;\n });\n var oldDatasetLabels = oldData.datasets.map(function (dataset) {\n return dataset.label;\n });\n var oldLabels = JSON.stringify(oldDatasetLabels);\n var newLabels = JSON.stringify(newDatasetLabels);\n\n if (newLabels === oldLabels && oldData.datasets.length === newData.datasets.length) {\n newData.datasets.forEach(function (dataset, i) {\n var oldDatasetKeys = Object.keys(oldData.datasets[i]);\n var newDatasetKeys = Object.keys(dataset);\n var deletionKeys = oldDatasetKeys.filter(function (key) {\n return key !== '_meta' && newDatasetKeys.indexOf(key) === -1;\n });\n deletionKeys.forEach(function (deletionKey) {\n delete chart.data.datasets[i][deletionKey];\n });\n\n for (var attribute in dataset) {\n if (dataset.hasOwnProperty(attribute)) {\n chart.data.datasets[i][attribute] = dataset[attribute];\n }\n }\n });\n\n if (newData.hasOwnProperty('labels')) {\n chart.data.labels = newData.labels;\n this.$emit('labels:update');\n }\n\n if (newData.hasOwnProperty('xLabels')) {\n chart.data.xLabels = newData.xLabels;\n this.$emit('xlabels:update');\n }\n\n if (newData.hasOwnProperty('yLabels')) {\n chart.data.yLabels = newData.yLabels;\n this.$emit('ylabels:update');\n }\n\n chart.update();\n this.$emit('chart:update');\n } else {\n if (chart) {\n chart.destroy();\n this.$emit('chart:destroy');\n }\n\n this.renderChart(this.chartData, this.options);\n this.$emit('chart:render');\n }\n } else {\n if (this.$data._chart) {\n this.$data._chart.destroy();\n\n this.$emit('chart:destroy');\n }\n\n this.renderChart(this.chartData, this.options);\n this.$emit('chart:render');\n }\n}\n\nexport var reactiveData = {\n data: function data() {\n return {\n chartData: null\n };\n },\n watch: {\n 'chartData': dataHandler\n }\n};\nexport var reactiveProp = {\n props: {\n chartData: {\n type: Object,\n required: true,\n default: function _default() {}\n }\n },\n watch: {\n 'chartData': dataHandler\n }\n};\nexport default {\n reactiveData: reactiveData,\n reactiveProp: reactiveProp\n};","import Chart from 'chart.js';\nexport function generateChart(chartId, chartType) {\n return {\n render: function render(createElement) {\n return createElement('div', {\n style: this.styles,\n class: this.cssClasses\n }, [createElement('canvas', {\n attrs: {\n id: this.chartId,\n width: this.width,\n height: this.height\n },\n ref: 'canvas'\n })]);\n },\n props: {\n chartId: {\n default: chartId,\n type: String\n },\n width: {\n default: 400,\n type: Number\n },\n height: {\n default: 400,\n type: Number\n },\n cssClasses: {\n type: String,\n default: ''\n },\n styles: {\n type: Object\n },\n plugins: {\n type: Array,\n default: function _default() {\n return [];\n }\n }\n },\n data: function data() {\n return {\n _chart: null,\n _plugins: this.plugins\n };\n },\n methods: {\n addPlugin: function addPlugin(plugin) {\n this.$data._plugins.push(plugin);\n },\n generateLegend: function generateLegend() {\n if (this.$data._chart) {\n return this.$data._chart.generateLegend();\n }\n },\n renderChart: function renderChart(data, options) {\n if (this.$data._chart) this.$data._chart.destroy();\n this.$data._chart = new Chart(this.$refs.canvas.getContext('2d'), {\n type: chartType,\n data: data,\n options: options,\n plugins: this.$data._plugins\n });\n }\n },\n beforeDestroy: function beforeDestroy() {\n if (this.$data._chart) {\n this.$data._chart.destroy();\n }\n }\n };\n}\nexport var Bar = generateChart('bar-chart', 'bar');\nexport var HorizontalBar = generateChart('horizontalbar-chart', 'horizontalBar');\nexport var Doughnut = generateChart('doughnut-chart', 'doughnut');\nexport var Line = generateChart('line-chart', 'line');\nexport var Pie = generateChart('pie-chart', 'pie');\nexport var PolarArea = generateChart('polar-chart', 'polarArea');\nexport var Radar = generateChart('radar-chart', 'radar');\nexport var Bubble = generateChart('bubble-chart', 'bubble');\nexport var Scatter = generateChart('scatter-chart', 'scatter');\nexport default {\n Bar: Bar,\n HorizontalBar: HorizontalBar,\n Doughnut: Doughnut,\n Line: Line,\n Pie: Pie,\n PolarArea: PolarArea,\n Radar: Radar,\n Bubble: Bubble,\n Scatter: Scatter\n};","var render, staticRenderFns\nimport script from \"./ChartjsComponentBarChart.vue?vue&type=script&lang=js\"\nexport * from \"./ChartjsComponentBarChart.vue?vue&type=script&lang=js\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render, staticRenderFns\nimport script from \"./ChartjsComponentLineChart.vue?vue&type=script&lang=js\"\nexport * from \"./ChartjsComponentLineChart.vue?vue&type=script&lang=js\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render, staticRenderFns\nimport script from \"./ChartjsComponentPieChart.vue?vue&type=script&lang=js\"\nexport * from \"./ChartjsComponentPieChart.vue?vue&type=script&lang=js\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render, staticRenderFns\nimport script from \"./ChartjsComponentRadarChart.vue?vue&type=script&lang=js\"\nexport * from \"./ChartjsComponentRadarChart.vue?vue&type=script&lang=js\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render, staticRenderFns\nimport script from \"./ChartjsComponentPolarAreaChart.vue?vue&type=script&lang=js\"\nexport * from \"./ChartjsComponentPolarAreaChart.vue?vue&type=script&lang=js\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render, staticRenderFns\nimport script from \"./ChartjsComponentDoughnutChart.vue?vue&type=script&lang=js\"\nexport * from \"./ChartjsComponentDoughnutChart.vue?vue&type=script&lang=js\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render, staticRenderFns\nimport script from \"./ChartjsComponentHorizontalBarChart.vue?vue&type=script&lang=js\"\nexport * from \"./ChartjsComponentHorizontalBarChart.vue?vue&type=script&lang=js\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render, staticRenderFns\nimport script from \"./ChartjsComponentBubbleChart.vue?vue&type=script&lang=js\"\nexport * from \"./ChartjsComponentBubbleChart.vue?vue&type=script&lang=js\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render, staticRenderFns\nimport script from \"./ChartjsComponentScatterChart.vue?vue&type=script&lang=js\"\nexport * from \"./ChartjsComponentScatterChart.vue?vue&type=script&lang=js\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","\r\n\r\n\r\n\r\n","import mod from \"-!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../../node_modules/babel-loader/lib/index.js!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartjsComponentBarChart.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../../node_modules/babel-loader/lib/index.js!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartjsComponentBarChart.vue?vue&type=script&lang=js\"","\r\n\r\n\r\n\r\n\r\n\r\n","import mod from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartjsBarChart.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartjsBarChart.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./ChartjsBarChart.vue?vue&type=template&id=ebfaaebe\"\nimport script from \"./ChartjsBarChart.vue?vue&type=script&lang=js\"\nexport * from \"./ChartjsBarChart.vue?vue&type=script&lang=js\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('vx-card',{staticClass:\"mb-base\",attrs:{\"title\":\"Line Chart\",\"code-toggler\":\"\"}},[_c('div',{staticClass:\"mt-5\"},[_c('chartjs-component-line-chart',{attrs:{\"height\":250,\"data\":_vm.data,\"options\":_vm.options}})],1),_c('template',{slot:\"codeContainer\"},[_vm._v(\"\\n\\n \")])],2)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\r\n\r\n\r\n\r\n","import mod from \"-!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../../node_modules/babel-loader/lib/index.js!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartjsComponentLineChart.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../../node_modules/babel-loader/lib/index.js!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartjsComponentLineChart.vue?vue&type=script&lang=js\"","\r\n\r\n\r\n\r\n\r\n\r\n","import mod from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartjsLineChart.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartjsLineChart.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./ChartjsLineChart.vue?vue&type=template&id=71127f1d\"\nimport script from \"./ChartjsLineChart.vue?vue&type=script&lang=js\"\nexport * from \"./ChartjsLineChart.vue?vue&type=script&lang=js\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('vx-card',{staticClass:\"mb-base\",attrs:{\"title\":\"Pie Chart\",\"code-toggler\":\"\"}},[_c('div',{staticClass:\"mt-5\"},[_c('chartjs-component-pie-chart',{attrs:{\"height\":250,\"data\":_vm.data,\"options\":_vm.options}})],1),_c('template',{slot:\"codeContainer\"},[_vm._v(\"\\n\\n \")])],2)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\r\n\r\n\r\n\r\n","import mod from \"-!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../../node_modules/babel-loader/lib/index.js!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartjsComponentPieChart.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../../node_modules/babel-loader/lib/index.js!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartjsComponentPieChart.vue?vue&type=script&lang=js\"","\r\n\r\n\r\n\r\n\r\n\r\n","import mod from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartjsPieChart.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartjsPieChart.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./ChartjsPieChart.vue?vue&type=template&id=3dd90637\"\nimport script from \"./ChartjsPieChart.vue?vue&type=script&lang=js\"\nexport * from \"./ChartjsPieChart.vue?vue&type=script&lang=js\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('vx-card',{staticClass:\"mb-base\",attrs:{\"title\":\"Radar Chart\",\"code-toggler\":\"\"}},[_c('div',{staticClass:\"mt-5\"},[_c('chartjs-component-radar-chart',{attrs:{\"height\":250,\"data\":_vm.data,\"options\":_vm.options}})],1),_c('template',{slot:\"codeContainer\"},[_vm._v(\"\\n\\n \")])],2)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\r\n\r\n\r\n\r\n","import mod from \"-!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../../node_modules/babel-loader/lib/index.js!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartjsComponentRadarChart.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../../node_modules/babel-loader/lib/index.js!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartjsComponentRadarChart.vue?vue&type=script&lang=js\"","\r\n\r\n\r\n\r\n\r\n\r\n","import mod from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartjsRadarChart.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartjsRadarChart.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./ChartjsRadarChart.vue?vue&type=template&id=a61492be\"\nimport script from \"./ChartjsRadarChart.vue?vue&type=script&lang=js\"\nexport * from \"./ChartjsRadarChart.vue?vue&type=script&lang=js\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('vx-card',{staticClass:\"mb-base\",attrs:{\"title\":\"Polar Area Chart\",\"code-toggler\":\"\"}},[_c('div',{staticClass:\"mt-5\"},[_c('chartjs-component-polar-area-chart',{attrs:{\"height\":250,\"data\":_vm.data,\"options\":_vm.options}})],1),_c('template',{slot:\"codeContainer\"},[_vm._v(\"\\n\\n \")])],2)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\r\n\r\n\r\n\r\n","import mod from \"-!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../../node_modules/babel-loader/lib/index.js!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartjsComponentPolarAreaChart.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../../node_modules/babel-loader/lib/index.js!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartjsComponentPolarAreaChart.vue?vue&type=script&lang=js\"","\r\n\r\n\r\n\r\n\r\n\r\n","import mod from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartjsPolarAreaChart.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartjsPolarAreaChart.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./ChartjsPolarAreaChart.vue?vue&type=template&id=a6a731aa\"\nimport script from \"./ChartjsPolarAreaChart.vue?vue&type=script&lang=js\"\nexport * from \"./ChartjsPolarAreaChart.vue?vue&type=script&lang=js\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('vx-card',{staticClass:\"mb-base\",attrs:{\"title\":\"Doughnut Chart\",\"code-toggler\":\"\"}},[_c('div',{staticClass:\"mt-5\"},[_c('chartjs-component-doughnut-chart',{attrs:{\"height\":250,\"data\":_vm.data,\"options\":_vm.options}})],1),_c('template',{slot:\"codeContainer\"},[_vm._v(\"\\n\\n \")])],2)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\r\n\r\n\r\n\r\n","import mod from \"-!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../../node_modules/babel-loader/lib/index.js!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartjsComponentDoughnutChart.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../../node_modules/babel-loader/lib/index.js!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartjsComponentDoughnutChart.vue?vue&type=script&lang=js\"","\r\n\r\n\r\n\r\n\r\n\r\n","import mod from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartjsDoughnutChart.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartjsDoughnutChart.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./ChartjsDoughnutChart.vue?vue&type=template&id=43283d86\"\nimport script from \"./ChartjsDoughnutChart.vue?vue&type=script&lang=js\"\nexport * from \"./ChartjsDoughnutChart.vue?vue&type=script&lang=js\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('vx-card',{staticClass:\"mb-base\",attrs:{\"title\":\"Horizontal Bar Chart\",\"code-toggler\":\"\"}},[_c('div',{staticClass:\"mt-5\"},[_c('chartjs-component-horizontal-bar-chart',{attrs:{\"height\":250,\"data\":_vm.data,\"options\":_vm.options}})],1),_c('template',{slot:\"codeContainer\"},[_vm._v(\"\\n\\n \")])],2)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\r\n\r\n\r\n\r\n","import mod from \"-!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../../node_modules/babel-loader/lib/index.js!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartjsComponentHorizontalBarChart.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../../node_modules/babel-loader/lib/index.js!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartjsComponentHorizontalBarChart.vue?vue&type=script&lang=js\"","\r\n\r\n\r\n\r\n\r\n\r\n","import mod from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartjsHorizontalBarChart.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartjsHorizontalBarChart.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./ChartjsHorizontalBarChart.vue?vue&type=template&id=5c09cabf\"\nimport script from \"./ChartjsHorizontalBarChart.vue?vue&type=script&lang=js\"\nexport * from \"./ChartjsHorizontalBarChart.vue?vue&type=script&lang=js\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('vx-card',{staticClass:\"mb-base\",attrs:{\"title\":\"Bubble Chart\",\"code-toggler\":\"\"}},[_c('div',{staticClass:\"mt-5\"},[_c('chartjs-component-bubble-chart',{attrs:{\"height\":250,\"data\":_vm.data,\"options\":_vm.options}})],1),_c('template',{slot:\"codeContainer\"},[_vm._v(\"\\n\\n \")])],2)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\r\n\r\n\r\n","import mod from \"-!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../../node_modules/babel-loader/lib/index.js!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartjsComponentBubbleChart.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../../node_modules/babel-loader/lib/index.js!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartjsComponentBubbleChart.vue?vue&type=script&lang=js\"","\r\n\r\n\r\n\r\n\r\n\r\n","import mod from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartjsBubbleChart.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartjsBubbleChart.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./ChartjsBubbleChart.vue?vue&type=template&id=03eb38a9\"\nimport script from \"./ChartjsBubbleChart.vue?vue&type=script&lang=js\"\nexport * from \"./ChartjsBubbleChart.vue?vue&type=script&lang=js\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('vx-card',{attrs:{\"title\":\"Scatter Chart\",\"code-toggler\":\"\"}},[_c('div',{staticClass:\"mt-5\"},[_c('chartjs-component-scatter-chart',{attrs:{\"height\":300,\"data\":_vm.data,\"options\":_vm.options}})],1),_c('template',{slot:\"codeContainer\"},[_vm._v(\"\\n\\n \")])],2)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\r\n\r\n\r\n\r\n","import mod from \"-!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../../node_modules/babel-loader/lib/index.js!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartjsComponentScatterChart.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../../node_modules/babel-loader/lib/index.js!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartjsComponentScatterChart.vue?vue&type=script&lang=js\"","\r\n\r\n\r\n\r\n\r\n\r\n","import mod from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartjsScatterChart.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartjsScatterChart.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./ChartjsScatterChart.vue?vue&type=template&id=082ef474\"\nimport script from \"./ChartjsScatterChart.vue?vue&type=script&lang=js\"\nexport * from \"./ChartjsScatterChart.vue?vue&type=script&lang=js\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","\r\n\r\n\r\n\r\n\r\n","import mod from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Chartjs.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Chartjs.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./Chartjs.vue?vue&type=template&id=49b15397\"\nimport script from \"./Chartjs.vue?vue&type=script&lang=js\"\nexport * from \"./Chartjs.vue?vue&type=script&lang=js\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""}