/** * jqPlot * Pure JavaScript plotting plugin using jQuery * * Version: 1.0.0b2_r947 * * Copyright (c) 2009-2011 Chris Leonello * jqPlot is currently available for use in all personal or commercial projects * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can * choose the license that best suits your project and use it accordingly. * * Although not required, the author would appreciate an email letting him * know of any substantial use of jqPlot. You can reach the author at: * chris at jqplot dot com or see http://www.jqplot.com/info.php . * * If you are feeling kind and generous, consider supporting the project by * making a donation at: http://www.jqplot.com/donate.php . * * sprintf functions contained in jqplot.sprintf.js by Ash Searle: * * version 2007.04.27 * author Ash Searle * http://hexmen.com/blog/2007/03/printf-sprintf/ * http://hexmen.com/js/sprintf.js * The author (Ash Searle) has placed this code in the public domain: * "This code is unrestricted: you are free to use it however you like." * * included jsDate library by Chris Leonello: * * Copyright (c) 2010-2011 Chris Leonello * * jsDate is currently available for use in all personal or commercial projects * under both the MIT and GPL version 2.0 licenses. This means that you can * choose the license that best suits your project and use it accordingly. * * jsDate borrows many concepts and ideas from the Date Instance * Methods by Ken Snyder along with some parts of Ken's actual code. * * Ken's origianl Date Instance Methods and copyright notice: * * Ken Snyder (ken d snyder at gmail dot com) * 2008-09-10 * version 2.0.2 (http://kendsnyder.com/sandbox/date/) * Creative Commons Attribution License 3.0 (http://creativecommons.org/licenses/by/3.0/) * * jqplotToImage function based on Larry Siden's export-jqplot-to-png.js. * Larry has generously given permission to adapt his code for inclusion * into jqPlot. * * Larry's original code can be found here: * * https://github.com/lsiden/export-jqplot-to-png * * */ (function(G){var q;G.fn.emptyForce=function(){for(var aa=0,ab;(ab=G(this)[aa])!=null;aa++){if(ab.nodeType===1){jQuery.cleanData(ab.getElementsByTagName("*"))}if(G.jqplot_use_excanvas){ab.outerHTML=""}else{while(ab.firstChild){ab.removeChild(ab.firstChild)}}ab=null}return G(this)};G.fn.removeChildForce=function(aa){while(aa.firstChild){this.removeChildForce(aa.firstChild);aa.removeChild(aa.firstChild)}};G.jqplot=function(ag,ad,ab){var ac,aa;if(ab==null){if(jQuery.isArray(ad)){ac=ad;aa=null}else{if(typeof(ad)==="object"){ac=null;aa=ad}}}else{ac=ad;aa=ab}var af=new M();G("#"+ag).removeClass("jqplot-error");if(G.jqplot.config.catchErrors){try{af.init(ag,ac,aa);af.draw();af.themeEngine.init.call(af);return af}catch(ae){var ah=G.jqplot.config.errorMessage||ae.message;G("#"+ag).append('
'+ah+"
");G("#"+ag).addClass("jqplot-error");document.getElementById(ag).style.background=G.jqplot.config.errorBackground;document.getElementById(ag).style.border=G.jqplot.config.errorBorder;document.getElementById(ag).style.fontFamily=G.jqplot.config.errorFontFamily;document.getElementById(ag).style.fontSize=G.jqplot.config.errorFontSize;document.getElementById(ag).style.fontStyle=G.jqplot.config.errorFontStyle;document.getElementById(ag).style.fontWeight=G.jqplot.config.errorFontWeight}}else{af.init(ag,ac,aa);af.draw();af.themeEngine.init.call(af);return af}};G.jqplot.version="1.0.0b2_r947";G.jqplot.CanvasManager=function(){if(typeof G.jqplot.CanvasManager.canvases=="undefined"){G.jqplot.CanvasManager.canvases=[];G.jqplot.CanvasManager.free=[]}var aa=[];this.getCanvas=function(){var ad;var ac=true;if(!G.jqplot.use_excanvas){for(var ae=0,ab=G.jqplot.CanvasManager.canvases.length;ae887){G.jqplot.support_canvas_text.result=true}else{G.jqplot.support_canvas_text.result=!!(document.createElement("canvas").getContext&&typeof document.createElement("canvas").getContext("2d").fillText=="function")}}return G.jqplot.support_canvas_text.result};G.jqplot.use_excanvas=(G.browser.msie&&!G.jqplot.support_canvas())?true:false;G.jqplot.preInitHooks=[];G.jqplot.postInitHooks=[];G.jqplot.preParseOptionsHooks=[];G.jqplot.postParseOptionsHooks=[];G.jqplot.preDrawHooks=[];G.jqplot.postDrawHooks=[];G.jqplot.preDrawSeriesHooks=[];G.jqplot.postDrawSeriesHooks=[];G.jqplot.preDrawLegendHooks=[];G.jqplot.addLegendRowHooks=[];G.jqplot.preSeriesInitHooks=[];G.jqplot.postSeriesInitHooks=[];G.jqplot.preParseSeriesOptionsHooks=[];G.jqplot.postParseSeriesOptionsHooks=[];G.jqplot.eventListenerHooks=[];G.jqplot.preDrawSeriesShadowHooks=[];G.jqplot.postDrawSeriesShadowHooks=[];G.jqplot.ElemContainer=function(){this._elem;this._plotWidth;this._plotHeight;this._plotDimensions={height:null,width:null}};G.jqplot.ElemContainer.prototype.createElement=function(ad,af,ab,ac,ag){this._offsets=af;var aa=ab||"jqplot";var ae=document.createElement(ad);this._elem=G(ae);this._elem.addClass(aa);this._elem.css(ac);this._elem.attr(ag);ae=null;return this._elem};G.jqplot.ElemContainer.prototype.getWidth=function(){if(this._elem){return this._elem.outerWidth(true)}else{return null}};G.jqplot.ElemContainer.prototype.getHeight=function(){if(this._elem){return this._elem.outerHeight(true)}else{return null}};G.jqplot.ElemContainer.prototype.getPosition=function(){if(this._elem){return this._elem.position()}else{return{top:null,left:null,bottom:null,right:null}}};G.jqplot.ElemContainer.prototype.getTop=function(){return this.getPosition().top};G.jqplot.ElemContainer.prototype.getLeft=function(){return this.getPosition().left};G.jqplot.ElemContainer.prototype.getBottom=function(){return this._elem.css("bottom")};G.jqplot.ElemContainer.prototype.getRight=function(){return this._elem.css("right")};function r(aa){G.jqplot.ElemContainer.call(this);this.name=aa;this._series=[];this.show=false;this.tickRenderer=G.jqplot.AxisTickRenderer;this.tickOptions={};this.labelRenderer=G.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=G.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._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={}}r.prototype=new G.jqplot.ElemContainer();r.prototype.constructor=r;r.prototype.init=function(){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)};r.prototype.draw=function(aa,ab){if(this.__ticks){this.__ticks=null}return this.renderer.draw.call(this,aa,ab)};r.prototype.set=function(){this.renderer.set.call(this)};r.prototype.pack=function(ab,aa){if(this.show){this.renderer.pack.call(this,ab,aa)}if(this._min==null){this._min=this.min;this._max=this.max;this._tickInterval=this.tickInterval;this._numberTicks=this.numberTicks;this.__ticks=this._ticks}};r.prototype.reset=function(){this.renderer.reset.call(this)};r.prototype.resetScale=function(aa){G.extend(true,this,{min:null,max:null,numberTicks:null,tickInterval:null,_ticks:[],ticks:[]},aa);this.resetDataBounds()};r.prototype.resetDataBounds=function(){var ah=this._dataBounds;ah.min=null;ah.max=null;var ab,ai,af;var ac=(this.show)?true:false;for(var ae=0;aeah.max)||ah.max==null){ah.max=af[ad][0]}}else{if((af[ad][aa]!=null&&af[ad][aa]ah.max)||ah.max==null){ah.max=af[ad][ag]}}}if(ac&&ai.renderer.constructor!==G.jqplot.BarRenderer){ac=false}else{if(ac&&this._options.hasOwnProperty("forceTickAt0")&&this._options.forceTickAt0==false){ac=false}else{if(ac&&ai.renderer.constructor===G.jqplot.BarRenderer){if(ai.barDirection=="vertical"&&this.name!="xaxis"&&this.name!="x2axis"){if(this._options.pad!=null||this._options.padMin!=null){ac=false}}else{if(ai.barDirection=="horizontal"&&(this.name=="xaxis"||this.name=="x2axis")){if(this._options.pad!=null||this._options.padMin!=null){ac=false}}}}}}}if(ac&&this.renderer.constructor===G.jqplot.LinearAxisRenderer&&ah.min>=0){this.padMin=1;this.forceTickAt0=true}};function m(aa){G.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=G.jqplot.TableLegendRenderer;this.rendererOptions={};this.preDraw=false;this.marginTop=null;this.marginRight=null;this.marginBottom=null;this.marginLeft=null;this.escapeHtml=false;this._series=[];G.extend(true,this,aa)}m.prototype=new G.jqplot.ElemContainer();m.prototype.constructor=m;m.prototype.setOptions=function(aa){G.extend(true,this,aa);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}};m.prototype.init=function(){this.renderer=new this.renderer();this.renderer.init.call(this,this.rendererOptions)};m.prototype.draw=function(ab){for(var aa=0;aa');this.target.append(ao);ao.height(at);ao.width(ap);ao.css("top",this.eventCanvas._offsets.top);ao.css("left",this.eventCanvas._offsets.left);var ar=G('
');ao.append(ar);ar.html(this.noDataIndicator.indicator);var aq=ar.height();var an=ar.width();ar.height(aq);ar.width(an);ar.css("top",(at-aq)/2+"px")})}}this.data=ah;this.parseOptions(am);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;for(var ai=0;ai0){ai._prevPlotData=this.series[aj-1]._plotData}ai._sumy=0;ai._sumx=0;for(ah=ai.data.length-1;ah>-1;ah--){ai._sumy+=ai.data[ah][1];ai._sumx+=ai.data[ah][0]}};this.getNextSeriesColor=(function(af){var ae=0;var ag=af.seriesColors;return function(){if(ae=0&&ar>=0){aq.top+=at;aq.bottom+=at;aq.left+=ar;aq.right+=ar}}var am=["top","bottom","left","right"];for(var ai in am){if(this._gridPadding[am[ai]]==null&&aq[am[ai]]>0){this._gridPadding[am[ai]]=aq[am[ai]]}else{if(this._gridPadding[am[ai]]==null){this._gridPadding[am[ai]]=this._defaultGridPadding[am[ai]]}}}var ap=(this.legend.placement=="outsideGrid")?{top:this.title.getHeight(),left:0,right:0,bottom:0}:this._gridPadding;ae.xaxis.pack({position:"absolute",bottom:this._gridPadding.bottom-ae.xaxis.getHeight(),left:0,width:this._width},{min:this._gridPadding.left,max:this._width-this._gridPadding.right});ae.yaxis.pack({position:"absolute",top:0,left:this._gridPadding.left-ae.yaxis.getWidth(),height:this._height},{min:this._height-this._gridPadding.bottom,max:this._gridPadding.top});ae.x2axis.pack({position:"absolute",top:this._gridPadding.top-ae.x2axis.getHeight(),left:0,width:this._width},{min:this._gridPadding.left,max:this._width-this._gridPadding.right});for(al=8;al>0;al--){ae[ah[al-1]].pack({position:"absolute",top:0,right:this._gridPadding.right-af[al-1]},{min:this._height-this._gridPadding.bottom,max:this._gridPadding.top})}var ao=(this._width-this._gridPadding.left-this._gridPadding.right)/2+this._gridPadding.left-ae.yMidAxis.getWidth()/2;ae.yMidAxis.pack({position:"absolute",top:0,left:ao,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();for(al=0;al0;af--){ag=aj[af-1];if(ae[ag].show){ai[ag]=ae[ag].series_p2u(ak[ag.charAt(0)])}}return{offsets:ah,gridPos:ak,dataPos:ai}}function ad(ae,af){var aj=af.series;var aO,aN,aM,aH,aI,aC,aB,ao,am,ar,at,aD;var aL,aP,aJ,ak,aA,aF;var ag,aG;for(aM=af.seriesStack.length-1;aM>=0;aM--){aO=af.seriesStack[aM];aH=aj[aO];switch(aH.renderer.constructor){case G.jqplot.BarRenderer:case G.jqplot.PyramidRenderer:aC=ae.x;aB=ae.y;for(aN=0;aNaA[0][0]&&aCaA[2][1]&&aB0&&-aB>=0){ao=2*Math.PI-Math.atan(-aB/aC)}else{if(aC>0&&-aB<0){ao=-Math.atan(-aB/aC)}else{if(aC<0){ao=Math.PI-Math.atan(-aB/aC)}else{if(aC==0&&-aB>0){ao=3*Math.PI/2}else{if(aC==0&&-aB<0){ao=Math.PI/2}else{if(aC==0&&aB==0){ao=0}}}}}}if(ar){ao-=ar;if(ao<0){ao+=2*Math.PI}else{if(ao>2*Math.PI){ao-=2*Math.PI}}}am=aH.sliceMargin/180*Math.PI;if(aIaH._innerRadius){for(aN=0;aN0)?aH.gridData[aN-1][1]+am:am;aD=aH.gridData[aN][1];if(ao>at&&ao0&&-aB>=0){ao=2*Math.PI-Math.atan(-aB/aC)}else{if(aC>0&&-aB<0){ao=-Math.atan(-aB/aC)}else{if(aC<0){ao=Math.PI-Math.atan(-aB/aC)}else{if(aC==0&&-aB>0){ao=3*Math.PI/2}else{if(aC==0&&-aB<0){ao=Math.PI/2}else{if(aC==0&&aB==0){ao=0}}}}}}if(ar){ao-=ar;if(ao<0){ao+=2*Math.PI}else{if(ao>2*Math.PI){ao-=2*Math.PI}}}am=aH.sliceMargin/180*Math.PI;if(aI0)?aH.gridData[aN-1][1]+am:am;aD=aH.gridData[aN][1];if(ao>at&&ao=aq[0][1]&&aB<=aq[3][1]&&aC>=al[0]&&aC<=ax[0]){return{seriesIndex:aH.index,pointIndex:aN,gridData:null,data:aH.data[aN]}}}break;case G.jqplot.LineRenderer:aC=ae.x;aB=ae.y;aI=aH.renderer;if(aH.show){if((aH.fill||(aH.renderer.bands.show&&aH.renderer.bands.fill))&&(!af.plugins.highlighter||!af.plugins.highlighter.show)){var ap=false;if(aC>aH._boundingBox[0][0]&&aCaH._boundingBox[1][1]&&aB=aB||au[1]=aB){if(av[0]+(aB-av[1])/(au[1]-av[1])*(au[0]-av[0])0)?aG:0;for(var aN=0;aN=aJ[0]-aI._bodyWidth/2&&aC<=aJ[0]+aI._bodyWidth/2&&aB>=an(aH.data[aN][2])&&aB<=an(aH.data[aN][3])){return{seriesIndex:aO,pointIndex:aN,gridData:aJ,data:aH.data[aN]}}}else{if(!aI.hlc){var an=aH._yaxis.series_u2p;if(aC>=aJ[0]-aI._tickLength&&aC<=aJ[0]+aI._tickLength&&aB>=an(aH.data[aN][2])&&aB<=an(aH.data[aN][3])){return{seriesIndex:aO,pointIndex:aN,gridData:aJ,data:aH.data[aN]}}}else{var an=aH._yaxis.series_u2p;if(aC>=aJ[0]-aI._tickLength&&aC<=aJ[0]+aI._tickLength&&aB>=an(aH.data[aN][1])&&aB<=an(aH.data[aN][2])){return{seriesIndex:aO,pointIndex:aN,gridData:aJ,data:aH.data[aN]}}}}}else{if(aJ[0]!=null&&aJ[1]!=null){aP=Math.sqrt((aC-aJ[0])*(aC-aJ[0])+(aB-aJ[1])*(aB-aJ[1]));if(aP<=ag&&(aP<=aL||aL==null)){aL=aP;return{seriesIndex:aO,pointIndex:aN,gridData:aJ,data:aH.data[aN]}}}}}}}break;default:aC=ae.x;aB=ae.y;aI=aH.renderer;if(aH.show){aG=aH.markerRenderer.size/2+aH.neighborThreshold;ag=(aG>0)?aG:0;for(var aN=0;aN=aJ[0]-aI._bodyWidth/2&&aC<=aJ[0]+aI._bodyWidth/2&&aB>=an(aH.data[aN][2])&&aB<=an(aH.data[aN][3])){return{seriesIndex:aO,pointIndex:aN,gridData:aJ,data:aH.data[aN]}}}else{if(!aI.hlc){var an=aH._yaxis.series_u2p;if(aC>=aJ[0]-aI._tickLength&&aC<=aJ[0]+aI._tickLength&&aB>=an(aH.data[aN][2])&&aB<=an(aH.data[aN][3])){return{seriesIndex:aO,pointIndex:aN,gridData:aJ,data:aH.data[aN]}}}else{var an=aH._yaxis.series_u2p;if(aC>=aJ[0]-aI._tickLength&&aC<=aJ[0]+aI._tickLength&&aB>=an(aH.data[aN][1])&&aB<=an(aH.data[aN][2])){return{seriesIndex:aO,pointIndex:aN,gridData:aJ,data:aH.data[aN]}}}}}else{aP=Math.sqrt((aC-aJ[0])*(aC-aJ[0])+(aB-aJ[1])*(aB-aJ[1]));if(aP<=ag&&(aP<=aL||aL==null)){aL=aP;return{seriesIndex:aO,pointIndex:aN,gridData:aJ,data:aH.data[aN]}}}}}break}}return null}this.onClick=function(ag){var af=ab(ag);var ai=ag.data.plot;var ah=ad(af.gridPos,ai);var ae=jQuery.Event("jqplotClick");ae.pageX=ag.pageX;ae.pageY=ag.pageY;G(this).trigger(ae,[af.gridPos,af.dataPos,ah,ai])};this.onDblClick=function(ag){var af=ab(ag);var ai=ag.data.plot;var ah=ad(af.gridPos,ai);var ae=jQuery.Event("jqplotDblClick");ae.pageX=ag.pageX;ae.pageY=ag.pageY;G(this).trigger(ae,[af.gridPos,af.dataPos,ah,ai])};this.onMouseDown=function(ag){var af=ab(ag);var ai=ag.data.plot;var ah=ad(af.gridPos,ai);var ae=jQuery.Event("jqplotMouseDown");ae.pageX=ag.pageX;ae.pageY=ag.pageY;G(this).trigger(ae,[af.gridPos,af.dataPos,ah,ai])};this.onMouseUp=function(ag){var af=ab(ag);var ae=jQuery.Event("jqplotMouseUp");ae.pageX=ag.pageX;ae.pageY=ag.pageY;G(this).trigger(ae,[af.gridPos,af.dataPos,null,ag.data.plot])};this.onRightClick=function(ag){var af=ab(ag);var ai=ag.data.plot;var ah=ad(af.gridPos,ai);if(ai.captureRightClick){if(ag.which==3){var ae=jQuery.Event("jqplotRightClick");ae.pageX=ag.pageX;ae.pageY=ag.pageY;G(this).trigger(ae,[af.gridPos,af.dataPos,ah,ai])}else{var ae=jQuery.Event("jqplotMouseUp");ae.pageX=ag.pageX;ae.pageY=ag.pageY;G(this).trigger(ae,[af.gridPos,af.dataPos,ah,ai])}}};this.onMouseMove=function(ag){var af=ab(ag);var ai=ag.data.plot;var ah=ad(af.gridPos,ai);var ae=jQuery.Event("jqplotMouseMove");ae.pageX=ag.pageX;ae.pageY=ag.pageY;G(this).trigger(ae,[af.gridPos,af.dataPos,ah,ai])};this.onMouseEnter=function(ag){var af=ab(ag);var ah=ag.data.plot;var ae=jQuery.Event("jqplotMouseEnter");ae.pageX=ag.pageX;ae.pageY=ag.pageY;ae.relatedTarget=ag.relatedTarget;G(this).trigger(ae,[af.gridPos,af.dataPos,null,ah])};this.onMouseLeave=function(ag){var af=ab(ag);var ah=ag.data.plot;var ae=jQuery.Event("jqplotMouseLeave");ae.pageX=ag.pageX;ae.pageY=ag.pageY;ae.relatedTarget=ag.relatedTarget;G(this).trigger(ae,[af.gridPos,af.dataPos,null,ah])};this.drawSeries=function(ag,ae){var ai,ah,af;ae=(typeof(ag)==="number"&&ae==null)?ag:ae;ag=(typeof(ag)==="object")?ag:{};if(ae!=q){ah=this.series[ae];af=ah.shadowCanvas._ctx;af.clearRect(0,0,af.canvas.width,af.canvas.height);ah.drawShadow(af,ag,this);af=ah.canvas._ctx;af.clearRect(0,0,af.canvas.width,af.canvas.height);ah.draw(af,ag,this);if(ah.renderer.constructor==G.jqplot.BezierCurveRenderer){if(ae660)?aa[ac]*0.85:0.73*aa[ac]+90;aa[ac]=parseInt(aa[ac],10);(aa[ac]>255)?255:aa[ac]}aa[3]=0.3+0.35*ae[3];ad.push("rgba("+aa[0]+","+aa[1]+","+aa[2]+","+aa[3]+")")}}else{var ae=G.jqplot.getColorComponents(ab);var aa=[ae[0],ae[1],ae[2]];var ag=aa[0]+aa[1]+aa[2];for(var ac=0;ac<3;ac++){aa[ac]=(ag>660)?aa[ac]*0.85:0.73*aa[ac]+90;aa[ac]=parseInt(aa[ac],10);(aa[ac]>255)?255:aa[ac]}aa[3]=0.3+0.35*ae[3];ad="rgba("+aa[0]+","+aa[1]+","+aa[2]+","+aa[3]+")"}return ad};G.jqplot.ColorGenerator=function(ab){ab=ab||G.jqplot.config.defaultColors;var aa=0;this.next=function(){if(aa0){return ab[aa--]}else{aa=ab.length-1;return ab[aa]}};this.get=function(ad){var ac=ad-ab.length*Math.floor(ad/ab.length);return ab[ac]};this.setColors=function(ac){ab=ac};this.reset=function(){aa=0};this.getIndex=function(){return aa};this.setIndex=function(ac){aa=ac}};G.jqplot.hex2rgb=function(ac,aa){ac=ac.replace("#","");if(ac.length==3){ac=ac.charAt(0)+ac.charAt(0)+ac.charAt(1)+ac.charAt(1)+ac.charAt(2)+ac.charAt(2)}var ab;ab="rgba("+parseInt(ac.slice(0,2),16)+", "+parseInt(ac.slice(2,4),16)+", "+parseInt(ac.slice(4,6),16);if(aa){ab+=", "+aa}ab+=")";return ab};G.jqplot.rgb2hex=function(af){var ac=/rgba?\( *([0-9]{1,3}\.?[0-9]*%?) *, *([0-9]{1,3}\.?[0-9]*%?) *, *([0-9]{1,3}\.?[0-9]*%?) *(?:, *[0-9.]*)?\)/;var aa=af.match(ac);var ae="#";for(var ad=1;ad<4;ad++){var ab;if(aa[ad].search(/%/)!=-1){ab=parseInt(255*aa[ad]/100,10).toString(16);if(ab.length==1){ab="0"+ab}}else{ab=parseInt(aa[ad],10).toString(16);if(ab.length==1){ab="0"+ab}}ae+=ab}return ae};G.jqplot.normalize2rgb=function(ab,aa){if(ab.search(/^ *rgba?\(/)!=-1){return ab}else{if(ab.search(/^ *#?[0-9a-fA-F]?[0-9a-fA-F]/)!=-1){return G.jqplot.hex2rgb(ab,aa)}else{throw"invalid color spec"}}};G.jqplot.getColorComponents=function(af){af=G.jqplot.colorKeywordMap[af]||af;var ad=G.jqplot.normalize2rgb(af);var ac=/rgba?\( *([0-9]{1,3}\.?[0-9]*%?) *, *([0-9]{1,3}\.?[0-9]*%?) *, *([0-9]{1,3}\.?[0-9]*%?) *,? *([0-9.]* *)?\)/;var aa=ad.match(ac);var ab=[];for(var ae=1;ae<4;ae++){if(aa[ae].search(/%/)!=-1){ab[ae-1]=parseInt(255*aa[ae]/100,10)}else{ab[ae-1]=parseInt(aa[ae],10)}}ab[3]=parseFloat(aa[4])?parseFloat(aa[4]):1;return ab};G.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)"};G.jqplot.AxisLabelRenderer=function(aa){G.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;G.extend(true,this,aa)};G.jqplot.AxisLabelRenderer.prototype=new G.jqplot.ElemContainer();G.jqplot.AxisLabelRenderer.prototype.constructor=G.jqplot.AxisLabelRenderer;G.jqplot.AxisLabelRenderer.prototype.init=function(aa){G.extend(true,this,aa)};G.jqplot.AxisLabelRenderer.prototype.draw=function(aa,ab){if(this._elem){this._elem.emptyForce();this._elem=null}this._elem=G('
');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};G.jqplot.AxisLabelRenderer.prototype.pack=function(){};G.jqplot.AxisTickRenderer=function(aa){G.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=G.jqplot.DefaultTickFormatter;this.prefix="";this.formatString="";this.fontFamily;this.fontSize;this.textColor;this.escapeHTML=false;this._elem;this._breakTick=false;G.extend(true,this,aa)};G.jqplot.AxisTickRenderer.prototype.init=function(aa){G.extend(true,this,aa)};G.jqplot.AxisTickRenderer.prototype=new G.jqplot.ElemContainer();G.jqplot.AxisTickRenderer.prototype.constructor=G.jqplot.AxisTickRenderer;G.jqplot.AxisTickRenderer.prototype.setTick=function(aa,ac,ab){this.value=aa;this.axis=ac;if(ab){this.isMinorTick=true}return this};G.jqplot.AxisTickRenderer.prototype.draw=function(){if(this.label===null){this.label=this.prefix+this.formatter(this.formatString,this.value)}var ab={position:"absolute"};if(Number(this.label)){ab.whitSpace="nowrap"}if(this._elem){this._elem.emptyForce();this._elem=null}this._elem=G(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(ab);for(var aa in this._styles){this._elem.css(aa,this._styles[aa])}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};G.jqplot.DefaultTickFormatter=function(aa,ab){if(typeof ab=="number"){if(!aa){aa=G.jqplot.config.defaultTickFormatString}return G.jqplot.sprintf(aa,ab)}else{return String(ab)}};G.jqplot.AxisTickRenderer.prototype.pack=function(){};G.jqplot.CanvasGridRenderer=function(){this.shadowRenderer=new G.jqplot.ShadowRenderer()};G.jqplot.CanvasGridRenderer.prototype.init=function(ab){this._ctx;G.extend(true,this,ab);var aa={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(aa)};G.jqplot.CanvasGridRenderer.prototype.createElement=function(ad){var ac;if(this._elem){if(G.jqplot.use_excanvas&&window.G_vmlCanvasManager.uninitElement!==q){ac=this._elem.get(0);window.G_vmlCanvasManager.uninitElement(ac);ac=null}this._elem.emptyForce();this._elem=null}ac=ad.canvasManager.getCanvas();var aa=this._plotDimensions.width;var ab=this._plotDimensions.height;ac.width=aa;ac.height=ab;this._elem=G(ac);this._elem.addClass("jqplot-grid-canvas");this._elem.css({position:"absolute",left:0,top:0});ac=ad.canvasManager.initCanvas(ac);this._top=this._offsets.top;this._bottom=ab-this._offsets.bottom;this._left=this._offsets.left;this._right=aa-this._offsets.right;this._width=this._right-this._left;this._height=this._bottom-this._top;ac=null;return this._elem};G.jqplot.CanvasGridRenderer.prototype.draw=function(){this._ctx=this._elem.get(0).getContext("2d");var al=this._ctx;var ao=this._axes;al.save();al.clearRect(0,0,this._plotDimensions.width,this._plotDimensions.height);al.fillStyle=this.backgroundColor||this.background;al.fillRect(this._left,this._top,this._width,this._height);al.save();al.lineJoin="miter";al.lineCap="butt";al.lineWidth=this.gridLineWidth;al.strokeStyle=this.gridLineColor;var ar,aq,ai,aj;var af=["xaxis","yaxis","x2axis","y2axis"];for(var ap=4;ap>0;ap--){var av=af[ap-1];var aa=ao[av];var at=aa._ticks;var ak=at.length;if(aa.show){if(aa.drawBaseline){var au={};if(aa.baselineWidth!==null){au.lineWidth=aa.baselineWidth}if(aa.baselineColor!==null){au.strokeStyle=aa.baselineColor}switch(av){case"xaxis":ah(this._left,this._bottom,this._right,this._bottom,au);break;case"yaxis":ah(this._left,this._bottom,this._left,this._top,au);break;case"x2axis":ah(this._left,this._bottom,this._right,this._bottom,au);break;case"y2axis":ah(this._right,this._bottom,this._right,this._top,au);break}}for(var am=ak;am>0;am--){var ag=at[am-1];if(ag.show){var ad=Math.round(aa.u2p(ag.value))+0.5;switch(av){case"xaxis":if(ag.showGridline&&this.drawGridlines&&((!ag.isMinorTick&&aa.drawMajorGridlines)||(ag.isMinorTick&&aa.drawMinorGridlines))){ah(ad,this._top,ad,this._bottom)}if(ag.showMark&&ag.mark&&((!ag.isMinorTick&&aa.drawMajorTickMarks)||(ag.isMinorTick&&aa.drawMinorTickMarks))){ai=ag.markSize;aj=ag.mark;var ad=Math.round(aa.u2p(ag.value))+0.5;switch(aj){case"outside":ar=this._bottom;aq=this._bottom+ai;break;case"inside":ar=this._bottom-ai;aq=this._bottom;break;case"cross":ar=this._bottom-ai;aq=this._bottom+ai;break;default:ar=this._bottom;aq=this._bottom+ai;break}if(this.shadow){this.renderer.shadowRenderer.draw(al,[[ad,ar],[ad,aq]],{lineCap:"butt",lineWidth:this.gridLineWidth,offset:this.gridLineWidth*0.75,depth:2,fill:false,closePath:false})}ah(ad,ar,ad,aq)}break;case"yaxis":if(ag.showGridline&&this.drawGridlines&&((!ag.isMinorTick&&aa.drawMajorGridlines)||(ag.isMinorTick&&aa.drawMinorGridlines))){ah(this._right,ad,this._left,ad)}if(ag.showMark&&ag.mark&&((!ag.isMinorTick&&aa.drawMajorTickMarks)||(ag.isMinorTick&&aa.drawMinorTickMarks))){ai=ag.markSize;aj=ag.mark;var ad=Math.round(aa.u2p(ag.value))+0.5;switch(aj){case"outside":ar=this._left-ai;aq=this._left;break;case"inside":ar=this._left;aq=this._left+ai;break;case"cross":ar=this._left-ai;aq=this._left+ai;break;default:ar=this._left-ai;aq=this._left;break}if(this.shadow){this.renderer.shadowRenderer.draw(al,[[ar,ad],[aq,ad]],{lineCap:"butt",lineWidth:this.gridLineWidth*1.5,offset:this.gridLineWidth*0.75,fill:false,closePath:false})}ah(ar,ad,aq,ad,{strokeStyle:aa.borderColor})}break;case"x2axis":if(ag.showGridline&&this.drawGridlines&&((!ag.isMinorTick&&aa.drawMajorGridlines)||(ag.isMinorTick&&aa.drawMinorGridlines))){ah(ad,this._bottom,ad,this._top)}if(ag.showMark&&ag.mark&&((!ag.isMinorTick&&aa.drawMajorTickMarks)||(ag.isMinorTick&&aa.drawMinorTickMarks))){ai=ag.markSize;aj=ag.mark;var ad=Math.round(aa.u2p(ag.value))+0.5;switch(aj){case"outside":ar=this._top-ai;aq=this._top;break;case"inside":ar=this._top;aq=this._top+ai;break;case"cross":ar=this._top-ai;aq=this._top+ai;break;default:ar=this._top-ai;aq=this._top;break}if(this.shadow){this.renderer.shadowRenderer.draw(al,[[ad,ar],[ad,aq]],{lineCap:"butt",lineWidth:this.gridLineWidth,offset:this.gridLineWidth*0.75,depth:2,fill:false,closePath:false})}ah(ad,ar,ad,aq)}break;case"y2axis":if(ag.showGridline&&this.drawGridlines&&((!ag.isMinorTick&&aa.drawMajorGridlines)||(ag.isMinorTick&&aa.drawMinorGridlines))){ah(this._left,ad,this._right,ad)}if(ag.showMark&&ag.mark&&((!ag.isMinorTick&&aa.drawMajorTickMarks)||(ag.isMinorTick&&aa.drawMinorTickMarks))){ai=ag.markSize;aj=ag.mark;var ad=Math.round(aa.u2p(ag.value))+0.5;switch(aj){case"outside":ar=this._right;aq=this._right+ai;break;case"inside":ar=this._right-ai;aq=this._right;break;case"cross":ar=this._right-ai;aq=this._right+ai;break;default:ar=this._right;aq=this._right+ai;break}if(this.shadow){this.renderer.shadowRenderer.draw(al,[[ar,ad],[aq,ad]],{lineCap:"butt",lineWidth:this.gridLineWidth*1.5,offset:this.gridLineWidth*0.75,fill:false,closePath:false})}ah(ar,ad,aq,ad,{strokeStyle:aa.borderColor})}break;default:break}}}ag=null}aa=null;at=null}af=["y3axis","y4axis","y5axis","y6axis","y7axis","y8axis","y9axis","yMidAxis"];for(var ap=7;ap>0;ap--){var aa=ao[af[ap-1]];var at=aa._ticks;if(aa.show){var ab=at[aa.numberTicks-1];var ae=at[0];var ac=aa.getLeft();var an=[[ac,ab.getTop()+ab.getHeight()/2],[ac,ae.getTop()+ae.getHeight()/2+1]];if(this.shadow){this.renderer.shadowRenderer.draw(al,an,{lineCap:"butt",fill:false,closePath:false})}ah(an[0][0],an[0][1],an[1][0],an[1][1],{lineCap:"butt",strokeStyle:aa.borderColor,lineWidth:aa.borderWidth});for(var am=at.length;am>0;am--){var ag=at[am-1];ai=ag.markSize;aj=ag.mark;var ad=Math.round(aa.u2p(ag.value))+0.5;if(ag.showMark&&ag.mark){switch(aj){case"outside":ar=ac;aq=ac+ai;break;case"inside":ar=ac-ai;aq=ac;break;case"cross":ar=ac-ai;aq=ac+ai;break;default:ar=ac;aq=ac+ai;break}an=[[ar,ad],[aq,ad]];if(this.shadow){this.renderer.shadowRenderer.draw(al,an,{lineCap:"butt",lineWidth:this.gridLineWidth*1.5,offset:this.gridLineWidth*0.75,fill:false,closePath:false})}ah(ar,ad,aq,ad,{strokeStyle:aa.borderColor})}ag=null}ae=null}aa=null;at=null}al.restore();function ah(aA,az,ax,aw,ay){al.save();ay=ay||{};if(ay.lineWidth==null||ay.lineWidth!=0){G.extend(true,al,ay);al.beginPath();al.moveTo(aA,az);al.lineTo(ax,aw);al.stroke();al.restore()}}if(this.shadow){var an=[[this._left,this._bottom],[this._right,this._bottom],[this._right,this._top]];this.renderer.shadowRenderer.draw(al,an)}if(this.borderWidth!=0&&this.drawBorder){ah(this._left,this._top,this._right,this._top,{lineCap:"round",strokeStyle:ao.x2axis.borderColor,lineWidth:ao.x2axis.borderWidth});ah(this._right,this._top,this._right,this._bottom,{lineCap:"round",strokeStyle:ao.y2axis.borderColor,lineWidth:ao.y2axis.borderWidth});ah(this._right,this._bottom,this._left,this._bottom,{lineCap:"round",strokeStyle:ao.xaxis.borderColor,lineWidth:ao.xaxis.borderWidth});ah(this._left,this._bottom,this._left,this._top,{lineCap:"round",strokeStyle:ao.yaxis.borderColor,lineWidth:ao.yaxis.borderWidth})}al.restore();al=null;ao=null};G.jqplot.DivTitleRenderer=function(){};G.jqplot.DivTitleRenderer.prototype.init=function(aa){G.extend(true,this,aa)};G.jqplot.DivTitleRenderer.prototype.draw=function(){if(this._elem){this._elem.emptyForce();this._elem=null}var ad=this.renderer;var ac=document.createElement("div");this._elem=G(ac);this._elem.addClass("jqplot-title");if(!this.text){this.show=false;this._elem.height(0);this._elem.width(0)}else{if(this.text){var aa;if(this.color){aa=this.color}else{if(this.textColor){aa=this.textColor}}var ab={position:"absolute",top:"0px",left:"0px"};if(this._plotWidth){ab.width=this._plotWidth+"px"}if(this.fontSize){ab.fontSize=this.fontSize}if(typeof this.textAlign==="string"){ab.textAlign=this.textAlign}else{ab.textAlign="center"}if(aa){ab.color=aa}if(this.paddingBottom){ab.paddingBottom=this.paddingBottom}if(this.fontFamily){ab.fontFamily=this.fontFamily}this._elem.css(ab);if(this.escapeHtml){this._elem.text(this.text)}else{this._elem.html(this.text)}}}ac=null;return this._elem};G.jqplot.DivTitleRenderer.prototype.pack=function(){};var n=0.1;G.jqplot.LinePattern=function(ao,aj){var ai={dotted:[n,G.jqplot.config.dotGapLength],dashed:[G.jqplot.config.dashLength,G.jqplot.config.gapLength],solid:null};if(typeof aj==="string"){if(aj[0]==="."||aj[0]==="-"){var ap=aj;aj=[];for(var ah=0,ae=ap.length;ah0)&&(av>0)){at/=au;ar/=au;while(true){var aw=av*ak;if(aw=aj.length){ad=0}ak=aj[ad]}else{am=aq;al=ax;if((ad&1)==0){ao.lineTo(am,al)}else{ao.moveTo(am,al)}ak-=au/av;break}}}};var ab=function(){ao.beginPath()};var af=function(){ac(ag,aa)};return{moveTo:an,lineTo:ac,beginPath:ab,closePath:af}};G.jqplot.LineRenderer=function(){this.shapeRenderer=new G.jqplot.ShapeRenderer();this.shadowRenderer=new G.jqplot.ShadowRenderer()};G.jqplot.LineRenderer.prototype.init=function(ab,ag){ab=ab||{};this._type="line";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 ae={highlightMouseOver:ab.highlightMouseOver,highlightMouseDown:ab.highlightMouseDown,highlightColor:ab.highlightColor};delete (ab.highlightMouseOver);delete (ab.highlightMouseDown);delete (ab.highlightColor);G.extend(true,this.renderer,ab);this.renderer.options=ab;if(this.renderer.bandData.length>1&&(!ab.bands||ab.bands.show==null)){this.renderer.bands.show=true}else{if(ab.bands&&ab.bands.show==null&&ab.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,ag)}if(this._stack){this.renderer.smooth=false}var af={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(af);var ac=ab.shadowOffset;if(ac==null){if(this.lineWidth>2.5){ac=1.25*(1+(Math.atan((this.lineWidth/2.5))/0.785398163-1)*0.6)}else{ac=1.25*Math.atan((this.lineWidth/2.5))/0.785398163}}var aa={lineJoin:this.lineJoin,lineCap:this.lineCap,fill:this.fill,isarc:false,angle:this.shadowAngle,offset:ac,alpha:this.shadowAlpha,depth:this.shadowDepth,lineWidth:this.lineWidth,linePattern:this.linePattern,closePath:this.fill};this.renderer.shadowRenderer.init(aa);this._areaPoints=[];this._boundingBox=[[],[]];if(!this.isTrendline&&this.fill||this.renderer.bands.show){this.highlightMouseOver=true;this.highlightMouseDown=false;this.highlightColor=null;if(ae.highlightMouseDown&&ae.highlightMouseOver==null){ae.highlightMouseOver=false}G.extend(true,this,{highlightMouseOver:ae.highlightMouseOver,highlightMouseDown:ae.highlightMouseDown,highlightColor:ae.highlightColor});if(!this.highlightColor){var ad=(this.renderer.bands.show)?this.renderer.bands.fillColor:this.fillColor;this.highlightColor=G.jqplot.computeHighlightColors(ad)}if(this.highlighter){this.highlighter.show=false}}if(!this.isTrendline&&ag){ag.plugins.lineRenderer={};ag.postInitHooks.addOnce(u);ag.postDrawHooks.addOnce(Y);ag.eventListenerHooks.addOnce("jqplotMouseMove",f);ag.eventListenerHooks.addOnce("jqplotMouseDown",c);ag.eventListenerHooks.addOnce("jqplotMouseUp",X);ag.eventListenerHooks.addOnce("jqplotClick",e);ag.eventListenerHooks.addOnce("jqplotRightClick",o)}};G.jqplot.LineRenderer.prototype.initBands=function(ad,an){var ae=ad.bandData||[];var ag=this.renderer.bands;ag.hiData=[];ag.lowData=[];var au=this.data;ag._max=null;ag._min=null;if(ae.length==2){if(G.isArray(ae[0][0])){var ah;var aa=0,ak=0;for(var ao=0,al=ae[0].length;aoag._max)||ag._max==null){ag._max=ah[1]}if((ah[1]!=null&&ah[1]ag._max)||ag._max==null){ag._max=ah[1];ak=1}if((ah[1]!=null&&ah[1]ae[1][0])?0:1;var av=(ac)?0:1;for(var ao=0,al=au.length;ao2&&!G.isArray(ae[0][0])){var ac=(ae[0][0]>ae[0][1])?0:1;var av=(ac)?0:1;for(var ao=0,al=ae.length;aoag._max)||ag._max==null){ag._max=af[ao][1]}}for(var ao=0,al=ai.length;ao0){aK=Math.abs((ai[aJ][1]-ai[aJ-1][1])/(ai[aJ][0]-ai[aJ-1][0]))}af=aK/az+ax;aF=ay*v(af)-ay*v(ax)+aL;aM=(aH+aF)/2}else{aM=aN}for(aD=0;aD2){var ah;if(this.renderer.constrainSmoothing){ah=E.call(this,this.gridData);this.renderer._smoothedData=ah[0];this.renderer._smoothedPlotData=ah[1];if(ad.show){ah=E.call(this,this.renderer._hiBandGridData);this.renderer._hiBandSmoothedData=ah[0];ah=E.call(this,this.renderer._lowBandGridData);this.renderer._lowBandSmoothedData=ah[0]}ah=null}else{ah=A.call(this,this.gridData);this.renderer._smoothedData=ah[0];this.renderer._smoothedPlotData=ah[1];if(ad.show){ah=A.call(this,this.renderer._hiBandGridData);this.renderer._hiBandSmoothedData=ah[0];ah=A.call(this,this.renderer._lowBandGridData);this.renderer._lowBandSmoothedData=ah[0]}ah=null}}};G.jqplot.LineRenderer.prototype.makeGridData=function(ah,aj){var af=this._xaxis.series_u2p;var aa=this._yaxis.series_u2p;var ak=[];var ac=[];this.renderer._smoothedData=[];this.renderer._smoothedPlotData=[];this.renderer._hiBandGridData=[];this.renderer._lowBandGridData=[];this.renderer._hiBandSmoothedData=[];this.renderer._lowBandSmoothedData=[];var ae=this.renderer.bands;var ab=false;for(var ag=0;ag2){var ai;if(this.renderer.constrainSmoothing){ai=E.call(this,ak);this.renderer._smoothedData=ai[0];this.renderer._smoothedPlotData=ai[1];if(ae.show){ai=E.call(this,this.renderer._hiBandGridData);this.renderer._hiBandSmoothedData=ai[0];ai=E.call(this,this.renderer._lowBandGridData);this.renderer._lowBandSmoothedData=ai[0]}ai=null}else{ai=A.call(this,ak);this.renderer._smoothedData=ai[0];this.renderer._smoothedPlotData=ai[1];if(ae.show){ai=A.call(this,this.renderer._hiBandGridData);this.renderer._hiBandSmoothedData=ai[0];ai=A.call(this,this.renderer._lowBandGridData);this.renderer._lowBandSmoothedData=ai[0]}ai=null}}return ak};G.jqplot.LineRenderer.prototype.draw=function(ap,aB,ab,au){var av;var aj=G.extend(true,{},ab);var ad=(aj.shadow!=q)?aj.shadow:this.shadow;var aC=(aj.showLine!=q)?aj.showLine:this.showLine;var at=(aj.fill!=q)?aj.fill:this.fill;var aa=(aj.fillAndStroke!=q)?aj.fillAndStroke:this.fillAndStroke;var ak,aq,an,ax;ap.save();if(aB.length){if(aC){if(at){if(this.fillToZero){var ay=this.negativeColor;if(!this.useNegativeColors){ay=aj.fillStyle}var ah=false;var ai=aj.fillStyle;if(aa){var aA=aB.slice(0)}if(this.index==0||!this._stack){var ao=[];var aE=(this.renderer.smooth)?this.renderer._smoothedPlotData:this._plotData;this._areaPoints=[];var az=this._yaxis.series_u2p(this.fillToValue);var ac=this._xaxis.series_u2p(this.fillToValue);aj.closePath=true;if(this.fillAxis=="y"){ao.push([aB[0][0],az]);this._areaPoints.push([aB[0][0],az]);for(var av=0;av0;av--){aB.push(am[av-1])}if(ad){this.renderer.shadowRenderer.draw(ap,aB,aj)}this._areaPoints=aB;this.renderer.shapeRenderer.draw(ap,aB,aj)}}else{if(aa){var aA=aB.slice(0)}if(this.index==0||!this._stack){var ae=ap.canvas.height;aB.unshift([aB[0][0],ae]);var aw=aB.length;aB.push([aB[aw-1][0],ae])}else{var am=this._prevGridData;for(var av=am.length;av>0;av--){aB.push(am[av-1])}}this._areaPoints=aB;if(ad){this.renderer.shadowRenderer.draw(ap,aB,aj)}this.renderer.shapeRenderer.draw(ap,aB,aj)}if(aa){var ar=G.extend(true,{},aj,{fill:false,closePath:false});this.renderer.shapeRenderer.draw(ap,aA,ar);if(this.markerRenderer.show){if(this.renderer.smooth){aA=this.gridData}for(av=0;aval[0]||ak==null){ak=al[0]}if(axal[1]||aq==null){aq=al[1]}}if(this.type==="line"&&this.renderer.bands.show){ax=this._yaxis.series_u2p(this.renderer.bands._min);aq=this._yaxis.series_u2p(this.renderer.bands._max)}this._boundingBox=[[ak,ax],[an,aq]];if(this.markerRenderer.show&&!at){if(this.renderer.smooth){aB=this.gridData}for(av=0;avah){ah=ac}}}ae=null;af=null;if(aa){ab=this._label._elem.outerWidth(true);ag=this._label._elem.outerHeight(true)}if(this.name=="xaxis"){ah=ah+ag;this._elem.css({height:ah+"px",left:"0px",bottom:"0px"})}else{if(this.name=="x2axis"){ah=ah+ag;this._elem.css({height:ah+"px",left:"0px",top:"0px"})}else{if(this.name=="yaxis"){ah=ah+ab;this._elem.css({width:ah+"px",left:"0px",top:"0px"});if(aa&&this._label.constructor==G.jqplot.AxisLabelRenderer){this._label._elem.css("width",ab+"px")}}else{ah=ah+ab;this._elem.css({width:ah+"px",right:"0px",top:"0px"});if(aa&&this._label.constructor==G.jqplot.AxisLabelRenderer){this._label._elem.css("width",ab+"px")}}}}}};G.jqplot.LinearAxisRenderer.prototype.createTicks=function(ac){var aM=this._ticks;var aC=this.ticks;var ar=this.name;var au=this._dataBounds;var aa,ag;var aY,aA;var ai,ah;var aW,aT;var az=this.min;var aX=this.max;var aP=this.numberTicks;var a2=this.tickInterval;if(aC.length){for(aT=0;aTthis.breakPoints[0]&&aG[0]<=this.breakPoints[1]){aN.show=false;aN.showGridline=false;aN.label=aG[1]}else{aN.label=aG[1]}}}else{aN.label=aG[1]}aN.setTick(aG[0],this.name);this._ticks.push(aN)}else{if(G.isPlainObject(aG)){G.extend(true,aN,aG);aN.axis=this.name;this._ticks.push(aN)}else{aN.value=aG;if(this.breakPoints){if(aG==this.breakPoints[0]){aN.label=this.breakTickLabel;aN._breakTick=true;aN.showGridline=false;aN.showMark=false}else{if(aG>this.breakPoints[0]&&aG<=this.breakPoints[1]){aN.show=false;aN.showGridline=false}}}aN.setTick(aG,this.name);this._ticks.push(aN)}}}this.numberTicks=aC.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(ar=="xaxis"||ar=="x2axis"){aa=this._plotDimensions.width}else{aa=this._plotDimensions.height}var ap=this.numberTicks;if(this.alignTicks){if(this.name==="x2axis"&&ac.axes.xaxis.show){ap=ac.axes.xaxis.numberTicks}else{if(this.name.charAt(0)==="y"&&this.name!=="yaxis"&&this.name!=="yMidAxis"&&ac.axes.yaxis.show){ap=ac.axes.yaxis.numberTicks}}}aY=((this.min!=null)?this.min:au.min);aA=((this.max!=null)?this.max:au.max);var an=aA-aY;var aL,aq;var al;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(aY>0){aY=0}if(aA<0){aA=0}}if(this.forceTickAt100){if(aY>100){aY=100}if(aA<100){aA=100}}var af=30;var aI=Math.max(aa,af+1);this._scalefact=(aI-af)/300;var aH=G.jqplot.LinearTickGenerator(aY,aA,this._scalefact,ap);var ao=aY+an*(this.padMin-1);var aJ=aA-an*(this.padMax-1);if(aYaJ){ao=aY-an*(this.padMin-1);aJ=aA+an*(this.padMax-1);aH=G.jqplot.LinearTickGenerator(ao,aJ,this._scalefact,ap)}this.min=aH[0];this.max=aH[1];this.numberTicks=aH[2];this._autoFormatString=aH[3];this.tickInterval=aH[4]}else{if(aY==aA){var ab=0.05;if(aY>0){ab=Math.max(Math.log(aY)/Math.LN10,0.05)}aY-=ab;aA+=ab}if(this.autoscale&&this.min==null&&this.max==null){var ad,ae,ak;var av=false;var aF=false;var at={min:null,max:null,average:null,stddev:null};for(var aT=0;aTaU){aU=aK[aS]}}}var am=(aU-ay)/aU;if(aO.renderer.constructor==G.jqplot.BarRenderer){if(ay>=0&&(aO.fillToZero||am>0.1)){av=true}else{av=false;if(aO.fill&&aO.fillToZero&&ay<0&&aU>0){aF=true}else{aF=false}}}else{if(aO.fill){if(ay>=0&&(aO.fillToZero||am>0.1)){av=true}else{if(ay<0&&aU>0&&aO.fillToZero){av=false;aF=true}else{av=false;aF=false}}}else{if(ay<0){av=false}}}}}if(av){this.numberTicks=2+Math.ceil((aa-(this.tickSpacing-1))/this.tickSpacing);this.min=0;az=0;ae=aA/(this.numberTicks-1);al=Math.pow(10,Math.abs(Math.floor(Math.log(ae)/Math.LN10)));if(ae/al==parseInt(ae/al,10)){ae+=al}this.tickInterval=Math.ceil(ae/al)*al;this.max=this.tickInterval*(this.numberTicks-1)}else{if(aF){this.numberTicks=2+Math.ceil((aa-(this.tickSpacing-1))/this.tickSpacing);var aB=Math.ceil(Math.abs(aY)/an*(this.numberTicks-1));var a1=this.numberTicks-1-aB;ae=Math.max(Math.abs(aY/aB),Math.abs(aA/a1));al=Math.pow(10,Math.abs(Math.floor(Math.log(ae)/Math.LN10)));this.tickInterval=Math.ceil(ae/al)*al;this.max=this.tickInterval*a1;this.min=-this.tickInterval*aB}else{if(this.numberTicks==null){if(this.tickInterval){this.numberTicks=3+Math.ceil(an/this.tickInterval)}else{this.numberTicks=2+Math.ceil((aa-(this.tickSpacing-1))/this.tickSpacing)}}if(this.tickInterval==null){ae=an/(this.numberTicks-1);if(ae<1){al=Math.pow(10,Math.abs(Math.floor(Math.log(ae)/Math.LN10)))}else{al=1}this.tickInterval=Math.ceil(ae*al*this.pad)/al}else{al=1/this.tickInterval}ad=this.tickInterval*(this.numberTicks-1);ak=(ad-an)/2;if(this.min==null){this.min=Math.floor(al*(aY-ak))/al}if(this.max==null){this.max=this.min+ad}}}var ax=G.jqplot.getSignificantFigures(this.tickInterval);var aE;if(ax.digitsLeft>=ax.significantDigits){aE="%d"}else{var al=Math.max(0,5-ax.digitsLeft);al=Math.min(al,ax.digitsRight);aE="%."+al+"f"}this._autoFormatString=aE}else{aL=(this.min!=null)?this.min:aY-an*(this.padMin-1);aq=(this.max!=null)?this.max:aA+an*(this.padMax-1);an=aq-aL;if(this.numberTicks==null){if(this.tickInterval!=null){this.numberTicks=Math.ceil((aq-aL)/this.tickInterval)+1}else{if(aa>100){this.numberTicks=parseInt(3+(aa-100)/75,10)}else{this.numberTicks=2}}}if(this.tickInterval==null){this.tickInterval=an/(this.numberTicks-1)}if(this.max==null){aq=aL+this.tickInterval*(this.numberTicks-1)}if(this.min==null){aL=aq-this.tickInterval*(this.numberTicks-1)}var ax=G.jqplot.getSignificantFigures(this.tickInterval);var aE;if(ax.digitsLeft>=ax.significantDigits){aE="%d"}else{var al=Math.max(0,5-ax.digitsLeft);al=Math.min(al,ax.digitsRight);aE="%."+al+"f"}this._autoFormatString=aE;this.min=aL;this.max=aq}if(this.renderer.constructor==G.jqplot.LinearAxisRenderer&&this._autoFormatString==""){an=this.max-this.min;var aZ=new this.tickRenderer(this.tickOptions);var aD=aZ.formatString||G.jqplot.config.defaultTickFormatString;var aD=aD.match(G.jqplot.sprintf.regex)[0];var aV=0;if(aD){if(aD.search(/[fFeEgGpP]/)>-1){var aR=aD.match(/\%\.(\d{0,})?[eEfFgGpP]/);if(aR){aV=parseInt(aR[1],10)}else{aV=6}}else{if(aD.search(/[di]/)>-1){aV=0}}var aj=Math.pow(10,-aV);if(this.tickIntervalthis.breakPoints[0]&&atthis.breakPoints[0]&&atthis.breakPoints[0]&&at=this.breakPoints[1]){return(at-am)*ad/ae}else{return(at+this.breakPoints[1]-this.breakPoints[0]-am)*ad/ae}};this.series_p2u=function(at){return at*ae/ad+am}}}else{this.p2u=function(at){return(at-af)*ae/ad+al};this.u2p=function(at){return(at-al)*ad/ae+af};if(this.name=="xaxis"||this.name=="x2axis"){this.series_u2p=function(at){return(at-al)*ad/ae};this.series_p2u=function(at){return at*ae/ad+al}}else{this.series_u2p=function(at){return(at-am)*ad/ae};this.series_p2u=function(at){return at*ae/ad+am}}}if(this.show){if(this.name=="xaxis"||this.name=="x2axis"){for(var an=0;an0){aa=-ai._textRenderer.height*Math.cos(-ai._textRenderer.angle)/2}else{aa=-ai.getHeight()+ai._textRenderer.height*Math.cos(ai._textRenderer.angle)/2}break;case"middle":aa=-ai.getHeight()/2;break;default:aa=-ai.getHeight()/2;break}}else{aa=-ai.getHeight()/2}var ar=this.u2p(ai.value)+aa+"px";ai._elem.css("top",ar);ai.pack()}}if(aj){var ao=this._label._elem.outerHeight(true);this._label._elem.css("top",ah-ad/2-ao/2+"px");if(this.name=="yaxis"){this._label._elem.css("left","0px")}else{this._label._elem.css("right","0px")}this._label.pack()}}}aq=null};function g(ab){var aa;ab=Math.abs(ab);if(ab>=10){aa="%d"}else{if(ab>1){if(ab===parseInt(ab)){aa="%d"}else{aa="%.1f"}}else{var ac=-Math.floor(Math.log(ab)/Math.LN10);aa="%."+ac+"f"}}return aa}var a=[0.1,0.2,0.3,0.4,0.5,0.8,1,2,3,4,5];var b=function(ab){var aa=a.indexOf(ab);if(aa>0){return a[aa-1]}else{return a[a.length-1]/100}};var h=function(ab){var aa=a.indexOf(ab);if(aa5){aa=10*ac}else{if(af>2){aa=5*ac}else{if(af>1){aa=2*ac}else{aa=ac}}}}else{if(af>5){aa=10*ac}else{if(af>4){aa=5*ac}else{if(af>3){aa=4*ac}else{if(af>2){aa=3*ac}else{if(af>1){aa=2*ac}else{aa=ac}}}}}}return aa}function L(ab,aa){var ad=Math.floor(Math.log(ab)/Math.LN10);var af=Math.pow(10,ad);var ae=ab/af;var ac;ae=ae/aa;if(ae<=0.38){ac=0.1}else{if(ae<=1.6){ac=0.2}else{if(ae<=4){ac=0.5}else{if(ae<=8){ac=1}else{if(ae<=16){ac=2}else{ac=5}}}}}return ac*af}function s(ac,ab){var ae=Math.floor(Math.log(ac)/Math.LN10);var ag=Math.pow(10,ae);var af=ac/ag;var aa;var ad;af=af/ab;if(af<=0.38){ad=0.1}else{if(af<=1.6){ad=0.2}else{if(af<=4){ad=0.5}else{if(af<=8){ad=1}else{if(af<=16){ad=2}else{ad=5}}}}}aa=ad*ag;return[aa,ad,ag]}G.jqplot.LinearTickGenerator=function(af,ag,ac,ad){if(af===ag){ag=(ag)?0:1}ac=ac||1;if(agal){al=au}if(ab>at){at=ab}})}ag.width=al+Number(an);ag.height=at+Number(ap);var ad=ag.getContext("2d");ad.save();ad.fillStyle=ae;ad.fillRect(0,0,ag.width,ag.height);ad.restore();ad.translate(am,ak);ad.textAlign="left";ad.textBaseline="top";function av(ax){var ay=parseInt(G(ax).css("line-height"));if(isNaN(ay)){ay=parseInt(G(ax).css("font-size"))*1.2}return ay}function aw(ay,ax,aL,az,aH,aA){var aJ=av(ay);var aD=G(ay).innerWidth();var aE=G(ay).innerHeight();var aG=aL.split(/\s+/);var aK=aG.length;var aI="";var aF=[];var aN=aH;var aM=az;for(var aC=0;aCaD){aF.push(aC);aI=""}}if(aF.length===0){if(G(ay).css("textAlign")==="center"){aM=az+(aA-ax.measureText(aI).width)/2-am}ax.fillText(aL,aM,aH)}else{aI=aG.slice(0,aF[0]).join(" ");if(G(ay).css("textAlign")==="center"){aM=az+(aA-ax.measureText(aI).width)/2-am}ax.fillText(aI,aM,aN);aN+=aJ;for(var aC=1,aB=aF.length;aC0){ad.strokeRect(aB,aE,G(az).innerWidth(),G(az).innerHeight())}G(az).find("div.jqplot-table-legend-swatch-outline").each(function(){var aN=G(this);ad.strokeStyle=aN.css("border-top-color");var aJ=aB+aN.position().left;var aK=aE+aN.position().top;ad.strokeRect(aJ,aK,aN.innerWidth(),aN.innerHeight());aJ+=parseInt(aN.css("padding-left"));aK+=parseInt(aN.css("padding-top"));var aM=aN.innerHeight()-2*parseInt(aN.css("padding-top"));var aI=aN.innerWidth()-2*parseInt(aN.css("padding-left"));var aL=aN.children("div.jqplot-table-legend-swatch");ad.fillStyle=aL.css("background-color");ad.fillRect(aJ,aK,aI,aM)});G(az).find("td.jqplot-table-legend-label").each(function(){var aK=G(this);var aI=aB+aK.position().left;var aJ=aE+aK.position().top+parseInt(aK.css("padding-top"));ad.font=aK.jqplotGetComputedFontStyle();ad.fillStyle=aK.css("color");ad.fillText(aK.text(),aI,aJ)});var aA=null}else{if(aG=="canvas"){ad.drawImage(az,aB,aE)}}}}G(this).children().each(function(){ao(this,an,ap)});return ag};G.fn.jqplotToImageStr=function(ab){var aa=G(this).jqplotToImageCanvas(ab);if(aa){return aa.toDataURL("image/png")}else{return null}};G.fn.jqplotToImageElem=function(aa){var ab=document.createElement("img");var ac=G(this).jqplotToImageStr(aa);ab.src=ac;return ab};G.fn.jqplotToImageElemStr=function(aa){var ab="";return ab};G.fn.jqplotSaveImage=function(){var aa=G(this).jqplotToImageStr({});if(aa){window.location.href=aa.replace("image/png","image/octet-stream")}};G.fn.jqplotViewImage=function(){var ab=G(this).jqplotToImageElemStr({});var ac=G(this).jqplotToImageStr({});if(ab){var aa=window.open("");aa.document.open("image/png");aa.document.write(ab);aa.document.close();aa=null}};var Z=function(){this.syntax=Z.config.syntax;this._type="jsDate";this.utcOffset=new Date().getTimezoneOffset*60000;this.proxy=new Date();this.options={};this.locale=Z.regional.getLocale();this.formatString="";this.defaultCentury=Z.config.defaultCentury;switch(arguments.length){case 0:break;case 1:if(i(arguments[0])=="[object Object]"&&arguments[0]._type!="jsDate"){var ac=this.options=arguments[0];this.syntax=ac.syntax||this.syntax;this.defaultCentury=ac.defaultCentury||this.defaultCentury;this.proxy=Z.createDate(ac.date)}else{this.proxy=Z.createDate(arguments[0])}break;default:var aa=[];for(var ab=0;ab0?"floor":"ceil"](ad))};Z.prototype.getAbbrDayName=function(){return Z.regional[this.locale]["dayNamesShort"][this.proxy.getDay()]};Z.prototype.getAbbrMonthName=function(){return Z.regional[this.locale]["monthNamesShort"][this.proxy.getMonth()]};Z.prototype.getAMPM=function(){return this.proxy.getHours()>=12?"PM":"AM"};Z.prototype.getAmPm=function(){return this.proxy.getHours()>=12?"pm":"am"};Z.prototype.getCentury=function(){return parseInt(this.proxy.getFullYear()/100,10)};Z.prototype.getDate=function(){return this.proxy.getDate()};Z.prototype.getDay=function(){return this.proxy.getDay()};Z.prototype.getDayOfWeek=function(){var aa=this.proxy.getDay();return aa===0?7:aa};Z.prototype.getDayOfYear=function(){var ab=this.proxy;var aa=ab-new Date(""+ab.getFullYear()+"/1/1 GMT");aa+=ab.getTimezoneOffset()*60000;ab=null;return parseInt(aa/60000/60/24,10)+1};Z.prototype.getDayName=function(){return Z.regional[this.locale]["dayNames"][this.proxy.getDay()]};Z.prototype.getFullWeekOfYear=function(){var ad=this.proxy;var aa=this.getDayOfYear();var ac=6-ad.getDay();var ab=parseInt((aa+ac)/7,10);return ab};Z.prototype.getFullYear=function(){return this.proxy.getFullYear()};Z.prototype.getGmtOffset=function(){var aa=this.proxy.getTimezoneOffset()/60;var ab=aa<0?"+":"-";aa=Math.abs(aa);return ab+I(Math.floor(aa),2)+":"+I((aa%1)*60,2)};Z.prototype.getHours=function(){return this.proxy.getHours()};Z.prototype.getHours12=function(){var aa=this.proxy.getHours();return aa>12?aa-12:(aa==0?12:aa)};Z.prototype.getIsoWeek=function(){var ad=this.proxy;var ac=ad.getWeekOfYear();var aa=(new Date(""+ad.getFullYear()+"/1/1")).getDay();var ab=ac+(aa>4||aa<=1?0:1);if(ab==53&&(new Date(""+ad.getFullYear()+"/12/31")).getDay()<4){ab=1}else{if(ab===0){ad=new Z(new Date(""+(ad.getFullYear()-1)+"/12/31"));ab=ad.getIsoWeek()}}ad=null;return ab};Z.prototype.getMilliseconds=function(){return this.proxy.getMilliseconds()};Z.prototype.getMinutes=function(){return this.proxy.getMinutes()};Z.prototype.getMonth=function(){return this.proxy.getMonth()};Z.prototype.getMonthName=function(){return Z.regional[this.locale]["monthNames"][this.proxy.getMonth()]};Z.prototype.getMonthNumber=function(){return this.proxy.getMonth()+1};Z.prototype.getSeconds=function(){return this.proxy.getSeconds()};Z.prototype.getShortYear=function(){return this.proxy.getYear()%100};Z.prototype.getTime=function(){return this.proxy.getTime()};Z.prototype.getTimezoneAbbr=function(){return this.proxy.toString().replace(/^.*\(([^)]+)\)$/,"$1")};Z.prototype.getTimezoneName=function(){var aa=/(?:\((.+)\)$| ([A-Z]{3}) )/.exec(this.toString());return aa[1]||aa[2]||"GMT"+this.getGmtOffset()};Z.prototype.getTimezoneOffset=function(){return this.proxy.getTimezoneOffset()};Z.prototype.getWeekOfYear=function(){var aa=this.getDayOfYear();var ac=7-this.getDayOfWeek();var ab=parseInt((aa+ac)/7,10);return ab};Z.prototype.getUnix=function(){return Math.round(this.proxy.getTime()/1000,0)};Z.prototype.getYear=function(){return this.proxy.getYear()};Z.prototype.next=function(aa){aa=aa||"day";return this.clone().add(1,aa)};Z.prototype.set=function(){switch(arguments.length){case 0:this.proxy=new Date();break;case 1:if(i(arguments[0])=="[object Object]"&&arguments[0]._type!="jsDate"){var ac=this.options=arguments[0];this.syntax=ac.syntax||this.syntax;this.defaultCentury=ac.defaultCentury||this.defaultCentury;this.proxy=Z.createDate(ac.date)}else{this.proxy=Z.createDate(arguments[0])}break;default:var aa=[];for(var ab=0;ab0?"floor":"ceil"](aa/12));var ab=ac.getMonth()+(aa%12);if(ab==12){ab=0;ac.setYear(ac.getFullYear()+1)}else{if(ab==-1){ab=11;ac.setYear(ac.getFullYear()-1)}}ac.setMonth(ab)},diff:function(ae,ac){var aa=ae.getFullYear()-ac.getFullYear();var ab=ae.getMonth()-ac.getMonth()+(aa*12);var ad=ae.getDate()-ac.getDate();return ab+(ad/30)}},year:{add:function(ab,aa){ab.setYear(ab.getFullYear()+Math[aa>0?"floor":"ceil"](aa))},diff:function(ab,aa){return z.month.diff(ab,aa)/12}}};for(var S in z){if(S.substring(S.length-1)!="s"){z[S+"s"]=z[S]}}var C=function(ae,ad,ab){if(Z.formats[ab]["shortcuts"][ad]){return Z.strftime(ae,Z.formats[ab]["shortcuts"][ad],ab)}else{var aa=(Z.formats[ab]["codes"][ad]||"").split(".");var ac=ae["get"+aa[0]]?ae["get"+aa[0]]():"";if(aa[1]){ac=I(ac,aa[1])}return ac}};Z.strftime=function(ag,ad,ac,ah){var ab="perl";var af=Z.regional.getLocale();if(ac&&Z.formats.hasOwnProperty(ac)){ab=ac}else{if(ac&&Z.regional.hasOwnProperty(ac)){af=ac}}if(ah&&Z.formats.hasOwnProperty(ah)){ab=ah}else{if(ah&&Z.regional.hasOwnProperty(ah)){af=ah}}if(i(ag)!="[object Object]"||ag._type!="jsDate"){ag=new Z(ag);ag.locale=af}if(!ad){ad=ag.formatString||Z.regional[af]["formatString"]}var aa=ad||"%Y-%m-%d",ai="",ae;while(aa.length>0){if(ae=aa.match(Z.formats[ab].codes.matcher)){ai+=aa.slice(0,ae.index);ai+=(ae[1]||"")+C(ag,ae[2],ab);aa=aa.slice(ae.index+ae[0].length)}else{ai+=aa;aa=""}}return ai};Z.formats={ISO:"%Y-%m-%dT%H:%M:%S.%N%G",SQL:"%Y-%m-%d %H:%M:%S"};Z.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","%":"%"}};Z.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","%":"%"}};Z.createDate=function(ac){if(ac==null){return new Date()}if(ac instanceof Date){return ac}if(typeof ac=="number"){return new Date(ac)}var ah=String(ac).replace(/^\s*(.+)\s*$/g,"$1");ah=ah.replace(/^([0-9]{1,4})-([0-9]{1,2})-([0-9]{1,4})/,"$1/$2/$3");ah=ah.replace(/^(3[01]|[0-2]?\d)[-\/]([a-z]{3,})[-\/](\d{4})/i,"$1 $2 $3");var ag=ah.match(/^(3[01]|[0-2]?\d)[-\/]([a-z]{3,})[-\/](\d{2})\D*/i);if(ag&&ag.length>3){var al=parseFloat(ag[3]);var af=Z.config.defaultCentury+al;af=String(af);ah=ah.replace(/^(3[01]|[0-2]?\d)[-\/]([a-z]{3,})[-\/](\d{2})\D*/i,ag[1]+" "+ag[2]+" "+af)}ag=ah.match(/^([0-9]{1,2})[-\/]([0-9]{1,2})[-\/]([0-9]{1,2})[^0-9]/);function ak(ap,ao){var av=parseFloat(ao[1]);var au=parseFloat(ao[2]);var at=parseFloat(ao[3]);var ar=Z.config.defaultCentury;var an,am,aw,aq;if(av>31){am=at;aw=au;an=ar+av}else{am=au;aw=av;an=ar+at}aq=aw+"/"+am+"/"+an;return ap.replace(/^([0-9]{1,2})[-\/]([0-9]{1,2})[-\/]([0-9]{1,2})/,aq)}if(ag&&ag.length>3){ah=ak(ah,ag)}var ag=ah.match(/^([0-9]{1,2})[-\/]([0-9]{1,2})[-\/]([0-9]{1,2})$/);if(ag&&ag.length>3){ah=ak(ah,ag)}var ae=0;var ab=Z.matchers.length;var aj,aa,ai=ah,ad;while(ae31){aa=ag;ab=af+ah}else{aa=ah;ab=af+ag}var ai=V(ac[2],Z.regional[Z.regional.getLocale()]["monthNamesShort"]);if(ai==-1){ai=V(ac[2],Z.regional[Z.regional.getLocale()]["monthNames"])}ad.setFullYear(ab,ai,aa);ad.setHours(0,0,0,0);return ad}else{return ae}}];function V(ac,ad){if(ad.indexOf){return ad.indexOf(ac)}for(var aa=0,ab=ad.length;aa=ai)?"":Array(1+ai-am.length>>>0).join(aj);return al?am+ak:ak+am}function ad(ak){var aj=new String(ak);for(var ai=10;ai>0;ai--){if(aj==(aj=aj.replace(/^(\d+)(\d{3})/,"$1"+G.jqplot.sprintf.thousandsSeparator+"$2"))){break}}return aj}function ac(an,am,ap,ak,al,aj){var ao=ak-an.length;if(ao>0){var ai=" ";if(aj){ai=" "}if(ap||!al){an=ag(an,ak,ai,ap)}else{an=an.slice(0,am.length)+ag("",ao,"0",true)+an.slice(am.length)}}return an}function ah(aq,aj,ao,ak,ai,an,ap,am){var al=aq>>>0;ao=ao&&al&&{"2":"0b","8":"0","16":"0x"}[aj]||"";aq=ao+ag(al.toString(aj),an||0,"0",false);return ac(aq,ao,ak,ai,ap,am)}function aa(am,an,ak,ai,al,aj){if(ai!=null){am=am.slice(0,ai)}return ac(am,"",an,ak,al,aj)}var ab=arguments,ae=0,af=ab[ae++];return af.replace(G.jqplot.sprintf.regex,function(aE,ap,aq,au,aG,aB,an){if(aE=="%%"){return"%"}var av=false,ar="",at=false,aD=false,ao=false,am=false;for(var aA=0;aq&&aA-1?6:(an=="d")?0:void (0)}else{if(aB=="*"){aB=+ab[ae++]}else{if(aB.charAt(0)=="*"){aB=+ab[aB.slice(1,-1)]}else{aB=+aB}}}var ax=ap?ab[ap.slice(0,-1)]:ab[ae++];switch(an){case"s":if(ax==null){return""}return aa(String(ax),av,au,aB,at,ao);case"c":return aa(String.fromCharCode(+ax),av,au,aB,at,ao);case"b":return ah(ax,2,aD,av,au,aB,at,ao);case"o":return ah(ax,8,aD,av,au,aB,at,ao);case"x":return ah(ax,16,aD,av,au,aB,at,ao);case"X":return ah(ax,16,aD,av,au,aB,at,ao).toUpperCase();case"u":return ah(ax,10,aD,av,au,aB,at,ao);case"i":var ak=parseInt(+ax,10);if(isNaN(ak)){return""}var az=ak<0?"-":ar;var aC=am?ad(String(Math.abs(ak))):String(Math.abs(ak));ax=az+ag(aC,aB,"0",false);return ac(ax,az,av,au,at,ao);case"d":var ak=Math.round(+ax);if(isNaN(ak)){return""}var az=ak<0?"-":ar;var aC=am?ad(String(Math.abs(ak))):String(Math.abs(ak));ax=az+ag(aC,aB,"0",false);return ac(ax,az,av,au,at,ao);case"e":case"E":case"f":case"F":case"g":case"G":var ak=+ax;if(isNaN(ak)){return""}var az=ak<0?"-":ar;var al=["toExponential","toFixed","toPrecision"]["efg".indexOf(an.toLowerCase())];var aF=["toString","toUpperCase"]["eEfFgG".indexOf(an)%2];var aC=Math.abs(ak)[al](aB);aC=am?ad(aC):aC;ax=az+aC;return ac(ax,az,av,au,at,ao)[aF]();case"p":case"P":var ak=+ax;if(isNaN(ak)){return""}var az=ak<0?"-":ar;var aw=String(Number(Math.abs(ak)).toExponential()).split(/e|E/);var aj=(aw[0].indexOf(".")!=-1)?aw[0].length-1:aw[0].length;var ay=(aw[1]<0)?-aw[1]-1:0;if(Math.abs(ak)<1){if(aj+ay<=aB){ax=az+Math.abs(ak).toPrecision(aj)}else{if(aj<=aB-1){ax=az+Math.abs(ak).toExponential(aj-1)}else{ax=az+Math.abs(ak).toExponential(aB-1)}}}else{var ai=(aj<=aB)?aj:aB;ax=az+Math.abs(ak).toPrecision(ai)}var aF=["toString","toUpperCase"]["pP".indexOf(an)%2];return ac(ax,az,av,au,at,ao)[aF]();case"n":return"";default:return aE}})};G.jqplot.sprintf.thousandsSeparator=",";G.jqplot.sprintf.regex=/%%|%(\d+\$)?([-+#0&\' ]*)(\*\d+\$|\*|\d+)?(\.(\*\d+\$|\*|\d+))?([nAscboxXuidfegpEGP])/g;G.jqplot.getSignificantFigures=function(ae){var ag=String(Number(Math.abs(ae)).toExponential()).split(/e|E/);var af=(ag[0].indexOf(".")!=-1)?ag[0].length-1:ag[0].length;var ab=(ag[1]<0)?-ag[1]-1:0;var aa=parseInt(ag[1]);var ac=(aa+1>0)?aa+1:0;var ad=(af<=ac)?0:af-aa-1;return{significantDigits:af,digitsLeft:ac,digitsRight:ad,zeros:ab,exponent:aa}};G.jqplot.getPrecision=function(ab){var aa=G.jqplot.getSignificantFigures(ab);var ac=aa[1]-1-parseInt(aa[0][1]);return ac}})(jQuery);