|
|
@ -0,0 +1,304 @@
|
|
|
|
|
|
|
|
(function e$$0(m,n,f){function e(a,h){if(!n[a]){if(!m[a]){var k="function"==typeof require&&require;if(!h&&k)return k(a,!0);if(c)return c(a,!0);k=Error("Cannot find module '"+a+"'");throw k.code="MODULE_NOT_FOUND",k;}k=n[a]={exports:{}};m[a][0].call(k.exports,function(c){var k=m[a][1][c];return e(k?k:c)},k,k.exports,e$$0,m,n,f)}return n[a].exports}for(var c="function"==typeof require&&require,a=0;a<f.length;a++)e(f[a]);return e})({1:[function(p,m,n){},{}],2:[function(p,m,n){function f(a){var c=a[0]/
|
|
|
|
|
|
|
|
255,d=a[1]/255,k=a[2]/255;a=Math.min(c,d,k);var h=Math.max(c,d,k),e=h-a,l;h==a?l=0:c==h?l=(d-k)/e:d==h?l=2+(k-c)/e:k==h&&(l=4+(c-d)/e);l=Math.min(60*l,360);0>l&&(l+=360);c=(a+h)/2;return[l,100*(h==a?0:.5>=c?e/(h+a):e/(2-h-a)),100*c]}function e(a){var c=a[0],d=a[1];a=a[2];var k=Math.min(c,d,a),h=Math.max(c,d,a),e=h-k,l;h==k?l=0:c==h?l=(d-a)/e:d==h?l=2+(a-c)/e:a==h&&(l=4+(c-d)/e);l=Math.min(60*l,360);0>l&&(l+=360);return[l,0==h?0:e/h*1E3/10,h/255*1E3/10]}function c(a){var c=a[0],d=a[1],k=a[2];a=f(a)[0];
|
|
|
|
|
|
|
|
var h=1/255*Math.min(c,Math.min(d,k)),k=1-1/255*Math.max(c,Math.max(d,k));return[a,100*h,100*k]}function a(a){var c=a[0]/255,d=a[1]/255;a=a[2]/255;var k;k=Math.min(1-c,1-d,1-a);return[100*((1-c-k)/(1-k)||0),100*((1-d-k)/(1-k)||0),100*((1-a-k)/(1-k)||0),100*k]}function d(a){return I[JSON.stringify(a)]}function h(a){var c=a[0]/255,d=a[1]/255;a=a[2]/255;c=.04045<c?Math.pow((c+.055)/1.055,2.4):c/12.92;d=.04045<d?Math.pow((d+.055)/1.055,2.4):d/12.92;a=.04045<a?Math.pow((a+.055)/1.055,2.4):a/12.92;return[100*
|
|
|
|
|
|
|
|
(.4124*c+.3576*d+.1805*a),100*(.2126*c+.7152*d+.0722*a),100*(.0193*c+.1192*d+.9505*a)]}function k(a){var c=h(a);a=c[0];var d=c[1],c=c[2];a/=95.047;d/=100;c/=108.883;a=.008856<a?Math.pow(a,1/3):7.787*a+16/116;d=.008856<d?Math.pow(d,1/3):7.787*d+16/116;c=.008856<c?Math.pow(c,1/3):7.787*c+16/116;return[116*d-16,500*(a-d),200*(d-c)]}function l(a){var c=a[0]/360,d=a[1]/100;a=a[2]/100;var k,h;if(0==d)return k=255*a,[k,k,k];d=.5>a?a*(1+d):a+d-a*d;a=2*a-d;h=[0,0,0];for(var e=0;3>e;e++)k=c+1/3*-(e-1),0>k&&
|
|
|
|
|
|
|
|
k++,1<k&&k--,k=1>6*k?a+6*(d-a)*k:1>2*k?d:2>3*k?a+(d-a)*(2/3-k)*6:a,h[e]=255*k;return h}function q(a){var c=a[0]/60,d=a[1]/100;a=a[2]/100;var k=Math.floor(c)%6,h=c-Math.floor(c),c=255*a*(1-d),e=255*a*(1-d*h),d=255*a*(1-d*(1-h));a*=255;switch(k){case 0:return[a,d,c];case 1:return[e,a,c];case 2:return[c,a,d];case 3:return[c,e,a];case 4:return[d,c,a];case 5:return[a,c,e]}}function t(a){var c=a[0]/360,d=a[1]/100,k=a[2]/100;a=d+k;1<a&&(d/=a,k/=a);a=Math.floor(6*c);k=1-k;c=6*c-a;0!=(a&1)&&(c=1-c);c=d+c*
|
|
|
|
|
|
|
|
(k-d);switch(a){default:case 6:case 0:r=k;g=c;b=d;break;case 1:r=c;g=k;b=d;break;case 2:r=d;g=k;b=c;break;case 3:r=d;g=c;b=k;break;case 4:r=c;g=d;b=k;break;case 5:r=k,g=d,b=c}return[255*r,255*g,255*b]}function w(a){var c=a[3]/100;return[255*(1-Math.min(1,a[0]/100*(1-c)+c)),255*(1-Math.min(1,a[1]/100*(1-c)+c)),255*(1-Math.min(1,a[2]/100*(1-c)+c))]}function x(a){var c=a[0]/100,d=a[1]/100,k=a[2]/100,h;a=3.2406*c+-1.5372*d+-.4986*k;h=-.9689*c+1.8758*d+.0415*k;c=.0557*c+-.204*d+1.057*k;a=.0031308<a?1.055*
|
|
|
|
|
|
|
|
Math.pow(a,1/2.4)-.055:a*=12.92;h=.0031308<h?1.055*Math.pow(h,1/2.4)-.055:h*=12.92;c=.0031308<c?1.055*Math.pow(c,1/2.4)-.055:c*=12.92;a=Math.min(Math.max(0,a),1);h=Math.min(Math.max(0,h),1);c=Math.min(Math.max(0,c),1);return[255*a,255*h,255*c]}function u(a){var c=a[0],d=a[1];a=a[2];c/=95.047;d/=100;a/=108.883;c=.008856<c?Math.pow(c,1/3):7.787*c+16/116;d=.008856<d?Math.pow(d,1/3):7.787*d+16/116;a=.008856<a?Math.pow(a,1/3):7.787*a+16/116;return[116*d-16,500*(c-d),200*(d-a)]}function E(a){var c=a[0],
|
|
|
|
|
|
|
|
d=a[1];a=a[2];var k,h,e;8>=c?(c=100*c/903.3,e=c/100*7.787+16/116):(c=100*Math.pow((c+16)/116,3),e=Math.pow(c/100,1/3));k=.008856>=k/95.047?k=95.047*(d/500+e-16/116)/7.787:95.047*Math.pow(d/500+e,3);h=.008859>=h/108.883?h=108.883*(e-a/200-16/116)/7.787:108.883*Math.pow(e-a/200,3);return[k,c,h]}function v(a){var c=a[0],d=a[1];a=a[2];var k;k=360*Math.atan2(a,d)/2/Math.PI;0>k&&(k+=360);return[c,Math.sqrt(d*d+a*a),k]}function A(a){return x(E(a))}function F(a){var c=a[0],d=a[1];a=a[2]/360*2*Math.PI;return[c,
|
|
|
|
|
|
|
|
d*Math.cos(a),d*Math.sin(a)]}m.exports={rgb2hsl:f,rgb2hsv:e,rgb2hwb:c,rgb2cmyk:a,rgb2keyword:d,rgb2xyz:h,rgb2lab:k,rgb2lch:function(a){return v(k(a))},hsl2rgb:l,hsl2hsv:function(a){var c=a[0],d=a[1]/100;a=a[2]/100;if(0===a)return[0,0,0];a*=2;d*=1>=a?a:2-a;return[c,2*d/(a+d)*100,(a+d)/2*100]},hsl2hwb:function(a){return c(l(a))},hsl2cmyk:function(c){return a(l(c))},hsl2keyword:function(a){return d(l(a))},hsv2rgb:q,hsv2hsl:function(a){var c=a[0],d=a[1]/100,k=a[2]/100;a=(2-d)*k;d=(d=d*k/(1>=a?a:2-a))||
|
|
|
|
|
|
|
|
0;return[c,100*d,a/2*100]},hsv2hwb:function(a){return c(q(a))},hsv2cmyk:function(c){return a(q(c))},hsv2keyword:function(a){return d(q(a))},hwb2rgb:t,hwb2hsl:function(a){return f(t(a))},hwb2hsv:function(a){return e(t(a))},hwb2cmyk:function(c){return a(t(c))},hwb2keyword:function(a){return d(t(a))},cmyk2rgb:w,cmyk2hsl:function(a){return f(w(a))},cmyk2hsv:function(a){return e(w(a))},cmyk2hwb:function(a){return c(w(a))},cmyk2keyword:function(a){return d(w(a))},keyword2rgb:function(a){return z[a]},keyword2hsl:function(a){return f(z[a])},
|
|
|
|
|
|
|
|
keyword2hsv:function(a){return e(z[a])},keyword2hwb:function(a){return c(z[a])},keyword2cmyk:function(c){return a(z[c])},keyword2lab:function(a){return k(z[a])},keyword2xyz:function(a){return h(z[a])},xyz2rgb:x,xyz2lab:u,xyz2lch:function(a){return v(u(a))},lab2xyz:E,lab2rgb:A,lab2lch:v,lch2lab:F,lch2xyz:function(a){return E(F(a))},lch2rgb:function(a){return A(F(a))}};var z={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,
|
|
|
|
|
|
|
|
245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,
|
|
|
|
|
|
|
|
0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,
|
|
|
|
|
|
|
|
220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,
|
|
|
|
|
|
|
|
211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,
|
|
|
|
|
|
|
|
104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,
|
|
|
|
|
|
|
|
218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,
|
|
|
|
|
|
|
|
180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},I={},y;for(y in z)I[JSON.stringify(z[y])]=y},{}],3:[function(p,m,n){var f=p("./conversions"),e=function(){return new a},c;for(c in f)e[c+"Raw"]=function(a){return function(c){"number"==typeof c&&(c=Array.prototype.slice.call(arguments));return f[a](c)}}(c),n=/(\w+)2(\w+)/.exec(c),
|
|
|
|
|
|
|
|
p=n[1],n=n[2],e[p]=e[p]||{},e[p][n]=e[c]=function(a){return function(c){"number"==typeof c&&(c=Array.prototype.slice.call(arguments));var k=f[a](c);if("string"==typeof k||void 0===k)return k;for(var e=0;e<k.length;e++)k[e]=Math.round(k[e]);return k}}(c);var a=function(){this.convs={}};a.prototype.routeSpace=function(a,c){var k=c[0];if(void 0===k)return this.getValues(a);"number"==typeof k&&(k=Array.prototype.slice.call(c));return this.setValues(a,k)};a.prototype.setValues=function(a,c){this.space=
|
|
|
|
|
|
|
|
a;this.convs={};this.convs[a]=c;return this};a.prototype.getValues=function(a){var c=this.convs[a];c||(c=this.space,c=e[c][a](this.convs[c]),this.convs[a]=c);return c};["rgb","hsl","hsv","cmyk","keyword"].forEach(function(c){a.prototype[c]=function(a){return this.routeSpace(c,arguments)}});m.exports=e},{"./conversions":2}],4:[function(p,m,n){function f(a){if(a){var c=/^#([a-fA-F0-9]{6})$/,d=/^rgba?\(\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/,h=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/,
|
|
|
|
|
|
|
|
e=/(\w+)/,l=[0,0,0],f=1,t=a.match(/^#([a-fA-F0-9]{3})$/);if(t)for(t=t[1],a=0;a<l.length;a++)l[a]=parseInt(t[a]+t[a],16);else if(t=a.match(c))for(t=t[1],a=0;a<l.length;a++)l[a]=parseInt(t.slice(2*a,2*a+2),16);else if(t=a.match(d)){for(a=0;a<l.length;a++)l[a]=parseInt(t[a+1]);f=parseFloat(t[4])}else if(t=a.match(h)){for(a=0;a<l.length;a++)l[a]=Math.round(2.55*parseFloat(t[a+1]));f=parseFloat(t[4])}else if(t=a.match(e)){if("transparent"==t[1])return[0,0,0,0];l=q[t[1]];if(!l)return}for(a=0;a<l.length;a++)l[a]=
|
|
|
|
|
|
|
|
k(l[a],0,255);f=f||0==f?k(f,0,1):1;l[3]=f;return l}}function e(a){if(a){var c=a.match(/^hsla?\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/);if(c){var d=parseFloat(c[4]);a=k(parseInt(c[1]),0,360);var h=k(parseFloat(c[2]),0,100),c=k(parseFloat(c[3]),0,100),d=k(isNaN(d)?1:d,0,1);return[a,h,c,d]}}}function c(a){if(a){var c=a.match(/^hwb\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/);if(c){var d=
|
|
|
|
|
|
|
|
parseFloat(c[4]);a=k(parseInt(c[1]),0,360);var h=k(parseFloat(c[2]),0,100),c=k(parseFloat(c[3]),0,100),d=k(isNaN(d)?1:d,0,1);return[a,h,c,d]}}}function a(a,c){void 0===c&&(c=void 0!==a[3]?a[3]:1);return"rgba("+a[0]+", "+a[1]+", "+a[2]+", "+c+")"}function d(a,c){return"rgba("+Math.round(a[0]/255*100)+"%, "+Math.round(a[1]/255*100)+"%, "+Math.round(a[2]/255*100)+"%, "+(c||a[3]||1)+")"}function h(a,c){void 0===c&&(c=void 0!==a[3]?a[3]:1);return"hsla("+a[0]+", "+a[1]+"%, "+a[2]+"%, "+c+")"}function k(a,
|
|
|
|
|
|
|
|
c,d){return Math.min(Math.max(c,a),d)}function l(a){a=a.toString(16).toUpperCase();return 2>a.length?"0"+a:a}var q=p("color-name");m.exports={getRgba:f,getHsla:e,getRgb:function(a){return(a=f(a))&&a.slice(0,3)},getHsl:function(a){return(a=e(a))&&a.slice(0,3)},getHwb:c,getAlpha:function(a){var d=f(a);if(d||(d=e(a))||(d=c(a)))return d[3]},hexString:function(a){return"#"+l(a[0])+l(a[1])+l(a[2])},rgbString:function(c,d){return 1>d||c[3]&&1>c[3]?a(c,d):"rgb("+c[0]+", "+c[1]+", "+c[2]+")"},rgbaString:a,
|
|
|
|
|
|
|
|
percentString:function(a,c){return 1>c||a[3]&&1>a[3]?d(a,c):"rgb("+Math.round(a[0]/255*100)+"%, "+Math.round(a[1]/255*100)+"%, "+Math.round(a[2]/255*100)+"%)"},percentaString:d,hslString:function(a,c){return 1>c||a[3]&&1>a[3]?h(a,c):"hsl("+a[0]+", "+a[1]+"%, "+a[2]+"%)"},hslaString:h,hwbString:function(a,c){void 0===c&&(c=void 0!==a[3]?a[3]:1);return"hwb("+a[0]+", "+a[1]+"%, "+a[2]+"%"+(void 0!==c&&1!==c?", "+c:"")+")"},keyword:function(a){return t[a.slice(0,3)]}};var t={},w;for(w in q)t[q[w]]=w},
|
|
|
|
|
|
|
|
{"color-name":5}],5:[function(p,m,n){m.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],
|
|
|
|
|
|
|
|
darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,
|
|
|
|
|
|
|
|
105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,
|
|
|
|
|
|
|
|
252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,
|
|
|
|
|
|
|
|
0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,
|
|
|
|
|
|
|
|
69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],
|
|
|
|
|
|
|
|
silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},{}],6:[function(p,m,n){var f=p("color-convert"),e=p("color-string"),c=function(a){if(a instanceof
|
|
|
|
|
|
|
|
c)return a;if(!(this instanceof c))return new c(a);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};if("string"==typeof a){var d=e.getRgba(a);if(d)this.setValues("rgb",d);else if(d=e.getHsla(a))this.setValues("hsl",d);else if(d=e.getHwb(a))this.setValues("hwb",d);else throw Error('Unable to parse color from string "'+a+'"');}else if("object"==typeof a)if(d=a,void 0!==d.r||void 0!==d.red)this.setValues("rgb",d);else if(void 0!==d.l||void 0!==d.lightness)this.setValues("hsl",
|
|
|
|
|
|
|
|
d);else if(void 0!==d.v||void 0!==d.value)this.setValues("hsv",d);else if(void 0!==d.w||void 0!==d.whiteness)this.setValues("hwb",d);else if(void 0!==d.c||void 0!==d.cyan)this.setValues("cmyk",d);else throw Error("Unable to parse color from object "+JSON.stringify(a));};c.prototype={rgb:function(a){return this.setSpace("rgb",arguments)},hsl:function(a){return this.setSpace("hsl",arguments)},hsv:function(a){return this.setSpace("hsv",arguments)},hwb:function(a){return this.setSpace("hwb",arguments)},
|
|
|
|
|
|
|
|
cmyk:function(a){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(){return this.values.rgb.concat([this.values.alpha])},hslaArray:function(){return this.values.hsl.concat([this.values.alpha])},alpha:function(a){if(void 0===
|
|
|
|
|
|
|
|
a)return this.values.alpha;this.setValues("alpha",a);return this},red:function(a){return this.setChannel("rgb",0,a)},green:function(a){return this.setChannel("rgb",1,a)},blue:function(a){return this.setChannel("rgb",2,a)},hue:function(a){return this.setChannel("hsl",0,a)},saturation:function(a){return this.setChannel("hsl",1,a)},lightness:function(a){return this.setChannel("hsl",2,a)},saturationv:function(a){return this.setChannel("hsv",1,a)},whiteness:function(a){return this.setChannel("hwb",1,a)},
|
|
|
|
|
|
|
|
blackness:function(a){return this.setChannel("hwb",2,a)},value:function(a){return this.setChannel("hsv",2,a)},cyan:function(a){return this.setChannel("cmyk",0,a)},magenta:function(a){return this.setChannel("cmyk",1,a)},yellow:function(a){return this.setChannel("cmyk",2,a)},black:function(a){return this.setChannel("cmyk",3,a)},hexString:function(){return e.hexString(this.values.rgb)},rgbString:function(){return e.rgbString(this.values.rgb,this.values.alpha)},rgbaString:function(){return e.rgbaString(this.values.rgb,
|
|
|
|
|
|
|
|
this.values.alpha)},percentString:function(){return e.percentString(this.values.rgb,this.values.alpha)},hslString:function(){return e.hslString(this.values.hsl,this.values.alpha)},hslaString:function(){return e.hslaString(this.values.hsl,this.values.alpha)},hwbString:function(){return e.hwbString(this.values.hwb,this.values.alpha)},keyword:function(){return e.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 a=
|
|
|
|
|
|
|
|
this.values.rgb,c=[],h=0;h<a.length;h++){var k=a[h]/255;c[h]=.03928>=k?k/12.92:Math.pow((k+.055)/1.055,2.4)}return.2126*c[0]+.7152*c[1]+.0722*c[2]},contrast:function(a){var c=this.luminosity();a=a.luminosity();return c>a?(c+.05)/(a+.05):(a+.05)/(c+.05)},level:function(a){a=this.contrast(a);return 7.1<=a?"AAA":4.5<=a?"AA":""},dark:function(){var a=this.values.rgb;return 128>(299*a[0]+587*a[1]+114*a[2])/1E3},light:function(){return!this.dark()},negate:function(){for(var a=[],c=0;3>c;c++)a[c]=255-this.values.rgb[c];
|
|
|
|
|
|
|
|
this.setValues("rgb",a);return this},lighten:function(a){this.values.hsl[2]+=this.values.hsl[2]*a;this.setValues("hsl",this.values.hsl);return this},darken:function(a){this.values.hsl[2]-=this.values.hsl[2]*a;this.setValues("hsl",this.values.hsl);return this},saturate:function(a){this.values.hsl[1]+=this.values.hsl[1]*a;this.setValues("hsl",this.values.hsl);return this},desaturate:function(a){this.values.hsl[1]-=this.values.hsl[1]*a;this.setValues("hsl",this.values.hsl);return this},whiten:function(a){this.values.hwb[1]+=
|
|
|
|
|
|
|
|
this.values.hwb[1]*a;this.setValues("hwb",this.values.hwb);return this},blacken:function(a){this.values.hwb[2]+=this.values.hwb[2]*a;this.setValues("hwb",this.values.hwb);return this},greyscale:function(){var a=this.values.rgb,a=.3*a[0]+.59*a[1]+.11*a[2];this.setValues("rgb",[a,a,a]);return this},clearer:function(a){this.setValues("alpha",this.values.alpha-this.values.alpha*a);return this},opaquer:function(a){this.setValues("alpha",this.values.alpha+this.values.alpha*a);return this},rotate:function(a){var c=
|
|
|
|
|
|
|
|
this.values.hsl[0],c=(c+a)%360;this.values.hsl[0]=0>c?360+c:c;this.setValues("hsl",this.values.hsl);return this},mix:function(a,c){c=1-(null==c?.5:c);for(var h=2*c-1,k=this.alpha()-a.alpha(),h=((-1==h*k?h:(h+k)/(1+h*k))+1)/2,k=1-h,e=this.rgbArray(),q=a.rgbArray(),f=0;f<e.length;f++)e[f]=e[f]*h+q[f]*k;this.setValues("rgb",e);h=this.alpha()*c+a.alpha()*(1-c);this.setValues("alpha",h);return this},toJSON:function(){return this.rgb()},clone:function(){return new c(this.rgb())}};c.prototype.getValues=
|
|
|
|
|
|
|
|
function(a){for(var c={},h=0;h<a.length;h++)c[a.charAt(h)]=this.values[a][h];1!=this.values.alpha&&(c.a=this.values.alpha);return c};c.prototype.setValues=function(a,c){var h={rgb:["red","green","blue"],hsl:["hue","saturation","lightness"],hsv:["hue","saturation","value"],hwb:["hue","whiteness","blackness"],cmyk:["cyan","magenta","yellow","black"]},k={rgb:[255,255,255],hsl:[360,100,100],hsv:[360,100,100],hwb:[360,100,100],cmyk:[100,100,100,100]},e=1;if("alpha"==a)e=c;else if(c.length)this.values[a]=
|
|
|
|
|
|
|
|
c.slice(0,a.length),e=c[a.length];else if(void 0!==c[a.charAt(0)]){for(e=0;e<a.length;e++)this.values[a][e]=c[a.charAt(e)];e=c.a}else if(void 0!==c[h[a][0]]){for(var q=h[a],e=0;e<a.length;e++)this.values[a][e]=c[q[e]];e=c.alpha}this.values.alpha=Math.max(0,Math.min(1,void 0!==e?e:this.values.alpha));if("alpha"!=a){for(e=0;e<a.length;e++)q=Math.max(0,Math.min(k[a][e],this.values[a][e])),this.values[a][e]=Math.round(q);for(var t in h)for(t!=a&&(this.values[t]=f[a][t](this.values[a])),e=0;e<t.length;e++)q=
|
|
|
|
|
|
|
|
Math.max(0,Math.min(k[t][e],this.values[t][e])),this.values[t][e]=Math.round(q);return!0}};c.prototype.setSpace=function(a,c){var e=c[0];if(void 0===e)return this.getValues(a);"number"==typeof e&&(e=Array.prototype.slice.call(c));this.setValues(a,e);return this};c.prototype.setChannel=function(a,c,e){if(void 0===e)return this.values[a][c];this.values[a][c]=e;this.setValues(a,this.values[a]);return this};window.Color=m.exports=c},{"color-convert":3,"color-string":4}],7:[function(p,m,n){n=p("./core/core.js")();
|
|
|
|
|
|
|
|
p("./core/core.helpers")(n);p("./core/core.element")(n);p("./core/core.animation")(n);p("./core/core.controller")(n);p("./core/core.datasetController")(n);p("./core/core.layoutService")(n);p("./core/core.legend")(n);p("./core/core.scale")(n);p("./core/core.scaleService")(n);p("./core/core.title")(n);p("./core/core.tooltip")(n);p("./controllers/controller.bar")(n);p("./controllers/controller.bubble")(n);p("./controllers/controller.doughnut")(n);p("./controllers/controller.line")(n);p("./controllers/controller.polarArea")(n);
|
|
|
|
|
|
|
|
p("./controllers/controller.radar")(n);p("./scales/scale.category")(n);p("./scales/scale.linear")(n);p("./scales/scale.logarithmic")(n);p("./scales/scale.radialLinear")(n);p("./scales/scale.time")(n);p("./elements/element.arc")(n);p("./elements/element.line")(n);p("./elements/element.point")(n);p("./elements/element.rectangle")(n);p("./charts/Chart.Bar")(n);p("./charts/Chart.Bubble")(n);p("./charts/Chart.Doughnut")(n);p("./charts/Chart.Line")(n);p("./charts/Chart.PolarArea")(n);p("./charts/Chart.Radar")(n);
|
|
|
|
|
|
|
|
p("./charts/Chart.Scatter")(n);window.Chart=m.exports=n},{"./charts/Chart.Bar":8,"./charts/Chart.Bubble":9,"./charts/Chart.Doughnut":10,"./charts/Chart.Line":11,"./charts/Chart.PolarArea":12,"./charts/Chart.Radar":13,"./charts/Chart.Scatter":14,"./controllers/controller.bar":15,"./controllers/controller.bubble":16,"./controllers/controller.doughnut":17,"./controllers/controller.line":18,"./controllers/controller.polarArea":19,"./controllers/controller.radar":20,"./core/core.animation":21,"./core/core.controller":22,
|
|
|
|
|
|
|
|
"./core/core.datasetController":23,"./core/core.element":24,"./core/core.helpers":25,"./core/core.js":26,"./core/core.layoutService":27,"./core/core.legend":28,"./core/core.scale":29,"./core/core.scaleService":30,"./core/core.title":31,"./core/core.tooltip":32,"./elements/element.arc":33,"./elements/element.line":34,"./elements/element.point":35,"./elements/element.rectangle":36,"./scales/scale.category":37,"./scales/scale.linear":38,"./scales/scale.logarithmic":39,"./scales/scale.radialLinear":40,
|
|
|
|
|
|
|
|
"./scales/scale.time":41}],8:[function(p,m,n){m.exports=function(f){f.Bar=function(e,c){c.type="bar";return new f(e,c)}}},{}],9:[function(p,m,n){m.exports=function(f){f.Bubble=function(e,c){c.type="bubble";return new f(e,c)}}},{}],10:[function(p,m,n){m.exports=function(f){f.Doughnut=function(e,c){c.type="doughnut";return new f(e,c)}}},{}],11:[function(p,m,n){m.exports=function(f){f.Line=function(e,c){c.type="line";return new f(e,c)}}},{}],12:[function(p,m,n){m.exports=function(f){f.PolarArea=function(e,
|
|
|
|
|
|
|
|
c){c.type="polarArea";return new f(e,c)}}},{}],13:[function(p,m,n){m.exports=function(f){var e=f.helpers,c={aspectRatio:1};f.Radar=function(a,d){d.options=e.configMerge(c,d.options);d.type="radar";return new f(a,d)}}},{}],14:[function(p,m,n){m.exports=function(f){f.defaults.scatter={hover:{mode:"single"},scales:{xAxes:[{type:"linear",position:"bottom",id:"x-axis-1"}],yAxes:[{type:"linear",position:"left",id:"y-axis-1"}]},tooltips:{callbacks:{title:function(e,c){return""},label:function(e,c){return"("+
|
|
|
|
|
|
|
|
e.xLabel+", "+e.yLabel+")"}}}};f.controllers.scatter=f.controllers.line;f.Scatter=function(e,c){c.type="scatter";return new f(e,c)}}},{}],15:[function(p,m,n){m.exports=function(f){var e=f.helpers;f.defaults.bar={hover:{mode:"label"},scales:{xAxes:[{type:"category",categoryPercentage:.8,barPercentage:.9,gridLines:{offsetGridLines:!0}}],yAxes:[{type:"linear"}]}};f.controllers.bar=f.DatasetController.extend({initialize:function(c,a){f.DatasetController.prototype.initialize.call(this,c,a);this.getDataset().bar=
|
|
|
|
|
|
|
|
!0},getBarCount:function(){var c=0;e.each(this.chart.data.datasets,function(a){e.isDatasetVisible(a)&&a.bar&&++c});return c},addElements:function(){this.getDataset().metaData=this.getDataset().metaData||[];e.each(this.getDataset().data,function(c,a){this.getDataset().metaData[a]=this.getDataset().metaData[a]||new f.elements.Rectangle({_chart:this.chart.chart,_datasetIndex:this.index,_index:a})},this)},addElementAndReset:function(c){this.getDataset().metaData=this.getDataset().metaData||[];var a=new f.elements.Rectangle({_chart:this.chart.chart,
|
|
|
|
|
|
|
|
_datasetIndex:this.index,_index:c}),d=this.getBarCount();this.updateElement(a,c,!0,d);this.getDataset().metaData.splice(c,0,a)},update:function(c){var a=this.getBarCount();e.each(this.getDataset().metaData,function(d,e){this.updateElement(d,e,c,a)},this)},updateElement:function(c,a,d,h){var k=this.getScaleForId(this.getDataset().xAxisID),l=this.getScaleForId(this.getDataset().yAxisID),q;q=0>l.min&&0>l.max?l.getPixelForValue(l.max):0<l.min&&0<l.max?l.getPixelForValue(l.min):l.getPixelForValue(0);e.extend(c,
|
|
|
|
|
|
|
|
{_chart:this.chart.chart,_xScale:k,_yScale:l,_datasetIndex:this.index,_index:a,_model:{x:this.calculateBarX(a,this.index),y:d?q:this.calculateBarY(a,this.index),label:this.chart.data.labels[a],datasetLabel:this.getDataset().label,base:d?q:this.calculateBarBase(this.index,a),width:this.calculateBarWidth(h),backgroundColor:c.custom&&c.custom.backgroundColor?c.custom.backgroundColor:e.getValueAtIndexOrDefault(this.getDataset().backgroundColor,a,this.chart.options.elements.rectangle.backgroundColor),
|
|
|
|
|
|
|
|
borderSkipped:c.custom&&c.custom.borderSkipped?c.custom.borderSkipped:this.chart.options.elements.rectangle.borderSkipped,borderColor:c.custom&&c.custom.borderColor?c.custom.borderColor:e.getValueAtIndexOrDefault(this.getDataset().borderColor,a,this.chart.options.elements.rectangle.borderColor),borderWidth:c.custom&&c.custom.borderWidth?c.custom.borderWidth:e.getValueAtIndexOrDefault(this.getDataset().borderWidth,a,this.chart.options.elements.rectangle.borderWidth)}});c.pivot()},calculateBarBase:function(c,
|
|
|
|
|
|
|
|
a){this.getScaleForId(this.getDataset().xAxisID);var d=this.getScaleForId(this.getDataset().yAxisID),h=0;if(d.options.stacked){if(0>this.chart.data.datasets[c].data[a])for(var k=0;k<c;k++){var l=this.chart.data.datasets[k];e.isDatasetVisible(l)&&l.yAxisID===d.id&&l.bar&&(h+=0>l.data[a]?l.data[a]:0)}else for(k=0;k<c;k++)l=this.chart.data.datasets[k],e.isDatasetVisible(l)&&l.yAxisID===d.id&&l.bar&&(h+=0<l.data[a]?l.data[a]:0);return d.getPixelForValue(h)}h=d.getPixelForValue(d.min);d.beginAtZero||0>=
|
|
|
|
|
|
|
|
d.min&&0<=d.max||0<=d.min&&0>=d.max?h=d.getPixelForValue(0,0):0>d.min&&0>d.max&&(h=d.getPixelForValue(d.max));return h},getRuler:function(){var c=this.getScaleForId(this.getDataset().xAxisID);this.getScaleForId(this.getDataset().yAxisID);var a=this.getBarCount(),d;d=c.getPixelForTick(1)-c.getPixelForTick(0);for(var e=2;e<this.getDataset().data.length;e++)d=Math.min(c.getPixelForTick(e)-c.getPixelForTick(e-1),d);var e=d*c.options.categoryPercentage,k=e/a;return{datasetCount:a,tickWidth:d,categoryWidth:e,
|
|
|
|
|
|
|
|
categorySpacing:(d-d*c.options.categoryPercentage)/2,fullBarWidth:k,barWidth:k*c.options.barPercentage,barSpacing:k-k*c.options.barPercentage}},calculateBarWidth:function(){var c=this.getScaleForId(this.getDataset().xAxisID),a=this.getRuler();return c.options.stacked?a.categoryWidth:a.barWidth},getBarIndex:function(c){for(var a=0,d=0;d<c;++d)e.isDatasetVisible(this.chart.data.datasets[d])&&this.chart.data.datasets[d].bar&&++a;return a},calculateBarX:function(c,a){this.getScaleForId(this.getDataset().yAxisID);
|
|
|
|
|
|
|
|
var d=this.getScaleForId(this.getDataset().xAxisID),e=this.getBarIndex(a),k=this.getRuler(),l=d.getPixelForValue(null,c,a,this.chart.isCombo),l=l-(this.chart.isCombo?k.tickWidth/2:0);return d.options.stacked?l+k.categoryWidth/2+k.categorySpacing:l+k.barWidth/2+k.categorySpacing+k.barWidth*e+k.barSpacing/2+k.barSpacing*e},calculateBarY:function(c,a){this.getScaleForId(this.getDataset().xAxisID);var d=this.getScaleForId(this.getDataset().yAxisID),h=this.getDataset().data[c];if(d.options.stacked){for(var k=
|
|
|
|
|
|
|
|
0,l=0,q=0;q<a;q++){var f=this.chart.data.datasets[q];e.isDatasetVisible(f)&&f.bar&&f.yAxisID===d.id&&(0>f.data[c]?l+=f.data[c]||0:k+=f.data[c]||0)}return 0>h?d.getPixelForValue(l+h):d.getPixelForValue(k+h)}return d.getPixelForValue(h)},draw:function(c){var a=c||1;e.each(this.getDataset().metaData,function(c,e){var k=this.getDataset().data[e];null===k||void 0===k||isNaN(k)||c.transition(a).draw()},this)},setHoverStyle:function(c){var a=this.chart.data.datasets[c._datasetIndex],d=c._index;c._model.backgroundColor=
|
|
|
|
|
|
|
|
c.custom&&c.custom.hoverBackgroundColor?c.custom.hoverBackgroundColor:e.getValueAtIndexOrDefault(a.hoverBackgroundColor,d,e.color(c._model.backgroundColor).saturate(.5).darken(.1).rgbString());c._model.borderColor=c.custom&&c.custom.hoverBorderColor?c.custom.hoverBorderColor:e.getValueAtIndexOrDefault(a.hoverBorderColor,d,e.color(c._model.borderColor).saturate(.5).darken(.1).rgbString());c._model.borderWidth=c.custom&&c.custom.hoverBorderWidth?c.custom.hoverBorderWidth:e.getValueAtIndexOrDefault(a.hoverBorderWidth,
|
|
|
|
|
|
|
|
d,c._model.borderWidth)},removeHoverStyle:function(c){var a=c._index;c._model.backgroundColor=c.custom&&c.custom.backgroundColor?c.custom.backgroundColor:e.getValueAtIndexOrDefault(this.getDataset().backgroundColor,a,this.chart.options.elements.rectangle.backgroundColor);c._model.borderColor=c.custom&&c.custom.borderColor?c.custom.borderColor:e.getValueAtIndexOrDefault(this.getDataset().borderColor,a,this.chart.options.elements.rectangle.borderColor);c._model.borderWidth=c.custom&&c.custom.borderWidth?
|
|
|
|
|
|
|
|
c.custom.borderWidth:e.getValueAtIndexOrDefault(this.getDataset().borderWidth,a,this.chart.options.elements.rectangle.borderWidth)}})}},{}],16:[function(p,m,n){m.exports=function(f){var e=f.helpers;f.defaults.bubble={hover:{mode:"single"},scales:{xAxes:[{type:"linear",position:"bottom",id:"x-axis-0"}],yAxes:[{type:"linear",position:"left",id:"y-axis-0"}]},tooltips:{callbacks:{title:function(c,a){return""},label:function(c,a){var d=a.datasets[c.datasetIndex].data[c.index];return(a.datasets[c.datasetIndex].label||
|
|
|
|
|
|
|
|
"")+": ("+d.x+", "+d.y+", "+d.r+")"}}}};f.controllers.bubble=f.DatasetController.extend({addElements:function(){this.getDataset().metaData=this.getDataset().metaData||[];e.each(this.getDataset().data,function(c,a){this.getDataset().metaData[a]=this.getDataset().metaData[a]||new f.elements.Point({_chart:this.chart.chart,_datasetIndex:this.index,_index:a})},this)},addElementAndReset:function(c){this.getDataset().metaData=this.getDataset().metaData||[];var a=new f.elements.Point({_chart:this.chart.chart,
|
|
|
|
|
|
|
|
_datasetIndex:this.index,_index:c});this.updateElement(a,c,!0);this.getDataset().metaData.splice(c,0,a)},update:function(c){var a=this.getDataset().metaData,d=this.getScaleForId(this.getDataset().yAxisID);this.getScaleForId(this.getDataset().xAxisID);0>d.min&&0>d.max?d.getPixelForValue(d.max):0<d.min&&0<d.max?d.getPixelForValue(d.min):d.getPixelForValue(0);e.each(a,function(a,d){this.updateElement(a,d,c)},this)},updateElement:function(c,a,d){var h=this.getScaleForId(this.getDataset().yAxisID),k=this.getScaleForId(this.getDataset().xAxisID),
|
|
|
|
|
|
|
|
l;l=0>h.min&&0>h.max?h.getPixelForValue(h.max):0<h.min&&0<h.max?h.getPixelForValue(h.min):h.getPixelForValue(0);e.extend(c,{_chart:this.chart.chart,_xScale:k,_yScale:h,_datasetIndex:this.index,_index:a,_model:{x:d?k.getPixelForDecimal(.5):k.getPixelForValue(this.getDataset().data[a],a,this.index,this.chart.isCombo),y:d?l:h.getPixelForValue(this.getDataset().data[a],a,this.index),radius:d?0:c.custom&&c.custom.radius?c.custom.radius:this.getRadius(this.getDataset().data[a]),backgroundColor:c.custom&&
|
|
|
|
|
|
|
|
c.custom.backgroundColor?c.custom.backgroundColor:e.getValueAtIndexOrDefault(this.getDataset().backgroundColor,a,this.chart.options.elements.point.backgroundColor),borderColor:c.custom&&c.custom.borderColor?c.custom.borderColor:e.getValueAtIndexOrDefault(this.getDataset().borderColor,a,this.chart.options.elements.point.borderColor),borderWidth:c.custom&&c.custom.borderWidth?c.custom.borderWidth:e.getValueAtIndexOrDefault(this.getDataset().borderWidth,a,this.chart.options.elements.point.borderWidth),
|
|
|
|
|
|
|
|
hitRadius:c.custom&&c.custom.hitRadius?c.custom.hitRadius:e.getValueAtIndexOrDefault(this.getDataset().hitRadius,a,this.chart.options.elements.point.hitRadius)}});c._model.skip=c.custom&&c.custom.skip?c.custom.skip:isNaN(c._model.x)||isNaN(c._model.y);c.pivot()},getRadius:function(c){return c.r||this.chart.options.elements.point.radius},draw:function(c){var a=c||1;e.each(this.getDataset().metaData,function(c,e){c.transition(a);c.draw()})},setHoverStyle:function(c){var a=this.chart.data.datasets[c._datasetIndex],
|
|
|
|
|
|
|
|
d=c._index;c._model.radius=c.custom&&c.custom.hoverRadius?c.custom.hoverRadius:e.getValueAtIndexOrDefault(a.hoverRadius,d,this.chart.options.elements.point.hoverRadius)+this.getRadius(this.getDataset().data[c._index]);c._model.backgroundColor=c.custom&&c.custom.hoverBackgroundColor?c.custom.hoverBackgroundColor:e.getValueAtIndexOrDefault(a.hoverBackgroundColor,d,e.color(c._model.backgroundColor).saturate(.5).darken(.1).rgbString());c._model.borderColor=c.custom&&c.custom.hoverBorderColor?c.custom.hoverBorderColor:
|
|
|
|
|
|
|
|
e.getValueAtIndexOrDefault(a.hoverBorderColor,d,e.color(c._model.borderColor).saturate(.5).darken(.1).rgbString());c._model.borderWidth=c.custom&&c.custom.hoverBorderWidth?c.custom.hoverBorderWidth:e.getValueAtIndexOrDefault(a.hoverBorderWidth,d,c._model.borderWidth)},removeHoverStyle:function(c){var a=c._index;c._model.radius=c.custom&&c.custom.radius?c.custom.radius:this.getRadius(this.getDataset().data[c._index]);c._model.backgroundColor=c.custom&&c.custom.backgroundColor?c.custom.backgroundColor:
|
|
|
|
|
|
|
|
e.getValueAtIndexOrDefault(this.getDataset().backgroundColor,a,this.chart.options.elements.point.backgroundColor);c._model.borderColor=c.custom&&c.custom.borderColor?c.custom.borderColor:e.getValueAtIndexOrDefault(this.getDataset().borderColor,a,this.chart.options.elements.point.borderColor);c._model.borderWidth=c.custom&&c.custom.borderWidth?c.custom.borderWidth:e.getValueAtIndexOrDefault(this.getDataset().borderWidth,a,this.chart.options.elements.point.borderWidth)}})}},{}],17:[function(p,m,n){m.exports=
|
|
|
|
|
|
|
|
function(f){var e=f.helpers;f.defaults.doughnut={animation:{animateRotate:!0,animateScale:!1},aspectRatio:1,hover:{mode:"single"},legendCallback:function(c){var a=[];a.push('<ul class="'+c.id+'-legend">');if(c.data.datasets.length)for(var d=0;d<c.data.datasets[0].data.length;++d)a.push('<li><span style="background-color:'+c.data.datasets[0].backgroundColor[d]+'">'),c.data.labels[d]&&a.push(c.data.labels[d]),a.push("</span></li>");a.push("</ul>");return a.join("")},legend:{labels:{generateLabels:function(c){return c.labels.length&&
|
|
|
|
|
|
|
|
c.datasets.length?c.labels.map(function(a,d){return{text:a,fillStyle:c.datasets[0].backgroundColor[d],hidden:isNaN(c.datasets[0].data[d]),index:d}}):[]}},onClick:function(c,a){e.each(this.chart.data.datasets,function(c){c.metaHiddenData=c.metaHiddenData||[];var e=a.index;isNaN(c.data[e])?isNaN(c.metaHiddenData[e])||(c.data[e]=c.metaHiddenData[e]):(c.metaHiddenData[e]=c.data[e],c.data[e]=NaN)});this.chart.update()}},cutoutPercentage:50,rotation:-.5*Math.PI,circumference:2*Math.PI,tooltips:{callbacks:{title:function(){return""},
|
|
|
|
|
|
|
|
label:function(c,a){return a.labels[c.index]+": "+a.datasets[c.datasetIndex].data[c.index]}}}};f.defaults.pie=e.clone(f.defaults.doughnut);e.extend(f.defaults.pie,{cutoutPercentage:0});f.controllers.doughnut=f.controllers.pie=f.DatasetController.extend({linkScales:function(){},addElements:function(){this.getDataset().metaData=this.getDataset().metaData||[];e.each(this.getDataset().data,function(c,a){this.getDataset().metaData[a]=this.getDataset().metaData[a]||new f.elements.Arc({_chart:this.chart.chart,
|
|
|
|
|
|
|
|
_datasetIndex:this.index,_index:a})},this)},addElementAndReset:function(c,a){this.getDataset().metaData=this.getDataset().metaData||[];var d=new f.elements.Arc({_chart:this.chart.chart,_datasetIndex:this.index,_index:c});a&&e.isArray(this.getDataset().backgroundColor)&&this.getDataset().backgroundColor.splice(c,0,a);this.updateElement(d,c,!0);this.getDataset().metaData.splice(c,0,d)},getVisibleDatasetCount:function(){return e.where(this.chart.data.datasets,function(c){return e.isDatasetVisible(c)}).length},
|
|
|
|
|
|
|
|
getRingIndex:function(c){for(var a=0,d=0;d<c;++d)e.isDatasetVisible(this.chart.data.datasets[d])&&++a;return a},update:function(c){var a=this.chart.chartArea.right-this.chart.chartArea.left-this.chart.options.elements.arc.borderWidth,d=this.chart.chartArea.bottom-this.chart.chartArea.top-this.chart.options.elements.arc.borderWidth,h=Math.min(a,d),k=0,l=0;if(this.chart.options.circumference&&this.chart.options.circumference<2*Math.PI)var h=this.chart.options.rotation%(2*Math.PI),h=h+2*Math.PI*(h>=
|
|
|
|
|
|
|
|
Math.PI?-1:h<-Math.PI?1:0),q=h+this.chart.options.circumference,f=Math.cos(h),w=Math.sin(h),x=Math.cos(q),u=Math.sin(q),m=this.chart.options.cutoutPercentage/100,k=h<=-Math.PI&&-Math.PI<=q||h<=Math.PI&&Math.PI<=q?-1:Math.min(f*(0>f?1:m),x*(0>x?1:m)),l=h<=.5*-Math.PI&&.5*-Math.PI<=q||h<=1.5*Math.PI&&1.5*Math.PI<=q?-1:Math.min(w*(0>w?1:m),u*(0>u?1:m)),f=0>=h&&0<=q||h<=2*Math.PI&&2*Math.PI<=q?1:Math.max(f*(0<f?1:m),x*(0<x?1:m)),q=h<=.5*Math.PI&&.5*Math.PI<=q||h<=2.5*Math.PI&&2.5*Math.PI<=q?1:Math.max(w*
|
|
|
|
|
|
|
|
(0<w?1:m),u*(0<u?1:m)),h=Math.min(a/(.5*(f-k)),d/(.5*(q-l))),k=-.5*(f+k),l=-.5*(q+l);this.chart.outerRadius=Math.max(h/2,0);this.chart.innerRadius=Math.max(this.chart.options.cutoutPercentage?this.chart.outerRadius/100*this.chart.options.cutoutPercentage:1,0);this.chart.radiusLength=(this.chart.outerRadius-this.chart.innerRadius)/this.getVisibleDatasetCount();this.chart.offsetX=k*this.chart.outerRadius;this.chart.offsetY=l*this.chart.outerRadius;this.getDataset().total=0;e.each(this.getDataset().data,
|
|
|
|
|
|
|
|
function(a){isNaN(a)||(this.getDataset().total+=Math.abs(a))},this);this.outerRadius=this.chart.outerRadius-this.chart.radiusLength*this.getRingIndex(this.index);this.innerRadius=this.outerRadius-this.chart.radiusLength;e.each(this.getDataset().metaData,function(a,d){this.updateElement(a,d,c)},this)},updateElement:function(c,a,d){var h=(this.chart.chartArea.left+this.chart.chartArea.right)/2,k=(this.chart.chartArea.top+this.chart.chartArea.bottom)/2,l=this.chart.options.rotation||-.5*Math.PI,q=this.chart.options.rotation||
|
|
|
|
|
|
|
|
-.5*Math.PI,f=d&&this.chart.options.animation.animateRotate?0:this.calculateCircumference(this.getDataset().data[a])*((this.chart.options.circumference||2*Math.PI)/(2*Math.PI));e.extend(c,{_chart:this.chart.chart,_datasetIndex:this.index,_index:a,_model:{x:h+this.chart.offsetX,y:k+this.chart.offsetY,startAngle:l,endAngle:q,circumference:f,outerRadius:d&&this.chart.options.animation.animateScale?0:this.outerRadius,innerRadius:d&&this.chart.options.animation.animateScale?0:this.innerRadius,backgroundColor:c.custom&&
|
|
|
|
|
|
|
|
c.custom.backgroundColor?c.custom.backgroundColor:e.getValueAtIndexOrDefault(this.getDataset().backgroundColor,a,this.chart.options.elements.arc.backgroundColor),hoverBackgroundColor:c.custom&&c.custom.hoverBackgroundColor?c.custom.hoverBackgroundColor:e.getValueAtIndexOrDefault(this.getDataset().hoverBackgroundColor,a,this.chart.options.elements.arc.hoverBackgroundColor),borderWidth:c.custom&&c.custom.borderWidth?c.custom.borderWidth:e.getValueAtIndexOrDefault(this.getDataset().borderWidth,a,this.chart.options.elements.arc.borderWidth),
|
|
|
|
|
|
|
|
borderColor:c.custom&&c.custom.borderColor?c.custom.borderColor:e.getValueAtIndexOrDefault(this.getDataset().borderColor,a,this.chart.options.elements.arc.borderColor),label:e.getValueAtIndexOrDefault(this.getDataset().label,a,this.chart.data.labels[a])}});d||(c._model.startAngle=0===a?this.chart.options.rotation||-.5*Math.PI:this.getDataset().metaData[a-1]._model.endAngle,c._model.endAngle=c._model.startAngle+c._model.circumference);c.pivot()},draw:function(c){var a=c||1;e.each(this.getDataset().metaData,
|
|
|
|
|
|
|
|
function(c,e){c.transition(a).draw()})},setHoverStyle:function(c){var a=this.chart.data.datasets[c._datasetIndex],d=c._index;c._model.backgroundColor=c.custom&&c.custom.hoverBackgroundColor?c.custom.hoverBackgroundColor:e.getValueAtIndexOrDefault(a.hoverBackgroundColor,d,e.color(c._model.backgroundColor).saturate(.5).darken(.1).rgbString());c._model.borderColor=c.custom&&c.custom.hoverBorderColor?c.custom.hoverBorderColor:e.getValueAtIndexOrDefault(a.hoverBorderColor,d,e.color(c._model.borderColor).saturate(.5).darken(.1).rgbString());
|
|
|
|
|
|
|
|
c._model.borderWidth=c.custom&&c.custom.hoverBorderWidth?c.custom.hoverBorderWidth:e.getValueAtIndexOrDefault(a.hoverBorderWidth,d,c._model.borderWidth)},removeHoverStyle:function(c){var a=c._index;c._model.backgroundColor=c.custom&&c.custom.backgroundColor?c.custom.backgroundColor:e.getValueAtIndexOrDefault(this.getDataset().backgroundColor,a,this.chart.options.elements.arc.backgroundColor);c._model.borderColor=c.custom&&c.custom.borderColor?c.custom.borderColor:e.getValueAtIndexOrDefault(this.getDataset().borderColor,
|
|
|
|
|
|
|
|
a,this.chart.options.elements.arc.borderColor);c._model.borderWidth=c.custom&&c.custom.borderWidth?c.custom.borderWidth:e.getValueAtIndexOrDefault(this.getDataset().borderWidth,a,this.chart.options.elements.arc.borderWidth)},calculateCircumference:function(c){return 0<this.getDataset().total&&!isNaN(c)?1.999999*Math.PI*(c/this.getDataset().total):0}})}},{}],18:[function(p,m,n){m.exports=function(f){var e=f.helpers;f.defaults.line={showLines:!0,hover:{mode:"label"},scales:{xAxes:[{type:"category",
|
|
|
|
|
|
|
|
id:"x-axis-0"}],yAxes:[{type:"linear",id:"y-axis-0"}]}};f.controllers.line=f.DatasetController.extend({addElements:function(){this.getDataset().metaData=this.getDataset().metaData||[];this.getDataset().metaDataset=this.getDataset().metaDataset||new f.elements.Line({_chart:this.chart.chart,_datasetIndex:this.index,_points:this.getDataset().metaData});e.each(this.getDataset().data,function(c,a){this.getDataset().metaData[a]=this.getDataset().metaData[a]||new f.elements.Point({_chart:this.chart.chart,
|
|
|
|
|
|
|
|
_datasetIndex:this.index,_index:a})},this)},addElementAndReset:function(c){this.getDataset().metaData=this.getDataset().metaData||[];var a=new f.elements.Point({_chart:this.chart.chart,_datasetIndex:this.index,_index:c});this.updateElement(a,c,!0);this.getDataset().metaData.splice(c,0,a);this.chart.options.showLines&&0!==this.chart.options.elements.line.tension&&this.updateBezierControlPoints()},update:function(c){var a=this.getDataset().metaDataset,d=this.getDataset().metaData,h=this.getScaleForId(this.getDataset().yAxisID);
|
|
|
|
|
|
|
|
this.getScaleForId(this.getDataset().xAxisID);var k;k=0>h.min&&0>h.max?h.getPixelForValue(h.max):0<h.min&&0<h.max?h.getPixelForValue(h.min):h.getPixelForValue(0);this.chart.options.showLines&&(a._scale=h,a._datasetIndex=this.index,a._children=d,a._model={tension:a.custom&&a.custom.tension?a.custom.tension:e.getValueOrDefault(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:h.top,scaleBottom:h.bottom,scaleZero:k},a.pivot());e.each(d,function(a,d){this.updateElement(a,d,c)},this);this.chart.options.showLines&&0!==this.chart.options.elements.line.tension&&this.updateBezierControlPoints()},getPointBackgroundColor:function(c,a){var d=this.chart.options.elements.point.backgroundColor,h=this.getDataset();c.custom&&c.custom.backgroundColor?d=c.custom.backgroundColor:h.pointBackgroundColor?d=e.getValueAtIndexOrDefault(h.pointBackgroundColor,
|
|
|
|
|
|
|
|
a,d):h.backgroundColor&&(d=h.backgroundColor);return d},getPointBorderColor:function(c,a){var d=this.chart.options.elements.point.borderColor,h=this.getDataset();c.custom&&c.custom.borderColor?d=c.custom.borderColor:h.pointBorderColor?d=e.getValueAtIndexOrDefault(this.getDataset().pointBorderColor,a,d):h.borderColor&&(d=h.borderColor);return d},getPointBorderWidth:function(c,a){var d=this.chart.options.elements.point.borderWidth,h=this.getDataset();c.custom&&void 0!==c.custom.borderWidth?d=c.custom.borderWidth:
|
|
|
|
|
|
|
|
void 0!==h.pointBorderWidth?d=e.getValueAtIndexOrDefault(h.pointBorderWidth,a,d):void 0!==h.borderWidth&&(d=h.borderWidth);return d},updateElement:function(c,a,d){var h=this.getScaleForId(this.getDataset().yAxisID),k=this.getScaleForId(this.getDataset().xAxisID),l;l=0>h.min&&0>h.max?h.getPixelForValue(h.max):0<h.min&&0<h.max?h.getPixelForValue(h.min):h.getPixelForValue(0);c._chart=this.chart.chart;c._xScale=k;c._yScale=h;c._datasetIndex=this.index;c._index=a;c._model={x:k.getPixelForValue(this.getDataset().data[a],
|
|
|
|
|
|
|
|
a,this.index,this.chart.isCombo),y:d?l:this.calculatePointY(this.getDataset().data[a],a,this.index,this.chart.isCombo),tension:c.custom&&c.custom.tension?c.custom.tension:e.getValueOrDefault(this.getDataset().tension,this.chart.options.elements.line.tension),radius:c.custom&&c.custom.radius?c.custom.radius:e.getValueAtIndexOrDefault(this.getDataset().radius,a,this.chart.options.elements.point.radius),pointStyle:c.custom&&c.custom.pointStyle?c.custom.pointStyle:e.getValueAtIndexOrDefault(this.getDataset().pointStyle,
|
|
|
|
|
|
|
|
a,this.chart.options.elements.point.pointStyle),backgroundColor:this.getPointBackgroundColor(c,a),borderColor:this.getPointBorderColor(c,a),borderWidth:this.getPointBorderWidth(c,a),hitRadius:c.custom&&c.custom.hitRadius?c.custom.hitRadius:e.getValueAtIndexOrDefault(this.getDataset().hitRadius,a,this.chart.options.elements.point.hitRadius)};c._model.skip=c.custom&&c.custom.skip?c.custom.skip:isNaN(c._model.x)||isNaN(c._model.y)},calculatePointY:function(c,a,d,h){this.getScaleForId(this.getDataset().xAxisID);
|
|
|
|
|
|
|
|
h=this.getScaleForId(this.getDataset().yAxisID);if(h.options.stacked){for(var k=0,l=0,q=0;q<d;q++){var f=this.chart.data.datasets[q];"line"===f.type&&e.isDatasetVisible(f)&&(0>f.data[a]?l+=f.data[a]||0:k+=f.data[a]||0)}return 0>c?h.getPixelForValue(l+c):h.getPixelForValue(k+c)}return h.getPixelForValue(c)},updateBezierControlPoints:function(){e.each(this.getDataset().metaData,function(c,a){var d=e.splineCurve(e.previousItem(this.getDataset().metaData,a)._model,c._model,e.nextItem(this.getDataset().metaData,
|
|
|
|
|
|
|
|
a)._model,c._model.tension);c._model.controlPointPreviousX=Math.max(Math.min(d.previous.x,this.chart.chartArea.right),this.chart.chartArea.left);c._model.controlPointPreviousY=Math.max(Math.min(d.previous.y,this.chart.chartArea.bottom),this.chart.chartArea.top);c._model.controlPointNextX=Math.max(Math.min(d.next.x,this.chart.chartArea.right),this.chart.chartArea.left);c._model.controlPointNextY=Math.max(Math.min(d.next.y,this.chart.chartArea.bottom),this.chart.chartArea.top);c.pivot()},this)},draw:function(c){var a=
|
|
|
|
|
|
|
|
c||1;e.each(this.getDataset().metaData,function(c){c.transition(a)});this.chart.options.showLines&&this.getDataset().metaDataset.transition(a).draw();e.each(this.getDataset().metaData,function(a){a.draw()})},setHoverStyle:function(c){var a=this.chart.data.datasets[c._datasetIndex],d=c._index;c._model.radius=c.custom&&c.custom.hoverRadius?c.custom.hoverRadius:e.getValueAtIndexOrDefault(a.pointHoverRadius,d,this.chart.options.elements.point.hoverRadius);c._model.backgroundColor=c.custom&&c.custom.hoverBackgroundColor?
|
|
|
|
|
|
|
|
c.custom.hoverBackgroundColor:e.getValueAtIndexOrDefault(a.pointHoverBackgroundColor,d,e.color(c._model.backgroundColor).saturate(.5).darken(.1).rgbString());c._model.borderColor=c.custom&&c.custom.hoverBorderColor?c.custom.hoverBorderColor:e.getValueAtIndexOrDefault(a.pointHoverBorderColor,d,e.color(c._model.borderColor).saturate(.5).darken(.1).rgbString());c._model.borderWidth=c.custom&&c.custom.hoverBorderWidth?c.custom.hoverBorderWidth:e.getValueAtIndexOrDefault(a.pointHoverBorderWidth,d,c._model.borderWidth)},
|
|
|
|
|
|
|
|
removeHoverStyle:function(c){var a=c._index;c._model.radius=c.custom&&c.custom.radius?c.custom.radius:e.getValueAtIndexOrDefault(this.getDataset().radius,a,this.chart.options.elements.point.radius);c._model.backgroundColor=this.getPointBackgroundColor(c,a);c._model.borderColor=this.getPointBorderColor(c,a);c._model.borderWidth=this.getPointBorderWidth(c,a)}})}},{}],19:[function(p,m,n){m.exports=function(f){var e=f.helpers;f.defaults.polarArea={scale:{type:"radialLinear",lineArc:!0},animateRotate:!0,
|
|
|
|
|
|
|
|
animateScale:!0,aspectRatio:1,legendCallback:function(c){var a=[];a.push('<ul class="'+c.id+'-legend">');if(c.data.datasets.length)for(var d=0;d<c.data.datasets[0].data.length;++d)a.push('<li><span style="background-color:'+c.data.datasets[0].backgroundColor[d]+'">'),c.data.labels[d]&&a.push(c.data.labels[d]),a.push("</span></li>");a.push("</ul>");return a.join("")},legend:{labels:{generateLabels:function(c){return c.labels.length&&c.datasets.length?c.labels.map(function(a,d){return{text:a,fillStyle:c.datasets[0].backgroundColor[d],
|
|
|
|
|
|
|
|
hidden:isNaN(c.datasets[0].data[d]),index:d}}):[]}},onClick:function(c,a){e.each(this.chart.data.datasets,function(c){c.metaHiddenData=c.metaHiddenData||[];var e=a.index;isNaN(c.data[e])?isNaN(c.metaHiddenData[e])||(c.data[e]=c.metaHiddenData[e]):(c.metaHiddenData[e]=c.data[e],c.data[e]=NaN)});this.chart.update()}},tooltips:{callbacks:{title:function(){return""},label:function(c,a){return a.labels[c.index]+": "+c.yLabel}}}};f.controllers.polarArea=f.DatasetController.extend({linkScales:function(){},
|
|
|
|
|
|
|
|
addElements:function(){this.getDataset().metaData=this.getDataset().metaData||[];e.each(this.getDataset().data,function(c,a){this.getDataset().metaData[a]=this.getDataset().metaData[a]||new f.elements.Arc({_chart:this.chart.chart,_datasetIndex:this.index,_index:a})},this)},addElementAndReset:function(c){this.getDataset().metaData=this.getDataset().metaData||[];var a=new f.elements.Arc({_chart:this.chart.chart,_datasetIndex:this.index,_index:c});this.updateElement(a,c,!0);this.getDataset().metaData.splice(c,
|
|
|
|
|
|
|
|
0,a)},getVisibleDatasetCount:function(){return e.where(this.chart.data.datasets,function(c){return e.isDatasetVisible(c)}).length},update:function(c){this.chart.outerRadius=Math.max((Math.min(this.chart.chartArea.right-this.chart.chartArea.left,this.chart.chartArea.bottom-this.chart.chartArea.top)-this.chart.options.elements.arc.borderWidth/2)/2,0);this.chart.innerRadius=Math.max(this.chart.options.cutoutPercentage?this.chart.outerRadius/100*this.chart.options.cutoutPercentage:1,0);this.chart.radiusLength=
|
|
|
|
|
|
|
|
(this.chart.outerRadius-this.chart.innerRadius)/this.getVisibleDatasetCount();this.getDataset().total=0;e.each(this.getDataset().data,function(a){this.getDataset().total+=Math.abs(a)},this);this.outerRadius=this.chart.outerRadius-this.chart.radiusLength*this.index;this.innerRadius=this.outerRadius-this.chart.radiusLength;e.each(this.getDataset().metaData,function(a,d){this.updateElement(a,d,c)},this)},updateElement:function(c,a,d){for(var h=this.calculateCircumference(this.getDataset().data[a]),k=
|
|
|
|
|
|
|
|
(this.chart.chartArea.left+this.chart.chartArea.right)/2,l=(this.chart.chartArea.top+this.chart.chartArea.bottom)/2,q=0,f=0;f<a;++f)isNaN(this.getDataset().data[f])||++q;q=-.5*Math.PI+h*q;h=q+h;f={x:k,y:l,innerRadius:0,outerRadius:this.chart.options.animateScale?0:this.chart.scale.getDistanceFromCenterForValue(this.getDataset().data[a]),startAngle:this.chart.options.animateRotate?-.5*Math.PI:q,endAngle:this.chart.options.animateRotate?-.5*Math.PI:h,backgroundColor:c.custom&&c.custom.backgroundColor?
|
|
|
|
|
|
|
|
c.custom.backgroundColor:e.getValueAtIndexOrDefault(this.getDataset().backgroundColor,a,this.chart.options.elements.arc.backgroundColor),borderWidth:c.custom&&c.custom.borderWidth?c.custom.borderWidth:e.getValueAtIndexOrDefault(this.getDataset().borderWidth,a,this.chart.options.elements.arc.borderWidth),borderColor:c.custom&&c.custom.borderColor?c.custom.borderColor:e.getValueAtIndexOrDefault(this.getDataset().borderColor,a,this.chart.options.elements.arc.borderColor),label:e.getValueAtIndexOrDefault(this.chart.data.labels,
|
|
|
|
|
|
|
|
a,this.chart.data.labels[a])};e.extend(c,{_chart:this.chart.chart,_datasetIndex:this.index,_index:a,_scale:this.chart.scale,_model:d?f:{x:k,y:l,innerRadius:0,outerRadius:this.chart.scale.getDistanceFromCenterForValue(this.getDataset().data[a]),startAngle:q,endAngle:h,backgroundColor:c.custom&&c.custom.backgroundColor?c.custom.backgroundColor:e.getValueAtIndexOrDefault(this.getDataset().backgroundColor,a,this.chart.options.elements.arc.backgroundColor),borderWidth:c.custom&&c.custom.borderWidth?c.custom.borderWidth:
|
|
|
|
|
|
|
|
e.getValueAtIndexOrDefault(this.getDataset().borderWidth,a,this.chart.options.elements.arc.borderWidth),borderColor:c.custom&&c.custom.borderColor?c.custom.borderColor:e.getValueAtIndexOrDefault(this.getDataset().borderColor,a,this.chart.options.elements.arc.borderColor),label:e.getValueAtIndexOrDefault(this.chart.data.labels,a,this.chart.data.labels[a])}});c.pivot()},draw:function(c){var a=c||1;e.each(this.getDataset().metaData,function(c,e){c.transition(a).draw()})},setHoverStyle:function(c){var a=
|
|
|
|
|
|
|
|
this.chart.data.datasets[c._datasetIndex],d=c._index;c._model.backgroundColor=c.custom&&c.custom.hoverBackgroundColor?c.custom.hoverBackgroundColor:e.getValueAtIndexOrDefault(a.hoverBackgroundColor,d,e.color(c._model.backgroundColor).saturate(.5).darken(.1).rgbString());c._model.borderColor=c.custom&&c.custom.hoverBorderColor?c.custom.hoverBorderColor:e.getValueAtIndexOrDefault(a.hoverBorderColor,d,e.color(c._model.borderColor).saturate(.5).darken(.1).rgbString());c._model.borderWidth=c.custom&&c.custom.hoverBorderWidth?
|
|
|
|
|
|
|
|
c.custom.hoverBorderWidth:e.getValueAtIndexOrDefault(a.hoverBorderWidth,d,c._model.borderWidth)},removeHoverStyle:function(c){var a=c._index;c._model.backgroundColor=c.custom&&c.custom.backgroundColor?c.custom.backgroundColor:e.getValueAtIndexOrDefault(this.getDataset().backgroundColor,a,this.chart.options.elements.arc.backgroundColor);c._model.borderColor=c.custom&&c.custom.borderColor?c.custom.borderColor:e.getValueAtIndexOrDefault(this.getDataset().borderColor,a,this.chart.options.elements.arc.borderColor);
|
|
|
|
|
|
|
|
c._model.borderWidth=c.custom&&c.custom.borderWidth?c.custom.borderWidth:e.getValueAtIndexOrDefault(this.getDataset().borderWidth,a,this.chart.options.elements.arc.borderWidth)},calculateCircumference:function(c){if(isNaN(c))return 0;c=e.where(this.getDataset().data,function(a){return isNaN(a)}).length;return 2*Math.PI/(this.getDataset().data.length-c)}})}},{}],20:[function(p,m,n){m.exports=function(f){var e=f.helpers;f.defaults.radar={scale:{type:"radialLinear"},elements:{line:{tension:0}}};f.controllers.radar=
|
|
|
|
|
|
|
|
f.DatasetController.extend({linkScales:function(){},addElements:function(){this.getDataset().metaData=this.getDataset().metaData||[];this.getDataset().metaDataset=this.getDataset().metaDataset||new f.elements.Line({_chart:this.chart.chart,_datasetIndex:this.index,_points:this.getDataset().metaData,_loop:!0});e.each(this.getDataset().data,function(c,a){this.getDataset().metaData[a]=this.getDataset().metaData[a]||new f.elements.Point({_chart:this.chart.chart,_datasetIndex:this.index,_index:a,_model:{x:0,
|
|
|
|
|
|
|
|
y:0}})},this)},addElementAndReset:function(c){this.getDataset().metaData=this.getDataset().metaData||[];var a=new f.elements.Point({_chart:this.chart.chart,_datasetIndex:this.index,_index:c});this.updateElement(a,c,!0);this.getDataset().metaData.splice(c,0,a);this.updateBezierControlPoints()},update:function(c){var a=this.getDataset().metaDataset,d=this.getDataset().metaData,h=this.chart.scale,k;k=0>h.min&&0>h.max?h.getPointPositionForValue(0,h.max):0<h.min&&0<h.max?h.getPointPositionForValue(0,h.min):
|
|
|
|
|
|
|
|
h.getPointPositionForValue(0,0);e.extend(this.getDataset().metaDataset,{_datasetIndex:this.index,_children:this.getDataset().metaData,_model:{tension:a.custom&&a.custom.tension?a.custom.tension:e.getValueOrDefault(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,fill:a.custom&&a.custom.fill?a.custom.fill:void 0!==this.getDataset().fill?this.getDataset().fill:this.chart.options.elements.line.fill,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,scaleTop:h.top,scaleBottom:h.bottom,scaleZero:k}});
|
|
|
|
|
|
|
|
this.getDataset().metaDataset.pivot();e.each(d,function(a,d){this.updateElement(a,d,c)},this);this.updateBezierControlPoints()},updateElement:function(c,a,d){var h=this.chart.scale.getPointPositionForValue(a,this.getDataset().data[a]);e.extend(c,{_datasetIndex:this.index,_index:a,_scale:this.chart.scale,_model:{x:d?this.chart.scale.xCenter:h.x,y:d?this.chart.scale.yCenter:h.y,tension:c.custom&&c.custom.tension?c.custom.tension:e.getValueOrDefault(this.getDataset().tension,this.chart.options.elements.line.tension),
|
|
|
|
|
|
|
|
radius:c.custom&&c.custom.radius?c.custom.radius:e.getValueAtIndexOrDefault(this.getDataset().pointRadius,a,this.chart.options.elements.point.radius),backgroundColor:c.custom&&c.custom.backgroundColor?c.custom.backgroundColor:e.getValueAtIndexOrDefault(this.getDataset().pointBackgroundColor,a,this.chart.options.elements.point.backgroundColor),borderColor:c.custom&&c.custom.borderColor?c.custom.borderColor:e.getValueAtIndexOrDefault(this.getDataset().pointBorderColor,a,this.chart.options.elements.point.borderColor),
|
|
|
|
|
|
|
|
borderWidth:c.custom&&c.custom.borderWidth?c.custom.borderWidth:e.getValueAtIndexOrDefault(this.getDataset().pointBorderWidth,a,this.chart.options.elements.point.borderWidth),pointStyle:c.custom&&c.custom.pointStyle?c.custom.pointStyle:e.getValueAtIndexOrDefault(this.getDataset().pointStyle,a,this.chart.options.elements.point.pointStyle),hitRadius:c.custom&&c.custom.hitRadius?c.custom.hitRadius:e.getValueAtIndexOrDefault(this.getDataset().hitRadius,a,this.chart.options.elements.point.hitRadius)}});
|
|
|
|
|
|
|
|
c._model.skip=c.custom&&c.custom.skip?c.custom.skip:isNaN(c._model.x)||isNaN(c._model.y)},updateBezierControlPoints:function(){e.each(this.getDataset().metaData,function(c,a){var d=e.splineCurve(e.previousItem(this.getDataset().metaData,a,!0)._model,c._model,e.nextItem(this.getDataset().metaData,a,!0)._model,c._model.tension);c._model.controlPointPreviousX=Math.max(Math.min(d.previous.x,this.chart.chartArea.right),this.chart.chartArea.left);c._model.controlPointPreviousY=Math.max(Math.min(d.previous.y,
|
|
|
|
|
|
|
|
this.chart.chartArea.bottom),this.chart.chartArea.top);c._model.controlPointNextX=Math.max(Math.min(d.next.x,this.chart.chartArea.right),this.chart.chartArea.left);c._model.controlPointNextY=Math.max(Math.min(d.next.y,this.chart.chartArea.bottom),this.chart.chartArea.top);c.pivot()},this)},draw:function(c){var a=c||1;e.each(this.getDataset().metaData,function(c,e){c.transition(a)});this.getDataset().metaDataset.transition(a).draw();e.each(this.getDataset().metaData,function(a){a.draw()})},setHoverStyle:function(c){var a=
|
|
|
|
|
|
|
|
this.chart.data.datasets[c._datasetIndex],d=c._index;c._model.radius=c.custom&&c.custom.hoverRadius?c.custom.hoverRadius:e.getValueAtIndexOrDefault(a.pointHoverRadius,d,this.chart.options.elements.point.hoverRadius);c._model.backgroundColor=c.custom&&c.custom.hoverBackgroundColor?c.custom.hoverBackgroundColor:e.getValueAtIndexOrDefault(a.pointHoverBackgroundColor,d,e.color(c._model.backgroundColor).saturate(.5).darken(.1).rgbString());c._model.borderColor=c.custom&&c.custom.hoverBorderColor?c.custom.hoverBorderColor:
|
|
|
|
|
|
|
|
e.getValueAtIndexOrDefault(a.pointHoverBorderColor,d,e.color(c._model.borderColor).saturate(.5).darken(.1).rgbString());c._model.borderWidth=c.custom&&c.custom.hoverBorderWidth?c.custom.hoverBorderWidth:e.getValueAtIndexOrDefault(a.pointHoverBorderWidth,d,c._model.borderWidth)},removeHoverStyle:function(c){var a=c._index;c._model.radius=c.custom&&c.custom.radius?c.custom.radius:e.getValueAtIndexOrDefault(this.getDataset().radius,a,this.chart.options.elements.point.radius);c._model.backgroundColor=
|
|
|
|
|
|
|
|
c.custom&&c.custom.backgroundColor?c.custom.backgroundColor:e.getValueAtIndexOrDefault(this.getDataset().pointBackgroundColor,a,this.chart.options.elements.point.backgroundColor);c._model.borderColor=c.custom&&c.custom.borderColor?c.custom.borderColor:e.getValueAtIndexOrDefault(this.getDataset().pointBorderColor,a,this.chart.options.elements.point.borderColor);c._model.borderWidth=c.custom&&c.custom.borderWidth?c.custom.borderWidth:e.getValueAtIndexOrDefault(this.getDataset().pointBorderWidth,a,this.chart.options.elements.point.borderWidth)}})}},
|
|
|
|
|
|
|
|
{}],21:[function(p,m,n){m.exports=function(f){var e=f.helpers;f.defaults.global.animation={duration:1E3,easing:"easeOutQuart",onProgress:e.noop,onComplete:e.noop};f.Animation=f.Element.extend({currentStep:null,numSteps:60,easing:"",render:null,onAnimationProgress:null,onAnimationComplete:null});f.animationService={frameDuration:17,animations:[],dropFrames:0,request:null,addAnimation:function(c,a,d,e){e||(c.animating=!0);for(d=0;d<this.animations.length;++d)if(this.animations[d].chartInstance===c){this.animations[d].animationObject=
|
|
|
|
|
|
|
|
a;return}this.animations.push({chartInstance:c,animationObject:a});1===this.animations.length&&this.requestAnimationFrame()},cancelAnimation:function(c){var a=e.findIndex(this.animations,function(a){return a.chartInstance===c});-1!==a&&(this.animations.splice(a,1),c.animating=!1)},requestAnimationFrame:function(){var c=this;null===c.request&&(c.request=e.requestAnimFrame.call(window,function(){c.request=null;c.startDigest()}))},startDigest:function(){var c=Date.now(),a=0;1<this.dropFrames&&(a=Math.floor(this.dropFrames),
|
|
|
|
|
|
|
|
this.dropFrames%=1);for(var d=0;d<this.animations.length;)null===this.animations[d].animationObject.currentStep&&(this.animations[d].animationObject.currentStep=0),this.animations[d].animationObject.currentStep+=1+a,this.animations[d].animationObject.currentStep>this.animations[d].animationObject.numSteps&&(this.animations[d].animationObject.currentStep=this.animations[d].animationObject.numSteps),this.animations[d].animationObject.render(this.animations[d].chartInstance,this.animations[d].animationObject),
|
|
|
|
|
|
|
|
this.animations[d].animationObject.onAnimationProgress&&this.animations[d].animationObject.onAnimationProgress.call&&this.animations[d].animationObject.onAnimationProgress.call(this.animations[d].chartInstance,this.animations[d]),this.animations[d].animationObject.currentStep===this.animations[d].animationObject.numSteps?(this.animations[d].animationObject.onAnimationComplete&&this.animations[d].animationObject.onAnimationComplete.call&&this.animations[d].animationObject.onAnimationComplete.call(this.animations[d].chartInstance,
|
|
|
|
|
|
|
|
this.animations[d]),this.animations[d].chartInstance.animating=!1,this.animations.splice(d,1)):++d;c=(Date.now()-c)/this.frameDuration;this.dropFrames+=c;0<this.animations.length&&this.requestAnimationFrame()}}}},{}],22:[function(p,m,n){m.exports=function(f){var e=f.helpers;f.types={};f.instances={};f.controllers={};f.Controller=function(c){this.chart=c;this.config=c.config;this.options=this.config.options=e.configMerge(f.defaults.global,f.defaults[this.config.type],this.config.options||{});this.id=
|
|
|
|
|
|
|
|
e.uid();Object.defineProperty(this,"data",{get:function(){return this.config.data}});f.instances[this.id]=this;this.options.responsive&&this.resize(!0);this.initialize();return this};e.extend(f.Controller.prototype,{initialize:function(){this.bindEvents();this.ensureScalesHaveIDs();this.buildOrUpdateControllers();this.buildScales();this.buildSurroundingItems();this.updateLayout();this.resetElements();this.initToolTip();this.update();return this},clear:function(){e.clear(this.chart);return this},stop:function(){f.animationService.cancelAnimation(this);
|
|
|
|
|
|
|
|
return this},resize:function(c){var a=this.chart.canvas,d=e.getMaximumWidth(this.chart.canvas),h=this.options.maintainAspectRatio&&!1===isNaN(this.chart.aspectRatio)&&isFinite(this.chart.aspectRatio)&&0!==this.chart.aspectRatio?d/this.chart.aspectRatio:e.getMaximumHeight(this.chart.canvas);if(this.chart.width===d&&this.chart.height===h)return this;a.width=this.chart.width=d;a.height=this.chart.height=h;e.retinaScale(this.chart);c||(this.stop(),this.update(this.options.responsiveAnimationDuration));
|
|
|
|
|
|
|
|
return this},ensureScalesHaveIDs:function(){this.options.scales&&(this.options.scales.xAxes&&this.options.scales.xAxes.length&&e.each(this.options.scales.xAxes,function(c,a){c.id=c.id||"x-axis-"+a}),this.options.scales.yAxes&&this.options.scales.yAxes.length&&e.each(this.options.scales.yAxes,function(c,a){c.id=c.id||"y-axis-"+a}))},buildScales:function(){this.scales={};this.options.scales&&(this.options.scales.xAxes&&this.options.scales.xAxes.length&&e.each(this.options.scales.xAxes,function(a,c){var h=
|
|
|
|
|
|
|
|
e.getValueOrDefault(a.type,"category");if(h=f.scaleService.getScaleConstructor(h))h=new h({ctx:this.chart.ctx,options:a,chart:this,id:a.id}),this.scales[h.id]=h},this),this.options.scales.yAxes&&this.options.scales.yAxes.length&&e.each(this.options.scales.yAxes,function(a,c){var h=e.getValueOrDefault(a.type,"linear");if(h=f.scaleService.getScaleConstructor(h))h=new h({ctx:this.chart.ctx,options:a,chart:this,id:a.id}),this.scales[h.id]=h},this));if(this.options.scale){var c=f.scaleService.getScaleConstructor(this.options.scale.type);
|
|
|
|
|
|
|
|
c&&(this.scale=c=new c({ctx:this.chart.ctx,options:this.options.scale,chart:this}),this.scales.radialScale=c)}f.scaleService.addScalesToLayout(this)},buildSurroundingItems:function(){this.options.title&&(this.titleBlock=new f.Title({ctx:this.chart.ctx,options:this.options.title,chart:this}),f.layoutService.addBox(this,this.titleBlock));this.options.legend&&(this.legend=new f.Legend({ctx:this.chart.ctx,options:this.options.legend,chart:this}),f.layoutService.addBox(this,this.legend))},updateLayout:function(){f.layoutService.update(this,
|
|
|
|
|
|
|
|
this.chart.width,this.chart.height)},buildOrUpdateControllers:function(){var c=[],a=[];e.each(this.data.datasets,function(d,k){d.type||(d.type=this.config.type);var e=d.type;c.push(e);d.controller?d.controller.updateIndex(k):(d.controller=new f.controllers[e](this,k),a.push(d.controller))},this);if(1<c.length)for(var d=1;d<c.length;d++)if(c[d]!==c[d-1]){this.isCombo=!0;break}return a},resetElements:function(){e.each(this.data.datasets,function(c,a){c.controller.reset()})},update:function(c,a){this.tooltip._data=
|
|
|
|
|
|
|
|
this.data;var d=this.buildOrUpdateControllers();f.layoutService.update(this,this.chart.width,this.chart.height);e.each(d,function(a){a.reset()});e.each(this.data.datasets,function(a,c){a.controller.buildOrUpdateElements()});e.each(this.data.datasets,function(a,c){a.controller.update()});this.render(c,a)},render:function(c,a){if(this.options.animation&&("undefined"!==typeof c&&0!==c||"undefined"===typeof c&&0!==this.options.animation.duration)){var d=new f.Animation;d.numSteps=(c||this.options.animation.duration)/
|
|
|
|
|
|
|
|
16.66;d.easing=this.options.animation.easing;d.render=function(a,c){var d=c.currentStep/c.numSteps,q=(0,e.easingEffects[c.easing])(d);a.draw(q,d,c.currentStep)};d.onAnimationProgress=this.options.animation.onProgress;d.onAnimationComplete=this.options.animation.onComplete;f.animationService.addAnimation(this,d,c,a)}else this.draw(),this.options.animation&&this.options.animation.onComplete&&this.options.animation.onComplete.call&&this.options.animation.onComplete.call(this);return this},draw:function(c){var a=
|
|
|
|
|
|
|
|
c||1;this.clear();e.each(this.boxes,function(a){a.draw(this.chartArea)},this);this.scale&&this.scale.draw();this.chart.ctx.save();this.chart.ctx.beginPath();this.chart.ctx.rect(this.chartArea.left,this.chartArea.top,this.chartArea.right-this.chartArea.left,this.chartArea.bottom-this.chartArea.top);this.chart.ctx.clip();e.each(this.data.datasets,function(a,h){e.isDatasetVisible(a)&&a.controller.draw(c)},null,!0);this.chart.ctx.restore();this.tooltip.transition(a).draw()},getElementAtEvent:function(c){var a=
|
|
|
|
|
|
|
|
e.getRelativePosition(c,this.chart),d=[];e.each(this.data.datasets,function(c,k){e.isDatasetVisible(c)&&e.each(c.metaData,function(c,k){if(c.inRange(a.x,a.y))return d.push(c),d})});return d},getElementsAtEvent:function(c){var a=e.getRelativePosition(c,this.chart),d=[],h=function(){if(this.data.datasets)for(var c=0;c<this.data.datasets.length;c++)if(e.isDatasetVisible(this.data.datasets[c]))for(var d=0;d<this.data.datasets[c].metaData.length;d++)if(this.data.datasets[c].metaData[d].inRange(a.x,a.y))return this.data.datasets[c].metaData[d]}.call(this);
|
|
|
|
|
|
|
|
if(!h)return d;e.each(this.data.datasets,function(a,c){e.isDatasetVisible(a)&&d.push(a.metaData[h._index])});return d},getDatasetAtEvent:function(c){c=this.getElementAtEvent(c);0<c.length&&(c=this.data.datasets[c[0]._datasetIndex].metaData);return c},generateLegend:function(){return this.options.legendCallback(this)},destroy:function(){this.clear();e.unbindEvents(this,this.events);e.removeResizeListener(this.chart.canvas.parentNode);var c=this.chart.canvas;c.width=this.chart.width;c.height=this.chart.height;
|
|
|
|
|
|
|
|
void 0!==this.chart.originalDevicePixelRatio&&this.chart.ctx.scale(1/this.chart.originalDevicePixelRatio,1/this.chart.originalDevicePixelRatio);c.style.width=this.chart.originalCanvasStyleWidth;c.style.height=this.chart.originalCanvasStyleHeight;delete f.instances[this.id]},toBase64Image:function(){return this.chart.canvas.toDataURL.apply(this.chart.canvas,arguments)},initToolTip:function(){this.tooltip=new f.Tooltip({_chart:this.chart,_chartInstance:this,_data:this.data,_options:this.options},this)},
|
|
|
|
|
|
|
|
bindEvents:function(){e.bindEvents(this,this.options.events,function(c){this.eventHandler(c)})},eventHandler:function(c){this.lastActive=this.lastActive||[];this.lastTooltipActive=this.lastTooltipActive||[];if("mouseout"===c.type)this.active=[],this.tooltipActive=[];else{var a=this,d=function(d){switch(d){case "single":return a.getElementAtEvent(c);case "label":return a.getElementsAtEvent(c);case "dataset":return a.getDatasetAtEvent(c);default:return c}};this.active=d(this.options.hover.mode);this.tooltipActive=
|
|
|
|
|
|
|
|
d(this.options.tooltips.mode)}this.options.hover.onHover&&this.options.hover.onHover.call(this,this.active);if("mouseup"===c.type||"click"===c.type)this.options.onClick&&this.options.onClick.call(this,c,this.active),this.legend&&this.legend.handleEvent&&this.legend.handleEvent(c);if(this.lastActive.length)switch(this.options.hover.mode){case "single":this.data.datasets[this.lastActive[0]._datasetIndex].controller.removeHoverStyle(this.lastActive[0],this.lastActive[0]._datasetIndex,this.lastActive[0]._index);
|
|
|
|
|
|
|
|
break;case "label":case "dataset":for(d=0;d<this.lastActive.length;d++)this.lastActive[d]&&this.data.datasets[this.lastActive[d]._datasetIndex].controller.removeHoverStyle(this.lastActive[d],this.lastActive[d]._datasetIndex,this.lastActive[d]._index)}if(this.active.length&&this.options.hover.mode)switch(this.options.hover.mode){case "single":this.data.datasets[this.active[0]._datasetIndex].controller.setHoverStyle(this.active[0]);break;case "label":case "dataset":for(d=0;d<this.active.length;d++)this.active[d]&&
|
|
|
|
|
|
|
|
this.data.datasets[this.active[d]._datasetIndex].controller.setHoverStyle(this.active[d])}if(this.options.tooltips.enabled||this.options.tooltips.custom)this.tooltip.initialize(),this.tooltip._active=this.tooltipActive,this.tooltip.update();this.tooltip.pivot();if(!this.animating){var h;e.each(this.active,function(a,c){a!==this.lastActive[c]&&(h=!0)},this);e.each(this.tooltipActive,function(a,c){a!==this.lastTooltipActive[c]&&(h=!0)},this);if(this.lastActive.length!==this.active.length||this.lastTooltipActive.length!==
|
|
|
|
|
|
|
|
this.tooltipActive.length||h)this.stop(),(this.options.tooltips.enabled||this.options.tooltips.custom)&&this.tooltip.update(!0),this.render(this.options.hover.animationDuration,!0)}this.lastActive=this.active;this.lastTooltipActive=this.tooltipActive;return this}})}},{}],23:[function(p,m,n){m.exports=function(f){var e=f.helpers;f.DatasetController=function(c,a){this.initialize.call(this,c,a)};e.extend(f.DatasetController.prototype,{initialize:function(c,a){this.chart=c;this.index=a;this.linkScales();
|
|
|
|
|
|
|
|
this.addElements()},updateIndex:function(c){this.index=c},linkScales:function(){this.getDataset().xAxisID||(this.getDataset().xAxisID=this.chart.options.scales.xAxes[0].id);this.getDataset().yAxisID||(this.getDataset().yAxisID=this.chart.options.scales.yAxes[0].id)},getDataset:function(){return this.chart.data.datasets[this.index]},getScaleForId:function(c){return this.chart.scales[c]},reset:function(){this.update(!0)},buildOrUpdateElements:function(){var c=this.getDataset().data.length,a=this.getDataset().metaData.length;
|
|
|
|
|
|
|
|
if(c<a)this.getDataset().metaData.splice(c,a-c);else if(c>a)for(;a<c;++a)this.addElementAndReset(a)},addElements:e.noop,addElementAndReset:e.noop,draw:e.noop,removeHoverStyle:e.noop,setHoverStyle:e.noop,update:e.noop});f.DatasetController.extend=e.inherits}},{}],24:[function(p,m,n){m.exports=function(f){var e=f.helpers;f.elements={};f.Element=function(c){e.extend(this,c);this.initialize.apply(this,arguments)};e.extend(f.Element.prototype,{initialize:function(){},pivot:function(){this._view||(this._view=
|
|
|
|
|
|
|
|
e.clone(this._model));this._start=e.clone(this._view);return this},transition:function(c){this._view||(this._view=e.clone(this._model));if(1===c)return this._view=this._model,this._start=null,this;this._start||this.pivot();e.each(this._model,function(a,d){if("_"!==d[0]&&this._model.hasOwnProperty(d))if(!this._view.hasOwnProperty(d))"number"!==typeof a||isNaN(this._view[d])?this._view[d]=a:this._view[d]=a*c;else if(a!==this._view[d])if("string"===typeof a)try{var h=e.color(this._start[d]).mix(e.color(this._model[d]),
|
|
|
|
|
|
|
|
c);this._view[d]=h.rgbString()}catch(k){this._view[d]=a}else"number"===typeof a?(h=void 0!==this._start[d]&&!1===isNaN(this._start[d])?this._start[d]:0,this._view[d]=(this._model[d]-h)*c+h):this._view[d]=a},this);return this},tooltipPosition:function(){return{x:this._model.x,y:this._model.y}},hasValue:function(){return e.isNumber(this._model.x)&&e.isNumber(this._model.y)}});f.Element.extend=e.inherits}},{}],25:[function(p,m,n){var f=p("chartjs-color");m.exports=function(e){function c(a,c,d){var e;
|
|
|
|
|
|
|
|
"string"===typeof a?(e=parseInt(a,10),-1!=a.indexOf("%")&&(e=e/100*c.parentNode[d])):e=a;return e}function a(a,d,e){var h,f=document.defaultView.getComputedStyle(a)[d];d=document.defaultView.getComputedStyle(a.parentNode)[d];var x=null!==f&&"none"!==f,u=null!==d&&"none"!==d;if(x||u)h=Math.min(x?c(f,a,e):Number.POSITIVE_INFINITY,u?c(d,a.parentNode,e):Number.POSITIVE_INFINITY);return h}var d=e.helpers={};d.each=function(a,c,e,h){var f;if(d.isArray(a))if(f=a.length,h)for(h=f-1;0<=h;h--)c.call(e,a[h],
|
|
|
|
|
|
|
|
h);else for(h=0;h<f;h++)c.call(e,a[h],h);else if("object"===typeof a){var x=Object.keys(a);f=x.length;for(h=0;h<f;h++)c.call(e,a[x[h]],x[h])}};d.clone=function(a){var c={};d.each(a,function(e,h){a.hasOwnProperty(h)&&(d.isArray(e)?c[h]=e.slice(0):c[h]="object"===typeof e&&null!==e?d.clone(e):e)});return c};d.extend=function(a){for(var c=arguments.length,e=[],h=1;h<c;h++)e.push(arguments[h]);d.each(e,function(c){d.each(c,function(d,e){c.hasOwnProperty(e)&&(a[e]=d)})});return a};d.configMerge=function(a){var c=
|
|
|
|
|
|
|
|
d.clone(a);d.each(Array.prototype.slice.call(arguments,1),function(a){d.each(a,function(k,h){if(a.hasOwnProperty(h))if("scales"===h)c[h]=d.scaleMerge(c.hasOwnProperty(h)?c[h]:{},k);else if("scale"===h)c[h]=d.configMerge(c.hasOwnProperty(h)?c[h]:{},e.scaleService.getScaleDefaults(k.type),k);else if(c.hasOwnProperty(h)&&d.isArray(c[h])&&d.isArray(k)){var f=c[h];d.each(k,function(a,c){c<f.length?f[c]="object"===typeof f[c]&&null!==f[c]&&"object"===typeof a&&null!==a?d.configMerge(f[c],a):a:f.push(a)})}else c.hasOwnProperty(h)&&
|
|
|
|
|
|
|
|
"object"===typeof c[h]&&null!==c[h]&&"object"===typeof k?c[h]=d.configMerge(c[h],k):c[h]=k})});return c};d.extendDeep=function(a){function c(a){d.each(arguments,function(k){k!==a&&d.each(k,function(d,k){a[k]&&a[k].constructor&&a[k].constructor===Object?c(a[k],d):a[k]=d})});return a}return c.apply(this,arguments)};d.scaleMerge=function(a,c){var h=d.clone(a);d.each(c,function(a,k){c.hasOwnProperty(k)&&("xAxes"===k||"yAxes"===k?h.hasOwnProperty(k)?d.each(a,function(a,c){var l=d.getValueOrDefault(a.type,
|
|
|
|
|
|
|
|
"xAxes"===k?"category":"linear"),l=e.scaleService.getScaleDefaults(l);c>=h[k].length||!h[k][c].type?h[k].push(d.configMerge(l,a)):h[k][c]=a.type&&a.type!==h[k][c].type?d.configMerge(h[k][c],l,a):d.configMerge(h[k][c],a)}):(h[k]=[],d.each(a,function(a){var c=d.getValueOrDefault(a.type,"xAxes"===k?"category":"linear");h[k].push(d.configMerge(e.scaleService.getScaleDefaults(c),a))})):h.hasOwnProperty(k)&&"object"===typeof h[k]&&null!==h[k]&&"object"===typeof a?h[k]=d.configMerge(h[k],a):h[k]=a)});return h};
|
|
|
|
|
|
|
|
d.getValueAtIndexOrDefault=function(a,c,e){return void 0===a||null===a?e:d.isArray(a)?c<a.length?a[c]:e:a};d.getValueOrDefault=function(a,c){return void 0===a?c:a};d.indexOf=function(a,c){if(Array.prototype.indexOf)return a.indexOf(c);for(var d=0;d<a.length;d++)if(a[d]===c)return d;return-1};d.where=function(a,c){var e=[];d.each(a,function(a){c(a)&&e.push(a)});return e};d.findIndex=function(a,c,d){var e=-1;if(Array.prototype.findIndex)e=a.findIndex(c,d);else for(var h=0;h<a.length;++h)if(d=void 0!==
|
|
|
|
|
|
|
|
d?d:a,c.call(d,a[h],h,a)){e=h;break}return e};d.findNextWhere=function(a,c,d){if(void 0===d||null===d)d=-1;for(d+=1;d<a.length;d++){var e=a[d];if(c(e))return e}};d.findPreviousWhere=function(a,c,d){if(void 0===d||null===d)d=a.length;for(--d;0<=d;d--){var e=a[d];if(c(e))return e}};d.inherits=function(a){var c=this,e=a&&a.hasOwnProperty("constructor")?a.constructor:function(){return c.apply(this,arguments)},h=function(){this.constructor=e};h.prototype=c.prototype;e.prototype=new h;e.extend=d.inherits;
|
|
|
|
|
|
|
|
a&&d.extend(e.prototype,a);e.__super__=c.prototype;return e};d.noop=function(){};d.uid=function(){var a=0;return function(){return"chart-"+a++}}();d.warn=function(a){console&&"function"===typeof console.warn&&console.warn(a)};d.isNumber=function(a){return!isNaN(parseFloat(a))&&isFinite(a)};d.almostEquals=function(a,c,d){return Math.abs(a-c)<d};d.max=function(a){return a.reduce(function(a,c){return isNaN(c)?a:Math.max(a,c)},Number.NEGATIVE_INFINITY)};d.min=function(a){return a.reduce(function(a,c){return isNaN(c)?
|
|
|
|
|
|
|
|
a:Math.min(a,c)},Number.POSITIVE_INFINITY)};d.sign=function(a){if(Math.sign)return Math.sign(a);a=+a;return 0===a||isNaN(a)?a:0<a?1:-1};d.log10=function(a){return Math.log10?Math.log10(a):Math.log(a)/Math.LN10};d.toRadians=function(a){return Math.PI/180*a};d.toDegrees=function(a){return 180/Math.PI*a};d.getAngleFromPoint=function(a,c){var d=c.x-a.x,e=c.y-a.y,h=Math.sqrt(d*d+e*e),d=Math.atan2(e,d);d<-.5*Math.PI&&(d+=2*Math.PI);return{angle:d,distance:h}};d.aliasPixel=function(a){return 0===a%2?0:.5};
|
|
|
|
|
|
|
|
d.splineCurve=function(a,c,d,e){a=a.skip?c:a;d=d.skip?c:d;var h=Math.sqrt(Math.pow(c.x-a.x,2)+Math.pow(c.y-a.y,2)),f=Math.sqrt(Math.pow(d.x-c.x,2)+Math.pow(d.y-c.y,2)),m=h/(h+f),h=f/(h+f),m=isNaN(m)?0:m,h=isNaN(h)?0:h,m=e*m;e*=h;return{previous:{x:c.x-m*(d.x-a.x),y:c.y-m*(d.y-a.y)},next:{x:c.x+e*(d.x-a.x),y:c.y+e*(d.y-a.y)}}};d.nextItem=function(a,c,d){return d?c>=a.length-1?a[0]:a[c+1]:c>=a.length-1?a[a.length-1]:a[c+1]};d.previousItem=function(a,c,d){return d?0>=c?a[a.length-1]:a[c-1]:0>=c?a[0]:
|
|
|
|
|
|
|
|
a[c-1]};d.niceNum=function(a,c){var e=Math.floor(d.log10(a)),h=a/Math.pow(10,e);return(c?1.5>h?1:3>h?2:7>h?5:10:1>=h?1:2>=h?2:5>=h?5:10)*Math.pow(10,e)};var h=d.easingEffects={linear:function(a){return a},easeInQuad:function(a){return a*a},easeOutQuad:function(a){return-1*a*(a-2)},easeInOutQuad:function(a){return 1>(a/=.5)?.5*a*a:-.5*(--a*(a-2)-1)},easeInCubic:function(a){return a*a*a},easeOutCubic:function(a){return 1*((a=a/1-1)*a*a+1)},easeInOutCubic:function(a){return 1>(a/=.5)?.5*a*a*a:.5*((a-=
|
|
|
|
|
|
|
|
2)*a*a+2)},easeInQuart:function(a){return a*a*a*a},easeOutQuart:function(a){return-1*((a=a/1-1)*a*a*a-1)},easeInOutQuart:function(a){return 1>(a/=.5)?.5*a*a*a*a:-.5*((a-=2)*a*a*a-2)},easeInQuint:function(a){return 1*(a/=1)*a*a*a*a},easeOutQuint:function(a){return 1*((a=a/1-1)*a*a*a*a+1)},easeInOutQuint:function(a){return 1>(a/=.5)?.5*a*a*a*a*a:.5*((a-=2)*a*a*a*a+2)},easeInSine:function(a){return-1*Math.cos(a/1*(Math.PI/2))+1},easeOutSine:function(a){return 1*Math.sin(a/1*(Math.PI/2))},easeInOutSine:function(a){return-.5*
|
|
|
|
|
|
|
|
(Math.cos(Math.PI*a/1)-1)},easeInExpo:function(a){return 0===a?1:1*Math.pow(2,10*(a/1-1))},easeOutExpo:function(a){return 1===a?1:1*(-Math.pow(2,-10*a/1)+1)},easeInOutExpo:function(a){return 0===a?0:1===a?1:1>(a/=.5)?.5*Math.pow(2,10*(a-1)):.5*(-Math.pow(2,-10*--a)+2)},easeInCirc:function(a){return 1<=a?a:-1*(Math.sqrt(1-(a/=1)*a)-1)},easeOutCirc:function(a){return 1*Math.sqrt(1-(a=a/1-1)*a)},easeInOutCirc:function(a){return 1>(a/=.5)?-.5*(Math.sqrt(1-a*a)-1):.5*(Math.sqrt(1-(a-=2)*a)+1)},easeInElastic:function(a){var c=
|
|
|
|
|
|
|
|
1.70158,d=0,e=1;if(0===a)return 0;if(1===(a/=1))return 1;d||(d=.3);e<Math.abs(1)?(e=1,c=d/4):c=d/(2*Math.PI)*Math.asin(1/e);return-(e*Math.pow(2,10*--a)*Math.sin(2*(1*a-c)*Math.PI/d))},easeOutElastic:function(a){var c=1.70158,d=0,e=1;if(0===a)return 0;if(1===(a/=1))return 1;d||(d=.3);e<Math.abs(1)?(e=1,c=d/4):c=d/(2*Math.PI)*Math.asin(1/e);return e*Math.pow(2,-10*a)*Math.sin(2*(1*a-c)*Math.PI/d)+1},easeInOutElastic:function(a){var c=1.70158,d=0,e=1;if(0===a)return 0;if(2===(a/=.5))return 1;d||(d=
|
|
|
|
|
|
|
|
.3*1.5);e<Math.abs(1)?(e=1,c=d/4):c=d/(2*Math.PI)*Math.asin(1/e);return 1>a?-.5*e*Math.pow(2,10*--a)*Math.sin(2*(1*a-c)*Math.PI/d):e*Math.pow(2,-10*--a)*Math.sin(2*(1*a-c)*Math.PI/d)*.5+1},easeInBack:function(a){return 1*(a/=1)*a*(2.70158*a-1.70158)},easeOutBack:function(a){return 1*((a=a/1-1)*a*(2.70158*a+1.70158)+1)},easeInOutBack:function(a){var c=1.70158;return 1>(a/=.5)?.5*a*a*(((c*=1.525)+1)*a-c):.5*((a-=2)*a*(((c*=1.525)+1)*a+c)+2)},easeInBounce:function(a){return 1-h.easeOutBounce(1-a)},easeOutBounce:function(a){return(a/=
|
|
|
|
|
|
|
|
1)<1/2.75?7.5625*a*a:a<2/2.75?1*(7.5625*(a-=1.5/2.75)*a+.75):a<2.5/2.75?1*(7.5625*(a-=2.25/2.75)*a+.9375):1*(7.5625*(a-=2.625/2.75)*a+.984375)},easeInOutBounce:function(a){return.5>a?.5*h.easeInBounce(2*a):.5*h.easeOutBounce(2*a-1)+.5}};d.requestAnimFrame=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(a){return window.setTimeout(a,1E3/60)}}();d.cancelAnimFrame=
|
|
|
|
|
|
|
|
function(){return window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.oCancelAnimationFrame||window.msCancelAnimationFrame||function(a){return window.clearTimeout(a,1E3/60)}}();d.getRelativePosition=function(a,c){var e,h;h=a.originalEvent||a;var f=a.currentTarget||a.srcElement,m=f.getBoundingClientRect();h.touches&&0<h.touches.length?(e=h.touches[0].clientX,h=h.touches[0].clientY):(e=h.clientX,h=h.clientY);var n=parseFloat(d.getStyle(f,"padding-left")),
|
|
|
|
|
|
|
|
p=parseFloat(d.getStyle(f,"padding-top")),v=parseFloat(d.getStyle(f,"padding-right")),A=parseFloat(d.getStyle(f,"padding-bottom")),A=m.bottom-m.top-p-A;e=Math.round((e-m.left-n)/(m.right-m.left-n-v)*f.width/c.currentDevicePixelRatio);h=Math.round((h-m.top-p)/A*f.height/c.currentDevicePixelRatio);return{x:e,y:h}};d.addEvent=function(a,c,d){a.addEventListener?a.addEventListener(c,d):a.attachEvent?a.attachEvent("on"+c,d):a["on"+c]=d};d.removeEvent=function(a,c,e){a.removeEventListener?a.removeEventListener(c,
|
|
|
|
|
|
|
|
e,!1):a.detachEvent?a.detachEvent("on"+c,e):a["on"+c]=d.noop};d.bindEvents=function(a,c,e){a.events||(a.events={});d.each(c,function(c){a.events[c]=function(){e.apply(a,arguments)};d.addEvent(a.chart.canvas,c,a.events[c])})};d.unbindEvents=function(a,c){d.each(c,function(c,e){d.removeEvent(a.chart.canvas,e,c)})};d.getConstraintWidth=function(c){return a(c,"max-width","clientWidth")};d.getConstraintHeight=function(c){return a(c,"max-height","clientHeight")};d.getMaximumWidth=function(a){var c=a.parentNode,
|
|
|
|
|
|
|
|
e=parseInt(d.getStyle(c,"padding-left"))+parseInt(d.getStyle(c,"padding-right")),c=c.clientWidth-e;a=d.getConstraintWidth(a);void 0!==a&&(c=Math.min(c,a));return c};d.getMaximumHeight=function(a){var c=a.parentNode,e=parseInt(d.getStyle(c,"padding-top"))+parseInt(d.getStyle(c,"padding-bottom")),c=c.clientHeight-e;a=d.getConstraintHeight(a);void 0!==a&&(c=Math.min(c,a));return c};d.getStyle=function(a,c){return a.currentStyle?a.currentStyle[c]:document.defaultView.getComputedStyle(a,null).getPropertyValue(c)};
|
|
|
|
|
|
|
|
d.retinaScale=function(a){var c=a.ctx,d=a.canvas.width,e=a.canvas.height,h=a.currentDevicePixelRatio=window.devicePixelRatio||1;1!==h&&(c.canvas.height=e*h,c.canvas.width=d*h,c.scale(h,h),a.originalDevicePixelRatio=a.originalDevicePixelRatio||h);c.canvas.style.width=d+"px";c.canvas.style.height=e+"px"};d.clear=function(a){a.ctx.clearRect(0,0,a.width,a.height)};d.fontString=function(a,c,d){return c+" "+a+"px "+d};d.longestText=function(a,c,e,h){h=h||{};h.data=h.data||{};h.garbageCollect=h.garbageCollect||
|
|
|
|
|
|
|
|
[];h.font!==c&&(h.data={},h.garbageCollect=[],h.font=c);a.font=c;var f=0;d.each(e,function(c){if(void 0!==c&&null!==c){var d=h.data[c];d||(d=h.data[c]=a.measureText(c).width,h.garbageCollect.push(c));d>f&&(f=d)}});c=h.garbageCollect.length/2;if(c>e.length){for(e=0;e<c;e++)delete h.data[h.garbageCollect[e]];h.garbageCollect.splice(0,c)}return f};d.drawRoundedRectangle=function(a,c,d,e,h,f){a.beginPath();a.moveTo(c+f,d);a.lineTo(c+e-f,d);a.quadraticCurveTo(c+e,d,c+e,d+f);a.lineTo(c+e,d+h-f);a.quadraticCurveTo(c+
|
|
|
|
|
|
|
|
e,d+h,c+e-f,d+h);a.lineTo(c+f,d+h);a.quadraticCurveTo(c,d+h,c,d+h-f);a.lineTo(c,d+f);a.quadraticCurveTo(c,d,c+f,d);a.closePath()};d.color=function(a){return f?a instanceof CanvasGradient?f(e.defaults.global.defaultColor):f(a):(console.log("Color.js not found!"),a)};d.addResizeListener=function(a,c){var d=document.createElement("iframe");d.classlist?d.classlist.add("chartjs-hidden-iframe"):d.setAttribute("class","chartjs-hidden-iframe");d.style.width="100%";d.style.display="block";d.style.border=0;
|
|
|
|
|
|
|
|
d.style.height=0;d.style.margin=0;d.style.position="absolute";d.style.left=0;d.style.right=0;d.style.top=0;d.style.bottom=0;a.insertBefore(d,a.firstChild);(d.contentWindow||d).onresize=function(){c&&c()}};d.removeResizeListener=function(a){(a=a.querySelector(".chartjs-hidden-iframe"))&&a.parentNode.removeChild(a)};d.isArray=function(a){return Array.isArray?Array.isArray(a):"[object Array]"===Object.prototype.toString.call(a)};d.pushAllIfDefined=function(a,c){"undefined"!==typeof a&&(d.isArray(a)?
|
|
|
|
|
|
|
|
c.push.apply(c,a):c.push(a))};d.isDatasetVisible=function(a){return!a.hidden};d.callCallback=function(a,c,d){a&&"function"===typeof a.call&&a.apply(d,c)}}},{"chartjs-color":6}],26:[function(p,m,n){m.exports=function(){var f=function(e,c){this.config=c;e.length&&e[0].getContext&&(e=e[0]);e.getContext&&(e=e.getContext("2d"));this.ctx=e;this.canvas=e.canvas;this.width=e.canvas.width||parseInt(f.helpers.getStyle(e.canvas,"width"))||f.helpers.getMaximumWidth(e.canvas);this.height=e.canvas.height||parseInt(f.helpers.getStyle(e.canvas,
|
|
|
|
|
|
|
|
"height"))||f.helpers.getMaximumHeight(e.canvas);this.aspectRatio=this.width/this.height;if(isNaN(this.aspectRatio)||!1===isFinite(this.aspectRatio))this.aspectRatio=void 0!==c.aspectRatio?c.aspectRatio:2;this.originalCanvasStyleWidth=e.canvas.style.width;this.originalCanvasStyleHeight=e.canvas.style.height;f.helpers.retinaScale(this);c&&(this.controller=new f.Controller(this));var a=this;f.helpers.addResizeListener(e.canvas.parentNode,function(){a.controller&&a.controller.config.options.responsive&&
|
|
|
|
|
|
|
|
a.controller.resize()});return this.controller?this.controller:this};f.defaults={global:{responsive:!0,responsiveAnimationDuration:0,maintainAspectRatio:!0,events:["mousemove","mouseout","click","touchstart","touchmove"],hover:{onHover:null,mode:"single",animationDuration:400},onClick:null,defaultColor:"rgba(0,0,0,0.1)",defaultFontColor:"#666",defaultFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",defaultFontSize:12,defaultFontStyle:"normal",showLines:!0,elements:{},legendCallback:function(e){var c=
|
|
|
|
|
|
|
|
[];c.push('<ul class="'+e.id+'-legend">');for(var a=0;a<e.data.datasets.length;a++)c.push('<li><span style="background-color:'+e.data.datasets[a].backgroundColor+'"></span>'),e.data.datasets[a].label&&c.push(e.data.datasets[a].label),c.push("</li>");c.push("</ul>");return c.join("")}}};return f}},{}],27:[function(p,m,n){m.exports=function(f){var e=f.helpers;f.layoutService={defaults:{},addBox:function(c,a){c.boxes||(c.boxes=[]);c.boxes.push(a)},removeBox:function(c,a){c.boxes&&c.boxes.splice(c.boxes.indexOf(a),
|
|
|
|
|
|
|
|
1)},update:function(c,a,d){function h(a){var c,d=a.isHorizontal();d?(c=a.update(a.options.fullWidth?v:y,I),D-=c.height):(c=a.update(z,F),y-=c.width);N.push({horizontal:d,minSize:c,box:a})}function k(a){var c=e.findNextWhere(N,function(c){return c.box===a});c&&(a.isHorizontal()?a.update(a.options.fullWidth?v:y,A/2,{left:B,right:G,top:0,bottom:0}):a.update(c.minSize.width,D))}function f(a){var c=e.findNextWhere(N,function(c){return c.box===a}),d={left:0,right:0,top:C,bottom:H};c&&a.update(c.minSize.width,
|
|
|
|
|
|
|
|
D,d)}function q(c){c.isHorizontal()?(c.left=c.options.fullWidth?0:B,c.right=c.options.fullWidth?a-0:B+y,c.top=J,c.bottom=J+c.height,J=c.bottom):(c.left=K,c.right=K+c.width,c.top=C,c.bottom=C+D,K=c.right)}if(c){var t=e.where(c.boxes,function(a){return"left"===a.options.position}),m=e.where(c.boxes,function(a){return"right"===a.options.position}),n=e.where(c.boxes,function(a){return"top"===a.options.position}),p=e.where(c.boxes,function(a){return"bottom"===a.options.position}),E=e.where(c.boxes,function(a){return"chartArea"===
|
|
|
|
|
|
|
|
a.options.position});n.sort(function(a,c){return(c.options.fullWidth?1:0)-(a.options.fullWidth?1:0)});p.sort(function(a,c){return(a.options.fullWidth?1:0)-(c.options.fullWidth?1:0)});var v=a-0,A=d-0,F=A/2,z=(a-v/2)/(t.length+m.length),I=(d-F)/(n.length+p.length),y=v,D=A,N=[];e.each(t.concat(m,n,p),h);var B=0,G=0,C=0,H=0;e.each(t.concat(m),k);e.each(t,function(a){B+=a.width});e.each(m,function(a){G+=a.width});e.each(n.concat(p),k);e.each(n,function(a){C+=a.height});e.each(p,function(a){H+=a.height});
|
|
|
|
|
|
|
|
e.each(t.concat(m),f);H=C=G=B=0;e.each(t,function(a){B+=a.width});e.each(m,function(a){G+=a.width});e.each(n,function(a){C+=a.height});e.each(p,function(a){H+=a.height});var L=d-C-H,M=a-B-G;if(M!==y||L!==D)e.each(t,function(a){a.height=L}),e.each(m,function(a){a.height=L}),e.each(n,function(a){a.width=M}),e.each(p,function(a){a.width=M}),D=L,y=M;var K=0,J=0;e.each(t.concat(n),q);K+=y;J+=D;e.each(m,q);e.each(p,q);c.chartArea={left:B,top:C,right:B+y,bottom:C+D};e.each(E,function(a){a.left=c.chartArea.left;
|
|
|
|
|
|
|
|
a.top=c.chartArea.top;a.right=c.chartArea.right;a.bottom=c.chartArea.bottom;a.update(y,D)})}}}}},{}],28:[function(p,m,n){m.exports=function(f){var e=f.helpers;f.defaults.global.legend={display:!0,position:"top",fullWidth:!0,reverse:!1,onClick:function(c,a){var d=this.chart.data.datasets[a.datasetIndex];d.hidden=!d.hidden;this.chart.update()},labels:{boxWidth:40,padding:10,generateLabels:function(c){return e.isArray(c.datasets)?c.datasets.map(function(a,c){return{text:a.label,fillStyle:a.backgroundColor,
|
|
|
|
|
|
|
|
hidden:a.hidden,lineCap:a.borderCapStyle,lineDash:a.borderDash,lineDashOffset:a.borderDashOffset,lineJoin:a.borderJoinStyle,lineWidth:a.borderWidth,strokeStyle:a.borderColor,datasetIndex:c}},this):[]}}};f.Legend=f.Element.extend({initialize:function(c){e.extend(this,c);this.legendHitBoxes=[];this.doughnutMode=!1},beforeUpdate:e.noop,update:function(c,a,d){this.beforeUpdate();this.maxWidth=c;this.maxHeight=a;this.margins=d;this.beforeSetDimensions();this.setDimensions();this.afterSetDimensions();this.beforeBuildLabels();
|
|
|
|
|
|
|
|
this.buildLabels();this.afterBuildLabels();this.beforeFit();this.fit();this.afterFit();this.afterUpdate();return this.minSize},afterUpdate:e.noop,beforeSetDimensions:e.noop,setDimensions:function(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height);this.paddingBottom=this.paddingRight=this.paddingTop=this.paddingLeft=0;this.minSize={width:0,height:0}},afterSetDimensions:e.noop,beforeBuildLabels:e.noop,buildLabels:function(){this.legendItems=
|
|
|
|
|
|
|
|
this.options.labels.generateLabels.call(this,this.chart.data);this.options.reverse&&this.legendItems.reverse()},afterBuildLabels:e.noop,beforeFit:e.noop,fit:function(){var c=this.ctx,a=e.getValueOrDefault(this.options.labels.fontSize,f.defaults.global.defaultFontSize),d=e.getValueOrDefault(this.options.labels.fontStyle,f.defaults.global.defaultFontStyle),h=e.getValueOrDefault(this.options.labels.fontFamily,f.defaults.global.defaultFontFamily),d=e.fontString(a,d,h);this.legendHitBoxes=[];this.isHorizontal()?
|
|
|
|
|
|
|
|
this.minSize.width=this.maxWidth:this.minSize.width=this.options.display?10:0;this.isHorizontal()?this.minSize.height=this.options.display?10:0:this.minSize.height=this.maxHeight;if(this.options.display&&this.isHorizontal()){this.lineWidths=[0];var k=this.legendItems.length?a+this.options.labels.padding:0;c.textAlign="left";c.textBaseline="top";c.font=d;e.each(this.legendItems,function(d,e){var h=this.options.labels.boxWidth+a/2+c.measureText(d.text).width;this.lineWidths[this.lineWidths.length-1]+
|
|
|
|
|
|
|
|
h+this.options.labels.padding>=this.width&&(k+=a+this.options.labels.padding,this.lineWidths[this.lineWidths.length]=this.left);this.legendHitBoxes[e]={left:0,top:0,width:h,height:a};this.lineWidths[this.lineWidths.length-1]+=h+this.options.labels.padding},this);this.minSize.height+=k}this.width=this.minSize.width;this.height=this.minSize.height},afterFit:e.noop,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){if(this.options.display){var c=
|
|
|
|
|
|
|
|
this.ctx,a=this.left+(this.width-this.lineWidths[0])/2,d=this.top+this.options.labels.padding,h=0,k=e.getValueOrDefault(this.options.labels.fontColor,f.defaults.global.defaultFontColor),l=e.getValueOrDefault(this.options.labels.fontSize,f.defaults.global.defaultFontSize),q=e.getValueOrDefault(this.options.labels.fontStyle,f.defaults.global.defaultFontStyle),t=e.getValueOrDefault(this.options.labels.fontFamily,f.defaults.global.defaultFontFamily),q=e.fontString(l,q,t);this.isHorizontal()&&(c.textAlign=
|
|
|
|
|
|
|
|
"left",c.textBaseline="top",c.lineWidth=.5,c.strokeStyle=k,c.fillStyle=k,c.font=q,e.each(this.legendItems,function(e,k){var q=c.measureText(e.text).width,t=this.options.labels.boxWidth+l/2+q;a+t>=this.width&&(d+=l+this.options.labels.padding,h++,a=this.left+(this.width-this.lineWidths[h])/2);c.save();var m=function(a,c){return void 0!==a?a:c};c.fillStyle=m(e.fillStyle,f.defaults.global.defaultColor);c.lineCap=m(e.lineCap,f.defaults.global.elements.line.borderCapStyle);c.lineDashOffset=m(e.lineDashOffset,
|
|
|
|
|
|
|
|
f.defaults.global.elements.line.borderDashOffset);c.lineJoin=m(e.lineJoin,f.defaults.global.elements.line.borderJoinStyle);c.lineWidth=m(e.lineWidth,f.defaults.global.elements.line.borderWidth);c.strokeStyle=m(e.strokeStyle,f.defaults.global.defaultColor);c.setLineDash&&c.setLineDash(m(e.lineDash,f.defaults.global.elements.line.borderDash));c.strokeRect(a,d,this.options.labels.boxWidth,l);c.fillRect(a,d,this.options.labels.boxWidth,l);c.restore();this.legendHitBoxes[k].left=a;this.legendHitBoxes[k].top=
|
|
|
|
|
|
|
|
d;c.fillText(e.text,this.options.labels.boxWidth+l/2+a,d);e.hidden&&(c.beginPath(),c.lineWidth=2,c.moveTo(this.options.labels.boxWidth+l/2+a,d+l/2),c.lineTo(this.options.labels.boxWidth+l/2+a+q,d+l/2),c.stroke());a+=t+this.options.labels.padding},this))}},handleEvent:function(c){var a=e.getRelativePosition(c,this.chart.chart);if(a.x>=this.left&&a.x<=this.right&&a.y>=this.top&&a.y<=this.bottom)for(var d=0;d<this.legendHitBoxes.length;++d){var h=this.legendHitBoxes[d];if(a.x>=h.left&&a.x<=h.left+h.width&&
|
|
|
|
|
|
|
|
a.y>=h.top&&a.y<=h.top+h.height){this.options.onClick&&this.options.onClick.call(this,c,this.legendItems[d]);break}}}})}},{}],29:[function(p,m,n){m.exports=function(f){var e=f.helpers;f.defaults.scale={display:!0,gridLines:{display:!0,color:"rgba(0, 0, 0, 0.1)",lineWidth:1,drawOnChartArea:!0,drawTicks:!0,zeroLineWidth:1,zeroLineColor:"rgba(0,0,0,0.25)",offsetGridLines:!1},scaleLabel:{labelString:"",display:!1},ticks:{beginAtZero:!1,maxRotation:50,mirror:!1,padding:10,reverse:!1,display:!0,autoSkip:!0,
|
|
|
|
|
|
|
|
autoSkipPadding:0,callback:function(c){return""+c}}};f.Scale=f.Element.extend({beforeUpdate:function(){e.callCallback(this.options.beforeUpdate,[this])},update:function(c,a,d){this.beforeUpdate();this.maxWidth=c;this.maxHeight=a;this.margins=e.extend({left:0,right:0,top:0,bottom:0},d);this.beforeSetDimensions();this.setDimensions();this.afterSetDimensions();this.beforeDataLimits();this.determineDataLimits();this.afterDataLimits();this.beforeBuildTicks();this.buildTicks();this.afterBuildTicks();this.beforeTickToLabelConversion();
|
|
|
|
|
|
|
|
this.convertTicksToLabels();this.afterTickToLabelConversion();this.beforeCalculateTickRotation();this.calculateTickRotation();this.afterCalculateTickRotation();this.beforeFit();this.fit();this.afterFit();this.afterUpdate();return this.minSize},afterUpdate:function(){e.callCallback(this.options.afterUpdate,[this])},beforeSetDimensions:function(){e.callCallback(this.options.beforeSetDimensions,[this])},setDimensions:function(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):
|
|
|
|
|
|
|
|
(this.height=this.maxHeight,this.top=0,this.bottom=this.height);this.paddingBottom=this.paddingRight=this.paddingTop=this.paddingLeft=0},afterSetDimensions:function(){e.callCallback(this.options.afterSetDimensions,[this])},beforeDataLimits:function(){e.callCallback(this.options.beforeDataLimits,[this])},determineDataLimits:e.noop,afterDataLimits:function(){e.callCallback(this.options.afterDataLimits,[this])},beforeBuildTicks:function(){e.callCallback(this.options.beforeBuildTicks,[this])},buildTicks:e.noop,
|
|
|
|
|
|
|
|
afterBuildTicks:function(){e.callCallback(this.options.afterBuildTicks,[this])},beforeTickToLabelConversion:function(){e.callCallback(this.options.beforeTickToLabelConversion,[this])},convertTicksToLabels:function(){this.ticks=this.ticks.map(function(c,a,d){return this.options.ticks.userCallback?this.options.ticks.userCallback(c,a,d):this.options.ticks.callback(c,a,d)},this)},afterTickToLabelConversion:function(){e.callCallback(this.options.afterTickToLabelConversion,[this])},beforeCalculateTickRotation:function(){e.callCallback(this.options.beforeCalculateTickRotation,
|
|
|
|
|
|
|
|
[this])},calculateTickRotation:function(){var c=e.getValueOrDefault(this.options.ticks.fontSize,f.defaults.global.defaultFontSize),a=e.getValueOrDefault(this.options.ticks.fontStyle,f.defaults.global.defaultFontStyle),d=e.getValueOrDefault(this.options.ticks.fontFamily,f.defaults.global.defaultFontFamily),d=e.fontString(c,a,d);this.ctx.font=d;var a=this.ctx.measureText(this.ticks[0]).width,h=this.ctx.measureText(this.ticks[this.ticks.length-1]).width,k;this.paddingLeft=this.paddingRight=this.labelRotation=
|
|
|
|
|
|
|
|
0;if(this.options.display&&this.isHorizontal()){this.paddingRight=h/2+3;this.paddingLeft=a/2+3;this.longestTextCache||(this.longestTextCache={});k=d=e.longestText(this.ctx,d,this.ticks,this.longestTextCache);for(var l,q,h=this.getPixelForTick(1)-this.getPixelForTick(0)-6;k>h&&this.labelRotation<this.options.ticks.maxRotation;){l=Math.cos(e.toRadians(this.labelRotation));q=Math.sin(e.toRadians(this.labelRotation));k=l*a;k+c/2>this.yLabelWidth&&(this.paddingLeft=k+c/2);this.paddingRight=c/2;if(q*d>
|
|
|
|
|
|
|
|
this.maxHeight){this.labelRotation--;break}this.labelRotation++;k=l*d}}this.margins&&(this.paddingLeft=Math.max(this.paddingLeft-this.margins.left,0),this.paddingRight=Math.max(this.paddingRight-this.margins.right,0))},afterCalculateTickRotation:function(){e.callCallback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){e.callCallback(this.options.beforeFit,[this])},fit:function(){this.minSize={width:0,height:0};var c=e.getValueOrDefault(this.options.ticks.fontSize,f.defaults.global.defaultFontSize),
|
|
|
|
|
|
|
|
a=e.getValueOrDefault(this.options.ticks.fontStyle,f.defaults.global.defaultFontStyle),d=e.getValueOrDefault(this.options.ticks.fontFamily,f.defaults.global.defaultFontFamily),a=e.fontString(c,a,d),d=e.getValueOrDefault(this.options.scaleLabel.fontSize,f.defaults.global.defaultFontSize),h=e.getValueOrDefault(this.options.scaleLabel.fontStyle,f.defaults.global.defaultFontStyle),k=e.getValueOrDefault(this.options.scaleLabel.fontFamily,f.defaults.global.defaultFontFamily);e.fontString(d,h,k);this.isHorizontal()?
|
|
|
|
|
|
|
|
this.minSize.width=this.isFullWidth()?this.maxWidth-this.margins.left-this.margins.right:this.maxWidth:this.minSize.width=this.options.gridLines.display&&this.options.display?10:0;this.isHorizontal()?this.minSize.height=this.options.gridLines.display&&this.options.display?10:0:this.minSize.height=this.maxHeight;this.options.scaleLabel.display&&(this.isHorizontal()?this.minSize.height+=1.5*d:this.minSize.width+=1.5*d);this.options.ticks.display&&this.options.display&&(this.longestTextCache||(this.longestTextCache=
|
|
|
|
|
|
|
|
{}),d=e.longestText(this.ctx,a,this.ticks,this.longestTextCache),this.isHorizontal()?(this.longestLabelWidth=d,d=Math.sin(e.toRadians(this.labelRotation))*this.longestLabelWidth+1.5*c,this.minSize.height=Math.min(this.maxHeight,this.minSize.height+d),this.ctx.font=a,a=this.ctx.measureText(this.ticks[0]).width,d=this.ctx.measureText(this.ticks[this.ticks.length-1]).width,h=Math.cos(e.toRadians(this.labelRotation)),k=Math.sin(e.toRadians(this.labelRotation)),this.paddingLeft=0!==this.labelRotation?
|
|
|
|
|
|
|
|
h*a+3:a/2+3,this.paddingRight=0!==this.labelRotation?c/2*k+3:d/2+3):(a=this.maxWidth-this.minSize.width,this.options.ticks.mirror||(d+=this.options.ticks.padding),this.minSize.width=d<a?this.minSize.width+d:this.maxWidth,this.paddingTop=c/2,this.paddingBottom=c/2));this.margins&&(this.paddingLeft=Math.max(this.paddingLeft-this.margins.left,0),this.paddingTop=Math.max(this.paddingTop-this.margins.top,0),this.paddingRight=Math.max(this.paddingRight-this.margins.right,0),this.paddingBottom=Math.max(this.paddingBottom-
|
|
|
|
|
|
|
|
this.margins.bottom,0));this.width=this.minSize.width;this.height=this.minSize.height},afterFit:function(){e.callCallback(this.options.afterFit,[this])},isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},isFullWidth:function(){return this.options.fullWidth},getRightValue:function a(d){return null===d||"undefined"===typeof d||"number"===typeof d&&isNaN(d)?NaN:"object"!==typeof d||d instanceof Date?d:a(this.isHorizontal()?d.x:d.y)},getLabelForIndex:e.noop,
|
|
|
|
|
|
|
|
getPixelForValue:e.noop,getPixelForTick:function(a,d){if(this.isHorizontal()){var e=(this.width-(this.paddingLeft+this.paddingRight))/Math.max(this.ticks.length-(this.options.gridLines.offsetGridLines?0:1),1),k=e*a+this.paddingLeft;d&&(k+=e/2);e=this.left+Math.round(k);return e+=this.isFullWidth()?this.margins.left:0}return this.top+(this.height-(this.paddingTop+this.paddingBottom))/(this.ticks.length-1)*a},getPixelForDecimal:function(a){return this.isHorizontal()?(a=this.left+Math.round((this.width-
|
|
|
|
|
|
|
|
(this.paddingLeft+this.paddingRight))*a+this.paddingLeft),a+=this.isFullWidth()?this.margins.left:0):this.top+a*this.height},draw:function(a){if(this.options.display){var d,h=0!==this.labelRotation,k,l,q;l=this.options.ticks.autoSkip;this.options.ticks.maxTicksLimit&&(q=this.options.ticks.maxTicksLimit);var m=e.getValueOrDefault(this.options.ticks.fontColor,f.defaults.global.defaultFontColor),n=e.getValueOrDefault(this.options.ticks.fontSize,f.defaults.global.defaultFontSize),p=e.getValueOrDefault(this.options.ticks.fontStyle,
|
|
|
|
|
|
|
|
f.defaults.global.defaultFontStyle),u=e.getValueOrDefault(this.options.ticks.fontFamily,f.defaults.global.defaultFontFamily),E=e.fontString(n,p,u),n=e.getValueOrDefault(this.options.scaleLabel.fontColor,f.defaults.global.defaultFontColor),p=e.getValueOrDefault(this.options.scaleLabel.fontSize,f.defaults.global.defaultFontSize),u=e.getValueOrDefault(this.options.scaleLabel.fontStyle,f.defaults.global.defaultFontStyle),v=e.getValueOrDefault(this.options.scaleLabel.fontFamily,f.defaults.global.defaultFontFamily),
|
|
|
|
|
|
|
|
u=e.fontString(p,u,v),v=Math.cos(e.toRadians(this.labelRotation));e.toRadians(this.labelRotation);v*=this.longestLabelWidth;this.ctx.fillStyle=m;if(this.isHorizontal()){d=!0;var A="bottom"===this.options.position?this.top:this.bottom-10,F="bottom"===this.options.position?this.top+10:this.bottom;k=!1;(v/2+this.options.ticks.autoSkipPadding)*this.ticks.length>this.width-(this.paddingLeft+this.paddingRight)&&(k=1+Math.floor((v/2+this.options.ticks.autoSkipPadding)*this.ticks.length/(this.width-(this.paddingLeft+
|
|
|
|
|
|
|
|
this.paddingRight))));if(q&&this.ticks.length>q)for(;!k||this.ticks.length/(k||1)>q;)k||(k=1),k+=1;l||(k=!1);e.each(this.ticks,function(f,l){var q=this.ticks.length===l+1;if((!(1<k&&0<l%k||0===l%k&&l+k>this.ticks.length)||q)&&void 0!==f&&null!==f){var q=this.getPixelForTick(l),m=this.getPixelForTick(l,this.options.gridLines.offsetGridLines);this.options.gridLines.display&&(l===("undefined"!==typeof this.zeroLineIndex?this.zeroLineIndex:0)?(this.ctx.lineWidth=this.options.gridLines.zeroLineWidth,this.ctx.strokeStyle=
|
|
|
|
|
|
|
|
this.options.gridLines.zeroLineColor,d=!0):d&&(this.ctx.lineWidth=this.options.gridLines.lineWidth,this.ctx.strokeStyle=this.options.gridLines.color,d=!1),q+=e.aliasPixel(this.ctx.lineWidth),this.ctx.beginPath(),this.options.gridLines.drawTicks&&(this.ctx.moveTo(q,A),this.ctx.lineTo(q,F)),this.options.gridLines.drawOnChartArea&&(this.ctx.moveTo(q,a.top),this.ctx.lineTo(q,a.bottom)),this.ctx.stroke());this.options.ticks.display&&(this.ctx.save(),this.ctx.translate(m,h?this.top+12:"top"===this.options.position?
|
|
|
|
|
|
|
|
this.bottom-10:this.top+10),this.ctx.rotate(-1*e.toRadians(this.labelRotation)),this.ctx.font=E,this.ctx.textAlign=h?"right":"center",this.ctx.textBaseline=h?"middle":"top"===this.options.position?"bottom":"top",this.ctx.fillText(f,0,0),this.ctx.restore())}},this);this.options.scaleLabel.display&&(this.ctx.textAlign="center",this.ctx.textBaseline="middle",this.ctx.fillStyle=n,this.ctx.font=u,l=this.left+(this.right-this.left)/2,q="bottom"===this.options.position?this.bottom-p/2:this.top+p/2,this.ctx.fillText(this.options.scaleLabel.labelString,
|
|
|
|
|
|
|
|
l,q))}else{d=!0;var z="right"===this.options.position?this.left:this.right-5,I="right"===this.options.position?this.left+5:this.right;e.each(this.ticks,function(h,k){if(void 0!==h&&null!==h){var f=this.getPixelForTick(k);this.options.gridLines.display&&(k===("undefined"!==typeof this.zeroLineIndex?this.zeroLineIndex:0)?(this.ctx.lineWidth=this.options.gridLines.zeroLineWidth,this.ctx.strokeStyle=this.options.gridLines.zeroLineColor,d=!0):d&&(this.ctx.lineWidth=this.options.gridLines.lineWidth,this.ctx.strokeStyle=
|
|
|
|
|
|
|
|
this.options.gridLines.color,d=!1),f+=e.aliasPixel(this.ctx.lineWidth),this.ctx.beginPath(),this.options.gridLines.drawTicks&&(this.ctx.moveTo(z,f),this.ctx.lineTo(I,f)),this.options.gridLines.drawOnChartArea&&(this.ctx.moveTo(a.left,f),this.ctx.lineTo(a.right,f)),this.ctx.stroke());if(this.options.ticks.display){var l=this.getPixelForTick(k,this.options.gridLines.offsetGridLines);this.ctx.save();"left"===this.options.position?this.options.ticks.mirror?(f=this.right+this.options.ticks.padding,this.ctx.textAlign=
|
|
|
|
|
|
|
|
"left"):(f=this.right-this.options.ticks.padding,this.ctx.textAlign="right"):this.options.ticks.mirror?(f=this.left-this.options.ticks.padding,this.ctx.textAlign="right"):(f=this.left+this.options.ticks.padding,this.ctx.textAlign="left");this.ctx.translate(f,l);this.ctx.rotate(-1*e.toRadians(this.labelRotation));this.ctx.font=E;this.ctx.textBaseline="middle";this.ctx.fillText(h,0,0);this.ctx.restore()}}},this);this.options.scaleLabel.display&&(l="left"===this.options.position?this.left+p/2:this.right-
|
|
|
|
|
|
|
|
p/2,q=this.top+(this.bottom-this.top)/2,m="left"===this.options.position?-.5*Math.PI:.5*Math.PI,this.ctx.save(),this.ctx.translate(l,q),this.ctx.rotate(m),this.ctx.textAlign="center",this.ctx.fillStyle=n,this.ctx.font=u,this.ctx.textBaseline="middle",this.ctx.fillText(this.options.scaleLabel.labelString,0,0),this.ctx.restore())}this.ctx.lineWidth=this.options.gridLines.lineWidth;this.ctx.strokeStyle=this.options.gridLines.color;l=this.left;q=this.right;m=this.top;n=this.bottom;this.isHorizontal()?
|
|
|
|
|
|
|
|
(m=n="top"===this.options.position?this.bottom:this.top,m+=e.aliasPixel(this.ctx.lineWidth),n+=e.aliasPixel(this.ctx.lineWidth)):(l=q="left"===this.options.position?this.right:this.left,l+=e.aliasPixel(this.ctx.lineWidth),q+=e.aliasPixel(this.ctx.lineWidth));this.ctx.beginPath();this.ctx.moveTo(l,m);this.ctx.lineTo(q,n);this.ctx.stroke()}}})}},{}],30:[function(p,m,n){m.exports=function(f){var e=f.helpers;f.scaleService={constructors:{},defaults:{},registerScaleType:function(c,a,d){this.constructors[c]=
|
|
|
|
|
|
|
|
a;this.defaults[c]=e.clone(d)},getScaleConstructor:function(c){return this.constructors.hasOwnProperty(c)?this.constructors[c]:void 0},getScaleDefaults:function(c){return this.defaults.hasOwnProperty(c)?e.scaleMerge(f.defaults.scale,this.defaults[c]):{}},addScalesToLayout:function(c){e.each(c.scales,function(a){f.layoutService.addBox(c,a)})}}}},{}],31:[function(p,m,n){m.exports=function(f){var e=f.helpers;f.defaults.global.title={display:!1,position:"top",fullWidth:!0,fontStyle:"bold",padding:10,
|
|
|
|
|
|
|
|
text:""};f.Title=f.Element.extend({initialize:function(c){e.extend(this,c);this.options=e.configMerge(f.defaults.global.title,c.options);this.legendHitBoxes=[]},beforeUpdate:e.noop,update:function(c,a,d){this.beforeUpdate();this.maxWidth=c;this.maxHeight=a;this.margins=d;this.beforeSetDimensions();this.setDimensions();this.afterSetDimensions();this.beforeBuildLabels();this.buildLabels();this.afterBuildLabels();this.beforeFit();this.fit();this.afterFit();this.afterUpdate();return this.minSize},afterUpdate:e.noop,
|
|
|
|
|
|
|
|
beforeSetDimensions:e.noop,setDimensions:function(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height);this.paddingBottom=this.paddingRight=this.paddingTop=this.paddingLeft=0;this.minSize={width:0,height:0}},afterSetDimensions:e.noop,beforeBuildLabels:e.noop,buildLabels:e.noop,afterBuildLabels:e.noop,beforeFit:e.noop,fit:function(){var c=e.getValueOrDefault(this.options.fontSize,f.defaults.global.defaultFontSize),
|
|
|
|
|
|
|
|
a=e.getValueOrDefault(this.options.fontStyle,f.defaults.global.defaultFontStyle),d=e.getValueOrDefault(this.options.fontFamily,f.defaults.global.defaultFontFamily);e.fontString(c,a,d);this.isHorizontal()?this.minSize.width=this.maxWidth:this.minSize.width=0;this.isHorizontal()?this.minSize.height=0:this.minSize.height=this.maxHeight;this.isHorizontal()?this.options.display&&(this.minSize.height+=c+2*this.options.padding):this.options.display&&(this.minSize.width+=c+2*this.options.padding);this.width=
|
|
|
|
|
|
|
|
this.minSize.width;this.height=this.minSize.height},afterFit:e.noop,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){if(this.options.display){var c=this.ctx,a,d;a=e.getValueOrDefault(this.options.fontColor,f.defaults.global.defaultFontColor);d=e.getValueOrDefault(this.options.fontSize,f.defaults.global.defaultFontSize);var h=e.getValueOrDefault(this.options.fontStyle,f.defaults.global.defaultFontStyle),k=e.getValueOrDefault(this.options.fontFamily,
|
|
|
|
|
|
|
|
f.defaults.global.defaultFontFamily),h=e.fontString(d,h,k);c.fillStyle=a;c.font=h;this.isHorizontal()?(c.textAlign="center",c.textBaseline="middle",a=this.left+(this.right-this.left)/2,d=this.top+(this.bottom-this.top)/2,c.fillText(this.options.text,a,d)):(a="left"===this.options.position?this.left+d/2:this.right-d/2,d=this.top+(this.bottom-this.top)/2,h="left"===this.options.position?-.5*Math.PI:.5*Math.PI,c.save(),c.translate(a,d),c.rotate(h),c.textAlign="center",c.textBaseline="middle",c.fillText(this.options.text,
|
|
|
|
|
|
|
|
0,0),c.restore())}}})}},{}],32:[function(p,m,n){m.exports=function(f){function e(a,d){d&&(c.isArray(d)?a=a.concat(d):a.push(d));return a}var c=f.helpers;f.defaults.global.tooltips={enabled:!0,custom:null,mode:"single",backgroundColor:"rgba(0,0,0,0.8)",titleFontStyle:"bold",titleSpacing:2,titleMarginBottom:6,titleColor:"#fff",titleAlign:"left",bodySpacing:2,bodyColor:"#fff",bodyAlign:"left",footerFontStyle:"bold",footerSpacing:2,footerMarginTop:6,footerColor:"#fff",footerAlign:"left",yPadding:6,xPadding:6,
|
|
|
|
|
|
|
|
yAlign:"center",xAlign:"center",caretSize:5,cornerRadius:6,multiKeyBackground:"#fff",callbacks:{beforeTitle:c.noop,title:function(a,c){var e="";0<a.length&&(a[0].xLabel?e=a[0].xLabel:0<c.labels.length&&a[0].index<c.labels.length&&(e=c.labels[a[0].index]));return e},afterTitle:c.noop,beforeBody:c.noop,beforeLabel:c.noop,label:function(a,c){return(c.datasets[a.datasetIndex].label||"")+": "+a.yLabel},afterLabel:c.noop,afterBody:c.noop,beforeFooter:c.noop,footer:c.noop,afterFooter:c.noop}};f.Tooltip=
|
|
|
|
|
|
|
|
f.Element.extend({initialize:function(){var a=this._options;c.extend(this,{_model:{xPadding:a.tooltips.xPadding,yPadding:a.tooltips.yPadding,xAlign:a.tooltips.yAlign,yAlign:a.tooltips.xAlign,bodyColor:a.tooltips.bodyColor,_bodyFontFamily:c.getValueOrDefault(a.tooltips.bodyFontFamily,f.defaults.global.defaultFontFamily),_bodyFontStyle:c.getValueOrDefault(a.tooltips.bodyFontStyle,f.defaults.global.defaultFontStyle),_bodyAlign:a.tooltips.bodyAlign,bodyFontSize:c.getValueOrDefault(a.tooltips.bodyFontSize,
|
|
|
|
|
|
|
|
f.defaults.global.defaultFontSize),bodySpacing:a.tooltips.bodySpacing,titleColor:a.tooltips.titleColor,_titleFontFamily:c.getValueOrDefault(a.tooltips.titleFontFamily,f.defaults.global.defaultFontFamily),_titleFontStyle:c.getValueOrDefault(a.tooltips.titleFontStyle,f.defaults.global.defaultFontStyle),titleFontSize:c.getValueOrDefault(a.tooltips.titleFontSize,f.defaults.global.defaultFontSize),_titleAlign:a.tooltips.titleAlign,titleSpacing:a.tooltips.titleSpacing,titleMarginBottom:a.tooltips.titleMarginBottom,
|
|
|
|
|
|
|
|
footerColor:a.tooltips.footerColor,_footerFontFamily:c.getValueOrDefault(a.tooltips.footerFontFamily,f.defaults.global.defaultFontFamily),_footerFontStyle:c.getValueOrDefault(a.tooltips.footerFontStyle,f.defaults.global.defaultFontStyle),footerFontSize:c.getValueOrDefault(a.tooltips.footerFontSize,f.defaults.global.defaultFontSize),_footerAlign:a.tooltips.footerAlign,footerSpacing:a.tooltips.footerSpacing,footerMarginTop:a.tooltips.footerMarginTop,caretSize:a.tooltips.caretSize,cornerRadius:a.tooltips.cornerRadius,
|
|
|
|
|
|
|
|
backgroundColor:a.tooltips.backgroundColor,opacity:0,legendColorBackground:a.tooltips.multiKeyBackground}})},getTitle:function(){var a=this._options.tooltips.callbacks.beforeTitle.apply(this,arguments),c=this._options.tooltips.callbacks.title.apply(this,arguments),h=this._options.tooltips.callbacks.afterTitle.apply(this,arguments),k=[],k=e(k,a),k=e(k,c);return k=e(k,h)},getBeforeBody:function(){var a=this._options.tooltips.callbacks.beforeBody.apply(this,arguments);return c.isArray(a)?a:void 0!==
|
|
|
|
|
|
|
|
a?[a]:[]},getBody:function(a,d){var e=[];c.each(a,function(a){c.pushAllIfDefined(this._options.tooltips.callbacks.beforeLabel.call(this,a,d),e);c.pushAllIfDefined(this._options.tooltips.callbacks.label.call(this,a,d),e);c.pushAllIfDefined(this._options.tooltips.callbacks.afterLabel.call(this,a,d),e)},this);return e},getAfterBody:function(){var a=this._options.tooltips.callbacks.afterBody.apply(this,arguments);return c.isArray(a)?a:void 0!==a?[a]:[]},getFooter:function(){var a=this._options.tooltips.callbacks.beforeFooter.apply(this,
|
|
|
|
|
|
|
|
arguments),c=this._options.tooltips.callbacks.footer.apply(this,arguments),h=this._options.tooltips.callbacks.afterFooter.apply(this,arguments),k=[],k=e(k,a),k=e(k,c);return k=e(k,h)},getAveragePosition:function(a){if(!a.length)return!1;var d=[],e=[];c.each(a,function(a){a&&(a=a.tooltipPosition(),d.push(a.x),e.push(a.y))});for(var k=a=0,f=0;f<d.length;f++)a+=d[f],k+=e[f];return{x:Math.round(a/d.length),y:Math.round(k/d.length)}},update:function(a){if(this._active.length){this._model.opacity=1;var d=
|
|
|
|
|
|
|
|
this._active[0],e=[],k,f=[];"single"===this._options.tooltips.mode?(k=d._yScale||d._scale,f.push({xLabel:d._xScale?d._xScale.getLabelForIndex(d._index,d._datasetIndex):"",yLabel:k?k.getLabelForIndex(d._index,d._datasetIndex):"",index:d._index,datasetIndex:d._datasetIndex}),k=this.getAveragePosition(this._active)):(c.each(this._data.datasets,function(a,e){if(c.isDatasetVisible(a)){var h=a.metaData[d._index];if(h){var k=d._yScale||d._scale;f.push({xLabel:h._xScale?h._xScale.getLabelForIndex(h._index,
|
|
|
|
|
|
|
|
h._datasetIndex):"",yLabel:k?k.getLabelForIndex(h._index,h._datasetIndex):"",index:d._index,datasetIndex:e})}}},null,d._yScale.options.stacked),c.each(this._active,function(a){a&&e.push({borderColor:a._view.borderColor,backgroundColor:a._view.backgroundColor})},null,d._yScale.options.stacked),k=this.getAveragePosition(this._active),k.y=this._active[0]._yScale.getPixelForDecimal(.5));c.extend(this._model,{title:this.getTitle(f,this._data),beforeBody:this.getBeforeBody(f,this._data),body:this.getBody(f,
|
|
|
|
|
|
|
|
this._data),afterBody:this.getAfterBody(f,this._data),footer:this.getFooter(f,this._data)});c.extend(this._model,{x:Math.round(k.x),y:Math.round(k.y),caretPadding:c.getValueOrDefault(k.padding,2),labelColors:e});k=this.getTooltipSize(this._model);this.determineAlignment(k);c.extend(this._model,this.getBackgroundPoint(this._model,k))}else this._model.opacity=0;a&&this._options.tooltips.custom&&this._options.tooltips.custom.call(this,this._model);return this},getTooltipSize:function(a){var d=this._chart.ctx,
|
|
|
|
|
|
|
|
e={height:2*a.yPadding,width:0},k=a.body.length+a.beforeBody.length+a.afterBody.length;e.height+=a.title.length*a.titleFontSize;e.height+=(a.title.length-1)*a.titleSpacing;e.height+=a.title.length?a.titleMarginBottom:0;e.height+=k*a.bodyFontSize;e.height+=k?(k-1)*a.bodySpacing:0;e.height+=a.footer.length?a.footerMarginTop:0;e.height+=a.footer.length*a.footerFontSize;e.height+=a.footer.length?(a.footer.length-1)*a.footerSpacing:0;d.font=c.fontString(a.titleFontSize,a._titleFontStyle,a._titleFontFamily);
|
|
|
|
|
|
|
|
c.each(a.title,function(a){e.width=Math.max(e.width,d.measureText(a).width)});d.font=c.fontString(a.bodyFontSize,a._bodyFontStyle,a._bodyFontFamily);c.each(a.beforeBody.concat(a.afterBody),function(a){e.width=Math.max(e.width,d.measureText(a).width)});c.each(a.body,function(c){e.width=Math.max(e.width,d.measureText(c).width+("single"!==this._options.tooltips.mode?a.bodyFontSize+2:0))},this);d.font=c.fontString(a.footerFontSize,a._footerFontStyle,a._footerFontFamily);c.each(a.footer,function(a){e.width=
|
|
|
|
|
|
|
|
Math.max(e.width,d.measureText(a).width)});e.width+=2*a.xPadding;return e},determineAlignment:function(a){this._model.y<a.height?this._model.yAlign="top":this._model.y>this._chart.height-a.height&&(this._model.yAlign="bottom");var c,e,k,f,q,m=this,n=(this._chartInstance.chartArea.left+this._chartInstance.chartArea.right)/2,p=(this._chartInstance.chartArea.top+this._chartInstance.chartArea.bottom)/2;"center"===this._model.yAlign?(c=function(a){return a<=n},e=function(a){return a>n}):(c=function(c){return c<=
|
|
|
|
|
|
|
|
a.width/2},e=function(c){return c>=m._chart.width-a.width/2});k=function(c){return c+a.width>m._chart.width};f=function(c){return 0>c-a.width};q=function(a){return a<=p?"top":"bottom"};c(this._model.x)?(this._model.xAlign="left",k(this._model.x)&&(this._model.xAlign="center",this._model.yAlign=q(this._model.y))):e(this._model.x)&&(this._model.xAlign="right",f(this._model.x)&&(this._model.xAlign="center",this._model.yAlign=q(this._model.y)))},getBackgroundPoint:function(a,c){var e={x:a.x,y:a.y};"right"===
|
|
|
|
|
|
|
|
a.xAlign?e.x-=c.width:"center"===a.xAlign&&(e.x-=c.width/2);e.y="top"===a.yAlign?e.y+(a.caretPadding+a.caretSize):"bottom"===a.yAlign?e.y-(c.height+a.caretPadding+a.caretSize):e.y-c.height/2;"center"===a.yAlign?"left"===a.xAlign?e.x+=a.caretPadding+a.caretSize:"right"===a.xAlign&&(e.x-=a.caretPadding+a.caretSize):"left"===a.xAlign?e.x-=a.cornerRadius+a.caretPadding:"right"===a.xAlign&&(e.x+=a.cornerRadius+a.caretPadding);return e},drawCaret:function(a,d,e,k){var f=this._view;k=this._chart.ctx;var q,
|
|
|
|
|
|
|
|
m,n,p;"center"===f.yAlign?("left"===f.xAlign?(q=a.x,m=q-f.caretSize):(q=a.x+d.width,m=q+f.caretSize),n=q,d=a.y+d.height/2,a=d-f.caretSize,p=d+f.caretSize):("left"===f.xAlign?(q=a.x+f.cornerRadius,m=q+f.caretSize,n=m+f.caretSize):"right"===f.xAlign?(q=a.x+d.width-f.cornerRadius,m=q-f.caretSize,n=m-f.caretSize):(m=a.x+d.width/2,q=m-f.caretSize,n=m+f.caretSize),"top"===f.yAlign?(a=a.y,d=a-f.caretSize):(a=a.y+d.height,d=a+f.caretSize),p=a);f=c.color(f.backgroundColor);k.fillStyle=f.alpha(e*f.alpha()).rgbString();
|
|
|
|
|
|
|
|
k.beginPath();k.moveTo(q,a);k.lineTo(m,d);k.lineTo(n,p);k.closePath();k.fill()},drawTitle:function(a,d,e,k){if(d.title.length){e.textAlign=d._titleAlign;e.textBaseline="top";var f=c.color(d.titleColor);e.fillStyle=f.alpha(k*f.alpha()).rgbString();e.font=c.fontString(d.titleFontSize,d._titleFontStyle,d._titleFontFamily);c.each(d.title,function(c,k){e.fillText(c,a.x,a.y);a.y+=d.titleFontSize+d.titleSpacing;k+1===d.title.length&&(a.y+=d.titleMarginBottom-d.titleSpacing)})}},drawBody:function(a,d,e,k){e.textAlign=
|
|
|
|
|
|
|
|
d._bodyAlign;e.textBaseline="top";var f=c.color(d.bodyColor);e.fillStyle=f.alpha(k*f.alpha()).rgbString();e.font=c.fontString(d.bodyFontSize,d._bodyFontStyle,d._bodyFontFamily);c.each(d.beforeBody,function(c){e.fillText(c,a.x,a.y);a.y+=d.bodyFontSize+d.bodySpacing});c.each(d.body,function(f,l){"single"!==this._options.tooltips.mode&&(e.fillStyle=c.color(d.legendColorBackground).alpha(k).rgbaString(),e.fillRect(a.x,a.y,d.bodyFontSize,d.bodyFontSize),e.strokeStyle=c.color(d.labelColors[l].borderColor).alpha(k).rgbaString(),
|
|
|
|
|
|
|
|
e.strokeRect(a.x,a.y,d.bodyFontSize,d.bodyFontSize),e.fillStyle=c.color(d.labelColors[l].backgroundColor).alpha(k).rgbaString(),e.fillRect(a.x+1,a.y+1,d.bodyFontSize-2,d.bodyFontSize-2),e.fillStyle=c.color(d.bodyColor).alpha(k).rgbaString());e.fillText(f,a.x+("single"!==this._options.tooltips.mode?d.bodyFontSize+2:0),a.y);a.y+=d.bodyFontSize+d.bodySpacing},this);c.each(d.afterBody,function(c){e.fillText(c,a.x,a.y);a.y+=d.bodyFontSize});a.y-=d.bodySpacing},drawFooter:function(a,d,e,k){if(d.footer.length){a.y+=
|
|
|
|
|
|
|
|
d.footerMarginTop;e.textAlign=d._footerAlign;e.textBaseline="top";var f=c.color(d.footerColor);e.fillStyle=f.alpha(k*f.alpha()).rgbString();e.font=c.fontString(d.footerFontSize,d._footerFontStyle,d._footerFontFamily);c.each(d.footer,function(c){e.fillText(c,a.x,a.y);a.y+=d.footerFontSize+d.footerSpacing})}},draw:function(){var a=this._chart.ctx,d=this._view;if(0!==d.opacity){var e=d.caretPadding,k=this.getTooltipSize(d),f={x:d.x,y:d.y},q=Math.abs(.001>d.opacity)?0:d.opacity;if(this._options.tooltips.enabled){var m=
|
|
|
|
|
|
|
|
c.color(d.backgroundColor);a.fillStyle=m.alpha(q*m.alpha()).rgbString();c.drawRoundedRectangle(a,f.x,f.y,k.width,k.height,d.cornerRadius);a.fill();this.drawCaret(f,k,q,e);f.x+=d.xPadding;f.y+=d.yPadding;this.drawTitle(f,d,a,q);this.drawBody(f,d,a,q);this.drawFooter(f,d,a,q)}}}})}},{}],33:[function(p,m,n){m.exports=function(f,e){var c=f.helpers;f.defaults.global.elements.arc={backgroundColor:f.defaults.global.defaultColor,borderColor:"#fff",borderWidth:2};f.elements.Arc=f.Element.extend({inLabelRange:function(a){var c=
|
|
|
|
|
|
|
|
this._view;return c?Math.pow(a-c.x,2)<Math.pow(c.radius+c.hoverRadius,2):!1},inRange:function(a,d){var e=this._view;if(e){for(var f=c.getAngleFromPoint(e,{x:a,y:d}),l=e.startAngle,q=e.endAngle;q<l;)q+=2*Math.PI;for(;f.angle>q;)f.angle-=2*Math.PI;for(;f.angle<l;)f.angle+=2*Math.PI;e=f.distance>=e.innerRadius&&f.distance<=e.outerRadius;return f.angle>=l&&f.angle<=q&&e}return!1},tooltipPosition:function(){var a=this._view,c=a.startAngle+(a.endAngle-a.startAngle)/2,e=(a.outerRadius-a.innerRadius)/2+a.innerRadius;
|
|
|
|
|
|
|
|
return{x:a.x+Math.cos(c)*e,y:a.y+Math.sin(c)*e}},draw:function(){var a=this._chart.ctx,c=this._view;a.beginPath();a.arc(c.x,c.y,c.outerRadius,c.startAngle,c.endAngle);a.arc(c.x,c.y,c.innerRadius,c.endAngle,c.startAngle,!0);a.closePath();a.strokeStyle=c.borderColor;a.lineWidth=c.borderWidth;a.fillStyle=c.backgroundColor;a.fill();a.lineJoin="bevel";c.borderWidth&&a.stroke()}})}},{}],34:[function(p,m,n){m.exports=function(f){var e=f.helpers;f.defaults.global.elements.line={tension:.4,backgroundColor:f.defaults.global.defaultColor,
|
|
|
|
|
|
|
|
borderWidth:3,borderColor:f.defaults.global.defaultColor,borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",fill:!0};f.elements.Line=f.Element.extend({lineToNextPoint:function(c,a,d,e,f){var l=this._chart.ctx;a._view.skip?e.call(this,c,a,d):c._view.skip?f.call(this,c,a,d):0===a._view.tension?l.lineTo(a._view.x,a._view.y):l.bezierCurveTo(c._view.controlPointNextX,c._view.controlPointNextY,a._view.controlPointPreviousX,a._view.controlPointPreviousY,a._view.x,a._view.y)},
|
|
|
|
|
|
|
|
draw:function(){function c(c){k._view.skip||l._view.skip?c&&h.lineTo(a._view.scaleZero.x,a._view.scaleZero.y):h.bezierCurveTo(l._view.controlPointNextX,l._view.controlPointNextY,k._view.controlPointPreviousX,k._view.controlPointPreviousY,k._view.x,k._view.y)}var a=this,d=this._view,h=this._chart.ctx,k=this._children[0],l=this._children[this._children.length-1];h.save();0<this._children.length&&d.fill&&(h.beginPath(),e.each(this._children,function(a,c){var f=e.previousItem(this._children,c),k=e.nextItem(this._children,
|
|
|
|
|
|
|
|
c);0===c?(this._loop?h.moveTo(d.scaleZero.x,d.scaleZero.y):h.moveTo(a._view.x,d.scaleZero),a._view.skip?this._loop||h.moveTo(k._view.x,this._view.scaleZero):h.lineTo(a._view.x,a._view.y)):this.lineToNextPoint(f,a,k,function(a,c,d){this._loop?h.lineTo(this._view.scaleZero.x,this._view.scaleZero.y):(h.lineTo(a._view.x,this._view.scaleZero),h.moveTo(d._view.x,this._view.scaleZero))},function(a,c){h.lineTo(c._view.x,c._view.y)})},this),this._loop?c(!0):(h.lineTo(this._children[this._children.length-1]._view.x,
|
|
|
|
|
|
|
|
d.scaleZero),h.lineTo(this._children[0]._view.x,d.scaleZero)),h.fillStyle=d.backgroundColor||f.defaults.global.defaultColor,h.closePath(),h.fill());h.lineCap=d.borderCapStyle||f.defaults.global.elements.line.borderCapStyle;h.setLineDash&&h.setLineDash(d.borderDash||f.defaults.global.elements.line.borderDash);h.lineDashOffset=d.borderDashOffset||f.defaults.global.elements.line.borderDashOffset;h.lineJoin=d.borderJoinStyle||f.defaults.global.elements.line.borderJoinStyle;h.lineWidth=d.borderWidth||
|
|
|
|
|
|
|
|
f.defaults.global.elements.line.borderWidth;h.strokeStyle=d.borderColor||f.defaults.global.defaultColor;h.beginPath();e.each(this._children,function(a,c){var d=e.previousItem(this._children,c),f=e.nextItem(this._children,c);0===c?h.moveTo(a._view.x,a._view.y):this.lineToNextPoint(d,a,f,function(a,c,d){h.moveTo(d._view.x,d._view.y)},function(a,c){h.moveTo(c._view.x,c._view.y)})},this);this._loop&&0<this._children.length&&c();h.stroke();h.restore()}})}},{}],35:[function(p,m,n){m.exports=function(f){var e=
|
|
|
|
|
|
|
|
f.helpers;f.defaults.global.elements.point={radius:3,pointStyle:"circle",backgroundColor:f.defaults.global.defaultColor,borderWidth:1,borderColor:f.defaults.global.defaultColor,hitRadius:1,hoverRadius:4,hoverBorderWidth:1};f.elements.Point=f.Element.extend({inRange:function(c,a){var d=this._view;return d?Math.pow(c-d.x,2)+Math.pow(a-d.y,2)<Math.pow(d.hitRadius+d.radius,2):!1},inLabelRange:function(c){var a=this._view;return a?Math.pow(c-a.x,2)<Math.pow(a.radius+a.hitRadius,2):!1},tooltipPosition:function(){var c=
|
|
|
|
|
|
|
|
this._view;return{x:c.x,y:c.y,padding:c.radius+c.borderWidth}},draw:function(){var c=this._view,a=this._chart.ctx;if(!c.skip)if("object"===typeof c.pointStyle&&("[object HTMLImageElement]"===c.pointStyle.toString()||"[object HTMLCanvasElement]"===c.pointStyle.toString()))a.drawImage(c.pointStyle,c.x-c.pointStyle.width/2,c.y-c.pointStyle.height/2);else if(!isNaN(c.radius)&&0<c.radius){a.strokeStyle=c.borderColor||f.defaults.global.defaultColor;a.lineWidth=e.getValueOrDefault(c.borderWidth,f.defaults.global.elements.point.borderWidth);
|
|
|
|
|
|
|
|
a.fillStyle=c.backgroundColor||f.defaults.global.defaultColor;var d=c.radius,h;switch(c.pointStyle){default:a.beginPath();a.arc(c.x,c.y,d,0,2*Math.PI);a.closePath();a.fill();break;case "triangle":a.beginPath();h=3*d/Math.sqrt(3);d=h*Math.sqrt(3)/2;a.moveTo(c.x-h/2,c.y+d/3);a.lineTo(c.x+h/2,c.y+d/3);a.lineTo(c.x,c.y-2*d/3);a.closePath();a.fill();break;case "rect":a.fillRect(c.x-1/Math.SQRT2*d,c.y-1/Math.SQRT2*d,2/Math.SQRT2*d,2/Math.SQRT2*d);a.strokeRect(c.x-1/Math.SQRT2*d,c.y-1/Math.SQRT2*d,2/Math.SQRT2*
|
|
|
|
|
|
|
|
d,2/Math.SQRT2*d);break;case "rectRot":a.translate(c.x,c.y);a.rotate(Math.PI/4);a.fillRect(-1/Math.SQRT2*d,-1/Math.SQRT2*d,2/Math.SQRT2*d,2/Math.SQRT2*d);a.strokeRect(-1/Math.SQRT2*d,-1/Math.SQRT2*d,2/Math.SQRT2*d,2/Math.SQRT2*d);a.setTransform(1,0,0,1,0,0);break;case "cross":a.beginPath();a.moveTo(c.x,c.y+d);a.lineTo(c.x,c.y-d);a.moveTo(c.x-d,c.y);a.lineTo(c.x+d,c.y);a.closePath();break;case "crossRot":a.beginPath();h=Math.cos(Math.PI/4)*d;d*=Math.sin(Math.PI/4);a.moveTo(c.x-h,c.y-d);a.lineTo(c.x+
|
|
|
|
|
|
|
|
h,c.y+d);a.moveTo(c.x-h,c.y+d);a.lineTo(c.x+h,c.y-d);a.closePath();break;case "star":a.beginPath();a.moveTo(c.x,c.y+d);a.lineTo(c.x,c.y-d);a.moveTo(c.x-d,c.y);a.lineTo(c.x+d,c.y);h=Math.cos(Math.PI/4)*d;d*=Math.sin(Math.PI/4);a.moveTo(c.x-h,c.y-d);a.lineTo(c.x+h,c.y+d);a.moveTo(c.x-h,c.y+d);a.lineTo(c.x+h,c.y-d);a.closePath();break;case "line":a.beginPath();a.moveTo(c.x-d,c.y);a.lineTo(c.x+d,c.y);a.closePath();break;case "dash":a.beginPath(),a.moveTo(c.x,c.y),a.lineTo(c.x+d,c.y),a.closePath()}a.stroke()}}})}},
|
|
|
|
|
|
|
|
{}],36:[function(p,m,n){m.exports=function(f){f.defaults.global.elements.rectangle={backgroundColor:f.defaults.global.defaultColor,borderWidth:0,borderColor:f.defaults.global.defaultColor,borderSkipped:"bottom"};f.elements.Rectangle=f.Element.extend({draw:function(){var e=this._chart.ctx,c=this._view,a=c.width/2,d=c.x-a,a=c.x+a,h=c.base-(c.base-c.y),f=c.borderWidth/2;c.borderWidth&&(d+=f,a-=f,h+=f);e.beginPath();e.fillStyle=c.backgroundColor;e.strokeStyle=c.borderColor;e.lineWidth=c.borderWidth;d=
|
|
|
|
|
|
|
|
[[d,c.base],[d,h],[a,h],[a,c.base]];a=["bottom","left","top","right"].indexOf(c.borderSkipped,0);-1===a&&(a=0);e.moveTo.apply(e,d[(a+0)%4]);for(h=1;4>h;h++)e.lineTo.apply(e,d[(a+h)%4]);e.fill();c.borderWidth&&e.stroke()},height:function(){var e=this._view;return e.base-e.y},inRange:function(e,c){var a=this._view,d=!1;a&&(d=a.y<a.base?e>=a.x-a.width/2&&e<=a.x+a.width/2&&c>=a.y&&c<=a.base:e>=a.x-a.width/2&&e<=a.x+a.width/2&&c>=a.base&&c<=a.y);return d},inLabelRange:function(e){var c=this._view;return c?
|
|
|
|
|
|
|
|
e>=c.x-c.width/2&&e<=c.x+c.width/2:!1},tooltipPosition:function(){var e=this._view;return{x:e.x,y:e.y}}})}},{}],37:[function(p,m,n){m.exports=function(f){var e=f.helpers,c=f.Scale.extend({buildTicks:function(a){this.startIndex=0;this.endIndex=this.chart.data.labels.length;void 0!==this.options.ticks.min&&(a=e.indexOf(this.chart.data.labels,this.options.ticks.min),this.startIndex=-1!==a?a:this.startIndex);void 0!==this.options.ticks.max&&(a=e.indexOf(this.chart.data.labels,this.options.ticks.max),
|
|
|
|
|
|
|
|
this.endIndex=-1!==a?a:this.endIndex);this.ticks=0===this.startIndex&&this.endIndex===this.chart.data.labels.length?this.chart.data.labels:this.chart.data.labels.slice(this.startIndex,this.endIndex+1)},getLabelForIndex:function(a,c){return this.ticks[a]},getPixelForValue:function(a,c,e,f){a=Math.max(this.ticks.length-(this.options.gridLines.offsetGridLines?0:1),1);if(this.isHorizontal())return a=(this.width-(this.paddingLeft+this.paddingRight))/a,c=a*(c-this.startIndex)+this.paddingLeft,this.options.gridLines.offsetGridLines&&
|
|
|
|
|
|
|
|
f&&(c+=a/2),this.left+Math.round(c);a=(this.height-(this.paddingTop+this.paddingBottom))/a;c=a*(c-this.startIndex)+this.paddingTop;this.options.gridLines.offsetGridLines&&f&&(c+=a/2);return this.top+Math.round(c)},getPixelForTick:function(a,c){return this.getPixelForValue(this.ticks[a],a+this.startIndex,null,c)}});f.scaleService.registerScaleType("category",c,{position:"bottom"})}},{}],38:[function(p,m,n){m.exports=function(f){var e=f.helpers,c=f.Scale.extend({determineDataLimits:function(){this.max=
|
|
|
|
|
|
|
|
this.min=null;if(this.options.stacked){var a={};e.each(this.chart.data.datasets,function(c){void 0===a[c.type]&&(a[c.type]={positiveValues:[],negativeValues:[]});var d=a[c.type].positiveValues,h=a[c.type].negativeValues;e.isDatasetVisible(c)&&(this.isHorizontal()?c.xAxisID===this.id:c.yAxisID===this.id)&&e.each(c.data,function(a,c){var e=+this.getRightValue(a);isNaN(e)||(d[c]=d[c]||0,h[c]=h[c]||0,this.options.relativePoints?d[c]=100:0>e?h[c]+=e:d[c]+=e)},this)},this);e.each(a,function(a){var c=a.positiveValues.concat(a.negativeValues);
|
|
|
|
|
|
|
|
a=e.min(c);c=e.max(c);this.min=null===this.min?a:Math.min(this.min,a);this.max=null===this.max?c:Math.max(this.max,c)},this)}else e.each(this.chart.data.datasets,function(a){e.isDatasetVisible(a)&&(this.isHorizontal()?a.xAxisID===this.id:a.yAxisID===this.id)&&e.each(a.data,function(a,c){var d=+this.getRightValue(a);isNaN(d)||(null===this.min?this.min=d:d<this.min&&(this.min=d),null===this.max?this.max=d:d>this.max&&(this.max=d))},this)},this);if(this.options.ticks.beginAtZero){var c=e.sign(this.min),
|
|
|
|
|
|
|
|
h=e.sign(this.max);0>c&&0>h?this.max=0:0<c&&0<h&&(this.min=0)}void 0!==this.options.ticks.min?this.min=this.options.ticks.min:void 0!==this.options.ticks.suggestedMin&&(this.min=Math.min(this.min,this.options.ticks.suggestedMin));void 0!==this.options.ticks.max?this.max=this.options.ticks.max:void 0!==this.options.ticks.suggestedMax&&(this.max=Math.max(this.max,this.options.ticks.suggestedMax));this.min===this.max&&(this.min--,this.max++)},buildTicks:function(){this.ticks=[];var a;this.isHorizontal()?
|
|
|
|
|
|
|
|
a=Math.min(this.options.ticks.maxTicksLimit?this.options.ticks.maxTicksLimit:11,Math.ceil(this.width/50)):(a=e.getValueOrDefault(this.options.ticks.fontSize,f.defaults.global.defaultFontSize),a=Math.min(this.options.ticks.maxTicksLimit?this.options.ticks.maxTicksLimit:11,Math.ceil(this.height/(2*a))));a=Math.max(2,a);if(this.options.ticks.fixedStepSize&&0<this.options.ticks.fixedStepSize||this.options.ticks.stepSize&&0<this.options.ticks.stepSize)a=e.getValueOrDefault(this.options.ticks.fixedStepSize,
|
|
|
|
|
|
|
|
this.options.ticks.stepSize);else{var c=e.niceNum(this.max-this.min,!1);a=e.niceNum(c/(a-1),!0)}var c=Math.floor(this.min/a)*a,h=Math.ceil(this.max/a)*a,k=(h-c)/a,k=e.almostEquals(k,Math.round(k),a/1E3)?Math.round(k):Math.ceil(k);this.ticks.push(void 0!==this.options.ticks.min?this.options.ticks.min:c);for(var l=1;l<k;++l)this.ticks.push(c+l*a);this.ticks.push(void 0!==this.options.ticks.max?this.options.ticks.max:h);"left"!==this.options.position&&"right"!==this.options.position||this.ticks.reverse();
|
|
|
|
|
|
|
|
this.max=e.max(this.ticks);this.min=e.min(this.ticks);this.options.ticks.reverse?(this.ticks.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max)},getLabelForIndex:function(a,c){return+this.getRightValue(this.chart.data.datasets[c].data[a])},convertTicksToLabels:function(){this.ticksAsNumbers=this.ticks.slice();this.zeroLineIndex=this.ticks.indexOf(0);f.Scale.prototype.convertTicksToLabels.call(this)},getPixelForValue:function(a,c,e,f){a=+this.getRightValue(a);
|
|
|
|
|
|
|
|
c=this.end-this.start;if(this.isHorizontal())return a=this.left+(this.width-(this.paddingLeft+this.paddingRight))/c*(a-this.start),Math.round(a+this.paddingLeft);a=this.bottom-this.paddingBottom-(this.height-(this.paddingTop+this.paddingBottom))/c*(a-this.start);return Math.round(a)},getPixelForTick:function(a,c){return this.getPixelForValue(this.ticksAsNumbers[a],null,null,c)}});f.scaleService.registerScaleType("linear",c,{position:"left",ticks:{callback:function(a,c,h){c=h[1]-h[0];1<Math.abs(c)&&
|
|
|
|
|
|
|
|
a!==Math.floor(a)&&(c=a-Math.floor(a));c=e.log10(Math.abs(c));h="";0!==a?(c=-1*Math.floor(c),c=Math.max(Math.min(c,20),0),h=a.toFixed(c)):h="0";return h}}})}},{}],39:[function(p,m,n){m.exports=function(f){var e=f.helpers,c=f.Scale.extend({determineDataLimits:function(){this.max=this.min=null;if(this.options.stacked){var a={};e.each(this.chart.data.datasets,function(c){e.isDatasetVisible(c)&&(this.isHorizontal()?c.xAxisID===this.id:c.yAxisID===this.id)&&(void 0===a[c.type]&&(a[c.type]=[]),e.each(c.data,
|
|
|
|
|
|
|
|
function(e,f){var l=a[c.type],q=+this.getRightValue(e);isNaN(q)||(l[f]=l[f]||0,l[f]=this.options.relativePoints?100:l[f]+q)},this))},this);e.each(a,function(a){var c=e.min(a);a=e.max(a);this.min=null===this.min?c:Math.min(this.min,c);this.max=null===this.max?a:Math.max(this.max,a)},this)}else e.each(this.chart.data.datasets,function(a){e.isDatasetVisible(a)&&(this.isHorizontal()?a.xAxisID===this.id:a.yAxisID===this.id)&&e.each(a.data,function(a,c){var d=+this.getRightValue(a);isNaN(d)||(null===this.min?
|
|
|
|
|
|
|
|
this.min=d:d<this.min&&(this.min=d),null===this.max?this.max=d:d>this.max&&(this.max=d))},this)},this);this.min=void 0!==this.options.ticks.min?this.options.ticks.min:this.min;this.max=void 0!==this.options.ticks.max?this.options.ticks.max:this.max;this.min===this.max&&(0!==this.min&&null!==this.min?(this.min=Math.pow(10,Math.floor(e.log10(this.min))-1),this.max=Math.pow(10,Math.floor(e.log10(this.max))+1)):(this.min=1,this.max=10))},buildTicks:function(){this.ticks=[];for(var a=void 0!==this.options.ticks.min?
|
|
|
|
|
|
|
|
this.options.ticks.min:Math.pow(10,Math.floor(e.log10(this.min)));a<this.max;){this.ticks.push(a);var c=Math.floor(e.log10(a)),a=Math.floor(a/Math.pow(10,c))+1;10===a&&(a=1,++c);a*=Math.pow(10,c)}this.ticks.push(void 0!==this.options.ticks.max?this.options.ticks.max:a);"left"!==this.options.position&&"right"!==this.options.position||this.ticks.reverse();this.max=e.max(this.ticks);this.min=e.min(this.ticks);this.options.ticks.reverse?(this.ticks.reverse(),this.start=this.max,this.end=this.min):(this.start=
|
|
|
|
|
|
|
|
this.min,this.end=this.max)},convertTicksToLabels:function(){this.tickValues=this.ticks.slice();f.Scale.prototype.convertTicksToLabels.call(this)},getLabelForIndex:function(a,c){return+this.getRightValue(this.chart.data.datasets[c].data[a])},getPixelForTick:function(a,c){return this.getPixelForValue(this.tickValues[a],null,null,c)},getPixelForValue:function(a,c,h,f){a=+this.getRightValue(a);c=e.log10(this.end)-e.log10(this.start);this.isHorizontal()?0===a?a=this.left+this.paddingLeft:(a=this.left+
|
|
|
|
|
|
|
|
(this.width-(this.paddingLeft+this.paddingRight))/c*(e.log10(a)-e.log10(this.start)),a+=this.paddingLeft):a=0===a?this.top+this.paddingTop:this.bottom-this.paddingBottom-(this.height-(this.paddingTop+this.paddingBottom))/c*(e.log10(a)-e.log10(this.start));return a}});f.scaleService.registerScaleType("logarithmic",c,{position:"left",ticks:{callback:function(a,c,e){var k=a/Math.pow(10,Math.floor(f.helpers.log10(a)));return 1===k||2===k||5===k||0===c||c===e.length-1?a.toExponential():""}}})}},{}],40:[function(p,
|
|
|
|
|
|
|
|
m,n){m.exports=function(f){var e=f.helpers,c=f.Scale.extend({getValueCount:function(){return this.chart.data.labels.length},setDimensions:function(){this.width=this.maxWidth;this.height=this.maxHeight;this.xCenter=Math.round(this.width/2);this.yCenter=Math.round(this.height/2);var a=e.min([this.height,this.width]),c=e.getValueOrDefault(this.options.ticks.fontSize,f.defaults.global.defaultFontSize);this.drawingArea=this.options.display?a/2-(c/2+this.options.ticks.backdropPaddingY):a/2},determineDataLimits:function(){this.max=
|
|
|
|
|
|
|
|
this.min=null;e.each(this.chart.data.datasets,function(a){e.isDatasetVisible(a)&&e.each(a.data,function(a,c){var d=+this.getRightValue(a);isNaN(d)||(null===this.min?this.min=d:d<this.min&&(this.min=d),null===this.max?this.max=d:d>this.max&&(this.max=d))},this)},this);if(this.options.ticks.beginAtZero){var a=e.sign(this.min),c=e.sign(this.max);0>a&&0>c?this.max=0:0<a&&0<c&&(this.min=0)}void 0!==this.options.ticks.min?this.min=this.options.ticks.min:void 0!==this.options.ticks.suggestedMin&&(this.min=
|
|
|
|
|
|
|
|
Math.min(this.min,this.options.ticks.suggestedMin));void 0!==this.options.ticks.max?this.max=this.options.ticks.max:void 0!==this.options.ticks.suggestedMax&&(this.max=Math.max(this.max,this.options.ticks.suggestedMax));this.min===this.max&&(this.min--,this.max++)},buildTicks:function(){this.ticks=[];var a=e.getValueOrDefault(this.options.ticks.fontSize,f.defaults.global.defaultFontSize),a=Math.min(this.options.ticks.maxTicksLimit?this.options.ticks.maxTicksLimit:11,Math.ceil(this.drawingArea/(1.5*
|
|
|
|
|
|
|
|
a))),a=Math.max(2,a),c=e.niceNum(this.max-this.min,!1),a=e.niceNum(c/(a-1),!0),c=Math.floor(this.min/a)*a,h=Math.ceil(this.max/a)*a,k=Math.ceil((h-c)/a);this.ticks.push(void 0!==this.options.ticks.min?this.options.ticks.min:c);for(var l=1;l<k;++l)this.ticks.push(c+l*a);this.ticks.push(void 0!==this.options.ticks.max?this.options.ticks.max:h);this.max=e.max(this.ticks);this.min=e.min(this.ticks);this.options.ticks.reverse?(this.ticks.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,
|
|
|
|
|
|
|
|
this.end=this.max);this.zeroLineIndex=this.ticks.indexOf(0)},convertTicksToLabels:function(){f.Scale.prototype.convertTicksToLabels.call(this);this.pointLabels=this.chart.data.labels.map(this.options.pointLabels.callback,this)},getLabelForIndex:function(a,c){return+this.getRightValue(this.chart.data.datasets[c].data[a])},fit:function(){var a=e.getValueOrDefault(this.options.pointLabels.fontSize,f.defaults.global.defaultFontSize),c=e.getValueOrDefault(this.options.pointLabels.fontStyle,f.defaults.global.defaultFontStyle),
|
|
|
|
|
|
|
|
h=e.getValueOrDefault(this.options.pointLabels.fontFamily,f.defaults.global.defaultFontFamily),k=e.fontString(a,c,h),a=e.min([this.height/2-a-5,this.width/2]),l,m,c=this.width,n,h=0,p;this.ctx.font=k;for(l=0;l<this.getValueCount();l++)k=this.getPointPosition(l,a),m=this.ctx.measureText(this.pointLabels[l]?this.pointLabels[l]:"").width+5,0===l||l===this.getValueCount()/2?(m/=2,k.x+m>c&&(c=k.x+m,n=l),k.x-m<h&&(h=k.x-m,p=l)):l<this.getValueCount()/2?k.x+m>c&&(c=k.x+m,n=l):l>this.getValueCount()/2&&k.x-
|
|
|
|
|
|
|
|
m<h&&(h=k.x-m,p=l);c=Math.ceil(c-this.width);n=this.getIndexAngle(n);p=this.getIndexAngle(p);n=c/Math.sin(n+Math.PI/2);p=h/Math.sin(p+Math.PI/2);n=e.isNumber(n)?n:0;p=e.isNumber(p)?p:0;this.drawingArea=Math.round(a-(p+n)/2);this.setCenterPoint(p,n)},setCenterPoint:function(a,c){this.xCenter=Math.round((a+this.drawingArea+(this.width-c-this.drawingArea))/2+this.left);this.yCenter=Math.round(this.height/2+this.top)},getIndexAngle:function(a){var c=2*Math.PI/this.getValueCount();return a*c-Math.PI/2},
|
|
|
|
|
|
|
|
getDistanceFromCenterForValue:function(a){if(null===a)return 0;var c=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-a)*c:(a-this.min)*c},getPointPosition:function(a,c){var e=this.getIndexAngle(a);return{x:Math.round(Math.cos(e)*c)+this.xCenter,y:Math.round(Math.sin(e)*c)+this.yCenter}},getPointPositionForValue:function(a,c){return this.getPointPosition(a,this.getDistanceFromCenterForValue(c))},draw:function(){if(this.options.display){var a=this.ctx;e.each(this.ticks,function(c,
|
|
|
|
|
|
|
|
d){if(0<d||this.options.reverse){var h=this.getDistanceFromCenterForValue(this.ticks[d]),k=this.yCenter-h;if(this.options.gridLines.display){a.strokeStyle=this.options.gridLines.color;a.lineWidth=this.options.gridLines.lineWidth;if(this.options.lineArc)a.beginPath(),a.arc(this.xCenter,this.yCenter,h,0,2*Math.PI);else for(a.beginPath(),h=0;h<this.getValueCount();h++){var l=this.getPointPosition(h,this.getDistanceFromCenterForValue(this.ticks[d]));0===h?a.moveTo(l.x,l.y):a.lineTo(l.x,l.y)}a.closePath();
|
|
|
|
|
|
|
|
a.stroke()}if(this.options.ticks.display){var h=e.getValueOrDefault(this.options.ticks.fontColor,f.defaults.global.defaultFontColor),l=e.getValueOrDefault(this.options.ticks.fontSize,f.defaults.global.defaultFontSize),m=e.getValueOrDefault(this.options.ticks.fontStyle,f.defaults.global.defaultFontStyle),n=e.getValueOrDefault(this.options.ticks.fontFamily,f.defaults.global.defaultFontFamily),m=e.fontString(l,m,n);a.font=m;this.options.ticks.showLabelBackdrop&&(m=a.measureText(c).width,a.fillStyle=
|
|
|
|
|
|
|
|
this.options.ticks.backdropColor,a.fillRect(this.xCenter-m/2-this.options.ticks.backdropPaddingX,k-l/2-this.options.ticks.backdropPaddingY,m+2*this.options.ticks.backdropPaddingX,l+2*this.options.ticks.backdropPaddingY));a.textAlign="center";a.textBaseline="middle";a.fillStyle=h;a.fillText(c,this.xCenter,k)}}},this);if(!this.options.lineArc){a.lineWidth=this.options.angleLines.lineWidth;a.strokeStyle=this.options.angleLines.color;for(var c=this.getValueCount()-1;0<=c;c--){if(this.options.angleLines.display){var h=
|
|
|
|
|
|
|
|
this.getPointPosition(c,this.getDistanceFromCenterForValue(this.options.reverse?this.min:this.max));a.beginPath();a.moveTo(this.xCenter,this.yCenter);a.lineTo(h.x,h.y);a.stroke();a.closePath()}var h=this.getPointPosition(c,this.getDistanceFromCenterForValue(this.options.reverse?this.min:this.max)+5),k=e.getValueOrDefault(this.options.pointLabels.fontColor,f.defaults.global.defaultFontColor),l=e.getValueOrDefault(this.options.pointLabels.fontSize,f.defaults.global.defaultFontSize),m=e.getValueOrDefault(this.options.pointLabels.fontStyle,
|
|
|
|
|
|
|
|
f.defaults.global.defaultFontStyle),n=e.getValueOrDefault(this.options.pointLabels.fontFamily,f.defaults.global.defaultFontFamily),l=e.fontString(l,m,n);a.font=l;a.fillStyle=k;m=this.pointLabels.length;k=this.pointLabels.length/2;n=k/2;l=c<n||c>m-n;m=c===n||c===m-n;a.textAlign=0===c?"center":c===k?"center":c<k?"left":"right";a.textBaseline=m?"middle":l?"bottom":"top";a.fillText(this.pointLabels[c]?this.pointLabels[c]:"",h.x,h.y)}}}}});f.scaleService.registerScaleType("radialLinear",c,{display:!0,
|
|
|
|
|
|
|
|
animate:!0,lineArc:!1,position:"chartArea",angleLines:{display:!0,color:"rgba(0, 0, 0, 0.1)",lineWidth:1},ticks:{showLabelBackdrop:!0,backdropColor:"rgba(255,255,255,0.75)",backdropPaddingY:2,backdropPaddingX:2},pointLabels:{fontSize:10,callback:function(a){return a}}})}},{}],41:[function(p,m,n){var f=p("moment"),f="function"===typeof f?f:window.moment;m.exports=function(e){var c=e.helpers,a=[{name:"millisecond",steps:[1,2,5,10,20,50,100,250,500]},{name:"second",steps:[1,2,5,10,30]},{name:"minute",
|
|
|
|
|
|
|
|
steps:[1,2,5,10,30]},{name:"hour",steps:[1,2,3,6,12]},{name:"day",steps:[1,2,5]},{name:"week",maxStep:4},{name:"month",maxStep:3},{name:"quarter",maxStep:4},{name:"year",maxStep:!1}],d=e.Scale.extend({initialize:function(){if(!f)throw Error("Chart.js - Moment.js could not be found! You must include it before Chart.js to use the time scale. Download at https://momentjs.com");e.Scale.prototype.initialize.call(this)},getLabelMoment:function(a,c){return this.labelMoments[a][c]},determineDataLimits:function(){this.labelMoments=
|
|
|
|
|
|
|
|
[];var a=[];this.chart.data.labels&&0<this.chart.data.labels.length?(c.each(this.chart.data.labels,function(c,d){var e=this.parseTime(c);this.options.time.round&&e.startOf(this.options.time.round);a.push(e)},this),this.firstTick=f.min.call(this,a),this.lastTick=f.max.call(this,a)):this.lastTick=this.firstTick=null;c.each(this.chart.data.datasets,function(d,e){var m=[];"object"===typeof d.data[0]?c.each(d.data,function(a,c){var d=this.parseTime(this.getRightValue(a));this.options.time.round&&d.startOf(this.options.time.round);
|
|
|
|
|
|
|
|
m.push(d);this.firstTick=null!==this.firstTick?f.min(this.firstTick,d):d;this.lastTick=null!==this.lastTick?f.max(this.lastTick,d):d},this):m=a;this.labelMoments.push(m)},this);this.options.time.min&&(this.firstTick=this.parseTime(this.options.time.min));this.options.time.max&&(this.lastTick=this.parseTime(this.options.time.max));this.firstTick=(this.firstTick||f()).clone();this.lastTick=(this.lastTick||f()).clone()},buildTicks:function(d){this.ctx.save();d=c.getValueOrDefault(this.options.ticks.fontSize,
|
|
|
|
|
|
|
|
e.defaults.global.defaultFontSize);var f=c.getValueOrDefault(this.options.ticks.fontStyle,e.defaults.global.defaultFontStyle),l=c.getValueOrDefault(this.options.ticks.fontFamily,e.defaults.global.defaultFontFamily),f=c.fontString(d,f,l);this.ctx.font=f;this.ticks=[];this.unitScale=1;this.scaleSizeInUnits=0;if(this.options.time.unit)this.tickUnit=this.options.time.unit||"day",this.displayFormat=this.options.time.displayFormats[this.tickUnit],this.scaleSizeInUnits=this.lastTick.diff(this.firstTick,
|
|
|
|
|
|
|
|
this.tickUnit,!0),this.unitScale=c.getValueOrDefault(this.options.time.unitStepSize,1);else{var f=this.isHorizontal()?this.width-(this.paddingLeft+this.paddingRight):this.height-(this.paddingTop+this.paddingBottom),l=this.tickFormatFunction(this.firstTick,0,[]),l=this.ctx.measureText(l).width,m=Math.cos(c.toRadians(this.options.ticks.maxRotation)),n=Math.sin(c.toRadians(this.options.ticks.maxRotation));d=f/(l*m+d*n);this.tickUnit="millisecond";this.scaleSizeInUnits=this.lastTick.diff(this.firstTick,
|
|
|
|
|
|
|
|
this.tickUnit,!0);this.displayFormat=this.options.time.displayFormats[this.tickUnit];l=0;for(f=a[l];l<a.length;)if(this.unitScale=1,c.isArray(f.steps)&&Math.ceil(this.scaleSizeInUnits/d)<c.max(f.steps)){for(l=0;l<f.steps.length;++l)if(f.steps[l]>=Math.ceil(this.scaleSizeInUnits/d)){this.unitScale=c.getValueOrDefault(this.options.time.unitStepSize,f.steps[l]);break}break}else if(!1===f.maxStep||Math.ceil(this.scaleSizeInUnits/d)<f.maxStep){this.unitScale=c.getValueOrDefault(this.options.time.unitStepSize,
|
|
|
|
|
|
|
|
Math.ceil(this.scaleSizeInUnits/d));break}else++l,f=a[l],this.tickUnit=f.name,this.scaleSizeInUnits=this.lastTick.diff(this.firstTick,this.tickUnit,!0),this.displayFormat=this.options.time.displayFormats[f.name]}this.options.time.min?d=this.firstTick.clone().startOf(this.tickUnit):(this.firstTick.startOf(this.tickUnit),d=this.firstTick);this.options.time.max||this.lastTick.endOf(this.tickUnit);this.smallestLabelSeparation=this.width;c.each(this.chart.data.datasets,function(a,c){for(var d=1;d<this.labelMoments[c].length;d++)this.smallestLabelSeparation=
|
|
|
|
|
|
|
|
Math.min(this.smallestLabelSeparation,this.labelMoments[c][d].diff(this.labelMoments[c][d-1],this.tickUnit,!0))},this);this.options.time.displayFormat&&(this.displayFormat=this.options.time.displayFormat);this.ticks.push(this.firstTick.clone());for(f=1;f<this.scaleSizeInUnits;++f){l=d.clone().add(f,this.tickUnit);if(this.options.time.max&&0<=l.diff(this.lastTick,this.tickUnit,!0))break;0===f%this.unitScale&&this.ticks.push(l)}if(0!==this.ticks[this.ticks.length-1].diff(this.lastTick,this.tickUnit)||
|
|
|
|
|
|
|
|
0===this.scaleSizeInUnits)this.options.time.max?(this.ticks.push(this.lastTick.clone()),this.scaleSizeInUnits=this.lastTick.diff(this.ticks[0],this.tickUnit,!0)):(this.scaleSizeInUnits=Math.ceil(this.scaleSizeInUnits/this.unitScale)*this.unitScale,this.ticks.push(this.firstTick.clone().add(this.scaleSizeInUnits,this.tickUnit)),this.lastTick=this.ticks[this.ticks.length-1].clone());this.ctx.restore()},getLabelForIndex:function(a,c){var d=this.chart.data.labels&&a<this.chart.data.labels.length?this.chart.data.labels[a]:
|
|
|
|
|
|
|
|
"";"object"===typeof this.chart.data.datasets[c].data[0]&&(d=this.getRightValue(this.chart.data.datasets[c].data[a]));this.options.time.tooltipFormat&&(d=this.parseTime(d).format(this.options.time.tooltipFormat));return d},tickFormatFunction:function(a,c,d){a=a.format(this.displayFormat);return this.options.ticks.userCallback?this.options.ticks.userCallback(a,c,d):a},convertTicksToLabels:function(){this.ticks=this.ticks.map(this.tickFormatFunction,this)},getPixelForValue:function(a,c,d,e){if(a=this.getLabelMoment(d,
|
|
|
|
|
|
|
|
c))return a=a.diff(this.firstTick,this.tickUnit,!0)/this.scaleSizeInUnits,this.isHorizontal()?this.left+Math.round((this.width-(this.paddingLeft+this.paddingRight))*a+this.paddingLeft):this.top+Math.round((this.height-(this.paddingTop+this.paddingBottom))*a+this.paddingTop)},parseTime:function(a){return"string"===typeof this.options.time.parser?f(a,this.options.time.parser):"function"===typeof this.options.time.parser?this.options.time.parser(a):"function"===typeof a.getMonth||"number"===typeof a?
|
|
|
|
|
|
|
|
f(a):a.isValid&&a.isValid()?a:"string"!==typeof this.options.time.format&&this.options.time.format.call?(console.warn("options.time.format is deprecated and replaced by options.time.parser. See http://nnnick.github.io/Chart.js/docs-v2/#scales-time-scale"),this.options.time.format(a)):f(a,this.options.time.format)}});e.scaleService.registerScaleType("time",d,{position:"bottom",time:{parser:!1,format:!1,unit:!1,round:!1,displayFormat:!1,displayFormats:{millisecond:"h:mm:ss.SSS a",second:"h:mm:ss a",
|
|
|
|
|
|
|
|
minute:"h:mm:ss a",hour:"MMM D, hA",day:"ll",week:"ll",month:"MMM YYYY",quarter:"[Q]Q - YYYY",year:"YYYY"}},ticks:{autoSkip:!1}})}},{moment:1}]},{},[7]);
|