-
Notifications
You must be signed in to change notification settings - Fork 0
/
jquery.flotR.min.js
executable file
·75 lines (72 loc) · 32.9 KB
/
jquery.flotR.min.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
/*
Javascript plotting library for Raphael v. 0.1.
Released under the MIT license by Xavier Basty / digitalanimal.se, March 2012.
Based on the flot plotting library (http://code.google.com/p/flot/)
Color management based on jquery.colorhelpers by Ole Laursen
*/
(function(k,K){function t(a,b,e,c){return this instanceof t?(this.r=a||0,this.g=b||0,this.b=e||0,this.a=null!=c?c:1,this.normalize()):new t(a,b,e,c)}function E(a,b){return b*Math.floor(a/b)}function L(a,b,e,c,f,d){var h=+(c-e>Math.PI),i=a+d*Math.cos(e),j=b+d*Math.sin(e),g=a+d*Math.cos(c),m=b+d*Math.sin(c),p=a+f*Math.cos(c),c=b+f*Math.sin(c),a=a+f*Math.cos(e),b=b+f*Math.sin(e),f=["M",p," ",c,"A",f," ",f," ",0," ",h," ",0," ",a," ",b];null!=d&&f.push("L"," ",i," ",j,"A"," ",d," ",d," ",0," ",h," ",
1," ",g," ",m,"z");return f.join("")}function H(a,b,e,c){b--;a[b]||(a[b]={n:b+1,direction:c,options:k.extend(!0,{},e)});return a[b]}function D(a,b,e){var c=this.data("plotr"),f=this.data("item"),d=c.placeholder.offset(),h,i,j,g,m;h=null;if(c){if(f){h=c.series[f.seriesIndex];i=h.datapoints;j=i.pointsize;m=h.datapoints.points.slice(j*f.dataIndex,j*(f.dataIndex+1));j=f.dataIndex*i.pointsize;for(g=j+i.pointsize;j<g;j++)m.push(i.points[j]);h={seriesIndex:f.seriesIndex,series:h,dataIndex:f.dataIndex,datapoint:m,
pageX:b,pageY:e}}b=b-d.left-c.plotOffset.left;e=e-d.top-c.plotOffset.top;b=c.canvasToAxisCoords({left:b,top:e});c.placeholder.trigger(a,[b,h])}}function M(){var a=this.data("set"),b,e,c,f;if(!a.hover){a.hover=!0;e=0;for(c=a.length;e<c;e++)f=a[e],(b=f.attrs.fill)&&"none"!==b&&f.attr({fill:t.parse(b).scale("a",0.5).toString()})}}function N(){var a=this.data("highlight"),b=this.data("set"),e,c,f;if(!a&&b.hover){b.hover=!1;e=0;for(c=b.length;e<c;e++)f=b[e],(a=f.attrs.fill)&&"none"!==a&&f.attr({fill:t.parse(a).scale("a",
2).toString()})}}function O(){var a=this.data("set");!this.data("glow")&&this.data("glow",a.glow({color:a.attrs.stroke,opacity:0.7}))}function P(){var a=this.data("highlight"),b=this.data("glow");a||(b&&b.remove(),this.removeData("glow"))}function F(a){var a=a.xAxes.concat(a.yAxes),b=[],e,c;e=0;for(c=a.length;e<c;e++)a[e]&&b.push(a[e]);return b}function G(a,b,e){var c,f,e=[a].concat(e);c=0;for(f=b.length;c<f;++c)b[c].apply(a,e)}function Q(a,b){var e=a[b+"axis"];"object"===typeof e&&(e=e.n);"number"!==
typeof e&&(e=1);return e}function V(a){function b(a,c,b){c<a.datamin&&c!=-h&&(a.datamin=c);b>a.datamax&&b!=h&&(a.datamax=b)}var e=a.series,c=a.hooks,f=Number.POSITIVE_INFINITY,d=Number.NEGATIVE_INFINITY,h=Number.MAX_VALUE,i,j,g,m,p,l,s,x,w,A,C,q,r,n,o,u;i=F(a);g=0;for(m=i.length;g<m;g++)j=i[g],j.datamin=f,j.datamax=d,j.used=!1;g=0;for(m=e.length;g<m;g++)j=e[g],j.datapoints={points:[]},G(a,c.processRawData,[j,j.data,j.datapoints]);g=0;for(m=e.length;g<m;g++){j=e[g];x=j.data;w=j.datapoints.format;if(!w){w=
[];w.push({x:!0,number:!0,required:!0});w.push({y:!0,number:!0,required:!0});if(j.bars.show||j.lines.show&&j.lines.fill)w.push({y:!0,number:!0,required:!1,defaultValue:0}),j.bars.horizontal&&(delete w[w.length-1].y,w[w.length-1].x=!0);j.datapoints.format=w}if(null==j.datapoints.pointsize){j.datapoints.pointsize=w.length;r=j.datapoints.pointsize;q=j.datapoints.points;A=j.lines.show&&j.lines.steps;j.xaxis.used=j.yaxis.used=!0;for(p=l=0;p<x.length;p++,l+=r){u=x[p];C=null==u;if(!C)for(s=0;s<r;s++){n=
u[s];if(o=w[s])if(o.number&&null!=n&&(n=+n,isNaN(n)?n=null:Infinity==n?n=h:-Infinity==n&&(n=-h)),null==n)o.required&&(C=!0),null!=o.defaultValue&&(n=o.defaultValue);q[l+s]=n}if(C)for(s=0;s<r;s++)n=q[l+s],null!=n&&(o=w[s],o.x&&b(j.xaxis,n,n),o.y&&b(j.yaxis,n,n)),q[l+s]=null;else if(A&&0<l&&null!=q[l-r]&&q[l-r]!=q[l]&&q[l-r+1]!=q[l+1]){for(s=0;s<r;++s)q[l+r+s]=q[l+s];q[l+1]=q[l-r+1];l+=r}}}}g=0;for(m=e.length;g<m;g++)j=e[g],G(a,c.processDatapoints,[j,j.datapoints]);g=0;for(m=e.length;g<m;++g){j=e[g];
q=j.datapoints.points;r=j.datapoints.pointsize;a=c=f;p=x=d;for(l=0;l<q.length;l+=r)if(null!=q[l])for(s=0;s<r;++s)if(n=q[l+s],(o=w[s])&&!(n==h||n==-h))if(o.x&&(n<a&&(a=n),n>p&&(p=n)),o.y)n<c&&(c=n),n>x&&(x=n);j.bars.show&&(l="left"==j.bars.align?0:-j.bars.barWidth/2,j.bars.horizontal?(c+=l,x+=l+j.bars.barWidth):(a+=l,p+=l+j.bars.barWidth));b(j.xaxis,a,p);b(j.yaxis,c,x)}g=0;for(m=i.length;g>m;g++)if(j=i[g],j.datamin==f&&(j.datamin=null),j.datamax==d)j.datamax=null}function W(a){var b=a.options,e=+(null!=
b.min?b.min:a.datamin),c=+(null!=b.max?b.max:a.datamax),f=c-e,d;if(0==f){if(f=0==c?1:0.01,null==b.min&&(e-=f),null==b.max||null!=b.min)c+=f}else if(d=b.autoscaleMargin,null!=d&&(null==b.min&&(e-=f*d,0>e&&null!=a.datamin&&0<=a.datamin&&(e=0)),null==b.max))c+=f*d,0<c&&null!=a.datamax&&0>=a.datamax&&(c=0);a.min=e;a.max=c}function X(a,b){var e=b.options,c,f,d,h,i,j,g,m;c="number"===typeof e.ticks&&0<e.ticks?e.ticks:0.3*Math.sqrt("x"===b.direction?a.canvasWidth:a.canvasHeight);c=(b.max-b.min)/c;if("time"===
e.mode){j={second:1E3,minute:6E4,hour:36E5,day:864E5,month:2592E6,year:525949.2*6E4};i=[[1,"second"],[2,"second"],[5,"second"],[10,"second"],[30,"second"],[1,"minute"],[2,"minute"],[5,"minute"],[10,"minute"],[30,"minute"],[1,"hour"],[2,"hour"],[4,"hour"],[8,"hour"],[12,"hour"],[1,"day"],[2,"day"],[3,"day"],[0.25,"month"],[0.5,"month"],[1,"month"],[2,"month"],[3,"month"],[6,"month"],[1,"year"]];h=0;null!=e.minTickSize&&(h="number"===typeof e.tickSize?e.tickSize:e.minTickSize[0]*j[e.minTickSize[1]]);
d=0;for(f=i.length-1;d<f&&!(c<(i[d][0]*j[i[d][1]]+i[d+1][0]*j[i[d+1][1]])/2&&i[d][0]*j[i[d][1]]>=h);d++);f=i[d][0];h=i[d][1];"year"===h&&(d=Math.pow(10,Math.floor(Math.log(c/j.year)/Math.LN10)),i=c/j.year/d,f=(1.5>i?1:3>i?2:7.5>i?5:10)*d);b.tickSize=e.tickSize||[f,h];d=function(a){var c=[],b=a.tickSize[0],e=a.tickSize[1],d=new Date(a.min),f=b*j[e],h=0,g=Number.NaN,i,m,o;e==="second"&&d.setUTCSeconds(E(d.getUTCSeconds(),b));e==="minute"&&d.setUTCMinutes(E(d.getUTCMinutes(),b));e==="hour"&&d.setUTCHours(E(d.getUTCHours(),
b));e==="month"&&d.setUTCMonth(E(d.getUTCMonth(),b));e==="year"&&d.setUTCFullYear(E(d.getUTCFullYear(),b));d.setUTCMilliseconds(0);f>=j.minute&&d.setUTCSeconds(0);f>=j.hour&&d.setUTCMinutes(0);f>=j.day&&d.setUTCHours(0);f>=j.day*4&&d.setUTCDate(1);f>=j.year&&d.setUTCMonth(0);do{i=g;g=d.getTime();c.push(g);if(e==="month")if(b<1){d.setUTCDate(1);m=d.getTime();d.setUTCMonth(d.getUTCMonth()+1);o=d.getTime();d.setTime(g+h*j.hour+(o-m)*b);h=d.getUTCHours();d.setUTCHours(0)}else d.setUTCMonth(d.getUTCMonth()+
b);else e==="year"?d.setUTCFullYear(d.getUTCFullYear()+b):d.setTime(g+f)}while(g<a.max&&g!==i);return c};f=function(a,b){var c=new Date(a),d,f,g;if(e.timeformat!=null)return k.plot.formatDate(c,e.timeformat,e.monthNames);d=b.tickSize[0]*j[b.tickSize[1]];f=b.max-b.min;g=e.twelveHourClock?" %p":"";return k.plot.formatDate(c,d<j.minute?"%h:%M:%S"+g:d<j.day?f<2*j.day?"%h:%M"+g:"%b %d %h:%M"+g:d<j.month?"%b %d":d<j.year?f<j.year?"%b":"%b %y":"%y",e.monthNames)}}else{h=e.tickDecimals;g=-Math.floor(Math.log(c)/
Math.LN10);null!=h&&g>h&&(g=h);d=Math.pow(10,-g);i=c/d;if(1.5>i)f=1;else if(3>i){if(f=2,2.25<i&&(null==h||g+1<=h))f=2.5,++g}else f=7.5>i?5:10;f*=d;null!=e.minTickSize&&f<e.minTickSize&&(f=e.minTickSize);b.tickDecimals=Math.max(0,null!=h?h:g);b.tickSize=e.tickSize||f;d=function(a){var b=[],c=E(a.min,a.tickSize),e=0,d=Number.NaN,f;do{f=d;d=c+e*a.tickSize;b.push(d);++e}while(d<a.max&&d!==f);return b};f=function(a,b){return a.toFixed(b.tickDecimals)}}if(null!=e.alignTicksWithAxis&&(m=("x"===b.direction?
a.xAxes:a.yAxes)[e.alignTicksWithAxis-1])&&m.used&&m!==b){d=d(b);if(0<d.length&&(null==e.min&&(b.min=Math.min(b.min,d[0])),null==e.max&&1<d.length))b.max=Math.max(b.max,d[d.length-1]);d=function(a){var b=[],c,d,e;d=0;for(e=m.ticks.length;d<e;++d)c=(m.ticks[d].v-m.min)/(m.max-m.min),c=a.min+c*(a.max-a.min),b.push(c);return b};!b.mode&&null==e.tickDecimals&&(c=Math.max(0,-Math.floor(Math.log(c)/Math.LN10)+1),i=d(b),1<i.length&&/\..*0$/.test((i[1]-i[0]).toFixed(c))||(b.tickDecimals=c))}b.tickGenerator=
d;b.tickFormatter=k.isFunction(e.tickFormatter)?function(a,b){return""+e.tickFormatter(a,b)}:f}function Y(a){var b=a.options.ticks,e=[],c,f,d,h;null==b||"number"===typeof b&&0<b?e=a.tickGenerator(a):b&&(e=k.isFunction(b)?b(a):b);a.ticks=[];b=0;for(c=e.length;b<c;b++)d=null,h=e[b],"object"===typeof h?(f=+h[0],1<h.length&&(d=h[1])):f=+h,null==d&&(d=a.tickFormatter(f,a)),isNaN(f)||a.ticks.push({v:f,label:d})}function Z(a,b){if(a.options.autoscaleMargin&&0<b.length&&(null==a.options.min&&(a.min=Math.min(a.min,
b[0].v)),null==a.options.max&&1<b.length))a.max=Math.max(a.max,b[b.length-1].v)}function $(a,b){var e=a.canvas,c=b.options,f=b.ticks||[],d=c.labelWidth||0,h=c.labelHeight||0,i,j,g,m,p,l,s,x,w,k={"font-family":b.font.family,"font-style":b.font.style,"font-weight":b.font.weight};i=0;for(j=f.length;i<j;i++)if(g=f[i],g.lines=[],g.width=g.height=0,g.label){m=g.label.replace(/<br ?\/?>|\r\n|\r/g,"\n").split("\n");l=0;for(s=m.length;l<s;++l)p={text:m[l]},w=e.text(0,0,p.text).attr(k),x=w.getBBox(),w.remove(),
p.width=x.width,p.height=x.height,p.height+=Math.round(0.15*b.font.size),g.width=Math.max(p.width,g.width),g.height+=p.height,g.lines.push(p);null==c.labelWidth&&(d=Math.max(d,g.width));null==c.labelHeight&&(h=Math.max(h,g.height))}b.labelWidth=Math.ceil(d);b.labelHeight=Math.ceil(h)}function aa(a,b){var e=b.labelWidth,c=b.labelHeight,f=b.options.position,d=b.options.tickLength,h=a.options.grid.axisMargin,i=a.options.grid.labelMargin,j="x"===b.direction?a.xAxes:a.yAxes,g,m;g=k.grep(j,function(a){return a&&
a.options.position===f&&a.reserveSpace});k.inArray(b,g)===g.length-1&&(h=0);null==d&&(d=k.grep(j,function(a){return a&&a.reserveSpace}),d=(m=0===k.inArray(b,d))?"full":5);isNaN(+d)||(i+=+d);"x"===b.direction?(c+=i,"bottom"===f?(a.plotOffset.bottom+=c+h,b.box={top:a.canvasHeight-a.plotOffset.bottom,height:c}):(b.box={top:a.plotOffset.top+h,height:c},a.plotOffset.top+=c+h)):(e+=i,"left"===f?(b.box={left:a.plotOffset.left+h,width:e},a.plotOffset.left+=e+h):(a.plotOffset.right+=e+h,b.box={left:a.canvasWidth-
a.plotOffset.right,width:e}));b.position=f;b.tickLength=d;b.box.padding=i;b.innermost=m}function ba(a,b){"x"===b.direction?(b.box.left=a.plotOffset.left-b.labelWidth/2,b.box.width=a.canvasWidth-a.plotOffset.left-a.plotOffset.right+b.labelWidth):(b.box.top=a.plotOffset.top-b.labelHeight/2,b.box.height=a.canvasHeight-a.plotOffset.bottom-a.plotOffset.top+b.labelHeight)}function ca(a){var b=a.series,e=a.plotOffset,c=a.options.grid.minBorderMargin,f={x:0,y:0},d,h;if(null==c){d=c=0;for(h=b.length;d<h;++d)c=
Math.max(c,2*(b[d].points.radius+b[d].points.lineWidth/2))}f.x=f.y=Math.ceil(c);k.each(F(a),function(a,b){var c=b.direction;b.reserveSpace&&(f[c]=Math.ceil(Math.max(f[c],("x"===c?b.labelWidth:b.labelHeight)/2)))});e.left=Math.max(f.x,e.left);e.right=Math.max(f.x,e.right);e.top=Math.max(f.y,e.top);e.bottom=Math.max(f.y,e.bottom)}function da(a,b){function e(a){return a}var c,f,d=b.options.transform||e,h=b.options.inverseTransform;"x"===b.direction?(c=b.scale=a.plotWidth/Math.abs(d(b.max)-d(b.min)),
f=Math.min(d(b.max),d(b.min))):(c=b.scale=a.plotHeight/Math.abs(d(b.max)-d(b.min)),c=-c,f=Math.max(d(b.max),d(b.min)));b.p2c=d===e?function(a){return(a-f)*c}:function(a){return(d(a)-f)*c};b.c2p=h?function(a){return h(f+a/c)}:function(a){return f+a/c}}function ea(a){var b=a.options,e=a.series,c=a.plotOffset,f=[],d=!1,h=b.legend.labelFormatter,i,j,g,m;a.placeholder.find(".legend").remove();if(b.legend.show){j=0;for(g=e.length;j<g;j++)if(i=e[j],m=i.label)0===j%b.legend.noColumns&&(d&&f.push("</tr>"),
f.push("<tr>"),d=!0),h&&(m=h(m,i)),f.push('<td class="legendColorBox"><div style="border:1px solid '+b.legend.labelBoxBorderColor+';padding:1px"><div style="width:4px;height:0;border:5px solid '+i.color+';overflow:hidden"></div></div></td><td class="legendLabel">'+m+"</td>");d&&f.push("</tr>");0!==f.length&&(f='<table style="font-size:smaller;color:'+b.grid.color+'">'+f.join("")+"</table>",null!=b.legend.container?k(b.legend.container).html(f):(e="",d=b.legend.position,h=b.legend.margin,null==h[0]&&
(h=[h,h]),"n"===d.charAt(0)?e+="top:"+(h[1]+c.top)+"px;":"s"===d.charAt(0)&&(e+="bottom:"+(h[1]+c.bottom)+"px;"),"e"===d.charAt(1)?e+="right:"+(h[0]+c.right)+"px;":"w"===d.charAt(1)&&(e+="left:"+(h[0]+c.left)+"px;"),a=k('<div class="legend">'+f.replace('style="','style="position:absolute;'+e+";")+"</div>").appendTo(a.placeholder),0!=b.legend.backgroundOpacity&&(c=b.legend.backgroundColor,null==c&&(c=(c=b.grid.backgroundColor)&&"string"===typeof c?t.parse(c):t.extract(a,"background-color"),c.a=1,c=
c.toString()),f=a.children(),k('<div style="position:absolute;width:'+f.width()+"px;height:"+f.height()+"px;"+e+"background-color:"+c+';"> </div>').prependTo(a).css("opacity",b.legend.backgroundOpacity))))}}function R(a,b){if("string"==typeof a)return a;if(!a)return b;var e,c,f,d,h=[null==a.angle?270:a.angle];e=0;for(c=a.colors.length;e<c;e++)f=a.colors[e],"string"!==typeof f&&(d=t.parse(b),null!=f.brightness&&(d=d.scale("rgb",f.brightness)),null!=f.opacity&&(d.a*=f.opacity),f=d.toString()),0!==e&&
e!==c-1?h.push([100*(e/(c-1)),f].join(":")):h.push(f);return h.join("-")}function I(a,b){var e=a.fill,c;if(!e)return null;if(a.fillColor)return R(a.fillColor,b);c=t.parse(b);c.a="number"==typeof e?e:0.4;c.normalize();return c.toString()}function S(a,b,e){var c,f,d,h,i,j,g=F(a);f=0;for(d=g.length;f<d;f++)if(c=g[f],c.direction==e&&(j=e+c.n+"axis",!b[j]&&1==c.n&&(j=e+"axis"),b[j])){h=b[j].from;i=b[j].to;break}b[j]||(c="x"===e?a.xAxes[0]:a.yAxes[0],h=b[e+"1"],i=b[e+"2"]);null!=h&&null!=i&&h>i&&(a=h,h=
i,i=a);return{from:h,to:i,axis:c}}function fa(a){var b,e=R(a.options.grid.backgroundColor,null);b=a.canvas.rect(a.plotOffset.left,a.plotOffset.top,a.plotWidth,a.plotHeight).attr({fill:e,stroke:null});null==e&&b.attr({opacity:0});a.options.grid.hoverable&&b.data("plotr",a).mousemove(function(a,b,d){D.call(this,"plothover",b,d)}).click(function(a,b,d){D.call(this,"plotclick",b,d)})}function T(a){var b,e,c,f=a.options.grid.markings,d,h,i,j,g,m,p,l,s,x,w="t"+a.plotOffset.left+","+a.plotOffset.top,A,C;
if(f){k.isFunction(f)&&(b=a.getAxes(),b.xmin=b.xaxis.min,b.xmax=b.xaxis.max,b.ymin=b.yaxis.min,b.ymax=b.yaxis.max,f=f(b));e=0;for(c=f.length;e<c;e++)if(b=f[e],g=S(a,b,"x"),d=S(a,b,"y"),null==g.from&&(g.from=g.axis.min),null==g.to&&(g.to=g.axis.max),null==d.from&&(d.from=d.axis.min),null==d.to&&(d.to=d.axis.max),!(g.to<g.axis.min||g.from>g.axis.max||d.to<d.axis.min||d.from>d.axis.max))g.from=Math.max(g.from,g.axis.min),g.to=Math.min(g.to,g.axis.max),d.from=Math.max(d.from,d.axis.min),d.to=Math.min(d.to,
d.axis.max),g.from==g.to&&d.from==d.to||(g.from=g.axis.p2c(g.from),g.to=g.axis.p2c(g.to),d.from=d.axis.p2c(d.from),d.to=d.axis.p2c(d.to),g.from==g.to||d.from==d.to?(g=["M",g.from,",",d.from,"L",g.to,",",d.to].join(""),a.canvas.path(g).transform(w).attr({stroke:b.color||a.options.grid.markingsColor,"stroke-width":b.lineWidth||a.options.grid.markingsLineWidth})):a.canvas.rect(g.from,d.to,g.to-g.from,d.from-d.to).transform(w).attr({fill:b.color||a.options.grid.markingsColor}))}b=F(a);c=a.options.grid.borderWidth;
f=0;for(e=b.length;f<e;f++)if(d=b[f],g=d.box,m=d.tickLength,d.show&&0!=d.ticks.length){"x"==d.direction?(p=0,l="full"==m?"top"==d.position?0:a.plotHeight:g.top-a.plotOffset.top+("top"==d.position?g.height:0)):(l=0,p="full"==m?"left"==d.position?0:a.plotWidth:g.left-a.plotOffset.left+("left"==d.position?g.width:0));A=d.options.tickColor||t.parse(d.options.color).scale("a",0.22).toString();C=t.parse(A).a;d.innermost||(s=x=0,"x"==d.direction?s=a.plotWidth:x=a.plotHeight,p=Math.floor(p)+0.5,l=Math.floor(l)+
0.5,g=["M",p,",",l,"L",p+s,",",l+x].join(""),a.canvas.path(g).transform(w).attr({stroke:A,opacity:C}));g=[];i=0;for(j=d.ticks.length;i<j;i++)h=d.ticks[i].v,s=x=0,h<d.min||h>d.max||"full"==m&&0<c&&(h==d.min||h==d.max)||("x"==d.direction?(p=d.p2c(h),x="full"==m?-a.plotHeight:m,"top"==d.position&&(x=-x)):(l=d.p2c(h),s="full"==m?-a.plotWidth:m,"left"==d.position&&(s=-s)),"x"==d.direction?p=Math.floor(p)+0.5:l=Math.floor(l)+0.5,g.push("M",p," ",l,"L",p+s," ",l+x));g=g.join("");g=a.canvas.path(g).transform(w).attr({stroke:A,
opacity:C});a.options.grid.hoverable&&g.data("plotr",a).mousemove(D)}c&&a.canvas.rect(-c/2,-c/2,a.plotWidth+c,a.plotHeight+c).transform(w).attr({stroke:a.options.grid.borderColor,"stroke-width":c})}function U(a){var b=a.canvas,e=F(a),c,f,d,h,i,j,g,m,p,l,s,x,w,k;f=0;for(d=e.length;f<d;f++)if(c=e[f],c.show&&0!=c.ticks.length){l=c.box;h=c.font;s={"text-anchor":"start","font-family":h.family,"font-style":h.style,"font-weight":h.weight,fill:c.options.color};i=0;for(j=c.ticks.length;i<j;i++)if(h=c.ticks[i],
h.label&&!(h.v<c.min||h.v>c.max)){m=k=0;for(p=h.lines.length;m<p;m++)g=h.lines[m],"x"==c.direction?(x=a.plotOffset.left+c.p2c(h.v)-g.width/2,w="bottom"==c.position?l.top+l.padding:l.top+l.height-l.padding-h.height):(w=a.plotOffset.top+c.p2c(h.v)-h.height/2,x="left"==c.position?l.left+l.width-l.padding-g.width:l.left+l.padding),w+=g.height/2+k,k+=g.height,b.text(x,w,g.text).attr(s)}}}function ga(a,b){function e(b,c,d,e,f,g){var h=b.points,b=b.pointsize,i=null,q=null,r,n,o,u,k,v,t=[];r=b;for(n=h.length;r<
n;r+=b)if(o=h[r-b],u=h[r-b+1],k=h[r],v=h[r+1],!(null==o||null==k)){if(u<=v&&u<g.min){if(v<g.min)continue;o=(g.min-u)/(v-u)*(k-o)+o;u=g.min}else if(v<=u&&v<g.min){if(u<g.min)continue;k=(g.min-u)/(v-u)*(k-o)+o;v=g.min}if(u>=v&&u>g.max){if(v>g.max)continue;o=(g.max-u)/(v-u)*(k-o)+o;u=g.max}else if(v>=u&&v>g.max){if(u>g.max)continue;k=(g.max-u)/(v-u)*(k-o)+o;v=g.max}if(o<=k&&o<f.min){if(k<f.min)continue;u=(f.min-o)/(k-o)*(v-u)+u;o=f.min}else if(k<=o&&k<f.min){if(o<f.min)continue;v=(f.min-o)/(k-o)*(v-
u)+u;k=f.min}if(o>=k&&o>f.max){if(k>f.max)continue;u=(f.max-o)/(k-o)*(v-u)+u;o=f.max}else if(k>=o&&k>f.max){if(o>f.max)continue;v=(f.max-o)/(k-o)*(v-u)+u;k=f.max}(o!=i||u!=q)&&t.push("M",f.p2c(o)+d," ",g.p2c(u)+e);i=k;q=v;t.push("L",f.p2c(k)+d," ",g.p2c(v)+e)}a.canvas.path(t).transform(j).attr(c)}function c(b,c,d,e){for(var f=b.points,b=b.pointsize,g=Math.min(Math.max(0,e.min),e.max),h=0,i,q,r,n,k=i,u=r,t=!1,v=1,y=0,B=0,z=[];!(0<b&&h>f.length+b);){h+=b;i=f[h-b];q=f[h-b+v];r=f[h];n=f[h+v];if(t){if(0<
b&&null!=i&&null==r){B=h;b=-b;v=2;continue}if(0>b&&h==y+b){a.canvas.path(z.join("")).transform(j).attr(c);t=!1;b=-b;v=1;h=y=B+b;continue}}if(!(null==i||null==r)){if(i<=r&&i<d.min){if(r<d.min)continue;q=(d.min-i)/(r-i)*(n-q)+q;i=d.min}else if(r<=i&&r<d.min){if(i<d.min)continue;n=(d.min-i)/(r-i)*(n-q)+q;r=d.min}if(i>=r&&i>d.max){if(r>d.max)continue;q=(d.max-i)/(r-i)*(n-q)+q;i=d.max}else if(r>=i&&r>d.max){if(i>d.max)continue;n=(d.max-i)/(r-i)*(n-q)+q;r=d.max}t||(z=["M",d.p2c(i)," ",e.p2c(g)],t=!0);if(q>=
e.max&&n>=e.max)z.push("L",d.p2c(i)," ",e.p2c(e.max)),z.push("L",d.p2c(r)," ",e.p2c(e.max));else if(q<=e.min&&n<=e.min)z.push("L",d.p2c(i)," ",e.p2c(e.min)),z.push("L",d.p2c(r)," ",e.p2c(e.min));else if(k=i,u=r,q<=n&&q<e.min&&n>=e.min?(i=(e.min-q)/(n-q)*(r-i)+i,q=e.min):n<=q&&n<e.min&&q>=e.min&&(r=(e.min-q)/(n-q)*(r-i)+i,n=e.min),q>=n&&q>e.max&&n<=e.max?(i=(e.max-q)/(n-q)*(r-i)+i,q=e.max):n>=q&&n>e.max&&q<=e.max&&(r=(e.max-q)/(n-q)*(r-i)+i,n=e.max),i!=k&&z.push("L",d.p2c(k)," ",e.p2c(q)),z.push("L",
d.p2c(i)," ",e.p2c(q)),z.push("L",d.p2c(r)," ",e.p2c(n)),r!=u)z.push("L",d.p2c(r)," ",e.p2c(n)),z.push("L",d.p2c(u)," ",e.p2c(n))}}}var f=a.series[b],d=f.lines.lineWidth,h=f.shadowSize,i,j="t"+a.plotOffset.left+","+a.plotOffset.top,g={"stroke-linejoin":"round","stroke-width":1,stroke:"#000"};0<d&&0<h&&(g["stroke-width"]=h,g.stroke="rgba(0,0,0,0.1)",i=Math.PI/18,e(f.datapoints,g,Math.sin(i)*(d/2+h/2),Math.cos(i)*(d/2+h/2),f.xaxis,f.yaxis),g["stroke-width"]=h/2,e(f.datapoints,g,Math.sin(i)*(d/2+h/4),
Math.cos(i)*(d/2+h/4),f.xaxis,f.yaxis));g["stroke-width"]=d;g.stroke=f.color;if(h=I(f.lines,f.color))g.fill=h,c(f.datapoints,g,f.xaxis,f.yaxis);0<d&&e(f.datapoints,g,0,0,f.xaxis,f.yaxis)}function ha(a,b){function e(c,e,d,f,g,h,i,j,o,u){var t,v,y,B;j?(B=v=y=!0,t=!1,j=d,d=e+f,g=e+g,c<j&&(e=c,c=j,j=e,t=!0,v=!1)):(t=v=y=!0,B=!1,j=c+f,c+=g,g=d,d=e,d<g&&(e=d,d=g,g=e,B=!0,y=!1));if(!(c<h.min||j>h.max||d<i.min||g>i.max)){j<h.min&&(j=h.min,t=!1);c>h.max&&(c=h.max,v=!1);g<i.min&&(g=i.min,B=!1);d>i.max&&(d=
i.max,y=!1);j=h.p2c(j);g=i.p2c(g);c=h.p2c(c);d=i.p2c(d);a.canvas.setStart();p&&(h=["M",j," ",g,"L",j," ",d,"L",c," ",d,"L",c," ",g],a.canvas.path(h.join("")).transform(k).attr({fill:p}));if(0<o&&(t||v||y||B))h=["M",j," ",g,t?"L":"M",j," ",d,y?"L":"M",c," ",d,v?"L":"M",c," ",g,B?"L":"M",j," ",g],a.canvas.path(h.join("")).transform(k).attr(l);h=a.canvas.setFinish();h.hover=!1;if(a.options.grid.hoverable)return o=a.canvas.rect(j-(t?o/2:0),d-(y?o/2:0),c-j+(v||t?o:0),g-d+(B||y?o:0)),o.transform(k).attr({stroke:null,
opacity:0}).data("plotr",a).data("item",{seriesIndex:b,dataIndex:u}).data("set",h).mousemove(function(a,b,c){D.call(this,"plothover",b,c)}).click(function(a,b,c){D.call(this,"plotclick",b,c)}),a.options.grid.autoHighlight&&o.hover(M,N),l&&o.data("stroke",l.stroke),p&&o.data("fill",p),o}}var c=a.series[b],f=c.datapoints,d=f.points,f=f.pointsize,h,i,j,g,k="t"+a.plotOffset.left+","+a.plotOffset.top,p=c.bars.fill?I(c.bars,c.color):null,l={"stroke-width":c.bars.lineWidth,stroke:c.color};h="left"==c.bars.align?
0:-c.bars.barWidth/2;i=h+c.bars.barWidth;c.el_=[];j=0;for(g=d.length;j<g;j+=f)null!=d[j]&&c.el_.push(e(d[j],d[j+1],d[j+2],h,i,c.xaxis,c.yaxis,c.bars.horizontal,c.bars.lineWidth,j/f))}function ia(a,b){function e(c,d,e,g,h,i,j){if(!(null==c||null==d||c<g.min||c>g.max||d<h.min||d>h.max))if(c=g.p2c(c),d=h.p2c(d),f.setStart(),"circle"==i?(s&&(f.path(L(c,d+s+s/2,0,180,e)).attr(w),f.path(L(c,d+s/2,0,180,e)).attr(w)),e=f.circle(c,d,e).attr(t)):(s&&(f.path(i(c,d+s+s/2,e,!0)).attr(w),f.path(i(c,d+s/2,e,!0)).attr(w)),
e=f.path(i(c,d,e,!1)).attr(t)),f.setFinish().transform(A),a.options.grid.hoverable)return c="circle"==i?f.circle(c,d,k):f.path(i(c,d,k,!1)),c.transform(A).attr({stroke:null,opacity:0}).data("plotr",a).data("item",{seriesIndex:b,dataIndex:j}).data("set",e).mousemove(function(a,b,c){D.call(this,"plothover",b,c)}).click(function(a,b,c){D.call(this,"plotclick",b,c)}),a.options.grid.autoHighlight&&c.hover(O,P),c}var c=a.series[b],f=a.canvas,d=c.datapoints.points,h=c.datapoints.pointsize,i=c.points.lineWidth,
j=c.shadowSize,g=c.points.radius,k=2*(g+i/2),p=c.points.symbol,l,s=i&&j&&j/2,t={"stroke-width":i,stroke:c.color,fill:I(c.points,c.color)},w={"stroke-width":s,stroke:"rgba(0,0,0,0.1)"},A="t"+a.plotOffset.left+","+a.plotOffset.top;c.el_=[];i=0;j=d.length;for(l=0;i<j;i+=h,l++)c.el_.push(e(d[i],d[i+1],g,c.xaxis,c.yaxis,p,l))}function J(a,b,e,c){this.placeholder=null;this.series=[];this.options={colors:["#edc240","#afd8f8","#cb4b4b","#4da74d","#9440ed"],legend:{show:!0,noColumns:1,labelFormatter:null,
labelBoxBorderColor:"#ccc",container:null,position:"ne",margin:5,backgroundColor:null,backgroundOpacity:0.85},xaxis:{show:null,position:"bottom",mode:null,font:null,color:null,tickColor:null,transform:null,inverseTransform:null,min:null,max:null,autoscaleMargin:null,ticks:null,tickFormatter:null,labelWidth:null,labelHeight:null,reserveSpace:null,tickLength:null,alignTicksWithAxis:null,tickDecimals:null,tickSize:null,minTickSize:null,monthNames:null,timeformat:null,twelveHourClock:!1},yaxis:{autoscaleMargin:0.02,
position:"left"},xaxes:[],yaxes:[],series:{points:{show:!1,radius:3,lineWidth:2,fill:!0,fillColor:"#ffffff",symbol:"circle"},lines:{lineWidth:2,fill:!1,fillColor:null,steps:!1},bars:{show:!1,lineWidth:2,barWidth:1,fill:!0,fillColor:null,align:"left",horizontal:!1},shadowSize:3},grid:{show:!0,aboveData:!1,color:"#545454",backgroundColor:null,borderColor:null,tickColor:null,labelMargin:5,axisMargin:8,borderWidth:2,minBorderMargin:null,markings:null,markingsColor:"#f4f4f4",markingsLineWidth:2,clickable:!1,
hoverable:!1,autoHighlight:!0,mouseActiveRadius:10},interaction:{redrawOverlayInterval:1E3/60},hooks:{}};this.hooks={processOptions:[],processRawData:[],processDatapoints:[],drawSeries:[],draw:[],bindEvents:[],drawOverlay:[],shutdown:[]};this.plotOffset={left:0,right:0,top:0,bottom:0};this.xAxes=[];this.yAxes=[];this.plotHeight=this.plotWidth=this.canvasHeight=this.canvasWidth=0;this.canvas=null;this.initPlugins(c);this.parseOptions(e);this.setupCanvas(a);this.setData(b);this.setupGrid();this.draw()}
var ja=Raphael;t.prototype={constructor:t,scale:function(a,b){var e,c;e=0;for(c=a.length;e<c;e++)this[a.charAt(e)]*=b;return this.normalize()},normalize:function(){function a(a,e,c){return e<a?a:e>c?c:e}this.r=a(0,parseInt(this.r,10),255);this.g=a(0,parseInt(this.g,10),255);this.b=a(0,parseInt(this.b,10),255);this.a=a(0,this.a,1);return this},toString:function(){return 1<=this.a?"rgb("+[this.r,this.g,this.b].join()+")":"rgba("+[this.r,this.g,this.b,this.a].join()+")"}};t.LookupColors={aqua:[0,255,
255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],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],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,
255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0]};t.parse=function(a){var b,e=t;if(b=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(a))return e(parseInt(b[1],10),parseInt(b[2],10),parseInt(b[3],
10));if(b=/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(a))return e(parseInt(b[1],10),parseInt(b[2],10),parseInt(b[3],10),parseFloat(b[4]));if(b=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(a))return e(2.55*parseFloat(b[1]),2.55*parseFloat(b[2]),2.55*parseFloat(b[3]));if(b=/rgba\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(a))return e(2.55*
parseFloat(b[1]),2.55*parseFloat(b[2]),2.55*parseFloat(b[3]),parseFloat(b[4]));if(b=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(a))return e(parseInt(b[1],16),parseInt(b[2],16),parseInt(b[3],16));if(b=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(a))return e(parseInt(b[1]+b[1],16),parseInt(b[2]+b[2],16),parseInt(b[3]+b[3],16));a=a.replace(/^\s+/,"").replace(/\s+$/,"").toLowerCase();if("transparent"==a)return e(255,255,255,0);b=t.LookupColors[a];return e(b[0],b[1],b[2])};t.extract=function(a,
b){var e;do{e=a.css(b).toLowerCase();if(""!=e&&"transparent"!=e)break;a=a.parent()}while(!jQuery.nodeName(a.get(0),"body"));"rgba(0, 0, 0, 0)"==e&&(e="transparent");return t.parse(e)};J.prototype={constructor:J,setupGrid:function(){var a=this.options,b=this.plotOffset,e=this.placeholder,c=F(this),f=a.grid.show,d,h;for(d in b)b.hasOwnProperty(d)&&(b[d]=f?a.grid.borderWidth:0);a=0;for(d=c.length;a<d;a++)h=c[a],h.show=h.options.show,null==h.show&&(h.show=h.used),h.reserveSpace=h.show||h.options.reserveSpace,
W(h);if(f){e={style:e.css("font-style"),size:Math.round(0.8*(+e.css("font-size").replace("px","")||13)),variant:e.css("font-variant"),weight:e.css("font-weight"),family:e.css("font-family")};f=k.grep(c,function(a){return a.reserveSpace});a=0;for(d=c.length;a<d;a++)h=c[a],X(this,h),Y(h),Z(h,h.ticks),h.font=k.extend({},e,h.options.font),$(this,h);for(a=f.length-1;0<=a;a--)aa(this,f[a]);ca(this);a=0;for(d=f.length;a<d;a++)ba(this,f[a])}this.plotWidth=this.canvasWidth-b.left-b.right;this.plotHeight=this.canvasHeight-
b.bottom-b.top;a=0;for(d=c.length;a<d;a++)da(this,c[a]);ea(this)},draw:function(){var a=this.series,b=this.options.grid,e=this.canvas,c,f;e.clear();fa(this);b.show&&!b.aboveData&&(T(this),U(this));c=0;for(f=a.length;c<f;++c){G(this,this.hooks.drawSeries,[e,a[c],c]);var d=c,h=this.series[d];h.lines.show&&ga(this,d);h.bars.show&&ha(this,d);h.points.show&&ia(this,d)}G(this,this.hooks.draw,[e]);b.show&&b.aboveData&&(T(this),U(this))},initPlugins:function(a){var b,e,c;b=0;for(e=a.length;b<e;++b)c=a[b],
c.init(this),c.options&&k.extend(!0,this.options,c.options)},parseOptions:function(a){var b,e,c=this.options,f=this.hooks,d=this.xAxes,h=this.yAxes;k.extend(!0,c,a);c.xaxis.color=c.xaxis.color||c.grid.color;c.yaxis.color=c.yaxis.color||c.grid.color;c.xaxis.tickColor=c.xaxis.tickColor||c.grid.tickColor;c.yaxis.tickColor=c.yaxis.tickColor||c.grid.tickColor;c.grid.borderColor=c.grid.borderColor||c.grid.color;c.grid.tickColor=c.grid.tickColor||t.parse(c.grid.color).scale("a",0.22).toString();a=0;for(b=
Math.max(1,c.xaxes.length);a<b;++a)c.xaxes[a]=k.extend(!0,{},c.xaxis,c.xaxes[a]);a=0;for(b=Math.max(1,c.yaxes.length);a<b;++a)c.yaxes[a]=k.extend(!0,{},c.yaxis,c.yaxes[a]);c.xaxis.noTicks&&null==c.xaxis.ticks&&(c.xaxis.ticks=c.xaxis.noTicks);c.yaxis.noTicks&&null==c.yaxis.ticks&&(c.yaxis.ticks=c.yaxis.noTicks);c.x2axis&&(c.xaxes[1]=k.extend(!0,{},c.xaxis,c.x2axis),c.xaxes[1].position="top");c.y2axis&&(c.yaxes[1]=k.extend(!0,{},c.yaxis,c.y2axis),c.yaxes[1].position="right");c.grid.coloredAreas&&(c.grid.markings=
c.grid.coloredAreas);c.grid.coloredAreasColor&&(c.grid.markingsColor=c.grid.coloredAreasColor);c.lines&&k.extend(!0,c.series.lines,c.lines);c.points&&k.extend(!0,c.series.points,c.points);c.bars&&k.extend(!0,c.series.bars,c.bars);null!=c.shadowSize&&(c.series.shadowSize=c.shadowSize);a=0;for(b=c.xaxes.length;a<b;++a)H(d,a+1,c.xaxes,"x").options=c.xaxes[a];a=0;for(b=c.yaxes.length;a<b;++a)H(h,a+1,c.yaxes,"y").options=c.yaxes[a];for(e in f)f.hasOwnProperty(e)&&c.hooks[e]&&c.hooks[e].length&&(f[e]=f[e].concat(c.hooks[e]));
G(this,f.processOptions,[c])},setupCanvas:function(a){this.placeholder=a=k(a);this.canvasWidth=a.width();this.canvasHeight=a.height();this.canvas=ja(a.get(0),this.canvasWidth,this.canvasHeight)},setData:function(a){var b=[],e,c,f;c=0;for(f=a.length;c<f;++c)e=k.extend(!0,{},this.options.series),null!=a[c].data?(e.data=a[c].data,delete a[c].data,k.extend(!0,e,a[c]),a[c].data=e.data):e.data=a[c],b.push(e);a=this.series=b;b=this.options;e=this.xAxes;c=this.yAxes;var d,h,i;i=a.length;var j=[],g=[],m=[],
p=0,l;f=0;for(d=a.length;f<d;++f)h=a[f].color,null!=h&&(i--,"number"===typeof h?g.push(h):j.push(t.parse(a[f].color)));f=0;for(d=g.length;f<d;++f)i=Math.max(i,g[f]+1);f=0;for(d=b.colors.length;m.length<i;)h=d===f?t(100,100,100):t.parse(b.colors[f]),j=1===p%2?-1:1,h.scale("rgb",1+0.2*j*Math.ceil(p/2)),m.push(h),++f,f>=d&&(f=0,++p);p=f=0;for(d=a.length;f<d;++f){i=a[f];null==i.color?(i.color=m[p].toString(),++p):"number"===typeof i.color&&(i.color=m[i.color].toString());if(null==i.lines.show){h=!0;for(l in i)if(i.hasOwnProperty(l)&&
i[l]&&i[l].show){h=!1;break}h&&(i.lines.show=!0)}i.xaxis=H(e,Q(i,"x"),b.xaxes,"x");i.yaxis=H(c,Q(i,"y"),b.yaxes,"y")}V(this)},getAxes:function(){var a={},b=this.xAxes,e=this.yAxes,c,f,d;f=0;for(d=b.length;f<d;f++)(c=b[f])&&(a[c.direction+(1!=c.n?c.n:"")+"axis"]=c);f=0;for(d=e.length;f<d;f++)(c=e[f])&&(a[c.direction+(1!=c.n?c.n:"")+"axis"]=c);return a},canvasToAxisCoords:function(a){var b={},e,c,f;e=0;for(c=this.xAxes.length;e<c;e++)(f=this.xAxes[e])&&f.used&&(b["x"+f.n]=f.c2p(a.left));e=0;for(c=this.yAxes.length;e<
c;++e)(f=this.yAxes[e])&&f.used&&(b["y"+f.n]=f.c2p(a.top));b.x1!==K&&(b.x=b.x1);b.y1!==K&&(b.y=b.y1);return b},axisToCanvasCoords:function(a){var b={},e,c,f,d;c=0;for(f=this.xAxes.length;c<f;c++)if((d=this.xAxes[c])&&d.used)if(e="x"+d.n,null==a[e]&&1==d.n&&(e="x"),null!=a[e]){b.left=d.p2c(a[e]);break}c=0;for(f=this.yAxes.length;c<f;++c)if((d=this.yAxes[c])&&d.used)if(e="y"+d.n,null==a[e]&&1==d.n&&(e="y"),null!=a[e]){b.top=d.p2c(a[e]);break}return b},getPlaceholder:function(){return this.placeholder},
getCanvas:function(){return this.canvas},getPlotOffset:function(){return this.plotOffset},getData:function(){return this.series},getXAxes:function(){return this.xAxes},getYAxes:function(){return this.yAxes},getOptions:function(){return this.options},highlight:function(a,b,e){if(a.el_){"number"===typeof a&&(a=this.series[a]);if("number"==typeof b)b=a.el_[b];else throw"not supported";!e&&b.data("highlight",!0);a.bars.show&&M.apply(b);a.points.show&&O.apply(b)}},unhighlight:function(a,b){var e;if(a.el_){"number"===
typeof a&&(a=this.series[a]);if("number"==typeof b)e=a.el_[b];else throw"not supported";e.removeData("highlight");a.bars.show&&N.apply(e);a.points.show&&P.apply(e)}},highlighted:function(a,b){var e;if(!a.el_)return!1;"number"===typeof a&&(a=this.series[a]);if("number"==typeof b)e=a.el_[b];else throw"not supported";return e&&!!e.data("highlight")}};k.plotr=function(a,b,e){return new J(a,b,e,k.plotr.plugins)};k.plotr.version="0.1";k.plotr.plugins=[];k.plotr._plot=k.plotr;k.plot=k.plotr;k.plotr.formatDate=
function(a,b,e){var c=[],f=!1,d=!1,h=a.getUTCHours(),i=12>h,j,g,k,p=function(a){a=""+a;return 1===a.length?"0"+a:a},e=e||"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(",");-1!==b.search(/%p|%P/)&&(12<h?h-=12:0===h&&(h=12));j=0;for(k=b.length;j<k;++j)if(g=b.charAt(j),f){switch(g){case "h":g=""+h;break;case "H":g=p(h);break;case "M":g=p(a.getUTCMinutes());break;case "S":g=p(a.getUTCSeconds());break;case "d":g=""+a.getUTCDate();break;case "m":g=""+(a.getUTCMonth()+1);break;case "y":g=""+a.getUTCFullYear();
break;case "b":g=""+e[a.getUTCMonth()];break;case "p":g=i?"am":"pm";break;case "P":g=i?"AM":"PM";break;case "0":g="",d=!0}g&&d&&(g=p(g),d=!1);c.push(g);d||(f=!1)}else"%"===g?f=!0:c.push(g);return c.join("")}})(jQuery);