All Downloads are FREE. Search and download functionalities are using the official Maven repository.

META-INF.resources.bower_components.jqplot-jwebswing.jquery.jqplot.min.js Maven / Gradle / Ivy

There is a newer version: 1.2.2.1-jre17
Show newest version
(function($){var undefined;$.fn.emptyForce=function(){for(var i=0,elem;(elem=$(this)[i])!=null;i++){if(elem.nodeType===1){$.cleanData(elem.getElementsByTagName("*"))}if($.jqplot.use_excanvas){elem.outerHTML=""}else{while(elem.firstChild){elem.removeChild(elem.firstChild)}}elem=null}return $(this)};$.fn.removeChildForce=function(parent){while(parent.firstChild){this.removeChildForce(parent.firstChild);parent.removeChild(parent.firstChild)}};$.fn.jqplot=function(){var datas=[];var options=[];for(var i=0,l=arguments.length;i'+msg+"
");$("#"+target).addClass("jqplot-error");document.getElementById(target).style.background=$.jqplot.config.errorBackground;document.getElementById(target).style.border=$.jqplot.config.errorBorder;document.getElementById(target).style.fontFamily=$.jqplot.config.errorFontFamily;document.getElementById(target).style.fontSize=$.jqplot.config.errorFontSize;document.getElementById(target).style.fontStyle=$.jqplot.config.errorFontStyle;document.getElementById(target).style.fontWeight=$.jqplot.config.errorFontWeight}}else{plot.init(target,_data,_options);plot.draw();plot.themeEngine.init.call(plot);return plot}};$.jqplot.version="1.0.9";$.jqplot.revision="d96a669";$.jqplot.targetCounter=1;$.jqplot.CanvasManager=function(){if(typeof $.jqplot.CanvasManager.canvases=="undefined"){$.jqplot.CanvasManager.canvases=[];$.jqplot.CanvasManager.free=[]}var myCanvases=[];this.getCanvas=function(){var canvas;var makeNew=true;if(!$.jqplot.use_excanvas){for(var i=0,l=$.jqplot.CanvasManager.canvases.length;i1&&(cctx.webkitBackingStorePixelRatio===undefined||cctx.webkitBackingStorePixelRatio<2)){canvasBackingScale=window.devicePixelRatio}var oldWidth=canvas.width;var oldHeight=canvas.height;canvas.width=canvasBackingScale*canvas.width;canvas.height=canvasBackingScale*canvas.height;canvas.style.width=oldWidth+"px";canvas.style.height=oldHeight+"px";cctx.save();cctx.scale(canvasBackingScale,canvasBackingScale);return canvas};this.freeAllCanvases=function(){for(var i=0,l=myCanvases.length;i887){$.jqplot.support_canvas_text.result=true}else{$.jqplot.support_canvas_text.result=!!(document.createElement("canvas").getContext&&typeof document.createElement("canvas").getContext("2d").fillText=="function")}}return $.jqplot.support_canvas_text.result};$.jqplot.use_excanvas=(!$.support.boxModel||!$.support.objectAll||!$support.leadingWhitespace)&&!$.jqplot.support_canvas()?true:false;$.jqplot.preInitHooks=[];$.jqplot.postInitHooks=[];$.jqplot.preParseOptionsHooks=[];$.jqplot.postParseOptionsHooks=[];$.jqplot.preDrawHooks=[];$.jqplot.postDrawHooks=[];$.jqplot.preDrawSeriesHooks=[];$.jqplot.postDrawSeriesHooks=[];$.jqplot.preDrawLegendHooks=[];$.jqplot.addLegendRowHooks=[];$.jqplot.preSeriesInitHooks=[];$.jqplot.postSeriesInitHooks=[];$.jqplot.preParseSeriesOptionsHooks=[];$.jqplot.postParseSeriesOptionsHooks=[];$.jqplot.eventListenerHooks=[];$.jqplot.preDrawSeriesShadowHooks=[];$.jqplot.postDrawSeriesShadowHooks=[];$.jqplot.ElemContainer=function(){this._elem;this._plotWidth;this._plotHeight;this._plotDimensions={height:null,width:null}};$.jqplot.ElemContainer.prototype.createElement=function(el,offsets,clss,cssopts,attrib){this._offsets=offsets;var klass=clss||"jqplot";var elem=document.createElement(el);this._elem=$(elem);this._elem.addClass(klass);this._elem.css(cssopts);this._elem.attr(attrib);elem=null;return this._elem};$.jqplot.ElemContainer.prototype.getWidth=function(){if(this._elem){return this._elem.outerWidth(true)}else{return null}};$.jqplot.ElemContainer.prototype.getHeight=function(){if(this._elem){return this._elem.outerHeight(true)}else{return null}};$.jqplot.ElemContainer.prototype.getPosition=function(){if(this._elem){return this._elem.position()}else{return{top:null,left:null,bottom:null,right:null}}};$.jqplot.ElemContainer.prototype.getTop=function(){return this.getPosition().top};$.jqplot.ElemContainer.prototype.getLeft=function(){return this.getPosition().left};$.jqplot.ElemContainer.prototype.getBottom=function(){return this._elem.css("bottom")};$.jqplot.ElemContainer.prototype.getRight=function(){return this._elem.css("right")};function Axis(name){$.jqplot.ElemContainer.call(this);this.name=name;this._series=[];this.show=false;this.tickRenderer=$.jqplot.AxisTickRenderer;this.tickOptions={};this.labelRenderer=$.jqplot.AxisLabelRenderer;this.labelOptions={};this.label=null;this.showLabel=true;this.min=null;this.max=null;this.autoscale=false;this.pad=1.2;this.padMax=null;this.padMin=null;this.ticks=[];this.numberTicks;this.tickInterval;this.renderer=$.jqplot.LinearAxisRenderer;this.rendererOptions={};this.showTicks=true;this.showTickMarks=true;this.showMinorTicks=true;this.drawMajorGridlines=true;this.drawMinorGridlines=false;this.drawMajorTickMarks=true;this.drawMinorTickMarks=true;this.useSeriesColor=false;this.borderWidth=null;this.borderColor=null;this.scaleToHiddenSeries=false;this._dataBounds={min:null,max:null};this._intervalStats=[];this._offsets={min:null,max:null};this._ticks=[];this._label=null;this.syncTicks=null;this.tickSpacing=75;this._min=null;this._max=null;this._tickInterval=null;this._numberTicks=null;this.__ticks=null;this._options={}}Axis.prototype=new $.jqplot.ElemContainer;Axis.prototype.constructor=Axis;Axis.prototype.init=function(){if($.isFunction(this.renderer)){this.renderer=new this.renderer}this.tickOptions.axis=this.name;if(this.tickOptions.showMark==null){this.tickOptions.showMark=this.showTicks}if(this.tickOptions.showMark==null){this.tickOptions.showMark=this.showTickMarks}if(this.tickOptions.showLabel==null){this.tickOptions.showLabel=this.showTicks}if(this.label==null||this.label==""){this.showLabel=false}else{this.labelOptions.label=this.label}if(this.showLabel==false){this.labelOptions.show=false}if(this.pad==0){this.pad=1}if(this.padMax==0){this.padMax=1}if(this.padMin==0){this.padMin=1}if(this.padMax==null){this.padMax=(this.pad-1)/2+1}if(this.padMin==null){this.padMin=(this.pad-1)/2+1}this.pad=this.padMax+this.padMin-1;if(this.min!=null||this.max!=null){this.autoscale=false}if(this.syncTicks==null&&this.name.indexOf("y")>-1){this.syncTicks=true}else if(this.syncTicks==null){this.syncTicks=false}this.renderer.init.call(this,this.rendererOptions)};Axis.prototype.draw=function(ctx,plot){if(this.__ticks){this.__ticks=null}return this.renderer.draw.call(this,ctx,plot)};Axis.prototype.set=function(){this.renderer.set.call(this)};Axis.prototype.pack=function(pos,offsets){if(this.show){this.renderer.pack.call(this,pos,offsets)}if(this._min==null){this._min=this.min;this._max=this.max;this._tickInterval=this.tickInterval;this._numberTicks=this.numberTicks;this.__ticks=this._ticks}};Axis.prototype.reset=function(){this.renderer.reset.call(this)};Axis.prototype.resetScale=function(opts){$.extend(true,this,{min:null,max:null,numberTicks:null,tickInterval:null,_ticks:[],ticks:[]},opts);this.resetDataBounds()};Axis.prototype.resetDataBounds=function(){var db=this._dataBounds;db.min=null;db.max=null;var l,s,d;var doforce=this.show?true:false;for(var i=0;idb.max||db.max==null){db.max=d[j][0]}}else{if(d[j][minyidx]!=null&&d[j][minyidx]db.max||db.max==null){db.max=d[j][maxyidx]}}}if(doforce&&s.renderer.constructor!==$.jqplot.BarRenderer){doforce=false}else if(doforce&&this._options.hasOwnProperty("forceTickAt0")&&this._options.forceTickAt0==false){doforce=false}else if(doforce&&s.renderer.constructor===$.jqplot.BarRenderer){if(s.barDirection=="vertical"&&this.name!="xaxis"&&this.name!="x2axis"){if(this._options.pad!=null||this._options.padMin!=null){doforce=false}}else if(s.barDirection=="horizontal"&&(this.name=="xaxis"||this.name=="x2axis")){if(this._options.pad!=null||this._options.padMin!=null){doforce=false}}}}}if(doforce&&this.renderer.constructor===$.jqplot.LinearAxisRenderer&&db.min>=0){this.padMin=1;this.forceTickAt0=true}};function Legend(options){$.jqplot.ElemContainer.call(this);this.show=false;this.location="ne";this.labels=[];this.showLabels=true;this.showSwatches=true;this.placement="insideGrid";this.xoffset=0;this.yoffset=0;this.border;this.background;this.textColor;this.fontFamily;this.fontSize;this.rowSpacing="0.5em";this.renderer=$.jqplot.TableLegendRenderer;this.rendererOptions={};this.preDraw=false;this.marginTop=null;this.marginRight=null;this.marginBottom=null;this.marginLeft=null;this.escapeHtml=false;this._series=[];$.extend(true,this,options)}Legend.prototype=new $.jqplot.ElemContainer;Legend.prototype.constructor=Legend;Legend.prototype.setOptions=function(options){$.extend(true,this,options);if(this.placement=="inside"){this.placement="insideGrid"}if(this.xoffset>0){if(this.placement=="insideGrid"){switch(this.location){case"nw":case"w":case"sw":if(this.marginLeft==null){this.marginLeft=this.xoffset+"px"}this.marginRight="0px";break;case"ne":case"e":case"se":default:if(this.marginRight==null){this.marginRight=this.xoffset+"px"}this.marginLeft="0px";break}}else if(this.placement=="outside"){switch(this.location){case"nw":case"w":case"sw":if(this.marginRight==null){this.marginRight=this.xoffset+"px"}this.marginLeft="0px";break;case"ne":case"e":case"se":default:if(this.marginLeft==null){this.marginLeft=this.xoffset+"px"}this.marginRight="0px";break}}this.xoffset=0}if(this.yoffset>0){if(this.placement=="outside"){switch(this.location){case"sw":case"s":case"se":if(this.marginTop==null){this.marginTop=this.yoffset+"px"}this.marginBottom="0px";break;case"ne":case"n":case"nw":default:if(this.marginBottom==null){this.marginBottom=this.yoffset+"px"}this.marginTop="0px";break}}else if(this.placement=="insideGrid"){switch(this.location){case"sw":case"s":case"se":if(this.marginBottom==null){this.marginBottom=this.yoffset+"px"}this.marginTop="0px";break;case"ne":case"n":case"nw":default:if(this.marginTop==null){this.marginTop=this.yoffset+"px"}this.marginBottom="0px";break}}this.yoffset=0}};Legend.prototype.init=function(){if($.isFunction(this.renderer)){this.renderer=new this.renderer}this.renderer.init.call(this,this.rendererOptions)};Legend.prototype.draw=function(offsets,plot){for(var i=0;i<$.jqplot.preDrawLegendHooks.length;i++){$.jqplot.preDrawLegendHooks[i].call(this,offsets)}return this.renderer.draw.call(this,offsets,plot)};Legend.prototype.pack=function(offsets){this.renderer.pack.call(this,offsets)};function Title(text){$.jqplot.ElemContainer.call(this);this.text=text;this.show=true;this.fontFamily;this.fontSize;this.textAlign;this.textColor;this.renderer=$.jqplot.DivTitleRenderer;this.rendererOptions={};this.escapeHtml=false}Title.prototype=new $.jqplot.ElemContainer;Title.prototype.constructor=Title;Title.prototype.init=function(){if($.isFunction(this.renderer)){this.renderer=new this.renderer}this.renderer.init.call(this,this.rendererOptions)};Title.prototype.draw=function(width){return this.renderer.draw.call(this,width)};Title.prototype.pack=function(){this.renderer.pack.call(this)};function Series(options){options=options||{};$.jqplot.ElemContainer.call(this);this.show=true;this.xaxis="xaxis";this._xaxis;this.yaxis="yaxis";this._yaxis;this.gridBorderWidth=2;this.renderer=$.jqplot.LineRenderer;this.rendererOptions={};this.data=[];this.gridData=[];this.label="";this.showLabel=true;this.color;this.negativeColor;this.lineWidth=2.5;this.lineJoin="round";this.lineCap="round";this.linePattern="solid";this.shadow=true;this.shadowAngle=45;this.shadowOffset=1.25;this.shadowDepth=3;this.shadowAlpha="0.1";this.breakOnNull=false;this.markerRenderer=$.jqplot.MarkerRenderer;this.markerOptions={};this.showLine=true;this.showMarker=true;this.index;this.fill=false;this.fillColor;this.fillAlpha;this.fillAndStroke=false;this.disableStack=false;this._stack=false;this.neighborThreshold=4;this.fillToZero=false;this.fillToValue=0;this.fillAxis="y";this.useNegativeColors=true;this._stackData=[];this._plotData=[];this._plotValues={x:[],y:[]};this._intervals={x:{},y:{}};this._prevPlotData=[];this._prevGridData=[];this._stackAxis="y";this._primaryAxis="_xaxis";this.canvas=new $.jqplot.GenericCanvas;this.shadowCanvas=new $.jqplot.GenericCanvas;this.plugins={};this._sumy=0;this._sumx=0;this._type="";this.step=false}Series.prototype=new $.jqplot.ElemContainer;Series.prototype.constructor=Series;Series.prototype.init=function(index,gridbw,plot){this.index=index;this.gridBorderWidth=gridbw;var d=this.data;var temp=[],i,l;for(i=0,l=d.length;i
');this.target.append(temp);temp.height(eh);temp.width(ew);temp.css("top",this.eventCanvas._offsets.top);temp.css("left",this.eventCanvas._offsets.left);var temp2=$('
');temp.append(temp2);temp2.html(this.noDataIndicator.indicator);var th=temp2.height();var tw=temp2.width();temp2.height(th);temp2.width(tw);temp2.css("top",(eh-th)/2+"px")})}}this.data=$.extend(true,[],data);this.parseOptions(options);if(this.textColor){this.target.css("color",this.textColor)}if(this.fontFamily){this.target.css("font-family",this.fontFamily)}if(this.fontSize){this.target.css("font-size",this.fontSize)}this.title.init();this.legend.init();this._sumy=0;this._sumx=0;this.computePlotData();for(var i=0;i0){for(var j=index;j--;){var prevval=this._plotData[j][k][sidx];if(temp*prevval>=0){this._plotData[index][k][sidx]+=prevval;this._stackData[index][k][sidx]+=prevval;break}}}}}else{for(var i=0;i0){series._prevPlotData=this.series[index-1]._plotData}series._sumy=0;series._sumx=0;for(i=series.data.length-1;i>-1;i--){series._sumy+=series.data[i][1];series._sumx+=series.data[i][0]}}};this.populatePlotData=function(series,index){this._plotData=[];this._stackData=[];series._stackData=[];series._plotData=[];var plotValues={x:[],y:[]};if(this.stackSeries&&!series.disableStack){series._stack=true;var sidx=series._stackAxis==="x"?0:1;var temp=$.extend(true,[],series.data);var plotdata=$.extend(true,[],series.data);var tempx,tempy,dval,stackval,comparator;for(var j=0;j=0){plotdata[k][sidx]+=stackval}}}for(var i=0;i0){series._prevPlotData=this.series[index-1]._plotData}series._sumy=0;series._sumx=0;for(i=series.data.length-1;i>-1;i--){series._sumy+=series.data[i][1];series._sumx+=series.data[i][0]}};this.getNextSeriesColor=function(t){var idx=0;var sc=t.seriesColors;return function(){if(idx=0&&widthAdj>=0){gridPadding.top+=heightAdj;gridPadding.bottom+=heightAdj;gridPadding.left+=widthAdj;gridPadding.right+=widthAdj}}var arr=["top","bottom","left","right"];for(var n in arr){if(this._gridPadding[arr[n]]==null&&gridPadding[arr[n]]>0){this._gridPadding[arr[n]]=gridPadding[arr[n]]}else if(this._gridPadding[arr[n]]==null){this._gridPadding[arr[n]]=this._defaultGridPadding[arr[n]]}}var legendPadding=this._gridPadding;if(this.legend.placement==="outsideGrid"){legendPadding={top:this.title.getHeight(),left:0,right:0,bottom:0};if(this.legend.location==="s"){legendPadding.left=this._gridPadding.left;legendPadding.right=this._gridPadding.right}}ax.xaxis.pack({position:"absolute",bottom:this._gridPadding.bottom-ax.xaxis.getHeight(),left:0,width:this._width},{min:this._gridPadding.left,max:this._width-this._gridPadding.right});ax.yaxis.pack({position:"absolute",top:0,left:this._gridPadding.left-ax.yaxis.getWidth(),height:this._height},{min:this._height-this._gridPadding.bottom,max:this._gridPadding.top});ax.x2axis.pack({position:"absolute",top:this._gridPadding.top-ax.x2axis.getHeight(),left:0,width:this._width},{min:this._gridPadding.left,max:this._width-this._gridPadding.right});for(i=8;i>0;i--){ax[ra[i-1]].pack({position:"absolute",top:0,right:this._gridPadding.right-rapad[i-1]},{min:this._height-this._gridPadding.bottom,max:this._gridPadding.top})}var ltemp=(this._width-this._gridPadding.left-this._gridPadding.right)/2+this._gridPadding.left-ax.yMidAxis.getWidth()/2;ax.yMidAxis.pack({position:"absolute",top:0,left:ltemp,zIndex:9,textAlign:"center"},{min:this._height-this._gridPadding.bottom,max:this._gridPadding.top});this.target.append(this.grid.createElement(this._gridPadding,this));this.grid.draw();var series=this.series;var seriesLength=series.length;for(i=0,l=seriesLength;isid1?sid2:sid1;fill(id1,id2)}else{for(var cnt=0;cntsid1[cnt]?sid2[cnt]:sid1[cnt];fill(id1,id2)}}};this.bindCustomEvents=function(){this.eventCanvas._elem.bind("click",{plot:this},this.onClick);this.eventCanvas._elem.bind("dblclick",{plot:this},this.onDblClick);this.eventCanvas._elem.bind("mousedown",{plot:this},this.onMouseDown);this.eventCanvas._elem.bind("mousemove",{plot:this},this.onMouseMove);this.eventCanvas._elem.bind("mouseenter",{plot:this},this.onMouseEnter);this.eventCanvas._elem.bind("mouseleave",{plot:this},this.onMouseLeave);if(this.captureRightClick){this.eventCanvas._elem.bind("mouseup",{plot:this},this.onRightClick);this.eventCanvas._elem.get(0).oncontextmenu=function(){return false}}else{this.eventCanvas._elem.bind("mouseup",{plot:this},this.onMouseUp)}};function getEventPosition(ev){var plot=ev.data.plot;var go=plot.eventCanvas._elem.offset();var gridPos={x:ev.pageX-go.left,y:ev.pageY-go.top};var dataPos={xaxis:null,yaxis:null,x2axis:null,y2axis:null,y3axis:null,y4axis:null,y5axis:null,y6axis:null,y7axis:null,y8axis:null,y9axis:null,yMidAxis:null};var an=["xaxis","yaxis","x2axis","y2axis","y3axis","y4axis","y5axis","y6axis","y7axis","y8axis","y9axis","yMidAxis"];var ax=plot.axes;var n,axis;for(n=11;n>0;n--){axis=an[n-1];if(ax[axis].show){dataPos[axis]=ax[axis].series_p2u(gridPos[axis.charAt(0)])}}return{offsets:go,gridPos:gridPos,dataPos:dataPos}}function checkIntersection(gridpos,plot){var series=plot.series;var i,j,k,s,r,x,y,theta,sm,sa,minang,maxang;var d0,d,p,pp,points,bw,hp;var threshold,t;for(k=plot.seriesStack.length-1;k>=0;k--){i=plot.seriesStack[k];s=series[i];hp=s._highlightThreshold;switch(s.renderer.constructor){case $.jqplot.BarRenderer:x=gridpos.x;y=gridpos.y;for(j=0;jpoints[0][0]&&xpoints[2][1]&&ypoints[0][1])){return{seriesIndex:s.index,pointIndex:j,gridData:p,data:s.data[j],points:s._barPoints[j]}}}break;case $.jqplot.PyramidRenderer:x=gridpos.x;y=gridpos.y;for(j=0;jpoints[0][0]+hp[0][0]&&xpoints[2][1]&&y0&&-y>=0){theta=2*Math.PI-Math.atan(-y/x)}else if(x>0&&-y<0){theta=-Math.atan(-y/x)}else if(x<0){theta=Math.PI-Math.atan(-y/x)}else if(x==0&&-y>0){theta=3*Math.PI/2}else if(x==0&&-y<0){theta=Math.PI/2}else if(x==0&&y==0){theta=0}if(sa){theta-=sa;if(theta<0){theta+=2*Math.PI}else if(theta>2*Math.PI){theta-=2*Math.PI}}sm=s.sliceMargin/180*Math.PI;if(rs._innerRadius){for(j=0;j0?s.gridData[j-1][1]+sm:sm;maxang=s.gridData[j][1];if(theta>minang&&theta0&&-y>=0){theta=2*Math.PI-Math.atan(-y/x)}else if(x>0&&-y<0){theta=-Math.atan(-y/x)}else if(x<0){theta=Math.PI-Math.atan(-y/x)}else if(x==0&&-y>0){theta=3*Math.PI/2}else if(x==0&&-y<0){theta=Math.PI/2}else if(x==0&&y==0){theta=0}if(sa){theta-=sa;if(theta<0){theta+=2*Math.PI}else if(theta>2*Math.PI){theta-=2*Math.PI}}sm=s.sliceMargin/180*Math.PI;if(r0?s.gridData[j-1][1]+sm:sm;maxang=s.gridData[j][1];if(theta>minang&&theta=cv[0][1]&&y<=cv[3][1]&&x>=lex[0]&&x<=rex[0]){return{seriesIndex:s.index,pointIndex:j,gridData:null,data:s.data[j]}}}break;case $.jqplot.LineRenderer:x=gridpos.x;y=gridpos.y;r=s.renderer;if(s.show){if((s.fill||s.renderer.bands.show&&s.renderer.bands.fill)&&(!plot.plugins.highlighter||!plot.plugins.highlighter.show)){var inside=false;if(x>s._boundingBox[0][0]&&xs._boundingBox[1][1]&&y=y||vertex2[1]=y){if(vertex1[0]+(y-vertex1[1])/(vertex2[1]-vertex1[1])*(vertex2[0]-vertex1[0])0?t:0;for(var j=0;j=p[0]-r._bodyWidth/2&&x<=p[0]+r._bodyWidth/2&&y>=yp(s.data[j][2])&&y<=yp(s.data[j][3])){return{seriesIndex:i,pointIndex:j,gridData:p,data:s.data[j]}}}else if(!r.hlc){var yp=s._yaxis.series_u2p;if(x>=p[0]-r._tickLength&&x<=p[0]+r._tickLength&&y>=yp(s.data[j][2])&&y<=yp(s.data[j][3])){return{seriesIndex:i,pointIndex:j,gridData:p,data:s.data[j]}}}else{var yp=s._yaxis.series_u2p;if(x>=p[0]-r._tickLength&&x<=p[0]+r._tickLength&&y>=yp(s.data[j][1])&&y<=yp(s.data[j][2])){return{seriesIndex:i,pointIndex:j,gridData:p,data:s.data[j]}}}}else if(p[0]!=null&&p[1]!=null){d=Math.sqrt((x-p[0])*(x-p[0])+(y-p[1])*(y-p[1]));if(d<=threshold&&(d<=d0||d0==null)){d0=d;return{seriesIndex:i,pointIndex:j,gridData:p,data:s.data[j]}}}}}}break;default:x=gridpos.x;y=gridpos.y;r=s.renderer;if(s.show){t=s.markerRenderer.size/2+s.neighborThreshold;threshold=t>0?t:0;for(var j=0;j=p[0]-r._bodyWidth/2&&x<=p[0]+r._bodyWidth/2&&y>=yp(s.data[j][2])&&y<=yp(s.data[j][3])){return{seriesIndex:i,pointIndex:j,gridData:p,data:s.data[j]}}}else if(!r.hlc){var yp=s._yaxis.series_u2p;if(x>=p[0]-r._tickLength&&x<=p[0]+r._tickLength&&y>=yp(s.data[j][2])&&y<=yp(s.data[j][3])){return{seriesIndex:i,pointIndex:j,gridData:p,data:s.data[j]}}}else{var yp=s._yaxis.series_u2p;if(x>=p[0]-r._tickLength&&x<=p[0]+r._tickLength&&y>=yp(s.data[j][1])&&y<=yp(s.data[j][2])){return{seriesIndex:i,pointIndex:j,gridData:p,data:s.data[j]}}}}else{d=Math.sqrt((x-p[0])*(x-p[0])+(y-p[1])*(y-p[1]));if(d<=threshold&&(d<=d0||d0==null)){d0=d;return{seriesIndex:i,pointIndex:j,gridData:p,data:s.data[j]}}}}}break}}return null}this.onClick=function(ev){var positions=getEventPosition(ev);var p=ev.data.plot;var neighbor=checkIntersection(positions.gridPos,p);var evt=$.Event("jqplotClick");evt.pageX=ev.pageX;evt.pageY=ev.pageY;$(this).trigger(evt,[positions.gridPos,positions.dataPos,neighbor,p])};this.onDblClick=function(ev){var positions=getEventPosition(ev);var p=ev.data.plot;var neighbor=checkIntersection(positions.gridPos,p);var evt=$.Event("jqplotDblClick");evt.pageX=ev.pageX;evt.pageY=ev.pageY;$(this).trigger(evt,[positions.gridPos,positions.dataPos,neighbor,p])};this.onMouseDown=function(ev){var positions=getEventPosition(ev);var p=ev.data.plot;var neighbor=checkIntersection(positions.gridPos,p);var evt=$.Event("jqplotMouseDown");evt.pageX=ev.pageX;evt.pageY=ev.pageY;$(this).trigger(evt,[positions.gridPos,positions.dataPos,neighbor,p])};this.onMouseUp=function(ev){var positions=getEventPosition(ev);var evt=$.Event("jqplotMouseUp");evt.pageX=ev.pageX;evt.pageY=ev.pageY;$(this).trigger(evt,[positions.gridPos,positions.dataPos,null,ev.data.plot])};this.onRightClick=function(ev){var positions=getEventPosition(ev);var p=ev.data.plot;var neighbor=checkIntersection(positions.gridPos,p);if(p.captureRightClick){if(ev.which==3){var evt=$.Event("jqplotRightClick");evt.pageX=ev.pageX;evt.pageY=ev.pageY;$(this).trigger(evt,[positions.gridPos,positions.dataPos,neighbor,p])}else{var evt=$.Event("jqplotMouseUp");evt.pageX=ev.pageX;evt.pageY=ev.pageY;$(this).trigger(evt,[positions.gridPos,positions.dataPos,neighbor,p])}}};this.onMouseMove=function(ev){var positions=getEventPosition(ev);var p=ev.data.plot;var neighbor=checkIntersection(positions.gridPos,p);var evt=$.Event("jqplotMouseMove");evt.pageX=ev.pageX;evt.pageY=ev.pageY;$(this).trigger(evt,[positions.gridPos,positions.dataPos,neighbor,p])};this.onMouseEnter=function(ev){var positions=getEventPosition(ev);var p=ev.data.plot;var evt=$.Event("jqplotMouseEnter");evt.pageX=ev.pageX;evt.pageY=ev.pageY;evt.relatedTarget=ev.relatedTarget;$(this).trigger(evt,[positions.gridPos,positions.dataPos,null,p])};this.onMouseLeave=function(ev){var positions=getEventPosition(ev);var p=ev.data.plot;var evt=$.Event("jqplotMouseLeave");evt.pageX=ev.pageX;evt.pageY=ev.pageY;evt.relatedTarget=ev.relatedTarget;$(this).trigger(evt,[positions.gridPos,positions.dataPos,null,p])};this.drawSeries=function(options,idx){var i,series,ctx;idx=typeof options==="number"&&idx==null?options:idx;options=typeof options==="object"?options:{};if(idx!=undefined){series=this.series[idx];ctx=series.shadowCanvas._ctx;ctx.clearRect(0,0,ctx.canvas.width,ctx.canvas.height);series.drawShadow(ctx,options,this);ctx=series.canvas._ctx;ctx.clearRect(0,0,ctx.canvas.width,ctx.canvas.height);series.draw(ctx,options,this);if(series.renderer.constructor==$.jqplot.BezierCurveRenderer){if(idx660?newrgb[j]*.85:.73*newrgb[j]+90;newrgb[j]=parseInt(newrgb[j],10);newrgb[j]>255?255:newrgb[j]}newrgb[3]=.3+.35*rgba[3];ret.push("rgba("+newrgb[0]+","+newrgb[1]+","+newrgb[2]+","+newrgb[3]+")")}}else{var rgba=$.jqplot.getColorComponents(colors);var newrgb=[rgba[0],rgba[1],rgba[2]];var sum=newrgb[0]+newrgb[1]+newrgb[2];for(var j=0;j<3;j++){newrgb[j]=sum>660?newrgb[j]*.85:.73*newrgb[j]+90;newrgb[j]=parseInt(newrgb[j],10);newrgb[j]>255?255:newrgb[j]}newrgb[3]=.3+.35*rgba[3];ret="rgba("+newrgb[0]+","+newrgb[1]+","+newrgb[2]+","+newrgb[3]+")"}return ret};$.jqplot.ColorGenerator=function(colors){colors=colors||$.jqplot.config.defaultColors;var idx=0;this.next=function(){if(idx0){return colors[idx--]}else{idx=colors.length-1;return colors[idx]}};this.get=function(i){var idx=i-colors.length*Math.floor(i/colors.length);return colors[idx]};this.setColors=function(c){colors=c};this.reset=function(){idx=0};this.getIndex=function(){return idx};this.setIndex=function(index){idx=index}};$.jqplot.hex2rgb=function(h,a){h=h.replace("#","");if(h.length==3){h=h.charAt(0)+h.charAt(0)+h.charAt(1)+h.charAt(1)+h.charAt(2)+h.charAt(2)}var rgb;rgb="rgba("+parseInt(h.slice(0,2),16)+", "+parseInt(h.slice(2,4),16)+", "+parseInt(h.slice(4,6),16);if(a){rgb+=", "+a}rgb+=")";return rgb};$.jqplot.rgb2hex=function(s){var pat=/rgba?\( *([0-9]{1,3}\.?[0-9]*%?) *, *([0-9]{1,3}\.?[0-9]*%?) *, *([0-9]{1,3}\.?[0-9]*%?) *(?:, *[0-9.]*)?\)/;var m=s.match(pat);var h="#";for(var i=1;i<4;i++){var temp;if(m[i].search(/%/)!=-1){temp=parseInt(255*m[i]/100,10).toString(16);if(temp.length==1){temp="0"+temp}}else{temp=parseInt(m[i],10).toString(16);if(temp.length==1){temp="0"+temp}}h+=temp}return h};$.jqplot.normalize2rgb=function(s,a){if(s.search(/^ *rgba?\(/)!=-1){return s}else if(s.search(/^ *#?[0-9a-fA-F]?[0-9a-fA-F]/)!=-1){return $.jqplot.hex2rgb(s,a)}else{throw new Error("Invalid color spec")}};$.jqplot.getColorComponents=function(s){s=$.jqplot.colorKeywordMap[s]||s;var rgb=$.jqplot.normalize2rgb(s);var pat=/rgba?\( *([0-9]{1,3}\.?[0-9]*%?) *, *([0-9]{1,3}\.?[0-9]*%?) *, *([0-9]{1,3}\.?[0-9]*%?) *,? *([0-9.]* *)?\)/;var m=rgb.match(pat);var ret=[];for(var i=1;i<4;i++){if(m[i].search(/%/)!=-1){ret[i-1]=parseInt(255*m[i]/100,10)}else{ret[i-1]=parseInt(m[i],10)}}ret[3]=parseFloat(m[4])?parseFloat(m[4]):1;return ret};$.jqplot.colorKeywordMap={aliceblue:"rgb(240, 248, 255)",antiquewhite:"rgb(250, 235, 215)",aqua:"rgb( 0, 255, 255)",aquamarine:"rgb(127, 255, 212)",azure:"rgb(240, 255, 255)",beige:"rgb(245, 245, 220)",bisque:"rgb(255, 228, 196)",black:"rgb( 0, 0, 0)",blanchedalmond:"rgb(255, 235, 205)",blue:"rgb( 0, 0, 255)",blueviolet:"rgb(138, 43, 226)",brown:"rgb(165, 42, 42)",burlywood:"rgb(222, 184, 135)",cadetblue:"rgb( 95, 158, 160)",chartreuse:"rgb(127, 255, 0)",chocolate:"rgb(210, 105, 30)",coral:"rgb(255, 127, 80)",cornflowerblue:"rgb(100, 149, 237)",cornsilk:"rgb(255, 248, 220)",crimson:"rgb(220, 20, 60)",cyan:"rgb( 0, 255, 255)",darkblue:"rgb( 0, 0, 139)",darkcyan:"rgb( 0, 139, 139)",darkgoldenrod:"rgb(184, 134, 11)",darkgray:"rgb(169, 169, 169)",darkgreen:"rgb( 0, 100, 0)",darkgrey:"rgb(169, 169, 169)",darkkhaki:"rgb(189, 183, 107)",darkmagenta:"rgb(139, 0, 139)",darkolivegreen:"rgb( 85, 107, 47)",darkorange:"rgb(255, 140, 0)",darkorchid:"rgb(153, 50, 204)",darkred:"rgb(139, 0, 0)",darksalmon:"rgb(233, 150, 122)",darkseagreen:"rgb(143, 188, 143)",darkslateblue:"rgb( 72, 61, 139)",darkslategray:"rgb( 47, 79, 79)",darkslategrey:"rgb( 47, 79, 79)",darkturquoise:"rgb( 0, 206, 209)",darkviolet:"rgb(148, 0, 211)",deeppink:"rgb(255, 20, 147)",deepskyblue:"rgb( 0, 191, 255)",dimgray:"rgb(105, 105, 105)",dimgrey:"rgb(105, 105, 105)",dodgerblue:"rgb( 30, 144, 255)",firebrick:"rgb(178, 34, 34)",floralwhite:"rgb(255, 250, 240)",forestgreen:"rgb( 34, 139, 34)",fuchsia:"rgb(255, 0, 255)",gainsboro:"rgb(220, 220, 220)",ghostwhite:"rgb(248, 248, 255)",gold:"rgb(255, 215, 0)",goldenrod:"rgb(218, 165, 32)",gray:"rgb(128, 128, 128)",grey:"rgb(128, 128, 128)",green:"rgb( 0, 128, 0)",greenyellow:"rgb(173, 255, 47)",honeydew:"rgb(240, 255, 240)",hotpink:"rgb(255, 105, 180)",indianred:"rgb(205, 92, 92)",indigo:"rgb( 75, 0, 130)",ivory:"rgb(255, 255, 240)",khaki:"rgb(240, 230, 140)",lavender:"rgb(230, 230, 250)",lavenderblush:"rgb(255, 240, 245)",lawngreen:"rgb(124, 252, 0)",lemonchiffon:"rgb(255, 250, 205)",lightblue:"rgb(173, 216, 230)",lightcoral:"rgb(240, 128, 128)",lightcyan:"rgb(224, 255, 255)",lightgoldenrodyellow:"rgb(250, 250, 210)",lightgray:"rgb(211, 211, 211)",lightgreen:"rgb(144, 238, 144)",lightgrey:"rgb(211, 211, 211)",lightpink:"rgb(255, 182, 193)",lightsalmon:"rgb(255, 160, 122)",lightseagreen:"rgb( 32, 178, 170)",lightskyblue:"rgb(135, 206, 250)",lightslategray:"rgb(119, 136, 153)",lightslategrey:"rgb(119, 136, 153)",lightsteelblue:"rgb(176, 196, 222)",lightyellow:"rgb(255, 255, 224)",lime:"rgb( 0, 255, 0)",limegreen:"rgb( 50, 205, 50)",linen:"rgb(250, 240, 230)",magenta:"rgb(255, 0, 255)",maroon:"rgb(128, 0, 0)",mediumaquamarine:"rgb(102, 205, 170)",mediumblue:"rgb( 0, 0, 205)",mediumorchid:"rgb(186, 85, 211)",mediumpurple:"rgb(147, 112, 219)",mediumseagreen:"rgb( 60, 179, 113)",mediumslateblue:"rgb(123, 104, 238)",mediumspringgreen:"rgb( 0, 250, 154)",mediumturquoise:"rgb( 72, 209, 204)",mediumvioletred:"rgb(199, 21, 133)",midnightblue:"rgb( 25, 25, 112)",mintcream:"rgb(245, 255, 250)",mistyrose:"rgb(255, 228, 225)",moccasin:"rgb(255, 228, 181)",navajowhite:"rgb(255, 222, 173)",navy:"rgb( 0, 0, 128)",oldlace:"rgb(253, 245, 230)",olive:"rgb(128, 128, 0)",olivedrab:"rgb(107, 142, 35)",orange:"rgb(255, 165, 0)",orangered:"rgb(255, 69, 0)",orchid:"rgb(218, 112, 214)",palegoldenrod:"rgb(238, 232, 170)",palegreen:"rgb(152, 251, 152)",paleturquoise:"rgb(175, 238, 238)",palevioletred:"rgb(219, 112, 147)",papayawhip:"rgb(255, 239, 213)",peachpuff:"rgb(255, 218, 185)",peru:"rgb(205, 133, 63)",pink:"rgb(255, 192, 203)",plum:"rgb(221, 160, 221)",powderblue:"rgb(176, 224, 230)",purple:"rgb(128, 0, 128)",red:"rgb(255, 0, 0)",rosybrown:"rgb(188, 143, 143)",royalblue:"rgb( 65, 105, 225)",saddlebrown:"rgb(139, 69, 19)",salmon:"rgb(250, 128, 114)",sandybrown:"rgb(244, 164, 96)",seagreen:"rgb( 46, 139, 87)",seashell:"rgb(255, 245, 238)",sienna:"rgb(160, 82, 45)",silver:"rgb(192, 192, 192)",skyblue:"rgb(135, 206, 235)",slateblue:"rgb(106, 90, 205)",slategray:"rgb(112, 128, 144)",slategrey:"rgb(112, 128, 144)",snow:"rgb(255, 250, 250)",springgreen:"rgb( 0, 255, 127)",steelblue:"rgb( 70, 130, 180)",tan:"rgb(210, 180, 140)",teal:"rgb( 0, 128, 128)",thistle:"rgb(216, 191, 216)",tomato:"rgb(255, 99, 71)",turquoise:"rgb( 64, 224, 208)",violet:"rgb(238, 130, 238)",wheat:"rgb(245, 222, 179)",white:"rgb(255, 255, 255)",whitesmoke:"rgb(245, 245, 245)",yellow:"rgb(255, 255, 0)",yellowgreen:"rgb(154, 205, 50)"};$.jqplot.AxisLabelRenderer=function(options){$.jqplot.ElemContainer.call(this);this.axis;this.show=true;this.label="";this.fontFamily=null;this.fontSize=null;this.textColor=null;this._elem;this.escapeHTML=false;$.extend(true,this,options)};$.jqplot.AxisLabelRenderer.prototype=new $.jqplot.ElemContainer;$.jqplot.AxisLabelRenderer.prototype.constructor=$.jqplot.AxisLabelRenderer;$.jqplot.AxisLabelRenderer.prototype.init=function(options){$.extend(true,this,options)};$.jqplot.AxisLabelRenderer.prototype.draw=function(ctx,plot){if(this._elem){this._elem.emptyForce();this._elem=null}this._elem=$('
');if(Number(this.label)){this._elem.css("white-space","nowrap")}if(!this.escapeHTML){this._elem.html(this.label)}else{this._elem.text(this.label)}if(this.fontFamily){this._elem.css("font-family",this.fontFamily)}if(this.fontSize){this._elem.css("font-size",this.fontSize)}if(this.textColor){this._elem.css("color",this.textColor)}return this._elem};$.jqplot.AxisLabelRenderer.prototype.pack=function(){};$.jqplot.AxisTickRenderer=function(options){$.jqplot.ElemContainer.call(this);this.mark="outside";this.axis;this.showMark=true;this.showGridline=true;this.isMinorTick=false;this.size=4;this.markSize=6;this.show=true;this.showLabel=true;this.label=null;this.value=null;this._styles={};this.formatter=$.jqplot.DefaultTickFormatter;this.prefix="";this.suffix="";this.formatString="";this.fontFamily;this.fontSize;this.textColor;this.escapeHTML=false;this._elem;this._breakTick=false;$.extend(true,this,options)};$.jqplot.AxisTickRenderer.prototype.init=function(options){$.extend(true,this,options)};$.jqplot.AxisTickRenderer.prototype=new $.jqplot.ElemContainer;$.jqplot.AxisTickRenderer.prototype.constructor=$.jqplot.AxisTickRenderer;$.jqplot.AxisTickRenderer.prototype.setTick=function(value,axisName,isMinor){this.value=value;this.axis=axisName;if(isMinor){this.isMinorTick=true}return this};$.jqplot.AxisTickRenderer.prototype.draw=function(){if(this.label===null){this.label=this.prefix+this.formatter(this.formatString,this.value)+this.suffix}var style={position:"absolute"};if(Number(this.label)){style["whitSpace"]="nowrap"}if(this._elem){this._elem.emptyForce();this._elem=null}this._elem=$(document.createElement("div"));this._elem.addClass("jqplot-"+this.axis+"-tick");if(!this.escapeHTML){this._elem.html(this.label)}else{this._elem.text(this.label)}this._elem.css(style);for(var s in this._styles){this._elem.css(s,this._styles[s])}if(this.fontFamily){this._elem.css("font-family",this.fontFamily)}if(this.fontSize){this._elem.css("font-size",this.fontSize)}if(this.textColor){this._elem.css("color",this.textColor)}if(this._breakTick){this._elem.addClass("jqplot-breakTick")}return this._elem};$.jqplot.DefaultTickFormatter=function(format,val){if(typeof val=="number"){if(!format){format=$.jqplot.config.defaultTickFormatString}return $.jqplot.sprintf(format,val)}else{return String(val)}};$.jqplot.PercentTickFormatter=function(format,val){if(typeof val=="number"){val=100*val;if(!format){format=$.jqplot.config.defaultTickFormatString}return $.jqplot.sprintf(format,val)}else{return String(val)}};$.jqplot.AxisTickRenderer.prototype.pack=function(){};$.jqplot.CanvasGridRenderer=function(){this.shadowRenderer=new $.jqplot.ShadowRenderer};$.jqplot.CanvasGridRenderer.prototype.init=function(options){this._ctx;$.extend(true,this,options);var sopts={lineJoin:"miter",lineCap:"round",fill:false,isarc:false,angle:this.shadowAngle,offset:this.shadowOffset,alpha:this.shadowAlpha,depth:this.shadowDepth,lineWidth:this.shadowWidth,closePath:false,strokeStyle:this.shadowColor};this.renderer.shadowRenderer.init(sopts)};$.jqplot.CanvasGridRenderer.prototype.createElement=function(plot){var elem;if(this._elem){if($.jqplot.use_excanvas&&window.G_vmlCanvasManager.uninitElement!==undefined){elem=this._elem.get(0);window.G_vmlCanvasManager.uninitElement(elem);elem=null}this._elem.emptyForce();this._elem=null}elem=plot.canvasManager.getCanvas();var w=this._plotDimensions.width;var h=this._plotDimensions.height;elem.width=w;elem.height=h;this._elem=$(elem);this._elem.addClass("jqplot-grid-canvas");this._elem.css({position:"absolute",left:0,top:0});elem=plot.canvasManager.initCanvas(elem);this._top=this._offsets.top;this._bottom=h-this._offsets.bottom;this._left=this._offsets.left;this._right=w-this._offsets.right;this._width=this._right-this._left;this._height=this._bottom-this._top;elem=null;return this._elem};$.jqplot.CanvasGridRenderer.prototype.draw=function(){this._ctx=this._elem.get(0).getContext("2d");var ctx=this._ctx;var axes=this._axes;ctx.save();ctx.clearRect(0,0,this._plotDimensions.width,this._plotDimensions.height);ctx.fillStyle=this.backgroundColor||this.background;ctx.fillRect(this._left,this._top,this._width,this._height);ctx.save();ctx.lineJoin="miter";ctx.lineCap="butt";ctx.lineWidth=this.gridLineWidth;ctx.strokeStyle=this.gridLineColor;var b,e,s,m;var ax=["xaxis","yaxis","x2axis","y2axis"];for(var i=4;i>0;i--){var name=ax[i-1];var axis=axes[name];var ticks=axis._ticks;var numticks=ticks.length;if(axis.show){if(axis.drawBaseline){var bopts={};if(axis.baselineWidth!==null){bopts.lineWidth=axis.baselineWidth}if(axis.baselineColor!==null){bopts.strokeStyle=axis.baselineColor}switch(name){case"xaxis":drawLine(this._left,this._bottom,this._right,this._bottom,bopts);break;case"yaxis":drawLine(this._left,this._bottom,this._left,this._top,bopts);break;case"x2axis":drawLine(this._left,this._bottom,this._right,this._bottom,bopts);break;case"y2axis":drawLine(this._right,this._bottom,this._right,this._top,bopts);break}}for(var j=numticks;j>0;j--){var t=ticks[j-1];if(t.show){var pos=Math.round(axis.u2p(t.value))+.5;switch(name){case"xaxis":if(t.showGridline&&this.drawGridlines&&(!t.isMinorTick&&axis.drawMajorGridlines||t.isMinorTick&&axis.drawMinorGridlines)){drawLine(pos,this._top,pos,this._bottom)}if(t.showMark&&t.mark&&(!t.isMinorTick&&axis.drawMajorTickMarks||t.isMinorTick&&axis.drawMinorTickMarks)){s=t.markSize;m=t.mark;var pos=Math.round(axis.u2p(t.value))+.5;switch(m){case"outside":b=this._bottom;e=this._bottom+s;break;case"inside":b=this._bottom-s;e=this._bottom;break;case"cross":b=this._bottom-s;e=this._bottom+s;break;default:b=this._bottom;e=this._bottom+s;break}if(this.shadow){this.renderer.shadowRenderer.draw(ctx,[[pos,b],[pos,e]],{lineCap:"butt",lineWidth:this.gridLineWidth,offset:this.gridLineWidth*.75,depth:2,fill:false,closePath:false})}drawLine(pos,b,pos,e)}break;case"yaxis":if(t.showGridline&&this.drawGridlines&&(!t.isMinorTick&&axis.drawMajorGridlines||t.isMinorTick&&axis.drawMinorGridlines)){drawLine(this._right,pos,this._left,pos)}if(t.showMark&&t.mark&&(!t.isMinorTick&&axis.drawMajorTickMarks||t.isMinorTick&&axis.drawMinorTickMarks)){s=t.markSize;m=t.mark;var pos=Math.round(axis.u2p(t.value))+.5;switch(m){case"outside":b=this._left-s;e=this._left;break;case"inside":b=this._left;e=this._left+s;break;case"cross":b=this._left-s;e=this._left+s;break;default:b=this._left-s;e=this._left;break}if(this.shadow){this.renderer.shadowRenderer.draw(ctx,[[b,pos],[e,pos]],{lineCap:"butt",lineWidth:this.gridLineWidth*1.5,offset:this.gridLineWidth*.75,fill:false,closePath:false})}drawLine(b,pos,e,pos,{strokeStyle:axis.borderColor})}break;case"x2axis":if(t.showGridline&&this.drawGridlines&&(!t.isMinorTick&&axis.drawMajorGridlines||t.isMinorTick&&axis.drawMinorGridlines)){drawLine(pos,this._bottom,pos,this._top)}if(t.showMark&&t.mark&&(!t.isMinorTick&&axis.drawMajorTickMarks||t.isMinorTick&&axis.drawMinorTickMarks)){s=t.markSize;m=t.mark;var pos=Math.round(axis.u2p(t.value))+.5;switch(m){case"outside":b=this._top-s;e=this._top;break;case"inside":b=this._top;e=this._top+s;break;case"cross":b=this._top-s;e=this._top+s;break;default:b=this._top-s;e=this._top;break}if(this.shadow){this.renderer.shadowRenderer.draw(ctx,[[pos,b],[pos,e]],{lineCap:"butt",lineWidth:this.gridLineWidth,offset:this.gridLineWidth*.75,depth:2,fill:false,closePath:false})}drawLine(pos,b,pos,e)}break;case"y2axis":if(t.showGridline&&this.drawGridlines&&(!t.isMinorTick&&axis.drawMajorGridlines||t.isMinorTick&&axis.drawMinorGridlines)){drawLine(this._left,pos,this._right,pos)}if(t.showMark&&t.mark&&(!t.isMinorTick&&axis.drawMajorTickMarks||t.isMinorTick&&axis.drawMinorTickMarks)){s=t.markSize;m=t.mark;var pos=Math.round(axis.u2p(t.value))+.5;switch(m){case"outside":b=this._right;e=this._right+s;break;case"inside":b=this._right-s;e=this._right;break;case"cross":b=this._right-s;e=this._right+s;break;default:b=this._right;e=this._right+s;break}if(this.shadow){this.renderer.shadowRenderer.draw(ctx,[[b,pos],[e,pos]],{lineCap:"butt",lineWidth:this.gridLineWidth*1.5,offset:this.gridLineWidth*.75,fill:false,closePath:false})}drawLine(b,pos,e,pos,{strokeStyle:axis.borderColor})}break;default:break}}}t=null}axis=null;ticks=null}ax=["y3axis","y4axis","y5axis","y6axis","y7axis","y8axis","y9axis","yMidAxis"];for(var i=7;i>0;i--){var axis=axes[ax[i-1]];var ticks=axis._ticks;if(axis.show){var tn=ticks[axis.numberTicks-1];var t0=ticks[0];var left=axis.getLeft();var points=[[left,tn.getTop()+tn.getHeight()/2],[left,t0.getTop()+t0.getHeight()/2+1]];if(this.shadow){this.renderer.shadowRenderer.draw(ctx,points,{lineCap:"butt",fill:false,closePath:false})}drawLine(points[0][0],points[0][1],points[1][0],points[1][1],{lineCap:"butt",strokeStyle:axis.borderColor,lineWidth:axis.borderWidth});for(var j=ticks.length;j>0;j--){var t=ticks[j-1];s=t.markSize;m=t.mark;var pos=Math.round(axis.u2p(t.value))+.5;if(t.showMark&&t.mark){switch(m){case"outside":b=left;e=left+s;break;case"inside":b=left-s;e=left;break;case"cross":b=left-s;e=left+s;break;default:b=left;e=left+s;break}points=[[b,pos],[e,pos]];if(this.shadow){this.renderer.shadowRenderer.draw(ctx,points,{lineCap:"butt",lineWidth:this.gridLineWidth*1.5,offset:this.gridLineWidth*.75,fill:false,closePath:false})}drawLine(b,pos,e,pos,{strokeStyle:axis.borderColor})}t=null}t0=null}axis=null;ticks=null}ctx.restore();function drawLine(bx,by,ex,ey,opts){ctx.save();opts=opts||{};if(opts.lineWidth==null||opts.lineWidth!=0){$.extend(true,ctx,opts);ctx.beginPath();ctx.moveTo(bx,by);ctx.lineTo(ex,ey);ctx.stroke();ctx.restore()}}if(this.shadow){var points=[[this._left,this._bottom],[this._right,this._bottom],[this._right,this._top]];this.renderer.shadowRenderer.draw(ctx,points)}if(this.borderWidth!=0&&this.drawBorder){drawLine(this._left,this._top,this._right,this._top,{lineCap:"round",strokeStyle:axes.x2axis.borderColor,lineWidth:axes.x2axis.borderWidth});drawLine(this._right,this._top,this._right,this._bottom,{lineCap:"round",strokeStyle:axes.y2axis.borderColor,lineWidth:axes.y2axis.borderWidth});drawLine(this._right,this._bottom,this._left,this._bottom,{lineCap:"round",strokeStyle:axes.xaxis.borderColor,lineWidth:axes.xaxis.borderWidth});drawLine(this._left,this._bottom,this._left,this._top,{lineCap:"round",strokeStyle:axes.yaxis.borderColor,lineWidth:axes.yaxis.borderWidth})}ctx.restore();ctx=null;axes=null};$.jqplot.DivTitleRenderer=function(){};$.jqplot.DivTitleRenderer.prototype.init=function(options){$.extend(true,this,options)};$.jqplot.DivTitleRenderer.prototype.draw=function(){if(this._elem){this._elem.emptyForce();this._elem=null}var r=this.renderer;var elem=document.createElement("div");this._elem=$(elem);this._elem.addClass("jqplot-title");if(!this.text){this.show=false;this._elem.height(0);this._elem.width(0)}else if(this.text){var color;if(this.color){color=this.color}else if(this.textColor){color=this.textColor}var styles={position:"absolute",top:"0px",left:"0px"};if(this._plotWidth){styles["width"]=this._plotWidth+"px"}if(this.fontSize){styles["fontSize"]=this.fontSize}if(typeof this.textAlign==="string"){styles["textAlign"]=this.textAlign}else{styles["textAlign"]="center"}if(color){styles["color"]=color}if(this.paddingBottom){styles["paddingBottom"]=this.paddingBottom}if(this.fontFamily){styles["fontFamily"]=this.fontFamily}this._elem.css(styles);if(this.escapeHtml){this._elem.text(this.text)}else{this._elem.html(this.text)}}elem=null;return this._elem};$.jqplot.DivTitleRenderer.prototype.pack=function(){};var dotlen=.1;$.jqplot.LinePattern=function(ctx,pattern){var defaultLinePatterns={dotted:[dotlen,$.jqplot.config.dotGapLength],dashed:[$.jqplot.config.dashLength,$.jqplot.config.gapLength],solid:null};if(typeof pattern==="string"){if(pattern[0]==="."||pattern[0]==="-"){var s=pattern;pattern=[];for(var i=0,imax=s.length;i0&&scale>0){dx/=dist;dy/=dist;while(true){var dp=scale*patternDistance;if(dp=pattern.length){patternIndex=0}patternDistance=pattern[patternIndex]}else{px=x;py=y;if((patternIndex&1)==0){ctx.lineTo(px,py)}else{ctx.moveTo(px,py)}patternDistance-=dist/scale;break}}}};var beginPath=function(){ctx.beginPath()};var closePath=function(){lineTo(pathx0,pathy0)};return{moveTo:moveTo,lineTo:lineTo,beginPath:beginPath,closePath:closePath}};$.jqplot.LineRenderer=function(){this.shapeRenderer=new $.jqplot.ShapeRenderer;this.shadowRenderer=new $.jqplot.ShadowRenderer};$.jqplot.LineRenderer.prototype.init=function(options,plot){options=options||{};this._type="line";this.renderer.animation={show:false,direction:"left",speed:2500,_supported:true};this.renderer.smooth=false;this.renderer.tension=null;this.renderer.constrainSmoothing=true;this.renderer._smoothedData=[];this.renderer._smoothedPlotData=[];this.renderer._hiBandGridData=[];this.renderer._lowBandGridData=[];this.renderer._hiBandSmoothedData=[];this.renderer._lowBandSmoothedData=[];this.renderer.bandData=[];this.renderer.bands={show:false,hiData:[],lowData:[],color:this.color,showLines:false,fill:true,fillColor:null,_min:null,_max:null,interval:"3%"};var lopts={highlightMouseOver:options.highlightMouseOver,highlightMouseDown:options.highlightMouseDown,highlightColor:options.highlightColor};delete options.highlightMouseOver;delete options.highlightMouseDown;delete options.highlightColor;$.extend(true,this.renderer,options);this.renderer.options=options;if(this.renderer.bandData.length>1&&(!options.bands||options.bands.show==null)){this.renderer.bands.show=true}else if(options.bands&&options.bands.show==null&&options.bands.interval!=null){this.renderer.bands.show=true}if(this.fill){this.renderer.bands.show=false}if(this.renderer.bands.show){this.renderer.initBands.call(this,this.renderer.options,plot)}if(this._stack){this.renderer.smooth=false}var opts={lineJoin:this.lineJoin,lineCap:this.lineCap,fill:this.fill,isarc:false,strokeStyle:this.color,fillStyle:this.fillColor,lineWidth:this.lineWidth,linePattern:this.linePattern,closePath:this.fill};this.renderer.shapeRenderer.init(opts);var shadow_offset=options.shadowOffset;if(shadow_offset==null){if(this.lineWidth>2.5){shadow_offset=1.25*(1+(Math.atan(this.lineWidth/2.5)/.785398163-1)*.6)}else{shadow_offset=1.25*Math.atan(this.lineWidth/2.5)/.785398163}}var sopts={lineJoin:this.lineJoin,lineCap:this.lineCap,fill:this.fill,isarc:false,angle:this.shadowAngle,offset:shadow_offset,alpha:this.shadowAlpha,depth:this.shadowDepth,lineWidth:this.lineWidth,linePattern:this.linePattern,closePath:this.fill};this.renderer.shadowRenderer.init(sopts);this._areaPoints=[];this._boundingBox=[[],[]];if(!this.isTrendline&&this.fill||this.renderer.bands.show){this.highlightMouseOver=true;this.highlightMouseDown=false;this.highlightColor=null;if(lopts.highlightMouseDown&&lopts.highlightMouseOver==null){lopts.highlightMouseOver=false}$.extend(true,this,{highlightMouseOver:lopts.highlightMouseOver,highlightMouseDown:lopts.highlightMouseDown,highlightColor:lopts.highlightColor});if(!this.highlightColor){var fc=this.renderer.bands.show?this.renderer.bands.fillColor:this.fillColor;this.highlightColor=$.jqplot.computeHighlightColors(fc)}if(this.highlighter){this.highlighter.show=false}}if(!this.isTrendline&&plot){plot.plugins.lineRenderer={};plot.postInitHooks.addOnce(postInit);plot.postDrawHooks.addOnce(postPlotDraw);plot.eventListenerHooks.addOnce("jqplotMouseMove",handleMove);plot.eventListenerHooks.addOnce("jqplotMouseDown",handleMouseDown);plot.eventListenerHooks.addOnce("jqplotMouseUp",handleMouseUp);plot.eventListenerHooks.addOnce("jqplotClick",handleClick);plot.eventListenerHooks.addOnce("jqplotRightClick",handleRightClick)}};$.jqplot.LineRenderer.prototype.initBands=function(options,plot){var bd=options.bandData||[];var bands=this.renderer.bands;bands.hiData=[];bands.lowData=[];var data=this.data;bands._max=null;bands._min=null;if(bd.length==2){if($.isArray(bd[0][0])){var p;var bdminidx=0,bdmaxidx=0;for(var i=0,l=bd[0].length;ibands._max||bands._max==null){bands._max=p[1]}if(p[1]!=null&&p[1]bands._max||bands._max==null){bands._max=p[1];bdmaxidx=1}if(p[1]!=null&&p[1]bd[1][0]?0:1;var low=hi?0:1;for(var i=0,l=data.length;i2&&!$.isArray(bd[0][0])){var hi=bd[0][0]>bd[0][1]?0:1;var low=hi?0:1;for(var i=0,l=bd.length;ibands._max||bands._max==null){bands._max=hd[i][1]}}for(var i=0,l=ld.length;i0){slope2=Math.abs((gd[i][1]-gd[i-1][1])/(gd[i][0]-gd[i-1][0]))}temp=slope2/scale+shift;a2=stretch*tanh(temp)-stretch*tanh(shift)+min;a=(a1+a2)/2}else{a=tension}for(t=0;t2){var ret;if(this.renderer.constrainSmoothing){ret=computeConstrainedSmoothedData.call(this,this.gridData);this.renderer._smoothedData=ret[0];this.renderer._smoothedPlotData=ret[1];if(bands.show){ret=computeConstrainedSmoothedData.call(this,this.renderer._hiBandGridData);this.renderer._hiBandSmoothedData=ret[0];ret=computeConstrainedSmoothedData.call(this,this.renderer._lowBandGridData);this.renderer._lowBandSmoothedData=ret[0]}ret=null}else{ret=computeHermiteSmoothedData.call(this,this.gridData);this.renderer._smoothedData=ret[0];this.renderer._smoothedPlotData=ret[1];if(bands.show){ret=computeHermiteSmoothedData.call(this,this.renderer._hiBandGridData);this.renderer._hiBandSmoothedData=ret[0];ret=computeHermiteSmoothedData.call(this,this.renderer._lowBandGridData);this.renderer._lowBandSmoothedData=ret[0]}ret=null}}};$.jqplot.LineRenderer.prototype.makeGridData=function(data,plot){var xp=this._xaxis.series_u2p;var yp=this._yaxis.series_u2p;var gd=[];var pgd=[];this.renderer._smoothedData=[];this.renderer._smoothedPlotData=[];this.renderer._hiBandGridData=[];this.renderer._lowBandGridData=[];this.renderer._hiBandSmoothedData=[];this.renderer._lowBandSmoothedData=[];var bands=this.renderer.bands;var hasNull=false;for(var i=0;i0){gd.push([xp.call(this._xaxis,data[i][0]),yp.call(this._yaxis,data[i-1][1])])}gd.push([xp.call(this._xaxis,data[i][0]),yp.call(this._yaxis,data[i][1])])}else if(data[i][0]==null){hasNull=true;gd.push([null,yp.call(this._yaxis,data[i][1])])}else if(data[i][1]==null){hasNull=true;gd.push([xp.call(this._xaxis,data[i][0]),null])}}if(hasNull){this.renderer.smooth=false;if(this._type==="line"){bands.show=false}}if(this._type==="line"&&bands.show){for(var i=0,l=bands.hiData.length;i2){var ret;if(this.renderer.constrainSmoothing){ret=computeConstrainedSmoothedData.call(this,gd);this.renderer._smoothedData=ret[0];this.renderer._smoothedPlotData=ret[1];if(bands.show){ret=computeConstrainedSmoothedData.call(this,this.renderer._hiBandGridData);this.renderer._hiBandSmoothedData=ret[0];ret=computeConstrainedSmoothedData.call(this,this.renderer._lowBandGridData);this.renderer._lowBandSmoothedData=ret[0]}ret=null}else{ret=computeHermiteSmoothedData.call(this,gd);this.renderer._smoothedData=ret[0];this.renderer._smoothedPlotData=ret[1];if(bands.show){ret=computeHermiteSmoothedData.call(this,this.renderer._hiBandGridData);this.renderer._hiBandSmoothedData=ret[0];ret=computeHermiteSmoothedData.call(this,this.renderer._lowBandGridData);this.renderer._lowBandSmoothedData=ret[0]}ret=null}}return gd};$.jqplot.LineRenderer.prototype.draw=function(ctx,gd,options,plot){var i;var opts=$.extend(true,{},options);var shadow=opts.shadow!=undefined?opts.shadow:this.shadow;var showLine=opts.showLine!=undefined?opts.showLine:this.showLine;var fill=opts.fill!=undefined?opts.fill:this.fill;var fillAndStroke=opts.fillAndStroke!=undefined?opts.fillAndStroke:this.fillAndStroke;var xmin,ymin,xmax,ymax;ctx.save();if(gd.length){if(showLine){if(fill){if(this.fillToZero){var negativeColor=this.negativeColor;if(!this.useNegativeColors){negativeColor=opts.fillStyle}var isnegative=false;var posfs=opts.fillStyle;if(fillAndStroke){var fasgd=gd.slice(0)}if(this.index==0||!this._stack){var tempgd=[];var pd=this.renderer.smooth?this.renderer._smoothedPlotData:this._plotData;this._areaPoints=[];var pyzero=this._yaxis.series_u2p(this.fillToValue);var pxzero=this._xaxis.series_u2p(this.fillToValue);opts.closePath=true;if(this.fillAxis=="y"){tempgd.push([gd[0][0],pyzero]);this._areaPoints.push([gd[0][0],pyzero]);for(var i=0;i0;i--){gd.push(prev[i-1])}if(shadow){this.renderer.shadowRenderer.draw(ctx,gd,opts)}this._areaPoints=gd;this.renderer.shapeRenderer.draw(ctx,gd,opts)}}else{if(fillAndStroke){var fasgd=gd.slice(0)}if(this.index==0||!this._stack){var gridymin=ctx.canvas.height;gd.unshift([gd[0][0],gridymin]);var len=gd.length;gd.push([gd[len-1][0],gridymin])}else{var prev=this._prevGridData;for(var i=prev.length;i>0;i--){gd.push(prev[i-1])}}this._areaPoints=gd;if(shadow){this.renderer.shadowRenderer.draw(ctx,gd,opts)}this.renderer.shapeRenderer.draw(ctx,gd,opts)}if(fillAndStroke){var fasopts=$.extend(true,{},opts,{fill:false,closePath:false});this.renderer.shapeRenderer.draw(ctx,fasgd,fasopts);if(this.markerRenderer.show){if(this.renderer.smooth){fasgd=this.gridData}for(i=0;ip[0]||xmin==null){xmin=p[0]}if(ymaxp[1]||ymin==null){ymin=p[1]}}if(this.type==="line"&&this.renderer.bands.show){ymax=this._yaxis.series_u2p(this.renderer.bands._min);ymin=this._yaxis.series_u2p(this.renderer.bands._max)}this._boundingBox=[[xmin,ymax],[xmax,ymin]];if(this.markerRenderer.show&&!fill){if(this.renderer.smooth){gd=this.gridData}for(i=0;idim){dim=temp}}}tick=null;t=null;if(lshow){w=this._label._elem.outerWidth(true);h=this._label._elem.outerHeight(true)}if(this.name=="xaxis"){dim=dim+h;this._elem.css({height:dim+"px",left:"0px",bottom:"0px"})}else if(this.name=="x2axis"){dim=dim+h;this._elem.css({height:dim+"px",left:"0px",top:"0px"})}else if(this.name=="yaxis"){dim=dim+w;this._elem.css({width:dim+"px",left:"0px",top:"0px"});if(lshow&&this._label.constructor==$.jqplot.AxisLabelRenderer){this._label._elem.css("width",w+"px")}}else{dim=dim+w;this._elem.css({width:dim+"px",right:"0px",top:"0px"});if(lshow&&this._label.constructor==$.jqplot.AxisLabelRenderer){this._label._elem.css("width",w+"px")}}}};$.jqplot.LinearAxisRenderer.prototype.createTicks=function(plot){var ticks=this._ticks;var userTicks=this.ticks;var name=this.name;var db=this._dataBounds;var dim=this.name.charAt(0)==="x"?this._plotDimensions.width:this._plotDimensions.height;var interval;var min,max;var pos1,pos2;var tt,i;var userMin=this.min;var userMax=this.max;var userNT=this.numberTicks;var userTI=this.tickInterval;var threshold=30;this._scalefact=(Math.max(dim,threshold+1)-threshold)/300;if(userTicks.length){for(i=0;ithis.breakPoints[0]&&ut[0]<=this.breakPoints[1]){t.show=false;t.showGridline=false;t.label=ut[1]}else{t.label=ut[1]}}else{t.label=ut[1]}t.setTick(ut[0],this.name);this._ticks.push(t)}else if($.isPlainObject(ut)){$.extend(true,t,ut);t.axis=this.name;this._ticks.push(t)}else{t.value=ut;if(this.breakPoints){if(ut==this.breakPoints[0]){t.label=this.breakTickLabel;t._breakTick=true;t.showGridline=false;t.showMark=false}else if(ut>this.breakPoints[0]&&ut<=this.breakPoints[1]){t.show=false;t.showGridline=false}}t.setTick(ut,this.name);this._ticks.push(t)}}this.numberTicks=userTicks.length;this.min=this._ticks[0].value;this.max=this._ticks[this.numberTicks-1].value;this.tickInterval=(this.max-this.min)/(this.numberTicks-1)}else{if(name=="xaxis"||name=="x2axis"){dim=this._plotDimensions.width}else{dim=this._plotDimensions.height}var _numberTicks=this.numberTicks;if(this.alignTicks){if(this.name==="x2axis"&&plot.axes.xaxis.show){_numberTicks=plot.axes.xaxis.numberTicks}else if(this.name.charAt(0)==="y"&&this.name!=="yaxis"&&this.name!=="yMidAxis"&&plot.axes.yaxis.show){_numberTicks=plot.axes.yaxis.numberTicks}}min=this.min!=null?this.min:db.min;max=this.max!=null?this.max:db.max;var range=max-min;var rmin,rmax;var temp;if(this.tickOptions==null||!this.tickOptions.formatString){this._overrideFormatString=true}if(this.min==null||this.max==null&&this.tickInterval==null&&!this.autoscale){if(this.forceTickAt0){if(min>0){min=0}if(max<0){max=0}}if(this.forceTickAt100){if(min>100){min=100}if(max<100){max=100}}var keepMin=false,keepMax=false;if(this.min!=null){keepMin=true}else if(this.max!=null){keepMax=true}var ret=$.jqplot.LinearTickGenerator(min,max,this._scalefact,_numberTicks,keepMin,keepMax);var tumin=this.min!=null?min:min+range*(this.padMin-1);var tumax=this.max!=null?max:max-range*(this.padMax-1);if(mintumax){tumin=this.min!=null?min:min-range*(this.padMin-1);tumax=this.max!=null?max:max+range*(this.padMax-1);ret=$.jqplot.LinearTickGenerator(tumin,tumax,this._scalefact,_numberTicks,keepMin,keepMax)}this.min=ret[0];this.max=ret[1];this.numberTicks=ret[2];this._autoFormatString=ret[3];this.tickInterval=ret[4]}else{if(min==max){var adj=.05;if(min>0){adj=Math.max(Math.log(min)/Math.LN10,.05)}min-=adj;max+=adj}if(this.autoscale&&this.min==null&&this.max==null){var rrange,ti,margin;var forceMinZero=false;var forceZeroLine=false;var intervals={min:null,max:null,average:null,stddev:null};for(var i=0;ivmax){vmax=vals[j]}}var dp=(vmax-vmin)/vmax;if(s.renderer.constructor==$.jqplot.BarRenderer){if(vmin>=0&&(s.fillToZero||dp>.1)){forceMinZero=true}else{forceMinZero=false;if(s.fill&&s.fillToZero&&vmin<0&&vmax>0){forceZeroLine=true}else{forceZeroLine=false}}}else if(s.fill){if(vmin>=0&&(s.fillToZero||dp>.1)){forceMinZero=true}else if(vmin<0&&vmax>0&&s.fillToZero){forceMinZero=false;forceZeroLine=true}else{forceMinZero=false;forceZeroLine=false}}else if(vmin<0){forceMinZero=false}}}if(forceMinZero){this.numberTicks=2+Math.ceil((dim-(this.tickSpacing-1))/this.tickSpacing);this.min=0;userMin=0;ti=max/(this.numberTicks-1);temp=Math.pow(10,Math.abs(Math.floor(Math.log(ti)/Math.LN10)));if(ti/temp==parseInt(ti/temp,10)){ti+=temp}this.tickInterval=Math.ceil(ti/temp)*temp;this.max=this.tickInterval*(this.numberTicks-1)}else if(forceZeroLine){this.numberTicks=2+Math.ceil((dim-(this.tickSpacing-1))/this.tickSpacing);var ntmin=Math.ceil(Math.abs(min)/range*(this.numberTicks-1));var ntmax=this.numberTicks-1-ntmin;ti=Math.max(Math.abs(min/ntmin),Math.abs(max/ntmax));temp=Math.pow(10,Math.abs(Math.floor(Math.log(ti)/Math.LN10)));this.tickInterval=Math.ceil(ti/temp)*temp;this.max=this.tickInterval*ntmax;this.min=-this.tickInterval*ntmin}else{if(this.numberTicks==null){if(this.tickInterval){this.numberTicks=3+Math.ceil(range/this.tickInterval)}else{this.numberTicks=2+Math.ceil((dim-(this.tickSpacing-1))/this.tickSpacing)}}if(this.tickInterval==null){ti=range/(this.numberTicks-1);if(ti<1){temp=Math.pow(10,Math.abs(Math.floor(Math.log(ti)/Math.LN10)))}else{temp=1}this.tickInterval=Math.ceil(ti*temp*this.pad)/temp}else{temp=1/this.tickInterval}rrange=this.tickInterval*(this.numberTicks-1);margin=(rrange-range)/2;if(this.min==null){this.min=Math.floor(temp*(min-margin))/temp}if(this.max==null){this.max=this.min+rrange}}var sf=$.jqplot.getSignificantFigures(this.tickInterval);var fstr;if(sf.digitsLeft>=sf.significantDigits){fstr="%d"}else{var temp=Math.max(0,5-sf.digitsLeft);temp=Math.min(temp,sf.digitsRight);fstr="%."+temp+"f"}this._autoFormatString=fstr}else{rmin=this.min!=null?this.min:min-range*(this.padMin-1);rmax=this.max!=null?this.max:max+range*(this.padMax-1);range=rmax-rmin;if(this.numberTicks==null){if(this.tickInterval!=null){this.numberTicks=Math.ceil((rmax-rmin)/this.tickInterval)+1}else if(dim>100){this.numberTicks=parseInt(3+(dim-100)/75,10)}else{this.numberTicks=2}}if(this.tickInterval==null){this.tickInterval=range/(this.numberTicks-1)}if(this.max==null){rmax=rmin+this.tickInterval*(this.numberTicks-1)}if(this.min==null){rmin=rmax-this.tickInterval*(this.numberTicks-1)}var sf=$.jqplot.getSignificantFigures(this.tickInterval);var fstr;if(sf.digitsLeft>=sf.significantDigits){fstr="%d"}else{var temp=Math.max(0,5-sf.digitsLeft);temp=Math.min(temp,sf.digitsRight);fstr="%."+temp+"f"}this._autoFormatString=fstr;this.min=rmin;this.max=rmax}if(this.renderer.constructor==$.jqplot.LinearAxisRenderer&&this._autoFormatString==""){range=this.max-this.min;var temptick=new this.tickRenderer(this.tickOptions);var fs=temptick.formatString||$.jqplot.config.defaultTickFormatString;var fs=fs.match($.jqplot.sprintf.regex)[0];var precision=0;if(fs){if(fs.search(/[fFeEgGpP]/)>-1){var m=fs.match(/\%\.(\d{0,})?[eEfFgGpP]/);if(m){precision=parseInt(m[1],10)}else{precision=6}}else if(fs.search(/[di]/)>-1){precision=0}var fact=Math.pow(10,-precision);if(this.tickIntervalthis.breakPoints[0]&&uthis.breakPoints[0]&&uthis.breakPoints[0]&&u=this.breakPoints[1]){return(u-max)*pixellength/unitlength}else{return(u+this.breakPoints[1]-this.breakPoints[0]-max)*pixellength/unitlength}};this.series_p2u=function(p){return p*unitlength/pixellength+max}}}else{this.p2u=function(p){return(p-offmin)*unitlength/pixellength+min};this.u2p=function(u){return(u-min)*pixellength/unitlength+offmin};if(this.name=="xaxis"||this.name=="x2axis"){this.series_u2p=function(u){return(u-min)*pixellength/unitlength};this.series_p2u=function(p){return p*unitlength/pixellength+min}}else{this.series_u2p=function(u){return(u-max)*pixellength/unitlength};this.series_p2u=function(p){return p*unitlength/pixellength+max}}}if(this.show){if(this.name=="xaxis"||this.name=="x2axis"){for(var i=0;i0){shim=-t._textRenderer.height*Math.cos(-t._textRenderer.angle)/2}else{shim=-t.getHeight()+t._textRenderer.height*Math.cos(t._textRenderer.angle)/2}break;case"middle":shim=-t.getHeight()/2;break;default:shim=-t.getHeight()/2;break}}else{shim=-t.getHeight()/2}var val=this.u2p(t.value)+shim+"px";t._elem.css("top",val);t.pack()}}if(lshow){var h=this._label._elem.outerHeight(true);this._label._elem.css("top",offmax-pixellength/2-h/2+"px");if(this.name=="yaxis"){this._label._elem.css("left","0px")}else{this._label._elem.css("right","0px")}this._label.pack()}}}ticks=null};function bestFormatString(interval){var fstr;interval=Math.abs(interval);if(interval>=10){fstr="%d"}else if(interval>1){if(interval===parseInt(interval,10)){fstr="%d"}else{fstr="%.1f"}}else{var expv=-Math.floor(Math.log(interval)/Math.LN10);fstr="%."+expv+"f"}return fstr}var _factors=[.1,.2,.3,.4,.5,.8,1,2,3,4,5];var _getLowerFactor=function(f){var i=_factors.indexOf(f);if(i>0){return _factors[i-1]}else{return _factors[_factors.length-1]/100}};var _getHigherFactor=function(f){var i=_factors.indexOf(f);if(i<_factors.length-1){return _factors[i+1]}else{return _factors[0]*100}};function bestConstrainedInterval(min,max,nttarget){var low=Math.floor(nttarget/2);var hi=Math.ceil(nttarget*1.5);var badness=Number.MAX_VALUE;var r=max-min;var temp;var sd;var bestNT;var gsf=$.jqplot.getSignificantFigures;var fsd;var fs;var currentNT;var bestPrec;for(var i=0,l=hi-low+1;i5){interval=10*magnitude}else if(residual>2){interval=5*magnitude}else if(residual>1){interval=2*magnitude}else{interval=magnitude}}else{if(residual>5){interval=10*magnitude}else if(residual>4){interval=5*magnitude}else if(residual>3){interval=4*magnitude}else if(residual>2){interval=3*magnitude}else if(residual>1){interval=2*magnitude}else{interval=magnitude}}return interval}function bestLinearInterval(range,scalefact){scalefact=scalefact||1;var expv=Math.floor(Math.log(range)/Math.LN10);var magnitude=Math.pow(10,expv);var f=range/magnitude;var fact;f=f/scalefact;if(f<=.38){fact=.1}else if(f<=1.6){fact=.2}else if(f<=4){fact=.5}else if(f<=8){fact=1}else if(f<=16){fact=2}else{fact=5}return fact*magnitude}function bestLinearComponents(range,scalefact){var expv=Math.floor(Math.log(range)/Math.LN10);var magnitude=Math.pow(10,expv);var f=range/magnitude;var interval;var fact;f=f/scalefact;if(f<=.38){fact=.1}else if(f<=1.6){fact=.2}else if(f<=4){fact=.5}else if(f<=8){fact=1}else if(f<=16){fact=2}else{fact=5}interval=fact*magnitude;return[interval,fact,magnitude]}$.jqplot.LinearTickGenerator=function(axis_min,axis_max,scalefact,numberTicks,keepMin,keepMax){keepMin=keepMin===null?false:keepMin;keepMax=keepMax===null||keepMin?false:keepMax;if(axis_min===axis_max){axis_max=axis_max?0:1}scalefact=scalefact||1;if(axis_maxw){w=tempright}if(tempbottom>h){h=tempbottom}})}newCanvas.width=w+Number(x_offset);newCanvas.height=h+Number(y_offset);var newContext=newCanvas.getContext("2d");newContext.save();newContext.fillStyle=backgroundColor;newContext.fillRect(0,0,newCanvas.width,newCanvas.height);newContext.restore();newContext.translate(transx,transy);newContext.textAlign="left";newContext.textBaseline="top";function getLineheight(el){var lineheight=parseInt($(el).css("line-height"),10);if(isNaN(lineheight)){lineheight=parseInt($(el).css("font-size"),10)*1.2}return lineheight}function writeWrappedText(el,context,text,left,top,canvasWidth){var lineheight=getLineheight(el);var tagwidth=$(el).innerWidth();var tagheight=$(el).innerHeight();var words=text.split(/\s+/);var wl=words.length;var w="";var breaks=[];var temptop=top;var templeft=left;for(var i=0;itagwidth&&w.length>words[i].length){breaks.push(i);w="";i--}}if(breaks.length===0){if($(el).css("textAlign")==="center"){templeft=left+(canvasWidth-context.measureText(w).width)/2-transx}context.fillText(text,templeft,top)}else{w=words.slice(0,breaks[0]).join(" ");if($(el).css("textAlign")==="center"){templeft=left+(canvasWidth-context.measureText(w).width)/2-transx}context.fillText(w,templeft,temptop);temptop+=lineheight;for(var i=1,l=breaks.length;i0){newContext.strokeRect(left,top,$(el).innerWidth(),$(el).innerHeight())}$(el).find("div.jqplot-table-legend-swatch-outline").each(function(){var elem=$(this);newContext.strokeStyle=elem.css("border-top-color");var l=left+elem.position().left;var t=top+elem.position().top;newContext.strokeRect(l,t,elem.innerWidth(),elem.innerHeight());l+=parseInt(elem.css("padding-left"),10);t+=parseInt(elem.css("padding-top"),10);var h=elem.innerHeight()-2*parseInt(elem.css("padding-top"),10);var w=elem.innerWidth()-2*parseInt(elem.css("padding-left"),10);var swatch=elem.children("div.jqplot-table-legend-swatch");newContext.fillStyle=swatch.css("background-color");newContext.fillRect(l,t,w,h)});$(el).find("td.jqplot-table-legend-label").each(function(){var elem=$(this);var l=left+elem.position().left;var t=top+elem.position().top+parseInt(elem.css("padding-top"),10);newContext.font=elem.jqplotGetComputedFontStyle();newContext.fillStyle=elem.css("color");writeWrappedText(elem,newContext,elem.text(),l,t,w)});var elem=null}else if(tagname=="canvas"){newContext.drawImage(el,left,top)}}$(this).children().each(function(){_jqpToImage(this,x_offset,y_offset)});return newCanvas};$.fn.jqplotToImageStr=function(options){var imgCanvas=$(this).jqplotToImageCanvas(options);if(imgCanvas){return imgCanvas.toDataURL("image/png")}else{return null}};$.fn.jqplotToImageElem=function(options){var elem=document.createElement("img");var str=$(this).jqplotToImageStr(options);elem.src=str;return elem};$.fn.jqplotToImageElemStr=function(options){var str="";return str};$.fn.jqplotSaveImage=function(){var imgData=$(this).jqplotToImageStr({});if(imgData){window.location.href=imgData.replace("image/png","image/octet-stream")}};$.fn.jqplotViewImage=function(){var imgStr=$(this).jqplotToImageElemStr({});var imgData=$(this).jqplotToImageStr({});if(imgStr){var w=window.open("");w.document.open("image/png");w.document.write(imgStr);w.document.close();w=null}};var jsDate=function(){this.syntax=jsDate.config.syntax;this._type="jsDate";this.proxy=new Date;this.options={};this.locale=jsDate.regional.getLocale();this.formatString="";this.defaultCentury=jsDate.config.defaultCentury;switch(arguments.length){case 0:break;case 1:if(get_type(arguments[0])=="[object Object]"&&arguments[0]._type!="jsDate"){var opts=this.options=arguments[0];this.syntax=opts.syntax||this.syntax;this.defaultCentury=opts.defaultCentury||this.defaultCentury;this.proxy=jsDate.createDate(opts.date)}else{this.proxy=jsDate.createDate(arguments[0])}break;default:var a=[];for(var i=0;i0?"floor":"ceil"](unitDiff)};jsDate.prototype.getAbbrDayName=function(){return jsDate.regional[this.locale]["dayNamesShort"][this.proxy.getDay()]};jsDate.prototype.getAbbrMonthName=function(){return jsDate.regional[this.locale]["monthNamesShort"][this.proxy.getMonth()]};jsDate.prototype.getAMPM=function(){return this.proxy.getHours()>=12?"PM":"AM"};jsDate.prototype.getAmPm=function(){return this.proxy.getHours()>=12?"pm":"am"};jsDate.prototype.getCentury=function(){return parseInt(this.proxy.getFullYear()/100,10)};jsDate.prototype.getDate=function(){return this.proxy.getDate()};jsDate.prototype.getDay=function(){return this.proxy.getDay()};jsDate.prototype.getDayOfWeek=function(){var dow=this.proxy.getDay();return dow===0?7:dow};jsDate.prototype.getDayOfYear=function(){var d=this.proxy;var ms=d-new Date(""+d.getFullYear()+"/1/1 GMT");ms+=d.getTimezoneOffset()*6e4;d=null;return parseInt(ms/6e4/60/24,10)+1};jsDate.prototype.getDayName=function(){return jsDate.regional[this.locale]["dayNames"][this.proxy.getDay()]};jsDate.prototype.getFullWeekOfYear=function(){var d=this.proxy;var doy=this.getDayOfYear();var rdow=6-d.getDay();var woy=parseInt((doy+rdow)/7,10);return woy};jsDate.prototype.getFullYear=function(){return this.proxy.getFullYear()};jsDate.prototype.getGmtOffset=function(){var hours=this.proxy.getTimezoneOffset()/60;var prefix=hours<0?"+":"-";hours=Math.abs(hours);return prefix+addZeros(Math.floor(hours),2)+":"+addZeros(hours%1*60,2)};jsDate.prototype.getHours=function(){return this.proxy.getHours()};jsDate.prototype.getHours12=function(){var hours=this.proxy.getHours();return hours>12?hours-12:hours==0?12:hours};jsDate.prototype.getIsoWeek=function(){var d=this.proxy;var woy=this.getWeekOfYear();var dow1_1=new Date(""+d.getFullYear()+"/1/1").getDay();var idow=woy+(dow1_1>4||dow1_1<=1?0:1);if(idow==53&&new Date(""+d.getFullYear()+"/12/31").getDay()<4){idow=1}else if(idow===0){d=new jsDate(new Date(""+(d.getFullYear()-1)+"/12/31"));idow=d.getIsoWeek()}d=null;return idow};jsDate.prototype.getMilliseconds=function(){return this.proxy.getMilliseconds()};jsDate.prototype.getMinutes=function(){return this.proxy.getMinutes()};jsDate.prototype.getMonth=function(){return this.proxy.getMonth()};jsDate.prototype.getMonthName=function(){return jsDate.regional[this.locale]["monthNames"][this.proxy.getMonth()]};jsDate.prototype.getMonthNumber=function(){return this.proxy.getMonth()+1};jsDate.prototype.getSeconds=function(){return this.proxy.getSeconds()};jsDate.prototype.getShortYear=function(){return this.proxy.getYear()%100};jsDate.prototype.getTime=function(){return this.proxy.getTime()};jsDate.prototype.getTimezoneAbbr=function(){return this.proxy.toString().replace(/^.*\(([^)]+)\)$/,"$1")};jsDate.prototype.getTimezoneName=function(){var match=/(?:\((.+)\)$| ([A-Z]{3}) )/.exec(this.toString());return match[1]||match[2]||"GMT"+this.getGmtOffset()};jsDate.prototype.getTimezoneOffset=function(){return this.proxy.getTimezoneOffset()};jsDate.prototype.getWeekOfYear=function(){var doy=this.getDayOfYear();var rdow=7-this.getDayOfWeek();var woy=parseInt((doy+rdow)/7,10);return woy};jsDate.prototype.getUnix=function(){return Math.round(this.proxy.getTime()/1e3,0)};jsDate.prototype.getYear=function(){return this.proxy.getYear()};jsDate.prototype.next=function(unit){unit=unit||"day";return this.clone().add(1,unit)};jsDate.prototype.set=function(){switch(arguments.length){case 0:this.proxy=new Date;break;case 1:if(get_type(arguments[0])=="[object Object]"&&arguments[0]._type!="jsDate"){var opts=this.options=arguments[0];this.syntax=opts.syntax||this.syntax;this.defaultCentury=opts.defaultCentury||this.defaultCentury;this.proxy=jsDate.createDate(opts.date)}else{this.proxy=jsDate.createDate(arguments[0])}break;default:var a=[];for(var i=0;i0?"floor":"ceil"](number/12));var prevMonth=d.getMonth()+number%12;if(prevMonth==12){prevMonth=0;d.setYear(d.getFullYear()+1)}else if(prevMonth==-1){prevMonth=11;d.setYear(d.getFullYear()-1)}d.setMonth(prevMonth)},diff:function(d1,d2){var diffYears=d1.getFullYear()-d2.getFullYear();var diffMonths=d1.getMonth()-d2.getMonth()+diffYears*12;var diffDays=d1.getDate()-d2.getDate();return diffMonths+diffDays/30}},year:{add:function(d,number){d.setYear(d.getFullYear()+Math[number>0?"floor":"ceil"](number))},diff:function(d1,d2){return multipliers.month.diff(d1,d2)/12}}};for(var unit in multipliers){if(unit.substring(unit.length-1)!="s"){multipliers[unit+"s"]=multipliers[unit]}}var format=function(d,code,syntax){if(jsDate.formats[syntax]["shortcuts"][code]){return jsDate.strftime(d,jsDate.formats[syntax]["shortcuts"][code],syntax)}else{var getter=(jsDate.formats[syntax]["codes"][code]||"").split(".");var nbr=d["get"+getter[0]]?d["get"+getter[0]]():"";if(getter[1]){nbr=addZeros(nbr,getter[1])}return nbr}};jsDate.strftime=function(d,formatString,syntax,locale){var syn="perl";var loc=jsDate.regional.getLocale();if(syntax&&jsDate.formats.hasOwnProperty(syntax)){syn=syntax}else if(syntax&&jsDate.regional.hasOwnProperty(syntax)){loc=syntax}if(locale&&jsDate.formats.hasOwnProperty(locale)){syn=locale}else if(locale&&jsDate.regional.hasOwnProperty(locale)){loc=locale}if(get_type(d)!="[object Object]"||d._type!="jsDate"){d=new jsDate(d);d.locale=loc}if(!formatString){formatString=d.formatString||jsDate.regional[loc]["formatString"]}var source=formatString||"%Y-%m-%d",result="",match;while(source.length>0){if(match=source.match(jsDate.formats[syn].codes.matcher)){result+=source.slice(0,match.index);result+=(match[1]||"")+format(d,match[2],syn);source=source.slice(match.index+match[0].length)}else{result+=source;source=""}}return result};jsDate.formats={ISO:"%Y-%m-%dT%H:%M:%S.%N%G",SQL:"%Y-%m-%d %H:%M:%S"};jsDate.formats.perl={codes:{matcher:/()%(#?(%|[a-z]))/i,Y:"FullYear",y:"ShortYear.2",m:"MonthNumber.2","#m":"MonthNumber",B:"MonthName",b:"AbbrMonthName",d:"Date.2","#d":"Date",e:"Date",A:"DayName",a:"AbbrDayName",w:"Day",H:"Hours.2","#H":"Hours",I:"Hours12.2","#I":"Hours12",p:"AMPM",M:"Minutes.2","#M":"Minutes",S:"Seconds.2","#S":"Seconds",s:"Unix",N:"Milliseconds.3","#N":"Milliseconds",O:"TimezoneOffset",Z:"TimezoneName",G:"GmtOffset"},shortcuts:{F:"%Y-%m-%d",T:"%H:%M:%S",X:"%H:%M:%S",x:"%m/%d/%y",D:"%m/%d/%y","#c":"%a %b %e %H:%M:%S %Y",v:"%e-%b-%Y",R:"%H:%M",r:"%I:%M:%S %p",t:"\t",n:"\n","%":"%"}};jsDate.formats.php={codes:{matcher:/()%((%|[a-z]))/i,a:"AbbrDayName",A:"DayName",d:"Date.2",e:"Date",j:"DayOfYear.3",u:"DayOfWeek",w:"Day",U:"FullWeekOfYear.2",V:"IsoWeek.2",W:"WeekOfYear.2",b:"AbbrMonthName",B:"MonthName",m:"MonthNumber.2",h:"AbbrMonthName",C:"Century.2",y:"ShortYear.2",Y:"FullYear",H:"Hours.2",I:"Hours12.2",l:"Hours12",p:"AMPM",P:"AmPm",M:"Minutes.2",S:"Seconds.2",s:"Unix",O:"TimezoneOffset",z:"GmtOffset",Z:"TimezoneAbbr"},shortcuts:{D:"%m/%d/%y",F:"%Y-%m-%d",T:"%H:%M:%S",X:"%H:%M:%S",x:"%m/%d/%y",R:"%H:%M",r:"%I:%M:%S %p",t:"\t",n:"\n","%":"%"}};jsDate.createDate=function(date){if(date==null){return new Date}if(date instanceof Date){return date}if(typeof date=="number"){return new Date(date)}var parsable=String(date).replace(/^\s*(.+)\s*$/g,"$1");parsable=parsable.replace(/^([0-9]{1,4})-([0-9]{1,2})-([0-9]{1,4})/,"$1/$2/$3");parsable=parsable.replace(/^(3[01]|[0-2]?\d)[-\/]([a-z]{3,})[-\/](\d{4})/i,"$1 $2 $3");var match=parsable.match(/^(3[01]|[0-2]?\d)[-\/]([a-z]{3,})[-\/](\d{2})\D*/i);if(match&&match.length>3){var m3=parseFloat(match[3]);var ny=jsDate.config.defaultCentury+m3;ny=String(ny);parsable=parsable.replace(/^(3[01]|[0-2]?\d)[-\/]([a-z]{3,})[-\/](\d{2})\D*/i,match[1]+" "+match[2]+" "+ny)}match=parsable.match(/^([0-9]{1,2})[-\/]([0-9]{1,2})[-\/]([0-9]{1,2})[^0-9]/);function h1(parsable,match){var m1=parseFloat(match[1]);var m2=parseFloat(match[2]);var m3=parseFloat(match[3]);var cent=jsDate.config.defaultCentury;var ny,nd,nm,str;if(m1>31){nd=m3;nm=m2;ny=cent+m1}else{nd=m2;nm=m1;ny=cent+m3}str=nm+"/"+nd+"/"+ny;return parsable.replace(/^([0-9]{1,2})[-\/]([0-9]{1,2})[-\/]([0-9]{1,2})/,str)}if(match&&match.length>3){parsable=h1(parsable,match)}var match=parsable.match(/^([0-9]{1,2})[-\/]([0-9]{1,2})[-\/]([0-9]{1,2})$/);if(match&&match.length>3){parsable=h1(parsable,match)}var i=0;var length=jsDate.matchers.length;var pattern,ms,current=parsable,obj;while(i31){nd=m3;ny=cent+m1}else{nd=m1;ny=cent+m3}var nm=inArray(match[2],jsDate.regional[jsDate.regional.getLocale()]["monthNamesShort"]);if(nm==-1){nm=inArray(match[2],jsDate.regional[jsDate.regional.getLocale()]["monthNames"])}d.setFullYear(ny,nm,nd);d.setHours(0,0,0,0);return d}else{return str}}];function inArray(elem,array){if(array.indexOf){return array.indexOf(elem)}for(var i=0,length=array.length;i=len?"":Array(1+len-str.length>>>0).join(chr);return leftJustify?str+padding:padding+str}function thousand_separate(value){var value_str=String(value);for(var i=10;i>0;i--){if(value_str==(value_str=value_str.replace(/^(\d+)(\d{3})/,"$1"+$.jqplot.sprintf.thousandsSeparator+"$2")))break}return value_str}function justify(value,prefix,leftJustify,minWidth,zeroPad,htmlSpace){var diff=minWidth-value.length;if(diff>0){var spchar=" ";if(htmlSpace){spchar=" "}if(leftJustify||!zeroPad){value=pad(value,minWidth,spchar,leftJustify)}else{value=value.slice(0,prefix.length)+pad("",diff,"0",true)+value.slice(prefix.length)}}return value}function formatBaseX(value,base,prefix,leftJustify,minWidth,precision,zeroPad,htmlSpace){var number=value>>>0;prefix=prefix&&number&&{2:"0b",8:"0",16:"0x"}[base]||"";value=prefix+pad(number.toString(base),precision||0,"0",false);return justify(value,prefix,leftJustify,minWidth,zeroPad,htmlSpace)}function formatString(value,leftJustify,minWidth,precision,zeroPad,htmlSpace){if(precision!=null){value=value.slice(0,precision)}return justify(value,"",leftJustify,minWidth,zeroPad,htmlSpace)}var a=arguments,i=0,format=a[i++];return format.replace($.jqplot.sprintf.regex,function(substring,valueIndex,flags,minWidth,_,precision,type){if(substring=="%%"){return"%"}var leftJustify=false,positivePrefix="",zeroPad=false,prefixBaseX=false,htmlSpace=false,thousandSeparation=false;for(var j=0;flags&&j-1?6:type=="d"?0:void 0}else if(precision=="*"){precision=+a[i++]}else if(precision.charAt(0)=="*"){precision=+a[precision.slice(1,-1)]}else{precision=+precision}var value=valueIndex?a[valueIndex.slice(0,-1)]:a[i++];switch(type){case"s":{if(value==null){return""}return formatString(String(value),leftJustify,minWidth,precision,zeroPad,htmlSpace)}case"c":return formatString(String.fromCharCode(+value),leftJustify,minWidth,precision,zeroPad,htmlSpace);case"b":return formatBaseX(value,2,prefixBaseX,leftJustify,minWidth,precision,zeroPad,htmlSpace);case"o":return formatBaseX(value,8,prefixBaseX,leftJustify,minWidth,precision,zeroPad,htmlSpace);case"x":return formatBaseX(value,16,prefixBaseX,leftJustify,minWidth,precision,zeroPad,htmlSpace);case"X":return formatBaseX(value,16,prefixBaseX,leftJustify,minWidth,precision,zeroPad,htmlSpace).toUpperCase();case"u":return formatBaseX(value,10,prefixBaseX,leftJustify,minWidth,precision,zeroPad,htmlSpace);case"i":{var number=parseInt(+value,10);if(isNaN(number)){return""}var prefix=number<0?"-":positivePrefix;var number_str=thousandSeparation?thousand_separate(String(Math.abs(number))):String(Math.abs(number));value=prefix+pad(number_str,precision,"0",false);return justify(value,prefix,leftJustify,minWidth,zeroPad,htmlSpace)}case"d":{var number=Math.round(+value);if(isNaN(number)){return""}var prefix=number<0?"-":positivePrefix;var number_str=thousandSeparation?thousand_separate(String(Math.abs(number))):String(Math.abs(number));value=prefix+pad(number_str,precision,"0",false);return justify(value,prefix,leftJustify,minWidth,zeroPad,htmlSpace)}case"e":case"E":case"f":case"F":case"g":case"G":{var number=+value;if(isNaN(number)){return""}var prefix=number<0?"-":positivePrefix;var method=["toExponential","toFixed","toPrecision"]["efg".indexOf(type.toLowerCase())];var textTransform=["toString","toUpperCase"]["eEfFgG".indexOf(type)%2];var number_str=Math.abs(number)[method](precision);var parts=number_str.toString().split(".");parts[0]=thousandSeparation?thousand_separate(parts[0]):parts[0];number_str=parts.join($.jqplot.sprintf.decimalMark);value=prefix+number_str;var justified=justify(value,prefix,leftJustify,minWidth,zeroPad,htmlSpace)[textTransform]();return justified}case"p":case"P":{var number=+value;if(isNaN(number)){return""}var prefix=number<0?"-":positivePrefix;var parts=String(Number(Math.abs(number)).toExponential()).split(/e|E/);var sd=parts[0].indexOf(".")!=-1?parts[0].length-1:String(number).length;var zeros=parts[1]<0?-parts[1]-1:0;if(Math.abs(number)<1){if(sd+zeros<=precision){value=prefix+Math.abs(number).toPrecision(sd)}else{if(sd<=precision-1){value=prefix+Math.abs(number).toExponential(sd-1)}else{value=prefix+Math.abs(number).toExponential(precision-1)}}}else{var prec=sd<=precision?sd:precision;value=prefix+Math.abs(number).toPrecision(prec)}var textTransform=["toString","toUpperCase"]["pP".indexOf(type)%2];return justify(value,prefix,leftJustify,minWidth,zeroPad,htmlSpace)[textTransform]()}case"n":return"";default:return substring}})};$.jqplot.sprintf.thousandsSeparator=",";$.jqplot.sprintf.decimalMark=".";$.jqplot.sprintf.regex=/%%|%(\d+\$)?([-+#0&\' ]*)(\*\d+\$|\*|\d+)?(\.(\*\d+\$|\*|\d+))?([nAscboxXuidfegpEGP])/g;$.jqplot.getSignificantFigures=function(number){var parts=String(Number(Math.abs(number)).toExponential()).split(/e|E/);var sd=parts[0].indexOf(".")!=-1?parts[0].length-1:parts[0].length;var zeros=parts[1]<0?-parts[1]-1:0;var expn=parseInt(parts[1],10);var dleft=expn+1>0?expn+1:0;var dright=sd<=dleft?0:sd-expn-1;return{significantDigits:sd,digitsLeft:dleft,digitsRight:dright,zeros:zeros,exponent:expn}};$.jqplot.getPrecision=function(number){return $.jqplot.getSignificantFigures(number).digitsRight};var backCompat=$.uiBackCompat!==false;$.jqplot.effects={effect:{}};var dataSpace="jqplot.storage.";$.extend($.jqplot.effects,{version:"1.9pre",save:function(element,set){for(var i=0;i").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),size={width:element.width(),height:element.height()},active=document.activeElement;element.wrap(wrapper);if(element[0]===active||$.contains(element[0],active)){$(active).focus()}wrapper=element.parent();if(element.css("position")==="static"){wrapper.css({position:"relative"});element.css({position:"relative"})}else{$.extend(props,{position:element.css("position"),zIndex:element.css("z-index")});$.each(["top","left","bottom","right"],function(i,pos){props[pos]=element.css(pos);if(isNaN(parseInt(props[pos],10))){props[pos]="auto"}});element.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})}element.css(size);return wrapper.css(props).show()},removeWrapper:function(element){var active=document.activeElement;if(element.parent().is(".ui-effects-wrapper")){element.parent().replaceWith(element);if(element[0]===active||$.contains(element[0],active)){$(active).focus()}}return element}});function _normalizeArguments(effect,options,speed,callback){if($.isPlainObject(effect)){return effect}effect={effect:effect};if(options===undefined){options={}}if($.isFunction(options)){callback=options;speed=null;options={}}if($.type(options)==="number"||$.fx.speeds[options]){callback=speed;speed=options;options={}}if($.isFunction(speed)){callback=speed;speed=null}if(options){$.extend(effect,options)}speed=speed||options.duration;effect.duration=$.fx.off?0:typeof speed==="number"?speed:speed in $.fx.speeds?$.fx.speeds[speed]:$.fx.speeds._default;effect.complete=callback||options.complete;return effect}function standardSpeed(speed){if(!speed||typeof speed==="number"||$.fx.speeds[speed]){return true}if(typeof speed==="string"&&!$.jqplot.effects.effect[speed]){if(backCompat&&$.jqplot.effects[speed]){return false}return true}return false}$.fn.extend({jqplotEffect:function(effect,options,speed,callback){var args=_normalizeArguments.apply(this,arguments),mode=args.mode,queue=args.queue,effectMethod=$.jqplot.effects.effect[args.effect],oldEffectMethod=!effectMethod&&backCompat&&$.jqplot.effects[args.effect];if($.fx.off||!(effectMethod||oldEffectMethod)){if(mode){return this[mode](args.duration,args.complete)}else{return this.each(function(){if(args.complete){args.complete.call(this)}})}}function run(next){var elem=$(this),complete=args.complete,mode=args.mode;function done(){if($.isFunction(complete)){complete.call(elem[0])}if($.isFunction(next)){next()}}if(elem.is(":hidden")?mode==="hide":mode==="show"){done()}else{effectMethod.call(elem[0],args,done)}}if(effectMethod){return queue===false?this.each(run):this.queue(queue||"fx",run)}else{return oldEffectMethod.call(this,{options:args,duration:args.duration,callback:args.complete,mode:args.mode})}}});var rvertical=/up|down|vertical/,rpositivemotion=/up|left|vertical|horizontal/;$.jqplot.effects.effect.blind=function(o,done){var el=$(this),props=["position","top","bottom","left","right","height","width"],mode=$.jqplot.effects.setMode(el,o.mode||"hide"),direction=o.direction||"up",vertical=rvertical.test(direction),ref=vertical?"height":"width",ref2=vertical?"top":"left",motion=rpositivemotion.test(direction),animation={},show=mode==="show",wrapper,distance,top;if(el.parent().is(".ui-effects-wrapper")){$.jqplot.effects.save(el.parent(),props)}else{$.jqplot.effects.save(el,props)}el.show();top=parseInt(el.css("top"),10);wrapper=$.jqplot.effects.createWrapper(el).css({overflow:"hidden"});distance=vertical?wrapper[ref]()+top:wrapper[ref]();animation[ref]=show?String(distance):"0";if(!motion){el.css(vertical?"bottom":"right",0).css(vertical?"top":"left","").css({position:"absolute"});animation[ref2]=show?"0":String(distance)}if(show){wrapper.css(ref,0);if(!motion){wrapper.css(ref2,distance)}}wrapper.animate(animation,{duration:o.duration,easing:o.easing,queue:false,complete:function(){if(mode==="hide"){el.hide()}$.jqplot.effects.restore(el,props);$.jqplot.effects.removeWrapper(el);done()}})}})(jQuery);




© 2015 - 2025 Weber Informatics LLC | Privacy Policy