2020-11-23 20:15:40 -07:00
|
|
|
!function(R){R.jqplot.DateAxisRenderer=function(){R.jqplot.LinearAxisRenderer.call(this),this.date=new R.jsDate};var t=1e3,i=6e4,e=36e5,O=24*e,s=7*O,A=30.4368499*O,L=365.242199*O,N=["%M:%S.%#N","%M:%S.%#N","%M:%S.%#N","%M:%S","%M:%S","%M:%S","%M:%S","%H:%M:%S","%H:%M:%S","%H:%M","%H:%M","%H:%M","%H:%M","%H:%M","%H:%M","%a %H:%M","%a %H:%M","%b %e %H:%M","%b %e %H:%M","%b %e %H:%M","%b %e %H:%M","%v","%v","%v","%v","%v","%v","%v"],z=[100,200,500,t,2e3,5e3,1e4,15e3,3e4,i,2*i,3e5,6e5,9e5,18e5,e,2*e,4*e,6*e,8*e,12*e,O,2*O,3*O,4*O,5*O,s,2*s];R.jqplot.DateAxisRenderer.prototype=new R.jqplot.LinearAxisRenderer,R.jqplot.DateAxisRenderer.prototype.constructor=R.jqplot.DateAxisRenderer,R.jqplot.DateTickFormatter=function(t,i){return t=t||"%Y/%m/%d",R.jsDate.strftime(i,t)},R.jqplot.DateAxisRenderer.prototype.init=function(t){this.tickOptions.formatter=R.jqplot.DateTickFormatter,this.tickInset=0,this.drawBaseline=!0,this.baselineWidth=null,this.baselineColor=null,this.daTickInterval=null,this._daTickInterval=null,R.extend(!0,this,t);for(var i,e,s,n,a,r,h,l=this._dataBounds,m=0;m<this._series.length;m++){i={intervals:[],frequencies:{},sortedIntervals:[],min:null,max:null,mean:null},e=0,n=(s=this._series[m]).data,a=s._plotData,r=s._stackData;for(var o=h=0;o<n.length;o++)"xaxis"==this.name||"x2axis"==this.name?(n[o][0]=new R.jsDate(n[o][0]).getTime(),a[o][0]=new R.jsDate(n[o][0]).getTime(),r[o][0]=new R.jsDate(n[o][0]).getTime(),(null!=n[o][0]&&n[o][0]<l.min||null==l.min)&&(l.min=n[o][0]),(null!=n[o][0]&&n[o][0]>l.max||null==l.max)&&(l.max=n[o][0]),0<o&&(h=Math.abs(n[o][0]-n[o-1][0]),i.intervals.push(h),i.frequencies.hasOwnProperty(h)?i.frequencies[h]+=1:i.frequencies[h]=1),e+=h):(n[o][1]=new R.jsDate(n[o][1]).getTime(),a[o][1]=new R.jsDate(n[o][1]).getTime(),r[o][1]=new R.jsDate(n[o][1]).getTime(),(null!=n[o][1]&&n[o][1]<l.min||null==l.min)&&(l.min=n[o][1]),(null!=n[o][1]&&n[o][1]>l.max||null==l.max)&&(l.max=n[o][1]),0<o&&(h=Math.abs(n[o][1]-n[o-1][1]),i.intervals.push(h),i.frequencies.hasOwnProperty(h)?i.frequencies[h]+=1:i.frequencies[h]=1)),e+=h;if(s.renderer.bands){if(s.renderer.bands.hiData.length)for(var o=0,c=(u=s.renderer.bands.hiData).length;o<c;o++)"xaxis"===this.name||"x2axis"===this.name?(u[o][0]=new R.jsDate(u[o][0]).getTime(),(null!=u[o][0]&&u[o][0]>l.max||null==l.max)&&(l.max=u[o][0])):(u[o][1]=new R.jsDate(u[o][1]).getTime(),(null!=u[o][1]&&u[o][1]>l.max||null==l.max)&&(l.max=u[o][1]));if(s.renderer.bands.lowData.length)for(var u,o=0,c=(u=s.renderer.bands.lowData).length;o<c;o++)"xaxis"===this.name||"x2axis"===this.name?(u[o][0]=new R.jsDate(u[o][0]).getTime(),(null!=u[o][0]&&u[o][0]<l.min||null==l.min)&&(l.min=u[o][0])):(u[o][1]=new R.jsDate(u[o][1]).getTime(),(null!=u[o][1]&&u[o][1]<l.min||null==l.min)&&(l.min=u[o][1]))}for(var k in i.frequencies)i.sortedIntervals.push({interval:k,frequency:i.frequencies[k]});i.sortedIntervals.sort(function(t,i){return i.frequency-t.frequency}),i.min=R.jqplot.arrayMin(i.intervals),i.max=R.jqplot.arrayMax(i.intervals),i.mean=e/n.length,this._intervalStats.push(i),i=e=s=n=a=r=null}l=null},R.jqplot.DateAxisRenderer.prototype.reset=function(){this.min=this._options.min,this.max=this._options.max,this.tickInterval=this._options.tickInterval,this.numberTicks=this._options.numberTicks,this._autoFormatString="",this._overrideFormatString&&this.tickOptions&&this.tickOptions.formatString&&(this.tickOptions.formatString=""),this.daTickInterval=this._daTickInterval},R.jqplot.DateAxisRenderer.prototype.createTicks=function(t){this._ticks;var i,e,s=this.ticks,n=this.name,a=this._dataBounds,r=(this._intervalStats,"x"===this.name.charAt(0)?this._plotDimensions.width:this._plotDimensions.height),h=1,l=null;null!=this.tickInterval&&(Number(this.tickInterval)?l=[Number(this.tickInterval),"seconds"]:"string"==typeof this.tickInterval&&(1==(e=this.tickInterval.split(" ")).length?l=[1,e[0]]:2==e.length&&(l=[e[0],e[1]])));this.tickInterval;y=new R.jsDate(null!=this.min?this.min:a.min).getTime(),i=new R.jsDate(null!=this.max?this.max:a.max).getTime();var m=t.plugins.cursor;m&&m._zoom&&m._zoom.zooming&&(thi
|