2015-11-02 02:42:13 +01:00
! function t ( e , i , a ) { function s ( n , r ) { if ( ! i [ n ] ) { if ( ! e [ n ] ) { var h = "function" == typeof require && require ; if ( ! r && h ) return h ( n , ! 0 ) ; if ( o ) return o ( n , ! 0 ) ; var l = new Error ( "Cannot find module '" + n + "'" ) ; throw l . code = "MODULE_NOT_FOUND" , l } var c = i [ n ] = { exports : { } } ; e [ n ] [ 0 ] . call ( c . exports , function ( t ) { var i = e [ n ] [ 1 ] [ t ] ; return s ( i ? i : t ) } , c , c . exports , t , e , i , a ) } return i [ n ] . exports } for ( var o = "function" == typeof require && require , n = 0 ; n < a . length ; n ++ ) s ( a [ n ] ) ; return s } ( { 1 : [ function ( t , e ) { ! function ( ) { var i = t ( "color-convert" ) , a = t ( "color-string" ) , s = function ( t ) { if ( t instanceof s ) return t ; if ( ! ( this instanceof s ) ) return new s ( t ) ; if ( this . values = { rgb : [ 0 , 0 , 0 ] , hsl : [ 0 , 0 , 0 ] , hsv : [ 0 , 0 , 0 ] , hwb : [ 0 , 0 , 0 ] , cmyk : [ 0 , 0 , 0 , 0 ] , alpha : 1 } , "string" == typeof t ) { var e = a . getRgba ( t ) ; if ( e ) this . setValues ( "rgb" , e ) ; else if ( e = a . getHsla ( t ) ) this . setValues ( "hsl" , e ) ; else { if ( ! ( e = a . getHwb ( t ) ) ) throw new Error ( 'Unable to parse color from string "' + t + '"' ) ; this . setValues ( "hwb" , e ) } } else if ( "object" == typeof t ) { var e = t ; if ( void 0 !== e . r || void 0 !== e . red ) this . setValues ( "rgb" , e ) ; else if ( void 0 !== e . l || void 0 !== e . lightness ) this . setValues ( "hsl" , e ) ; else if ( void 0 !== e . v || void 0 !== e . value ) this . setValues ( "hsv" , e ) ; else if ( void 0 !== e . w || void 0 !== e . whiteness ) this . setValues ( "hwb" , e ) ; else { if ( void 0 === e . c && void 0 === e . cyan ) throw new Error ( "Unable to parse color from object " + JSON . stringify ( t ) ) ; this . setValues ( "cmyk" , e ) } } } ; s . prototype = { rgb : function ( ) { return this . setSpace ( "rgb" , arguments ) } , hsl : function ( ) { return this . setSpace ( "hsl" , arguments ) } , hsv : function ( ) { return this . setSpace ( "hsv" , arguments ) } , hwb : function ( ) { return this . setSpace ( "hwb" , arguments ) } , cmyk : function ( ) { return this . setSpace ( "cmyk" , arguments ) } , rgbArray : function ( ) { return this . values . rgb } , hslArray : function ( ) { return this . values . hsl } , hsvArray : function ( ) { return this . values . hsv } , hwbArray : function ( ) { return 1 !== this . values . alpha ? this . values . hwb . concat ( [ this . values . alpha ] ) : this . values . hwb } , cmykArray : function ( ) { return this . values . cmyk } , rgbaArray : function ( ) { var t = this . values . rgb ; return t . concat ( [ this . values . alpha ] ) } , hslaArray : function ( ) { var t = this . values . hsl ; return t . concat ( [ this . values . alpha ] ) } , alpha : function ( t ) { return void 0 === t ? this . values . alpha : ( this . setValues ( "alpha" , t ) , this ) } , red : function ( t ) { return this . setChannel ( "rgb" , 0 , t ) } , green : function ( t ) { return this . setChannel ( "rgb" , 1 , t ) } , blue : function ( t ) { return this . setChannel ( "rgb" , 2 , t ) } , hue : function ( t ) { return this . setChannel ( "hsl" , 0 , t ) } , saturation : function ( t ) { return this . setChannel ( "hsl" , 1 , t ) } , lightness : function ( t ) { return this . setChannel ( "hsl" , 2 , t ) } , saturationv : function ( t ) { return this . setChannel ( "hsv" , 1 , t ) } , whiteness : function ( t ) { return this . setChannel ( "hwb" , 1 , t ) } , blackness : function ( t ) { return this . setChannel ( "hwb" , 2 , t ) } , value : function ( t ) { return this . setChannel ( "hsv" , 2 , t ) } , cyan : function ( t ) { return this . setChannel ( "cmyk" , 0 , t ) } , magenta : function ( t ) { return this . setChannel ( "cmyk" , 1 , t ) } , yellow : function ( t ) { return this . setChannel ( "cmyk" , 2 , t ) } , black : function ( t ) { return this . setChannel ( "cmyk" , 3 , t ) } , hexString : function ( ) { return a . hexString ( this . values . rgb ) } , rgbString : function ( ) { return a . rgbString ( this . values . rgb , this . values . alpha ) } , rgbaString : function ( ) { return a . rgbaString ( this . values . rgb , this . values . alpha ) } , percentString : function ( ) { return a . percentString ( this . values . rgb , this . values . alpha ) } , hslString : function ( ) { return a . hslString ( this . values . hsl , this . values . alpha ) } , hslaString : function ( ) { return a . hslaString ( this . values . hsl , this . values . alpha ) } , hwbString : function ( ) { return a . hwbString ( this . values . hwb , this . values . alpha ) } , keyword : function ( ) { return a . keyword ( this . values . rgb , this . values . alpha ) } , rgbNumber : function ( ) { return this . values . rgb [ 0 ] << 16 | this . values . rgb [ 1 ] << 8 | this . values . rgb [ 2 ] } , luminosity : function ( ) { for ( var t = this . values . rgb , e = [ ] , i = 0 ; i < t . length ; i ++ ) { var a = t [ i ] / 255 ; e [ i ] = . 03928 >= a ? a / 12.92 : Math . pow ( ( a + . 055 ) / 1.055 , 2.4 ) } return . 2126 * e [ 0 ] + . 7152 * e [ 1 ] + . 0722 * e [ 2 ] } , contrast : function ( t ) { var e = this . luminosity ( ) , i = t . luminosity ( ) ; return e > i ? ( e + . 05 ) / ( i + . 05 ) : ( i + . 05 ) / ( e + . 05 ) } , level : function ( t ) { var e = this . contrast ( t ) ; return e >= 7.1 ? "AAA" : e >= 4.5 ? "AA" : "" } , dark : function ( ) { var t = this . values . rgb , e = ( 299 * t [ 0 ] + 587 * t [ 1 ] + 114 * t [ 2 ] ) / 1e3 ; return 128 > e } , light : function ( ) { return ! this . d
2014-06-29 19:36:25 +02:00
* Chart . js
* http : //chartjs.org/
2015-10-31 23:40:23 +01:00
* Version : 2.0 . 0 - beta
2014-06-29 19:36:25 +02:00
*
2015-01-07 23:49:33 +01:00
* Copyright 2015 Nick Downie
2014-06-29 19:36:25 +02:00
* Released under the MIT license
* https : //github.com/nnnick/Chart.js/blob/master/LICENSE.md
* /
2015-11-02 02:42:13 +01:00
function ( ) { "use strict" ; var t = this , e = t . Chart , i = function ( t , e ) { this . config = e , t . length && t [ 0 ] . getContext && ( t = t [ 0 ] ) , t . getContext && ( t = t . getContext ( "2d" ) ) , this . ctx = t , this . canvas = t . canvas , this . width = t . canvas . width || parseInt ( i . helpers . getStyle ( t . canvas , "width" ) ) || i . helpers . getMaximumWidth ( t . canvas ) , this . height = t . canvas . height || parseInt ( i . helpers . getStyle ( t . canvas , "height" ) ) || i . helpers . getMaximumHeight ( t . canvas ) , this . aspectRatio = this . width / this . height , ( isNaN ( this . aspectRatio ) || isFinite ( this . aspectRatio ) === ! 1 ) && ( this . aspectRatio = void 0 !== e . aspectRatio ? e . aspectRatio : 2 ) , this . originalCanvasStyleWidth = t . canvas . style . width , this . originalCanvasStyleHeight = t . canvas . style . height , i . helpers . retinaScale ( this ) , e && ( this . controller = new i . Controller ( this ) ) ; var a = this ; return i . helpers . addResizeListener ( t . canvas . parentNode , function ( ) { a . controller && a . controller . config . options . responsive && a . controller . resize ( ) } ) , this . controller ? this . controller : this } ; i . defaults = { global : { responsive : ! 0 , responsiveAnimationDuration : 0 , maintainAspectRatio : ! 0 , events : [ "mousemove" , "mouseout" , "click" , "touchstart" , "touchmove" , "touchend" ] , hover : { onHover : null , mode : "single" , animationDuration : 400 } , onClick : null , defaultColor : "rgba(0,0,0,0.1)" , elements : { } , legendCallback : function ( t ) { var e = [ ] ; e . push ( '<ul class="' + t . id + '-legend">' ) ; for ( var i = 0 ; i < t . data . datasets . length ; i ++ ) e . push ( '<li><span style="background-color:' + t . data . datasets [ i ] . backgroundColor + '">' ) , t . data . datasets [ i ] . label && e . push ( t . data . datasets [ i ] . label ) , e . push ( "</span></li>" ) ; return e . push ( "</ul>" ) , e . join ( "" ) } } } , "undefined" != typeof amd ? define ( function ( ) { return i } ) : "object" == typeof module && module . exports && ( module . exports = i ) , t . Chart = i , i . noConflict = function ( ) { return t . Chart = e , i } } . call ( this ) , function ( ) { "use strict" ; { var t = this , e = t . Chart , i = e . helpers = { } , a = i . each = function ( t , e , i , a ) { var s = Array . prototype . slice . call ( arguments , 3 ) ; if ( t ) if ( t . length === + t . length ) { var o ; if ( a ) for ( o = t . length - 1 ; o >= 0 ; o -- ) e . apply ( i , [ t [ o ] , o ] . concat ( s ) ) ; else for ( o = 0 ; o < t . length ; o ++ ) e . apply ( i , [ t [ o ] , o ] . concat ( s ) ) } else for ( var n in t ) e . apply ( i , [ t [ n ] , n ] . concat ( s ) ) } , s = i . clone = function ( t ) { var e = { } ; return a ( t , function ( a , o ) { t . hasOwnProperty ( o ) && ( e [ o ] = i . isArray ( a ) ? a . slice ( 0 ) : "object" == typeof a && null !== a ? s ( a ) : a ) } ) , e } , o = i . extend = function ( t ) { return a ( Array . prototype . slice . call ( arguments , 1 ) , function ( e ) { a ( e , function ( i , a ) { e . hasOwnProperty ( a ) && ( t [ a ] = i ) } ) } ) , t } , n = ( i . configMerge = function ( t ) { var a = s ( t ) ; return i . each ( Array . prototype . slice . call ( arguments , 1 ) , function ( t ) { i . each ( t , function ( s , o ) { if ( t . hasOwnProperty ( o ) ) if ( "scales" === o ) a [ o ] = i . scaleMerge ( a . hasOwnProperty ( o ) ? a [ o ] : { } , s ) ; else if ( "scale" === o ) a [ o ] = i . configMerge ( a . hasOwnProperty ( o ) ? a [ o ] : { } , e . scaleService . getScaleDefaults ( s . type ) , s ) ; else if ( a . hasOwnProperty ( o ) && i . isArray ( a [ o ] ) && i . isArray ( s ) ) { var n = a [ o ] ; i . each ( s , function ( t , e ) { e < n . length ? n [ e ] = "object" == typeof n [ e ] && null !== n [ e ] && "object" == typeof t && null !== t ? i . configMerge ( n [ e ] , t ) : t : n . push ( t ) } ) } else a [ o ] = a . hasOwnProperty ( o ) && "object" == typeof a [ o ] && null !== a [ o ] && "object" == typeof s ? i . configMerge ( a [ o ] , s ) : s } ) } ) , a } , i . extendDeep = function ( ) { function t ( e ) { return i . each ( arguments , function ( a ) { a !== e && i . each ( a , function ( i , a ) { e [ a ] && e [ a ] . constructor && e [ a ] . constructor === Object ? t ( e [ a ] , i ) : e [ a ] = i } ) } ) , e } return t . apply ( this , arguments ) } , i . scaleMerge = function ( t , a ) { var o = s ( t ) ; return i . each ( a , function ( t , s ) { a . hasOwnProperty ( s ) && ( "xAxes" === s || "yAxes" === s ? o . hasOwnProperty ( s ) ? i . each ( t , function ( t , a ) { a >= o [ s ] . length || ! o [ s ] [ a ] . type ? o [ s ] . push ( i . configMerge ( t . type ? e . scaleService . getScaleDefaults ( t . type ) : { } , t ) ) : o [ s ] [ a ] = t . type !== o [ s ] [ a ] . type ? i . configMerge ( o [ s ] [ a ] , t . type ? e . scaleService . getScaleDefaults ( t . type ) : { } , t ) : i . configMerge ( o [ s ] [ a ] , t ) } ) : ( o [ s ] = [ ] , i . each ( t , function ( t ) { o [ s ] . push ( i . configMerge ( t . type ? e . scaleService . getScaleDefaults ( t . type ) : { } , t ) ) } ) ) : o [ s ] = o . hasOwnProperty ( s ) && "object" == typeof o [ s ] && null !== o [ s ] && "object" == typeof t ? i . configMerge ( o [ s ] , t ) : t ) } ) , o } , i . getValueAtIndexOrDefault = function ( t , e , a ) { return void 0 === t || null === t ? a : i . isArray ( t ) ? e < t . length ? t [ e ] : a : t } , i . indexOf = function ( t , e ) { if ( Array . prototype . indexOf ) return t . indexOf ( e ) ; for ( var i = 0 ; i < t . length ; i ++ ) if ( t [ i ] === e ) return i ; return - 1 } , i . where = function ( t , e ) { var a = [ ] ; return i
} else { e = ! 0 ; var c = "right" == this . options . position ? this . left : this . right - 5 , d = "right" == this . options . position ? this . left + 5 : this . right ; if ( i . each ( this . ticks , function ( a , s ) { var o = this . getPixelForTick ( s ) ; if ( this . options . gridLines . show && ( s === ( "undefined" != typeof this . zeroLineIndex ? this . zeroLineIndex : 0 ) ? ( this . ctx . lineWidth = this . options . gridLines . zeroLineWidth , this . ctx . strokeStyle = this . options . gridLines . zeroLineColor , e = ! 0 ) : e && ( this . ctx . lineWidth = this . options . gridLines . lineWidth , this . ctx . strokeStyle = this . options . gridLines . color , e = ! 1 ) , o += i . aliasPixel ( this . ctx . lineWidth ) , this . ctx . beginPath ( ) , this . options . gridLines . drawTicks && ( this . ctx . moveTo ( c , o ) , this . ctx . lineTo ( d , o ) ) , this . options . gridLines . drawOnChartArea && ( this . ctx . moveTo ( t . left , o ) , this . ctx . lineTo ( t . right , o ) ) , this . ctx . stroke ( ) ) , this . options . ticks . show ) { var n , h = this . getPixelForTick ( s , this . options . gridLines . offsetGridLines ) ; this . ctx . save ( ) , "left" == this . options . position ? this . options . ticks . mirror ? ( n = this . right + this . options . ticks . padding , this . ctx . textAlign = "left" ) : ( n = this . right - this . options . ticks . padding , this . ctx . textAlign = "right" ) : this . options . ticks . mirror ? ( n = this . left - this . options . ticks . padding , this . ctx . textAlign = "right" ) : ( n = this . left + this . options . ticks . padding , this . ctx . textAlign = "left" ) , this . ctx . translate ( n , h ) , this . ctx . rotate ( - 1 * i . toRadians ( this . labelRotation ) ) , this . ctx . font = r , this . ctx . textBaseline = "middle" , this . ctx . fillText ( a , 0 , 0 ) , this . ctx . restore ( ) } } , this ) , this . options . scaleLabel . show ) { s = "left" == this . options . position ? this . left + this . options . scaleLabel . fontSize / 2 : this . right - this . options . scaleLabel . fontSize / 2 , o = this . top + ( this . bottom - this . top ) / 2 ; var u = "left" == this . options . position ? - . 5 * Math . PI : . 5 * Math . PI ; this . ctx . save ( ) , this . ctx . translate ( s , o ) , this . ctx . rotate ( u ) , this . ctx . textAlign = "center" , this . ctx . fillStyle = this . options . scaleLabel . fontColor , this . ctx . font = i . fontString ( this . options . scaleLabel . fontSize , this . options . scaleLabel . fontStyle , this . options . scaleLabel . fontFamily ) , this . ctx . textBaseline = "middle" , this . ctx . fillText ( this . options . scaleLabel . labelString , 0 , 0 ) , this . ctx . restore ( ) } } } } } ) } . call ( this ) , function ( ) { "use strict" ; var t = this , e = t . Chart , i = e . helpers ; e . scaleService = { constructors : { } , defaults : { } , registerScaleType : function ( t , e , a ) { this . constructors [ t ] = e , this . defaults [ t ] = i . clone ( a ) } , getScaleConstructor : function ( t ) { return this . constructors . hasOwnProperty ( t ) ? this . constructors [ t ] : void 0 } , getScaleDefaults : function ( t ) { return this . defaults . hasOwnProperty ( t ) ? i . scaleMerge ( e . defaults . scale , this . defaults [ t ] ) : { } } , update : function ( t , e , a ) { var s = e > 30 ? 5 : 2 , o = a > 30 ? 5 : 2 ; if ( t ) { var n = i . where ( t . scales , function ( t ) { return "left" == t . options . position } ) , r = i . where ( t . scales , function ( t ) { return "right" == t . options . position } ) , h = i . where ( t . scales , function ( t ) { return "top" == t . options . position } ) , l = i . where ( t . scales , function ( t ) { return "bottom" == t . options . position } ) , c = i . where ( t . scales , function ( t ) { return "chartArea" == t . options . position } ) , d = e / 2 , u = a / 2 ; d -= 2 * s , u -= 2 * o ; var g = ( e - d ) / ( n . length + r . length ) , m = ( a - u ) / ( h . length + l . length ) , p = [ ] , f = function ( t ) { var e = t . update ( g , u ) ; p . push ( { horizontal : ! 1 , minSize : e , scale : t } ) } , b = function ( t ) { var e = t . update ( d , m ) ; p . push ( { horizontal : ! 0 , minSize : e , scale : t } ) } ; i . each ( n , f ) , i . each ( r , f ) , i . each ( h , b ) , i . each ( l , b ) ; var v = a - 2 * o , x = e - 2 * s ; i . each ( p , function ( t ) { t . horizontal ? v -= t . minSize . height : x -= t . minSize . width } ) ; var y = function ( t ) { var e = i . findNextWhere ( p , function ( e ) { return e . scale === t } ) ; e && t . update ( e . minSize . width , v ) } , k = function ( t ) { var e = i . findNextWhere ( p , function ( e ) { return e . scale === t } ) , a = { left : D , right : w , top : 0 , bottom : 0 } ; e && t . update ( x , e . minSize . height , a ) } , D = s , w = s , C = o , S = o ; i . each ( n , y ) , i . each ( r , y ) , i . each ( n , function ( t ) { D += t . width } ) , i . each ( r , function ( t ) { w += t . width } ) , i . each ( h , k ) , i . each ( l , k ) , i . each ( h , function ( t ) { C += t . height } ) , i . each ( l , function ( t ) { S += t . height } ) , i . each ( n , function ( t ) { var e = i . findNextWhere ( p , function ( e ) { return e . scale === t } ) , a = { left : 0 , right : 0 , top : C , bottom : S } ; e && t . update ( e . minSize . width , v , a ) } ) , i . each ( r , function ( t ) { var e = i . findNextWhere ( p , function ( e ) { return e . scale === t } ) , a = { left : 0 , right : 0 , top : C , bottom : S } ; e && t . update ( e . minSize . width , v , a ) } ) , D = s , w = s , C = o , S = o , i . each ( n , function ( t ) { D += t . width } ) , i . each ( r , function ( t ) { w += t . width } ) , i . each ( h , funct
} , this ) } , addElementAndReset : function ( t ) { this . getDataset ( ) . metaData = this . getDataset ( ) . metaData || [ ] ; var i = new e . elements . Point ( { _chart : this . chart . chart , _datasetIndex : this . index , _index : t } ) ; this . updateElement ( i , t , ! 0 ) , this . getDataset ( ) . metaData . splice ( t , 0 , i ) , this . updateBezierControlPoints ( ) } , removeElement : function ( t ) { this . getDataset ( ) . metaData . splice ( t , 1 ) } , reset : function ( ) { this . update ( ! 0 ) } , buildOrUpdateElements : function ( ) { var t = this . getDataset ( ) . data . length , e = this . getDataset ( ) . metaData . length ; if ( e > t ) this . getDataset ( ) . metaData . splice ( t , e - t ) ; else if ( t > e ) for ( var i = e ; t > i ; ++ i ) this . addElementAndReset ( i ) } , update : function ( t ) { { var e , a = this . getDataset ( ) . metaDataset , s = this . getDataset ( ) . metaData , o = this . getScaleForId ( this . getDataset ( ) . yAxisID ) ; this . getScaleForId ( this . getDataset ( ) . xAxisID ) } e = o . getPixelForValue ( o . min < 0 && o . max < 0 ? o . max : o . min > 0 && o . max > 0 ? o . min : 0 ) , i . extend ( a , { _scale : o , _datasetIndex : this . index , _children : s , _model : { tension : a . custom && a . custom . tension ? a . custom . tension : this . getDataset ( ) . tension || this . chart . options . elements . line . tension , backgroundColor : a . custom && a . custom . backgroundColor ? a . custom . backgroundColor : this . getDataset ( ) . backgroundColor || this . chart . options . elements . line . backgroundColor , borderWidth : a . custom && a . custom . borderWidth ? a . custom . borderWidth : this . getDataset ( ) . borderWidth || this . chart . options . elements . line . borderWidth , borderColor : a . custom && a . custom . borderColor ? a . custom . borderColor : this . getDataset ( ) . borderColor || this . chart . options . elements . line . borderColor , borderCapStyle : a . custom && a . custom . borderCapStyle ? a . custom . borderCapStyle : this . getDataset ( ) . borderCapStyle || this . chart . options . elements . line . borderCapStyle , borderDash : a . custom && a . custom . borderDash ? a . custom . borderDash : this . getDataset ( ) . borderDash || this . chart . options . elements . line . borderDash , borderDashOffset : a . custom && a . custom . borderDashOffset ? a . custom . borderDashOffset : this . getDataset ( ) . borderDashOffset || this . chart . options . elements . line . borderDashOffset , borderJoinStyle : a . custom && a . custom . borderJoinStyle ? a . custom . borderJoinStyle : this . getDataset ( ) . borderJoinStyle || this . chart . options . elements . line . borderJoinStyle , fill : a . custom && a . custom . fill ? a . custom . fill : void 0 !== this . getDataset ( ) . fill ? this . getDataset ( ) . fill : this . chart . options . elements . line . fill , scaleTop : o . top , scaleBottom : o . bottom , scaleZero : e } } ) , a . pivot ( ) , i . each ( s , function ( e , i ) { this . updateElement ( e , i , t ) } , this ) , this . updateBezierControlPoints ( ) } , updateElement : function ( t , e , a ) { var s , o = this . getScaleForId ( this . getDataset ( ) . yAxisID ) , n = this . getScaleForId ( this . getDataset ( ) . xAxisID ) ; s = o . getPixelForValue ( o . min < 0 && o . max < 0 ? o . max : o . min > 0 && o . max > 0 ? o . min : 0 ) , i . extend ( t , { _chart : this . chart . chart , _xScale : n , _yScale : o , _datasetIndex : this . index , _index : e , _model : { x : n . getPixelForValue ( this . getDataset ( ) . data [ e ] , e , this . index , this . chart . isCombo ) , y : a ? s : this . calculatePointY ( this . getDataset ( ) . data [ e ] , e , this . index , this . chart . isCombo ) , tension : t . custom && t . custom . tension ? t . custom . tension : this . getDataset ( ) . tension || this . chart . options . elements . line . tension , radius : t . custom && t . custom . radius ? t . custom . radius : i . getValueAtIndexOrDefault ( this . getDataset ( ) . radius , e , this . chart . options . elements . point . radius ) , backgroundColor : t . custom && t . custom . backgroundColor ? t . custom . backgroundColor : i . getValueAtIndexOrDefault ( this . getDataset ( ) . pointBackgroundColor , e , this . chart . options . elements . point . backgroundColor ) , borderColor : t . custom && t . custom . borderColor ? t . custom . borderColor : i . getValueAtIndexOrDefault ( this . getDataset ( ) . pointBorderColor , e , this . chart . options . elements . point . borderColor ) , borderWidth : t . custom && t . custom . borderWidth ? t . custom . borderWidth : i . getValueAtIndexOrDefault ( this . getDataset ( ) . pointBorderWidth , e , this . chart . options . elements . point . borderWidth ) , hitRadius : t . custom && t . custom . hitRadius ? t . custom . hitRadius : i . getValueAtIndexOrDefault ( this . getDataset ( ) . hitRadius , e , this . chart . options . elements . point . hitRadius ) } } ) , t . _model . skip = t . custom && t . custom . skip ? t . custom . skip : isNaN ( t . _model . x ) || isNaN ( t . _model . y ) } , calculatePointY : function ( t , e , a ) { var s = ( this . getScaleForId ( this . getDataset ( ) . xAxisID ) , this . getScaleForId ( this . getDataset ( ) . yAxisID ) ) ; if ( s . options . stacked ) { for ( var o = 0 , n = 0 , r = this . chart . dat
"object" == typeof e . data [ 0 ] ? i . each ( e . data , function ( t ) { var e = this . parseTime ( this . getRightValue ( t ) ) ; this . options . time . round && e . startOf ( this . options . time . round ) , a . push ( e ) , this . firstTick = null !== this . firstTick ? moment . min ( this . firstTick , e ) : e , this . lastTick = null !== this . lastTick ? moment . max ( this . lastTick , e ) : e } , this ) : a = t , this . labelMoments . push ( a ) } , this ) , this . firstTick = this . firstTick . clone ( ) , this . lastTick = this . lastTick . clone ( ) } , buildTicks : function ( ) { if ( this . ticks = [ ] , this . labelMoments = [ ] , this . buildLabelMoments ( ) , this . options . time . unit ) this . tickUnit = this . options . time . unit || "day" , this . displayFormat = a . unit [ this . tickUnit ] . display , this . tickRange = Math . ceil ( this . lastTick . diff ( this . firstTick , this . tickUnit , ! 0 ) ) ; else { var t = this . width - ( this . paddingLeft + this . paddingRight ) , e = t / this . options . ticks . fontSize + 4 , s = this . options . time . round ? 0 : 2 ; this . tickUnit = "millisecond" , this . tickRange = Math . ceil ( this . lastTick . diff ( this . firstTick , this . tickUnit , ! 0 ) + s ) , this . displayFormat = a . unit [ this . tickUnit ] . display , i . each ( a . units , function ( t ) { this . tickRange <= e || ( this . tickUnit = t , this . tickRange = Math . ceil ( this . lastTick . diff ( this . firstTick , this . tickUnit ) + s ) , this . displayFormat = a . unit [ t ] . display ) } , this ) } this . firstTick . startOf ( this . tickUnit ) , this . lastTick . endOf ( this . tickUnit ) , this . smallestLabelSeparation = this . width , i . each ( this . data . datasets , function ( t , e ) { for ( var i = 1 ; i < this . labelMoments [ e ] . length ; i ++ ) this . smallestLabelSeparation = Math . min ( this . smallestLabelSeparation , this . labelMoments [ e ] [ i ] . diff ( this . labelMoments [ e ] [ i - 1 ] , this . tickUnit , ! 0 ) ) } , this ) , this . options . time . displayFormat && ( this . displayFormat = this . options . time . displayFormat ) ; for ( var o = 0 ; o <= this . tickRange ; ++ o ) this . ticks . push ( this . firstTick . clone ( ) . add ( o , this . tickUnit ) ) } , getLabelForIndex : function ( t , e ) { var i = this . data . labels && t < this . data . labels . length ? this . data . labels [ t ] : "" ; return "object" == typeof this . data . datasets [ e ] . data [ 0 ] && ( i = this . getRightValue ( this . data . datasets [ e ] . data [ t ] ) ) , i } , convertTicksToLabels : function ( ) { this . ticks = this . ticks . map ( function ( t , e , i ) { var s = t . format ( this . options . time . displayFormat ? this . options . time . displayFormat : a . unit [ this . tickUnit ] . display ) ; return this . options . ticks . userCallback ? this . options . ticks . userCallback ( s , e , i ) : s } , this ) } , getPixelForValue : function ( t , e , i ) { var a = this . getLabelMoment ( i , e ) , s = a . diff ( this . firstTick , this . tickUnit , ! 0 ) , o = s / this . tickRange ; if ( this . isHorizontal ( ) ) { var n = this . width - ( this . paddingLeft + this . paddingRight ) , r = ( n / Math . max ( this . ticks . length - 1 , 1 ) , n * o + this . paddingLeft ) ; return this . left + Math . round ( r ) } var h = this . height - ( this . paddingTop + this . paddingBottom ) , l = ( h / Math . max ( this . ticks . length - 1 , 1 ) , h * o + this . paddingTop ) ; return this . top + Math . round ( l ) } , parseTime : function ( t ) { return "function" == typeof t . getMonth || "number" == typeof t ? moment ( t ) : t . isValid && t . isValid ( ) ? t : "string" != typeof this . options . time . format && this . options . time . format . call ? this . options . time . format ( t ) : moment ( t , this . options . time . format ) } } ) ; e . scaleService . registerScaleType ( "time" , o , s ) } . call ( this ) , / * !
2015-06-12 22:00:48 +02:00
* Chart . js
* http : //chartjs.org/
2015-10-31 23:40:23 +01:00
* Version : 2.0 . 0 - beta
2015-06-12 22:00:48 +02:00
*
* Copyright 2015 Nick Downie
* Released under the MIT license
* https : //github.com/nnnick/Chart.js/blob/master/LICENSE.md
* /
2015-09-28 19:30:52 +02:00
function ( ) { "use strict" ; var t = this , e = t . Chart , i = e . helpers ; e . defaults . global . elements . arc = { backgroundColor : e . defaults . global . defaultColor , borderColor : "#fff" , borderWidth : 2 } , e . elements . Arc = e . Element . extend ( { inLabelRange : function ( t ) { var e = this . _view ; return e ? Math . pow ( t - e . x , 2 ) < Math . pow ( e . radius + e . hoverRadius , 2 ) : ! 1 } , inRange : function ( t , e ) { var a = this . _view ; if ( a ) { var s = i . getAngleFromPoint ( a , { x : t , y : e } ) , o = a . startAngle < - . 5 * Math . PI ? a . startAngle + 2 * Math . PI : a . startAngle > 1.5 * Math . PI ? a . startAngle - 2 * Math . PI : a . startAngle , n = a . endAngle < - . 5 * Math . PI ? a . endAngle + 2 * Math . PI : a . endAngle > 1.5 * Math . PI ? a . endAngle - 2 * Math . PI : a . endAngle , r = s . angle >= o && s . angle <= n , h = s . distance >= a . innerRadius && s . distance <= a . outerRadius ; return r && h } return ! 1 } , tooltipPosition : function ( ) { var t = this . _view , e = t . startAngle + ( t . endAngle - t . startAngle ) / 2 , i = ( t . outerRadius - t . innerRadius ) / 2 + t . innerRadius ; return { x : t . x + Math . cos ( e ) * i , y : t . y + Math . sin ( e ) * i } } , draw : function ( ) { var t = this . _chart . ctx , e = this . _view ; t . beginPath ( ) , t . arc ( e . x , e . y , e . outerRadius , e . startAngle , e . endAngle ) , t . arc ( e . x , e . y , e . innerRadius , e . endAngle , e . startAngle , ! 0 ) , t . closePath ( ) , t . strokeStyle = e . borderColor , t . lineWidth = e . borderWidth , t . fillStyle = e . backgroundColor , t . fill ( ) , t . lineJoin = "bevel" , e . borderWidth && t . stroke ( ) } } ) } . call ( this ) , / * !
2015-06-12 22:00:48 +02:00
* Chart . js
* http : //chartjs.org/
2015-10-31 23:40:23 +01:00
* Version : 2.0 . 0 - beta
2015-06-12 22:00:48 +02:00
*
* Copyright 2015 Nick Downie
* Released under the MIT license
* https : //github.com/nnnick/Chart.js/blob/master/LICENSE.md
* /
2015-10-31 23:40:23 +01:00
function ( ) { "use strict" ; var t = this , e = t . Chart , i = e . helpers ; e . defaults . global . elements . line = { tension : . 4 , backgroundColor : e . defaults . global . defaultColor , borderWidth : 3 , borderColor : e . defaults . global . defaultColor , borderCapStyle : "butt" , borderDash : [ ] , borderDashOffset : 0 , borderJoinStyle : "miter" , fill : ! 0 } , e . elements . Line = e . Element . extend ( { draw : function ( ) { var t = this . _view , a = this . _chart . ctx , s = this . _children [ 0 ] , o = this . _children [ this . _children . length - 1 ] ; if ( a . save ( ) , i . each ( this . _children , function ( e , s ) { var o = i . previousItem ( this . _children , s ) , n = i . nextItem ( this . _children , s ) ; return s || a . moveTo ( e . _view . x , t . scaleZero ) , e . _view . skip && ! this . loop ? ( a . lineTo ( o . _view . x , t . scaleZero ) , void a . moveTo ( n . _view . x , t . scaleZero ) ) : o . _view . skip ? void a . lineTo ( e . _view . x , e . _view . y ) : t . tension > 0 && s ? void a . bezierCurveTo ( o . _view . controlPointNextX , o . _view . controlPointNextY , e . _view . controlPointPreviousX , e . _view . controlPointPreviousY , e . _view . x , e . _view . y ) : void a . lineTo ( e . _view . x , e . _view . y ) } , this ) , this . _loop ) { if ( t . tension > 0 && ! s . _view . skip ) return void a . bezierCurveTo ( o . _view . controlPointNextX , o . _view . controlPointNextY , s . _view . controlPointPreviousX , s . _view . controlPointPreviousY , s . _view . x , s . _view . y ) ; a . lineTo ( s . _view . x , s . _view . y ) } if ( this . _children . length > 0 && t . fill && ( a . lineTo ( this . _children [ this . _children . length - 1 ] . _view . x , t . scaleZero ) , a . lineTo ( this . _children [ 0 ] . _view . x , t . scaleZero ) , a . fillStyle = t . backgroundColor || e . defaults . global . defaultColor , a . closePath ( ) , a . fill ( ) ) , a . lineCap = t . borderCapStyle || e . defaults . global . elements . line . borderCapStyle , a . setLineDash && a . setLineDash ( t . borderDash || e . defaults . global . elements . line . borderDash ) , a . lineDashOffset = t . borderDashOffset || e . defaults . global . elements . line . borderDashOffset , a . lineJoin = t . borderJoinStyle || e . defaults . global . elements . line . borderJoinStyle , a . lineWidth = t . borderWidth || e . defaults . global . elements . line . borderWidth , a . strokeStyle = t . borderColor || e . defaults . global . defaultColor , a . beginPath ( ) , i . each ( this . _children , function ( e , s ) { var o = i . previousItem ( this . _children , s ) , n = i . nextItem ( this . _children , s ) ; return s || a . moveTo ( e . _view . x , t . scaleZero ) , e . _view . skip && ! this . loop ? void a . moveTo ( n . _view . x , t . scaleZero ) : o . _view . skip ? void a . moveTo ( e . _view . x , e . _view . y ) : ( s || a . moveTo ( e . _view . x , e . _view . y ) , t . tension > 0 && s ? void a . bezierCurveTo ( o . _view . controlPointNextX , o . _view . controlPointNextY , e . _view . controlPointPreviousX , e . _view . controlPointPreviousY , e . _view . x , e . _view . y ) : void a . lineTo ( e . _view . x , e . _view . y ) ) } , this ) , this . _loop && ! s . _view . skip ) { if ( t . tension > 0 ) return void a . bezierCurveTo ( o . _view . controlPointNextX , o . _view . controlPointNextY , s . _view . controlPointPreviousX , s . _view . controlPointPreviousY , s . _view . x , s . _view . y ) ; a . lineTo ( s . _view . x , s . _view . y ) } a . stroke ( ) , a . restore ( ) } } ) } . call ( this ) , / * !
2015-06-12 22:00:48 +02:00
* Chart . js
* http : //chartjs.org/
2015-10-31 23:40:23 +01:00
* Version : 2.0 . 0 - beta
2015-06-12 22:00:48 +02:00
*
* Copyright 2015 Nick Downie
* Released under the MIT license
* https : //github.com/nnnick/Chart.js/blob/master/LICENSE.md
* /
2015-11-02 02:42:13 +01:00
function ( ) { "use strict" ; { var t = this , e = t . Chart ; e . helpers } e . defaults . global . elements . point = { radius : 3 , backgroundColor : e . defaults . global . defaultColor , borderWidth : 1 , borderColor : e . defaults . global . defaultColor , hitRadius : 1 , hoverRadius : 4 , hoverBorderWidth : 1 } , e . elements . Point = e . Element . extend ( { inRange : function ( t , e ) { var i = this . _view ; if ( i ) { var a = i . hitRadius + i . radius ; return Math . pow ( t - i . x , 2 ) + Math . pow ( e - i . y , 2 ) < Math . pow ( a , 2 ) } return ! 1 } , inLabelRange : function ( t ) { var e = this . _view ; return e ? Math . pow ( t - e . x , 2 ) < Math . pow ( e . radius + e . hitRadius , 2 ) : ! 1 } , tooltipPosition : function ( ) { var t = this . _view ; return { x : t . x , y : t . y , padding : t . radius + t . borderWidth } } , draw : function ( ) { var t = this . _view , i = this . _chart . ctx ; t . skip || ( t . radius > 0 || t . borderWidth > 0 ) && ( i . beginPath ( ) , i . arc ( t . x , t . y , t . radius || e . defaults . global . elements . point . radius , 0 , 2 * Math . PI ) , i . closePath ( ) , i . strokeStyle = t . borderColor || e . defaults . global . defaultColor , i . lineWidth = t . borderWidth || e . defaults . global . elements . point . borderWidth , i . fillStyle = t . backgroundColor || e . defaults . global . defaultColor , i . fill ( ) , i . stroke ( ) ) } } ) } . call ( this ) , function ( ) { "use strict" ; { var t = this , e = t . Chart ; e . helpers } e . defaults . global . elements . rectangle = { backgroundColor : e . defaults . global . defaultColor , borderWidth : 0 , borderColor : e . defaults . global . defaultColor } , e . elements . Rectangle = e . Element . extend ( { draw : function ( ) { var t = this . _chart . ctx , e = this . _view , i = e . width / 2 , a = e . x - i , s = e . x + i , o = e . base - ( e . base - e . y ) , n = e . borderWidth / 2 ; e . borderWidth && ( a += n , s -= n , o += n ) , t . beginPath ( ) , t . fillStyle = e . backgroundColor , t . strokeStyle = e . borderColor , t . lineWidth = e . borderWidth , t . moveTo ( a , e . base ) , t . lineTo ( a , o ) , t . lineTo ( s , o ) , t . lineTo ( s , e . base ) , t . fill ( ) , e . borderWidth && t . stroke ( ) } , height : function ( ) { var t = this . _view ; return t . base - t . y } , inRange : function ( t , e ) { var i = this . _view , a = ! 1 ; return i && ( a = i . y < i . base ? t >= i . x - i . width / 2 && t <= i . x + i . width / 2 && e >= i . y && e <= i . base : t >= i . x - i . width / 2 && t <= i . x + i . width / 2 && e >= i . base && e <= i . y ) , a } , inLabelRange : function ( t ) { var e = this . _view ; return e ? t >= e . x - e . width / 2 && t <= e . x + e . width / 2 : ! 1 } , tooltipPosition : function ( ) { var t = this . _view ; return t . y < t . base ? { x : t . x , y : t . y } : { x : t . x , y : t . base } } } ) } . call ( this ) , function ( ) { "use strict" ; { var t = this , e = t . Chart ; e . helpers } e . Bar = function ( t , i ) { return i . type = "bar" , new e ( t , i ) } } . call ( this ) , function ( ) { "use strict" ; var t = this , e = t . Chart , i = e . helpers , a = { hover : { mode : "single" } , scales : { xAxes : [ { type : "linear" , position : "bottom" , id : "x-axis-0" } ] , yAxes : [ { type : "linear" , position : "left" , id : "y-axis-0" } ] } , tooltips : { template : "(<%= value.x %>, <%= value.y %>)" , multiTemplate : "<%if (datasetLabel){%><%=datasetLabel%>: <%}%>(<%= value.x %>, <%= value.y %>)" } } ; e . Bubble = function ( t , s ) { return s . options = i . configMerge ( a , s . options ) , s . type = "bubble" , new e ( t , s ) } } . call ( this ) , function ( ) { "use strict" ; var t = this , e = t . Chart , i = e . helpers , a = { aspectRatio : 1 , legendTemplate : '<ul class="<%=name.toLowerCase()%>-legend"><% for (var i = 0; i < data.datasets[0].data.length; i++){%><li><span style="background-color:<%=data.datasets[0].backgroundColor[i]%>"><%if(data.labels && i < data.labels.length){%><%=data.labels[i]%><%}%></span></li><%}%></ul>' } ; e . Doughnut = function ( t , s ) { return s . options = i . configMerge ( a , s . options ) , s . type = "doughnut" , new e ( t , s ) } } . call ( this ) , function ( ) { "use strict" ; { var t = this , e = t . Chart ; e . helpers } e . Line = function ( t , i ) { return i . type = "line" , new e ( t , i ) } } . call ( this ) , function ( ) { "use strict" ; var t = this , e = t . Chart , i = e . helpers , a = { aspectRatio : 1 , legendTemplate : '<ul class="<%=name.toLowerCase()%>-legend"><% for (var i = 0; i < data.datasets[0].data.length; i++){%><li><span style="background-color:<%=data.datasets[0].backgroundColor[i]%>"><%if(data.labels && i < data.labels.length){%><%=data.labels[i]%><%}%></span></li><%}%></ul>' } ; e . PolarArea = function ( t , s ) { return s . options = i . configMerge ( a , s . options ) , s . type = "polarArea" , new e ( t , s ) } } . call ( this ) , function ( ) { "use strict" ; var t = this , e = t . Chart , i = e . helpers , a = { aspectRatio : 1 } ; e . Radar = function ( t , s ) { return s . options = i . configMerge ( a , s . options ) , s . type = "radar" , new e ( t , s ) } } . call ( this ) , function ( ) { "use strict" ; var t = this , e = t . Chart , i = e . helpers , a = { hover : { mode : "single" } , scales : { xAxes : [ { type : "linear" , position : "bottom" , id : "x-axis-1" } ] , yAxes : [ { type : "linear" , position : "left" , id : " y -