/** * Copyright (c) 2009 - 2010 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 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 . * * jqPlot includes date instance methods and printf/sprintf functions by other authors: * * Date instance methods contained in jqplot.dateMethods.js: * * author Ken Snyder (ken d snyder at gmail dot com) * date 2008-09-10 * version 2.0.2 (http://kendsnyder.com/sandbox/date/) * license Creative Commons Attribution License 3.0 (http://creativecommons.org/licenses/by/3.0/) * * JavaScript printf/sprintf functions contained in jqplot.sprintf.js: * * 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." * */ (function(B){var l;B.jqplot=function(W,T,R){var S,Q;if(R==null){if(T instanceof Array){S=T;Q=null}else{if(T.constructor==Object){S=null;Q=T}}}else{S=T;Q=R}var V=new F();B("#"+W).removeClass("jqplot-error");if(B.jqplot.config.catchErrors){try{V.init(W,S,Q);V.draw();V.themeEngine.init.call(V);return V}catch(U){var X=B.jqplot.config.errorMessage||U.message;B("#"+W).append('
'+X+"
");B("#"+W).addClass("jqplot-error");document.getElementById(W).style.background=B.jqplot.config.errorBackground;document.getElementById(W).style.border=B.jqplot.config.errorBorder;document.getElementById(W).style.fontFamily=B.jqplot.config.errorFontFamily;document.getElementById(W).style.fontSize=B.jqplot.config.errorFontSize;document.getElementById(W).style.fontStyle=B.jqplot.config.errorFontStyle;document.getElementById(W).style.fontWeight=B.jqplot.config.errorFontWeight}}else{V.init(W,S,Q);V.draw();V.themeEngine.init.call(V);return V}};B.jqplot.debug=1;B.jqplot.config={debug:1,enablePlugins:false,defaultHeight:300,defaultWidth:400,UTCAdjust:false,timezoneOffset:new Date(new Date().getTimezoneOffset()*60000),errorMessage:"",errorBackground:"",errorBorder:"",errorFontFamily:"",errorFontSize:"",errorFontStyle:"",errorFontWeight:"",catchErrors:false,defaultTickFormatString:"%.1f"};B.jqplot.enablePlugins=B.jqplot.config.enablePlugins;B.jqplot.support_canvas=function(){return !!document.createElement("canvas").getContext};B.jqplot.support_canvas_text=function(){return !!(document.createElement("canvas").getContext&&typeof document.createElement("canvas").getContext("2d").fillText=="function")};B.jqplot.use_excanvas=(B.browser.msie&&!B.jqplot.support_canvas())?true:false;B.jqplot.preInitHooks=[];B.jqplot.postInitHooks=[];B.jqplot.preParseOptionsHooks=[];B.jqplot.postParseOptionsHooks=[];B.jqplot.preDrawHooks=[];B.jqplot.postDrawHooks=[];B.jqplot.preDrawSeriesHooks=[];B.jqplot.postDrawSeriesHooks=[];B.jqplot.preDrawLegendHooks=[];B.jqplot.addLegendRowHooks=[];B.jqplot.preSeriesInitHooks=[];B.jqplot.postSeriesInitHooks=[];B.jqplot.preParseSeriesOptionsHooks=[];B.jqplot.postParseSeriesOptionsHooks=[];B.jqplot.eventListenerHooks=[];B.jqplot.preDrawSeriesShadowHooks=[];B.jqplot.postDrawSeriesShadowHooks=[];B.jqplot.ElemContainer=function(){this._elem;this._plotWidth;this._plotHeight;this._plotDimensions={height:null,width:null}};B.jqplot.ElemContainer.prototype.createElement=function(T,V,R,S,W){this._offsets=V;var Q=R||"jqplot";var U=document.createElement(T);this._elem=B(U);this._elem.addClass(Q);this._elem.css(S);this._elem.attr(W);return this._elem};B.jqplot.ElemContainer.prototype.getWidth=function(){if(this._elem){return this._elem.outerWidth(true)}else{return null}};B.jqplot.ElemContainer.prototype.getHeight=function(){if(this._elem){return this._elem.outerHeight(true)}else{return null}};B.jqplot.ElemContainer.prototype.getPosition=function(){if(this._elem){return this._elem.position()}else{return{top:null,left:null,bottom:null,right:null}}};B.jqplot.ElemContainer.prototype.getTop=function(){return this.getPosition().top};B.jqplot.ElemContainer.prototype.getLeft=function(){return this.getPosition().left};B.jqplot.ElemContainer.prototype.getBottom=function(){return this._elem.css("bottom")};B.jqplot.ElemContainer.prototype.getRight=function(){return this._elem.css("right")};function o(Q){B.jqplot.ElemContainer.call(this);this.name=Q;this._series=[];this.show=false;this.tickRenderer=B.jqplot.AxisTickRenderer;this.tickOptions={};this.labelRenderer=B.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=B.jqplot.LinearAxisRenderer;this.rendererOptions={};this.showTicks=true;this.showTickMarks=true;this.showMinorTicks=true;this.useSeriesColor=false;this.borderWidth=null;this.borderColor=null;this._dataBounds={min:null,max:null};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}o.prototype=new B.jqplot.ElemContainer();o.prototype.constructor=o;o.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)};o.prototype.draw=function(Q){return this.renderer.draw.call(this,Q)};o.prototype.set=function(){this.renderer.set.call(this)};o.prototype.pack=function(R,Q){if(this.show){this.renderer.pack.call(this,R,Q)}if(this._min==null){this._min=this.min;this._max=this.max;this._tickInterval=this.tickInterval;this._numberTicks=this.numberTicks;this.__ticks=this._ticks}};o.prototype.reset=function(){this.renderer.reset.call(this)};o.prototype.resetScale=function(){this.min=null;this.max=null;this.numberTicks=null;this.tickInterval=null};function g(Q){B.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=B.jqplot.TableLegendRenderer;this.rendererOptions={};this.preDraw=false;this.marginTop=null;this.marginRight=null;this.marginBottom=null;this.marginLeft=null;this.escapeHtml=false;this._series=[];B.extend(true,this,Q)}g.prototype=new B.jqplot.ElemContainer();g.prototype.constructor=g;g.prototype.setOptions=function(Q){B.extend(true,this,Q);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}};g.prototype.init=function(){this.renderer=new this.renderer();this.renderer.init.call(this,this.rendererOptions)};g.prototype.draw=function(R){for(var Q=0;Q0){Y._prevPlotData=this.series[Z-1]._plotData}Y._sumy=0;Y._sumx=0;for(X=Y.data.length-1;X>-1;X--){Y._sumy+=Y.data[X][1];Y._sumx+=Y.data[X][0]}};this.getNextSeriesColor=(function(V){var U=0;var W=V.seriesColors;return function(){if(U0;aa--){U[X[aa-1]].pack({position:"absolute",top:0,right:this._gridPadding.right-V[aa-1]},{min:this._height-this._gridPadding.bottom,max:this._gridPadding.top})}this.target.append(this.grid.createElement(this._gridPadding));this.grid.draw();for(aa=0;aa0;V--){W=Z[V-1];if(U[W].show){Y[W]=U[W].series_p2u(aa[W.charAt(0)])}}return{offsets:X,gridPos:aa,dataPos:Y}}function T(U,V){var Z=V.series;var aD,aC,aB,aw,ax,aq,ap,ae,ac,ag,ah,ar;var aA,aE,ay,aa,ao,au;var W,av;for(aB=V.seriesStack.length-1;aB>=0;aB--){aD=V.seriesStack[aB];aw=Z[aD];switch(aw.renderer.constructor){case B.jqplot.BarRenderer:aq=U.x;ap=U.y;for(aC=aw.gridData.length-1;aC>=0;aC--){ao=aw._barPoints[aC];if(aq>ao[0][0]&&aqao[2][1]&&ap0&&-ap>=0){ae=2*Math.PI-Math.atan(-ap/aq)}else{if(aq>0&&-ap<0){ae=-Math.atan(-ap/aq)}else{if(aq<0){ae=Math.PI-Math.atan(-ap/aq)}else{if(aq==0&&-ap>0){ae=3*Math.PI/2}else{if(aq==0&&-ap<0){ae=Math.PI/2}else{if(aq==0&&ap==0){ae=0}}}}}}if(ag){ae-=ag;if(ae<0){ae+=2*Math.PI}else{if(ae>2*Math.PI){ae-=2*Math.PI}}}ac=aw.sliceMargin/180*Math.PI;if(axaw._innerRadius){for(aC=0;aC0)?aw.gridData[aC-1][1]+ac:ac;ar=aw.gridData[aC][1];if(ae>ah&&ae0&&-ap>=0){ae=2*Math.PI-Math.atan(-ap/aq)}else{if(aq>0&&-ap<0){ae=-Math.atan(-ap/aq)}else{if(aq<0){ae=Math.PI-Math.atan(-ap/aq)}else{if(aq==0&&-ap>0){ae=3*Math.PI/2}else{if(aq==0&&-ap<0){ae=Math.PI/2}else{if(aq==0&&ap==0){ae=0}}}}}}if(ag){ae-=ag;if(ae<0){ae+=2*Math.PI}else{if(ae>2*Math.PI){ae-=2*Math.PI}}}ac=aw.sliceMargin/180*Math.PI;if(ax0)?aw.gridData[aC-1][1]+ac:ac;ar=aw.gridData[aC][1];if(ae>ah&&ae=cv[0][1]&&ap<=cv[3][1]&&aq>=ab[0]&&aq<=al[0]){return{seriesIndex:aw.index,pointIndex:aC,gridData:null,data:aw.data[aC]}}}break;case B.jqplot.LineRenderer:aq=U.x;ap=U.y;ax=aw.renderer;if(aw.show){if(aw.fill){var af=false;if(aq>aw._boundingBox[0][0]&&aqaw._boundingBox[1][1]&&ap=ap||ai[1]=ap){if(aj[0]+(ap-aj[1])/(ai[1]-aj[1])*(ai[0]-aj[0])0)?av:0;for(var aC=0;aC=ay[0]-ax._bodyWidth/2&&aq<=ay[0]+ax._bodyWidth/2&&ap>=ad(aw.data[aC][2])&&ap<=ad(aw.data[aC][3])){return{seriesIndex:aD,pointIndex:aC,gridData:ay,data:aw.data[aC]}}}else{if(!ax.hlc){var ad=aw._yaxis.series_u2p;if(aq>=ay[0]-ax._tickLength&&aq<=ay[0]+ax._tickLength&&ap>=ad(aw.data[aC][2])&&ap<=ad(aw.data[aC][3])){return{seriesIndex:aD,pointIndex:aC,gridData:ay,data:aw.data[aC]}}}else{var ad=aw._yaxis.series_u2p;if(aq>=ay[0]-ax._tickLength&&aq<=ay[0]+ax._tickLength&&ap>=ad(aw.data[aC][1])&&ap<=ad(aw.data[aC][2])){return{seriesIndex:aD,pointIndex:aC,gridData:ay,data:aw.data[aC]}}}}}else{if(ay[0]!=null&&ay[1]!=null){aE=Math.sqrt((aq-ay[0])*(aq-ay[0])+(ap-ay[1])*(ap-ay[1]));if(aE<=W&&(aE<=aA||aA==null)){aA=aE;return{seriesIndex:aD,pointIndex:aC,gridData:ay,data:aw.data[aC]}}}}}}}break;default:aq=U.x;ap=U.y;ax=aw.renderer;if(aw.show){av=aw.markerRenderer.size/2+aw.neighborThreshold;W=(av>0)?av:0;for(var aC=0;aC=ay[0]-ax._bodyWidth/2&&aq<=ay[0]+ax._bodyWidth/2&&ap>=ad(aw.data[aC][2])&&ap<=ad(aw.data[aC][3])){return{seriesIndex:aD,pointIndex:aC,gridData:ay,data:aw.data[aC]}}}else{if(!ax.hlc){var ad=aw._yaxis.series_u2p;if(aq>=ay[0]-ax._tickLength&&aq<=ay[0]+ax._tickLength&&ap>=ad(aw.data[aC][2])&&ap<=ad(aw.data[aC][3])){return{seriesIndex:aD,pointIndex:aC,gridData:ay,data:aw.data[aC]}}}else{var ad=aw._yaxis.series_u2p;if(aq>=ay[0]-ax._tickLength&&aq<=ay[0]+ax._tickLength&&ap>=ad(aw.data[aC][1])&&ap<=ad(aw.data[aC][2])){return{seriesIndex:aD,pointIndex:aC,gridData:ay,data:aw.data[aC]}}}}}else{aE=Math.sqrt((aq-ay[0])*(aq-ay[0])+(ap-ay[1])*(ap-ay[1]));if(aE<=W&&(aE<=aA||aA==null)){aA=aE;return{seriesIndex:aD,pointIndex:aC,gridData:ay,data:aw.data[aC]}}}}}break}}return null}this.onClick=function(W){var V=R(W);var Y=W.data.plot;var X=T(V.gridPos,Y);var U=jQuery.Event("jqplotClick");U.pageX=W.pageX;U.pageY=W.pageY;B(this).trigger(U,[V.gridPos,V.dataPos,X,Y])};this.onDblClick=function(W){var V=R(W);var Y=W.data.plot;var X=T(V.gridPos,Y);var U=jQuery.Event("jqplotDblClick");U.pageX=W.pageX;U.pageY=W.pageY;B(this).trigger(U,[V.gridPos,V.dataPos,X,Y])};this.onMouseDown=function(W){var V=R(W);var Y=W.data.plot;var X=T(V.gridPos,Y);var U=jQuery.Event("jqplotMouseDown");U.pageX=W.pageX;U.pageY=W.pageY;B(this).trigger(U,[V.gridPos,V.dataPos,X,Y])};this.onMouseUp=function(W){var V=R(W);var U=jQuery.Event("jqplotMouseUp");U.pageX=W.pageX;U.pageY=W.pageY;B(this).trigger(U,[V.gridPos,V.dataPos,null,W.data.plot])};this.onRightClick=function(W){var V=R(W);var Y=W.data.plot;var X=T(V.gridPos,Y);if(Y.captureRightClick){if(W.which==3){var U=jQuery.Event("jqplotRightClick");U.pageX=W.pageX;U.pageY=W.pageY;B(this).trigger(U,[V.gridPos,V.dataPos,X,Y])}else{var U=jQuery.Event("jqplotMouseUp");U.pageX=W.pageX;U.pageY=W.pageY;B(this).trigger(U,[V.gridPos,V.dataPos,X,Y])}}};this.onMouseMove=function(W){var V=R(W);var Y=W.data.plot;var X=T(V.gridPos,Y);var U=jQuery.Event("jqplotMouseMove");U.pageX=W.pageX;U.pageY=W.pageY;B(this).trigger(U,[V.gridPos,V.dataPos,X,Y])};this.onMouseEnter=function(W){var V=R(W);var X=W.data.plot;var U=jQuery.Event("jqplotMouseEnter");U.pageX=W.pageX;U.pageY=W.pageY;B(this).trigger(U,[V.gridPos,V.dataPos,null,X])};this.onMouseLeave=function(W){var V=R(W);var X=W.data.plot;var U=jQuery.Event("jqplotMouseLeave");U.pageX=W.pageX;U.pageY=W.pageY;B(this).trigger(U,[V.gridPos,V.dataPos,null,X])};this.drawSeries=function(W,U){var Y,X,V;U=(typeof(W)=="number"&&U==null)?W:U;W=(typeof(W)=="object")?W:{};if(U!=l){X=this.series[U];V=X.shadowCanvas._ctx;V.clearRect(0,0,V.canvas.width,V.canvas.height);X.drawShadow(V,W,this);V=X.canvas._ctx;V.clearRect(0,0,V.canvas.width,V.canvas.height);X.draw(V,W,this);if(X.renderer.constructor==B.jqplot.BezierCurveRenderer){if(U570)?Q[S]*0.8:Q[S]+0.3*(255-Q[S]);Q[S]=parseInt(Q[S],10)}T.push("rgb("+Q[0]+","+Q[1]+","+Q[2]+")")}}else{var U=B.jqplot.getColorComponents(R);var Q=[U[0],U[1],U[2]];var W=Q[0]+Q[1]+Q[2];for(var S=0;S<3;S++){Q[S]=(W>570)?Q[S]*0.8:Q[S]+0.3*(255-Q[S]);Q[S]=parseInt(Q[S],10)}T="rgb("+Q[0]+","+Q[1]+","+Q[2]+")"}return T};B.jqplot.ColorGenerator=function(R){var Q=0;this.next=function(){if(Q0){return R[Q--]}else{Q=R.length-1;return R[Q]}};this.get=function(T){var S=T-R.length*Math.floor(T/R.length);return R[S]};this.setColors=function(S){R=S};this.reset=function(){Q=0}};B.jqplot.hex2rgb=function(S,Q){S=S.replace("#","");if(S.length==3){S=S[0]+S[0]+S[1]+S[1]+S[2]+S[2]}var R;R="rgba("+parseInt(S.slice(0,2),16)+", "+parseInt(S.slice(2,4),16)+", "+parseInt(S.slice(4,6),16);if(Q){R+=", "+Q}R+=")";return R};B.jqplot.rgb2hex=function(U){var S=/rgba?\( *([0-9]{1,3}\.?[0-9]*%?) *, *([0-9]{1,3}\.?[0-9]*%?) *, *([0-9]{1,3}\.?[0-9]*%?) *(?:, *[0-9.]*)?\)/;var Q=U.match(S);var T="#";for(i=1;i<4;i++){var R;if(Q[i].search(/%/)!=-1){R=parseInt(255*Q[i]/100,10).toString(16);if(R.length==1){R="0"+R}}else{R=parseInt(Q[i],10).toString(16);if(R.length==1){R="0"+R}}T+=R}return T};B.jqplot.normalize2rgb=function(R,Q){if(R.search(/^ *rgba?\(/)!=-1){return R}else{if(R.search(/^ *#?[0-9a-fA-F]?[0-9a-fA-F]/)!=-1){return B.jqplot.hex2rgb(R,Q)}else{throw"invalid color spec"}}};B.jqplot.getColorComponents=function(U){U=B.jqplot.colorKeywordMap[U]||U;var T=B.jqplot.normalize2rgb(U);var S=/rgba?\( *([0-9]{1,3}\.?[0-9]*%?) *, *([0-9]{1,3}\.?[0-9]*%?) *, *([0-9]{1,3}\.?[0-9]*%?) *,? *([0-9.]* *)?\)/;var Q=T.match(S);var R=[];for(i=1;i<4;i++){if(Q[i].search(/%/)!=-1){R[i-1]=parseInt(255*Q[i]/100,10)}else{R[i-1]=parseInt(Q[i],10)}}R[3]=parseFloat(Q[4])?parseFloat(Q[4]):1;return R};B.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)"};B.jqplot.log=function(){if(window.console&&B.jqplot.debug){if(arguments.length==1){console.log(arguments[0])}else{console.log(arguments)}}};var e=B.jqplot.log;B.jqplot.AxisLabelRenderer=function(Q){B.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;B.extend(true,this,Q)};B.jqplot.AxisLabelRenderer.prototype=new B.jqplot.ElemContainer();B.jqplot.AxisLabelRenderer.prototype.constructor=B.jqplot.AxisLabelRenderer;B.jqplot.AxisLabelRenderer.prototype.init=function(Q){B.extend(true,this,Q)};B.jqplot.AxisLabelRenderer.prototype.draw=function(){this._elem=B('
');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};B.jqplot.AxisLabelRenderer.prototype.pack=function(){};B.jqplot.AxisTickRenderer=function(Q){B.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="";this.value=null;this._styles={};this.formatter=B.jqplot.DefaultTickFormatter;this.prefix="";this.formatString="";this.fontFamily;this.fontSize;this.textColor;this._elem;B.extend(true,this,Q)};B.jqplot.AxisTickRenderer.prototype.init=function(Q){B.extend(true,this,Q)};B.jqplot.AxisTickRenderer.prototype=new B.jqplot.ElemContainer();B.jqplot.AxisTickRenderer.prototype.constructor=B.jqplot.AxisTickRenderer;B.jqplot.AxisTickRenderer.prototype.setTick=function(Q,S,R){this.value=Q;this.axis=S;if(R){this.isMinorTick=true}return this};B.jqplot.AxisTickRenderer.prototype.draw=function(){if(!this.label){this.label=this.formatter(this.formatString,this.value)}if(this.prefix&&!this.formatString){this.label=this.prefix+this.label}style='style="position:absolute;';if(Number(this.label)){style+="white-space:nowrap;"}style+='"';this._elem=B("
'+this.label+"
");for(var Q in this._styles){this._elem.css(Q,this._styles[Q])}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};B.jqplot.DefaultTickFormatter=function(Q,R){if(typeof R=="number"){if(!Q){Q=B.jqplot.config.defaultTickFormatString}return B.jqplot.sprintf(Q,R)}else{return String(R)}};B.jqplot.AxisTickRenderer.prototype.pack=function(){};B.jqplot.CanvasGridRenderer=function(){this.shadowRenderer=new B.jqplot.ShadowRenderer()};B.jqplot.CanvasGridRenderer.prototype.init=function(R){this._ctx;B.extend(true,this,R);var Q={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(Q)};B.jqplot.CanvasGridRenderer.prototype.createElement=function(){var S=document.createElement("canvas");var Q=this._plotDimensions.width;var R=this._plotDimensions.height;S.width=Q;S.height=R;this._elem=B(S);this._elem.addClass("jqplot-grid-canvas");this._elem.css({position:"absolute",left:0,top:0});if(B.jqplot.use_excanvas){window.G_vmlCanvasManager.init_(document)}if(B.jqplot.use_excanvas){S=window.G_vmlCanvasManager.initElement(S)}this._top=this._offsets.top;this._bottom=R-this._offsets.bottom;this._left=this._offsets.left;this._right=Q-this._offsets.right;this._width=this._right-this._left;this._height=this._bottom-this._top;return this._elem};B.jqplot.CanvasGridRenderer.prototype.draw=function(){this._ctx=this._elem.get(0).getContext("2d");var ag=this._ctx;var Z=this._axes;ag.save();ag.clearRect(0,0,this._plotDimensions.width,this._plotDimensions.height);ag.fillStyle=this.backgroundColor||this.background;ag.fillRect(this._left,this._top,this._width,this._height);if(this.drawGridlines){ag.save();ag.lineJoin="miter";ag.lineCap="butt";ag.lineWidth=this.gridLineWidth;ag.strokeStyle=this.gridLineColor;var ab,Y;var Q=["xaxis","yaxis","x2axis","y2axis"];for(var V=4;V>0;V--){var R=Q[V-1];var T=Z[R];var ac=T._ticks;if(T.show){for(var U=ac.length;U>0;U--){var af=ac[U-1];if(af.show){var aa=Math.round(T.u2p(af.value))+0.5;switch(R){case"xaxis":if(af.showGridline){X(aa,this._top,aa,this._bottom)}if(af.showMark&&af.mark){s=af.markSize;m=af.mark;var aa=Math.round(T.u2p(af.value))+0.5;switch(m){case"outside":ab=this._bottom;Y=this._bottom+s;break;case"inside":ab=this._bottom-s;Y=this._bottom;break;case"cross":ab=this._bottom-s;Y=this._bottom+s;break;default:ab=this._bottom;Y=this._bottom+s;break}if(this.shadow){this.renderer.shadowRenderer.draw(ag,[[aa,ab],[aa,Y]],{lineCap:"butt",lineWidth:this.gridLineWidth,offset:this.gridLineWidth*0.75,depth:2,fill:false,closePath:false})}X(aa,ab,aa,Y)}break;case"yaxis":if(af.showGridline){X(this._right,aa,this._left,aa)}if(af.showMark&&af.mark){s=af.markSize;m=af.mark;var aa=Math.round(T.u2p(af.value))+0.5;switch(m){case"outside":ab=this._left-s;Y=this._left;break;case"inside":ab=this._left;Y=this._left+s;break;case"cross":ab=this._left-s;Y=this._left+s;break;default:ab=this._left-s;Y=this._left;break}if(this.shadow){this.renderer.shadowRenderer.draw(ag,[[ab,aa],[Y,aa]],{lineCap:"butt",lineWidth:this.gridLineWidth*1.5,offset:this.gridLineWidth*0.75,fill:false,closePath:false})}X(ab,aa,Y,aa,{strokeStyle:T.borderColor})}break;case"x2axis":if(af.showGridline){X(aa,this._bottom,aa,this._top)}if(af.showMark&&af.mark){s=af.markSize;m=af.mark;var aa=Math.round(T.u2p(af.value))+0.5;switch(m){case"outside":ab=this._top-s;Y=this._top;break;case"inside":ab=this._top;Y=this._top+s;break;case"cross":ab=this._top-s;Y=this._top+s;break;default:ab=this._top-s;Y=this._top;break}if(this.shadow){this.renderer.shadowRenderer.draw(ag,[[aa,ab],[aa,Y]],{lineCap:"butt",lineWidth:this.gridLineWidth,offset:this.gridLineWidth*0.75,depth:2,fill:false,closePath:false})}X(aa,ab,aa,Y)}break;case"y2axis":if(af.showGridline){X(this._left,aa,this._right,aa)}if(af.showMark&&af.mark){s=af.markSize;m=af.mark;var aa=Math.round(T.u2p(af.value))+0.5;switch(m){case"outside":ab=this._right;Y=this._right+s;break;case"inside":ab=this._right-s;Y=this._right;break;case"cross":ab=this._right-s;Y=this._right+s;break;default:ab=this._right;Y=this._right+s;break}if(this.shadow){this.renderer.shadowRenderer.draw(ag,[[ab,aa],[Y,aa]],{lineCap:"butt",lineWidth:this.gridLineWidth*1.5,offset:this.gridLineWidth*0.75,fill:false,closePath:false})}X(ab,aa,Y,aa,{strokeStyle:T.borderColor})}break;default:break}}}}}Q=["y3axis","y4axis","y5axis","y6axis","y7axis","y8axis","y9axis"];for(var V=7;V>0;V--){var T=Z[Q[V-1]];var ac=T._ticks;if(T.show){var ae=ac[T.numberTicks-1];var W=ac[0];var S=T.getLeft();var ad=[[S,ae.getTop()+ae.getHeight()/2],[S,W.getTop()+W.getHeight()/2+1]];if(this.shadow){this.renderer.shadowRenderer.draw(ag,ad,{lineCap:"butt",fill:false,closePath:false})}X(ad[0][0],ad[0][1],ad[1][0],ad[1][1],{lineCap:"butt",strokeStyle:T.borderColor,lineWidth:T.borderWidth});for(var U=ac.length;U>0;U--){var af=ac[U-1];s=af.markSize;m=af.mark;var aa=Math.round(T.u2p(af.value))+0.5;if(af.showMark&&af.mark){switch(m){case"outside":ab=S;Y=S+s;break;case"inside":ab=S-s;Y=S;break;case"cross":ab=S-s;Y=S+s;break;default:ab=S;Y=S+s;break}ad=[[ab,aa],[Y,aa]];if(this.shadow){this.renderer.shadowRenderer.draw(ag,ad,{lineCap:"butt",lineWidth:this.gridLineWidth*1.5,offset:this.gridLineWidth*0.75,fill:false,closePath:false})}X(ab,aa,Y,aa,{strokeStyle:T.borderColor})}}}}ag.restore()}function X(al,ak,ai,ah,aj){ag.save();aj=aj||{};if(aj.lineWidth==null||aj.lineWidth!=0){B.extend(true,ag,aj);ag.beginPath();ag.moveTo(al,ak);ag.lineTo(ai,ah);ag.stroke();ag.restore()}}if(this.shadow){var ad=[[this._left,this._bottom],[this._right,this._bottom],[this._right,this._top]];this.renderer.shadowRenderer.draw(ag,ad)}if(this.borderWidth!=0&&this.drawBorder){X(this._left,this._top,this._right,this._top,{lineCap:"round",strokeStyle:Z.x2axis.borderColor,lineWidth:Z.x2axis.borderWidth});X(this._right,this._top,this._right,this._bottom,{lineCap:"round",strokeStyle:Z.y2axis.borderColor,lineWidth:Z.y2axis.borderWidth});X(this._right,this._bottom,this._left,this._bottom,{lineCap:"round",strokeStyle:Z.xaxis.borderColor,lineWidth:Z.xaxis.borderWidth});X(this._left,this._bottom,this._left,this._top,{lineCap:"round",strokeStyle:Z.yaxis.borderColor,lineWidth:Z.yaxis.borderWidth})}ag.restore()};var v=24*60*60*1000;var K=function(Q,R){Q=String(Q);while(Q.length0?"floor":"ceil"](Q/12));var R=S.getMonth()+(Q%12);if(R==12){R=0;S.setYear(S.getFullYear()+1)}else{if(R==-1){R=11;S.setYear(S.getFullYear()-1)}}S.setMonth(R)},diff:function(U,S){var Q=U.getFullYear()-S.getFullYear();var R=U.getMonth()-S.getMonth()+(Q*12);var T=U.getDate()-S.getDate();return R+(T/30)}},year:{add:function(R,Q){R.setYear(R.getFullYear()+Math[Q>0?"floor":"ceil"](Q))},diff:function(R,Q){return w.month.diff(R,Q)/12}}};for(var J in w){if(J.substring(J.length-1)!="s"){w[J+"s"]=w[J]}}var y=function(T,S){if(Date.prototype.strftime.formatShortcuts[S]){return T.strftime(Date.prototype.strftime.formatShortcuts[S])}else{var Q=(Date.prototype.strftime.formatCodes[S]||"").split(".");var R=T["get"+Q[0]]?T["get"+Q[0]]():"";if(Q[1]){R=K(R,Q[1])}return R}};var r={succ:function(Q){return this.clone().add(1,Q)},add:function(S,R){var Q=w[R]||w.day;if(typeof Q=="number"){this.setTime(this.getTime()+(Q*S))}else{Q.add(this,S)}return this},diff:function(R,U,Q){R=Date.create(R);if(R===null){return null}var S=w[U]||w.day;if(typeof S=="number"){var T=(this.getTime()-R.getTime())/S}else{var T=S.diff(this,R)}return(Q?T:Math[T>0?"floor":"ceil"](T))},strftime:function(R){var T=R||"%Y-%m-%d",Q="",S;while(T.length>0){if(S=T.match(Date.prototype.strftime.formatCodes.matcher)){Q+=T.slice(0,S.index);Q+=(S[1]||"")+y(this,S[2]);T=T.slice(S.index+S[0].length)}else{Q+=T;T=""}}return Q},getShortYear:function(){return this.getYear()%100},getMonthNumber:function(){return this.getMonth()+1},getMonthName:function(){return Date.MONTHNAMES[this.getMonth()]},getAbbrMonthName:function(){return Date.ABBR_MONTHNAMES[this.getMonth()]},getDayName:function(){return Date.DAYNAMES[this.getDay()]},getAbbrDayName:function(){return Date.ABBR_DAYNAMES[this.getDay()]},getDayOrdinal:function(){return Date.ORDINALNAMES[this.getDate()%10]},getHours12:function(){var Q=this.getHours();return Q>12?Q-12:(Q==0?12:Q)},getAmPm:function(){return this.getHours()>=12?"PM":"AM"},getUnix:function(){return Math.round(this.getTime()/1000,0)},getGmtOffset:function(){var Q=this.getTimezoneOffset()/60;var R=Q<0?"+":"-";Q=Math.abs(Q);return R+K(Math.floor(Q),2)+":"+K((Q%1)*60,2)},getTimezoneName:function(){var Q=/(?:\((.+)\)$| ([A-Z]{3}) )/.exec(this.toString());return Q[1]||Q[2]||"GMT"+this.getGmtOffset()},toYmdInt:function(){return(this.getFullYear()*10000)+(this.getMonthNumber()*100)+this.getDate()},clone:function(){return new Date(this.getTime())}};for(var n in r){Date.prototype[n]=r[n]}var A={create:function(Q){if(Q instanceof Date){return Q}if(typeof Q=="number"){return new Date(Q)}var V=String(Q).replace(/^\s*(.+)\s*$/,"$1"),R=0,S=Date.create.patterns.length,T;var U=V;while(R31){Q=S[3];if(Z')}else{if(this.text){var R;if(this.color){R=this.color}else{if(this.textColor){R=this.textColor}}var Q="position:absolute;top:0px;left:0px;";Q+=(this._plotWidth)?"width:"+this._plotWidth+"px;":"";Q+=(this.fontSize)?"font-size:"+this.fontSize+";":"";Q+=(this.textAlign)?"text-align:"+this.textAlign+";":"text-align:center;";Q+=(R)?"color:"+R+";":"";Q+=(this.paddingBottom)?"padding-bottom:"+this.paddingBottom+";":"";this._elem=B('
'+this.text+"
");if(this.fontFamily){this._elem.css("font-family",this.fontFamily)}}}return this._elem};B.jqplot.DivTitleRenderer.prototype.pack=function(){};B.jqplot.LineRenderer=function(){this.shapeRenderer=new B.jqplot.ShapeRenderer();this.shadowRenderer=new B.jqplot.ShadowRenderer()};B.jqplot.LineRenderer.prototype.init=function(R,V){R=R||{};var T={highlightMouseOver:R.highlightMouseOver,highlightMouseDown:R.highlightMouseDown,highlightColor:R.highlightColor};delete (R.highlightMouseOver);delete (R.highlightMouseDown);delete (R.highlightColor);B.extend(true,this.renderer,R);var U={lineJoin:"round",lineCap:"round",fill:this.fill,isarc:false,strokeStyle:this.color,fillStyle:this.fillColor,lineWidth:this.lineWidth,closePath:this.fill};this.renderer.shapeRenderer.init(U);if(this.lineWidth>2.5){var S=this.shadowOffset*(1+(Math.atan((this.lineWidth/2.5))/0.785398163-1)*0.6)}else{var S=this.shadowOffset*Math.atan((this.lineWidth/2.5))/0.785398163}var Q={lineJoin:"round",lineCap:"round",fill:this.fill,isarc:false,angle:this.shadowAngle,offset:S,alpha:this.shadowAlpha,depth:this.shadowDepth,lineWidth:this.lineWidth,closePath:this.fill};this.renderer.shadowRenderer.init(Q);this._areaPoints=[];this._boundingBox=[[],[]];if(!this.isTrendline&&this.fill){this.highlightMouseOver=true;this.highlightMouseDown=false;this.highlightColor=null;if(T.highlightMouseDown&&T.highlightMouseOver==null){T.highlightMouseOver=false}B.extend(true,this,{highlightMouseOver:T.highlightMouseOver,highlightMouseDown:T.highlightMouseDown,highlightColor:T.highlightColor});if(!this.highlightColor){this.highlightColor=B.jqplot.computeHighlightColors(this.fillColor)}if(this.highlighter){this.highlighter.show=false}V.postInitHooks.addOnce(q);V.postDrawHooks.addOnce(P);V.eventListenerHooks.addOnce("jqplotMouseMove",d);V.eventListenerHooks.addOnce("jqplotMouseDown",a);V.eventListenerHooks.addOnce("jqplotMouseUp",O);V.eventListenerHooks.addOnce("jqplotClick",c);V.eventListenerHooks.addOnce("jqplotRightClick",j)}};B.jqplot.LineRenderer.prototype.setGridData=function(V){var R=this._xaxis.series_u2p;var U=this._yaxis.series_u2p;var S=this._plotData;var T=this._prevPlotData;this.gridData=[];this._prevGridData=[];for(var Q=0;Q0;aj--){ao.push(ac[aj-1])}if(T){this.renderer.shadowRenderer.draw(af,ao,Z)}this._areaPoints=ao;this.renderer.shapeRenderer.draw(af,ao,Z)}}else{if(Q){var an=ao.slice(0)}if(this.index==0||!this._stack){var V=af.canvas.height;ao.unshift([ao[0][0],V]);len=ao.length;ao.push([ao[len-1][0],V])}else{var ac=this._prevGridData;for(var aj=ac.length;aj>0;aj--){ao.push(ac[aj-1])}}this._areaPoints=ao;if(T){this.renderer.shadowRenderer.draw(af,ao,Z)}this.renderer.shapeRenderer.draw(af,ao,Z)}if(Q){var ah=B.extend(true,{},Z,{fill:false,closePath:false});this.renderer.shapeRenderer.draw(af,an,ah);if(this.markerRenderer.show){for(aj=0;ajab[0]||aa==null){aa=ab[0]}if(akab[1]||ag==null){ag=ab[1]}}this._boundingBox=[[aa,ak],[ad,ag]];if(this.markerRenderer.show&&!ai){for(aj=0;ajQ.max)||Q.max==null){Q.max=V[R][0]}}else{if((V[R][1]!=null&&V[R][1]Q.max)||Q.max==null){Q.max=V[R][1]}}}}};B.jqplot.LinearAxisRenderer.prototype.draw=function(Q){if(this.show){this.renderer.createTicks.call(this);var W=0;var R;if(this._elem){this._elem.empty()}this._elem=B('
');if(this.name=="xaxis"||this.name=="x2axis"){this._elem.width(this._plotDimensions.width)}else{this._elem.height(this._plotDimensions.height)}this.labelOptions.axis=this.name;this._label=new this.labelRenderer(this.labelOptions);if(this._label.show){var V=this._label.draw(Q);V.appendTo(this._elem)}var U=this._ticks;for(var T=0;TX){X=S}}}if(Q){R=this._label._elem.outerWidth(true);W=this._label._elem.outerHeight(true)}if(this.name=="xaxis"){X=X+W;this._elem.css({height:X+"px",left:"0px",bottom:"0px"})}else{if(this.name=="x2axis"){X=X+W;this._elem.css({height:X+"px",left:"0px",top:"0px"})}else{if(this.name=="yaxis"){X=X+R;this._elem.css({width:X+"px",left:"0px",top:"0px"});if(Q&&this._label.constructor==B.jqplot.AxisLabelRenderer){this._label._elem.css("width",R+"px")}}else{X=X+R;this._elem.css({width:X+"px",right:"0px",top:"0px"});if(Q&&this._label.constructor==B.jqplot.AxisLabelRenderer){this._label._elem.css("width",R+"px")}}}}}};B.jqplot.LinearAxisRenderer.prototype.createTicks=function(){var at=this._ticks;var am=this.ticks;var ad=this.name;var af=this._dataBounds;var Q,U;var aF,ak;var W,V;var aD,aA;var aj=this.min;var aE=this.max;var aw=this.numberTicks;var aI=this.tickInterval;if(am.length){for(aA=0;aA0){R=Math.max(Math.log(aF)/Math.LN10,0.05)}aF-=R;ak+=R}var ab=ak-aF;var aq,ac;var Z;if(this.autoscale&&this.min==null&&this.max==null){var S,T,Y;var ag=false;var ao=false;var ae={min:null,max:null,average:null,stddev:null};for(var aA=0;aAaB){aB=ar[az]}}}var aa=(aB-ai)/aB;if(av.renderer.constructor==B.jqplot.BarRenderer){if(ai>=0&&(av.fillToZero||aa>0.1)){ag=true}else{ag=false;if(av.fill&&av.fillToZero&&ai<0&&aB>0){ao=true}else{ao=false}}}else{if(av.fill){if(ai>=0&&(av.fillToZero||aa>0.1)){ag=true}else{if(ai<0&&aB>0&&av.fillToZero){ag=false;ao=true}else{ag=false;ao=false}}}else{if(ai<0){ag=false}}}}}if(ag){this.numberTicks=2+Math.ceil((Q-(this.tickSpacing-1))/this.tickSpacing);this.min=0;aj=0;T=ak/(this.numberTicks-1);Z=Math.pow(10,Math.abs(Math.floor(Math.log(T)/Math.LN10)));if(T/Z==parseInt(T/Z,10)){T+=Z}this.tickInterval=Math.ceil(T/Z)*Z;this.max=this.tickInterval*(this.numberTicks-1)}else{if(ao){this.numberTicks=2+Math.ceil((Q-(this.tickSpacing-1))/this.tickSpacing);var al=Math.ceil(Math.abs(aF)/ab*(this.numberTicks-1));var aH=this.numberTicks-1-al;T=Math.max(Math.abs(aF/al),Math.abs(ak/aH));Z=Math.pow(10,Math.abs(Math.floor(Math.log(T)/Math.LN10)));this.tickInterval=Math.ceil(T/Z)*Z;this.max=this.tickInterval*aH;this.min=-this.tickInterval*al}else{if(this.numberTicks==null){if(this.tickInterval){this.numberTicks=3+Math.ceil(ab/this.tickInterval)}else{this.numberTicks=2+Math.ceil((Q-(this.tickSpacing-1))/this.tickSpacing)}}if(this.tickInterval==null){T=ab/(this.numberTicks-1);if(T<1){Z=Math.pow(10,Math.abs(Math.floor(Math.log(T)/Math.LN10)))}else{Z=1}this.tickInterval=Math.ceil(T*Z*this.pad)/Z}else{Z=1/this.tickInterval}S=this.tickInterval*(this.numberTicks-1);Y=(S-ab)/2;if(this.min==null){this.min=Math.floor(Z*(aF-Y))/Z}if(this.max==null){this.max=this.min+S}}}}else{aq=(this.min!=null)?this.min:aF-ab*(this.padMin-1);ac=(this.max!=null)?this.max:ak+ab*(this.padMax-1);this.min=aq;this.max=ac;ab=this.max-this.min;if(this.numberTicks==null){if(this.tickInterval!=null){this.numberTicks=Math.ceil((this.max-this.min)/this.tickInterval)+1;this.max=this.min+this.tickInterval*(this.numberTicks-1)}else{if(Q>100){this.numberTicks=parseInt(3+(Q-100)/75,10)}else{this.numberTicks=2}}}if(this.tickInterval==null){this.tickInterval=ab/(this.numberTicks-1)}}if(this.renderer.constructor==B.jqplot.LinearAxisRenderer){ab=this.max-this.min;var aG=new this.tickRenderer(this.tickOptions);var an=aG.formatString||B.jqplot.config.defaultTickFormatString;var an=an.match(B.jqplot.sprintf.regex)[0];var aC=0;if(an){if(an.search(/[fFeEgGpP]/)>-1){var ay=an.match(/\%\.(\d{0,})?[eEfFgGpP]/);if(ay){aC=parseInt(ay[1],10)}else{aC=6}}else{if(an.search(/[di]/)>-1){aC=0}}var X=Math.pow(10,-aC);if(this.tickInterval0){V=-ae._textRenderer.height*Math.cos(-ae._textRenderer.angle)/2}else{V=-ae.getHeight()+ae._textRenderer.height*Math.cos(ae._textRenderer.angle)/2}break;case"middle":V=-ae.getHeight()/2;break;default:V=-ae.getHeight()/2;break}}else{V=-ae.getHeight()/2}var R=this.u2p(ae.value)+V+"px";ae._elem.css("top",R);ae.pack()}}if(X){var Y=this._label._elem.outerHeight(true);this._label._elem.css("top",T-S/2-Y/2+"px");if(this.name=="yaxis"){this._label._elem.css("left","0px")}else{this._label._elem.css("right","0px")}this._label.pack()}}}};B.jqplot.MarkerRenderer=function(Q){this.show=true;this.style="filledCircle";this.lineWidth=2;this.size=9;this.color="#666666";this.shadow=true;this.shadowAngle=45;this.shadowOffset=1;this.shadowDepth=3;this.shadowAlpha="0.07";this.shadowRenderer=new B.jqplot.ShadowRenderer();this.shapeRenderer=new B.jqplot.ShapeRenderer();B.extend(true,this,Q)};B.jqplot.MarkerRenderer.prototype.init=function(Q){B.extend(true,this,Q);var S={angle:this.shadowAngle,offset:this.shadowOffset,alpha:this.shadowAlpha,lineWidth:this.lineWidth,depth:this.shadowDepth,closePath:true};if(this.style.indexOf("filled")!=-1){S.fill=true}if(this.style.indexOf("ircle")!=-1){S.isarc=true;S.closePath=false}this.shadowRenderer.init(S);var R={fill:false,isarc:false,strokeStyle:this.color,fillStyle:this.color,lineWidth:this.lineWidth,closePath:true};if(this.style.indexOf("filled")!=-1){R.fill=true}if(this.style.indexOf("ircle")!=-1){R.isarc=true;R.closePath=false}this.shapeRenderer.init(R)};B.jqplot.MarkerRenderer.prototype.drawDiamond=function(S,R,V,U,X){var Q=1.2;var Y=this.size/2/Q;var W=this.size/2*Q;var T=[[S-Y,R],[S,R+W],[S+Y,R],[S,R-W]];if(this.shadow){this.shadowRenderer.draw(V,T)}this.shapeRenderer.draw(V,T,X)};B.jqplot.MarkerRenderer.prototype.drawPlus=function(T,S,W,V,Z){var R=1;var aa=this.size/2*R;var X=this.size/2*R;var Y=[[T,S-X],[T,S+X]];var U=[[T+aa,S],[T-aa,S]];var Q=B.extend(true,{},this.options,{closePath:false});if(this.shadow){this.shadowRenderer.draw(W,Y,{closePath:false});this.shadowRenderer.draw(W,U,{closePath:false})}this.shapeRenderer.draw(W,Y,Q);this.shapeRenderer.draw(W,U,Q)};B.jqplot.MarkerRenderer.prototype.drawX=function(T,S,W,V,Z){var R=1;var aa=this.size/2*R;var X=this.size/2*R;var Q=B.extend(true,{},this.options,{closePath:false});var Y=[[T-aa,S-X],[T+aa,S+X]];var U=[[T-aa,S+X],[T+aa,S-X]];if(this.shadow){this.shadowRenderer.draw(W,Y,{closePath:false});this.shadowRenderer.draw(W,U,{closePath:false})}this.shapeRenderer.draw(W,Y,Q);this.shapeRenderer.draw(W,U,Q)};B.jqplot.MarkerRenderer.prototype.drawDash=function(S,R,V,U,X){var Q=1;var Y=this.size/2*Q;var W=this.size/2*Q;var T=[[S-Y,R],[S+Y,R]];if(this.shadow){this.shadowRenderer.draw(V,T)}this.shapeRenderer.draw(V,T,X)};B.jqplot.MarkerRenderer.prototype.drawSquare=function(S,R,V,U,X){var Q=1;var Y=this.size/2/Q;var W=this.size/2*Q;var T=[[S-Y,R-W],[S-Y,R+W],[S+Y,R+W],[S+Y,R-W]];if(this.shadow){this.shadowRenderer.draw(V,T)}this.shapeRenderer.draw(V,T,X)};B.jqplot.MarkerRenderer.prototype.drawCircle=function(R,X,T,W,U){var Q=this.size/2;var S=2*Math.PI;var V=[R,X,Q,0,S,true];if(this.shadow){this.shadowRenderer.draw(T,V)}this.shapeRenderer.draw(T,V,U)};B.jqplot.MarkerRenderer.prototype.draw=function(Q,T,R,S){S=S||{};if(S.show==null||S.show!=false){if(S.color&&!S.fillStyle){S.fillStyle=S.color}if(S.color&&!S.strokeStyle){S.strokeStyle=S.color}switch(this.style){case"diamond":this.drawDiamond(Q,T,R,false,S);break;case"filledDiamond":this.drawDiamond(Q,T,R,true,S);break;case"circle":this.drawCircle(Q,T,R,false,S);break;case"filledCircle":this.drawCircle(Q,T,R,true,S);break;case"square":this.drawSquare(Q,T,R,false,S);break;case"filledSquare":this.drawSquare(Q,T,R,true,S);break;case"x":this.drawX(Q,T,R,true,S);break;case"plus":this.drawPlus(Q,T,R,true,S);break;case"dash":this.drawDash(Q,T,R,true,S);break;default:this.drawDiamond(Q,T,R,false,S);break}}};B.jqplot.ShadowRenderer=function(Q){this.angle=45;this.offset=1;this.alpha=0.07;this.lineWidth=1.5;this.lineJoin="miter";this.lineCap="round";this.closePath=false;this.fill=false;this.depth=3;this.strokeStyle="rgba(0,0,0,0.1)";this.isarc=false;B.extend(true,this,Q)};B.jqplot.ShadowRenderer.prototype.init=function(Q){B.extend(true,this,Q)};B.jqplot.ShadowRenderer.prototype.draw=function(aa,Y,ac){aa.save();var Q=(ac!=null)?ac:{};var Z=(Q.fill!=null)?Q.fill:this.fill;var X=(Q.closePath!=null)?Q.closePath:this.closePath;var U=(Q.offset!=null)?Q.offset:this.offset;var S=(Q.alpha!=null)?Q.alpha:this.alpha;var W=(Q.depth!=null)?Q.depth:this.depth;var ab=(Q.isarc!=null)?Q.isarc:this.isarc;aa.lineWidth=(Q.lineWidth!=null)?Q.lineWidth:this.lineWidth;aa.lineJoin=(Q.lineJoin!=null)?Q.lineJoin:this.lineJoin;aa.lineCap=(Q.lineCap!=null)?Q.lineCap:this.lineCap;aa.strokeStyle=Q.strokeStyle||this.strokeStyle||"rgba(0,0,0,"+S+")";aa.fillStyle=Q.fillStyle||this.fillStyle||"rgba(0,0,0,"+S+")";for(var T=0;T').prependTo(this._elem)}else{var V=B('').appendTo(this._elem)}if(this.showSwatches){B('
').appendTo(V)}if(this.showLabels){var U=B('');U.appendTo(V);if(this.escapeHtml){U.text(T)}else{U.html(T)}}};B.jqplot.TableLegendRenderer.prototype.draw=function(){var X=this;if(this.show){var U=this._series;var Z="position:absolute;";Z+=(this.background)?"background:"+this.background+";":"";Z+=(this.border)?"border:"+this.border+";":"";Z+=(this.fontSize)?"font-size:"+this.fontSize+";":"";Z+=(this.fontFamily)?"font-family:"+this.fontFamily+";":"";Z+=(this.textColor)?"color:"+this.textColor+";":"";Z+=(this.marginTop!=null)?"margin-top:"+this.marginTop+";":"";Z+=(this.marginBottom!=null)?"margin-bottom:"+this.marginBottom+";":"";Z+=(this.marginLeft!=null)?"margin-left:"+this.marginLeft+";":"";Z+=(this.marginRight!=null)?"margin-right:"+this.marginRight+";":"";this._elem=B('
');var Q=false,W=false;for(var V=0;V=X)?"":Array(1+X-ab.length>>>0).join(Y);return aa?ab+Z:Z+ab}function S(ac,ab,ae,Z,aa,Y){var ad=Z-ac.length;if(ad>0){var X=" ";if(Y){X=" "}if(ae||!aa){ac=V(ac,Z,X,ae)}else{ac=ac.slice(0,ab.length)+V("",ad,"0",true)+ac.slice(ab.length)}}return ac}function W(af,Y,ad,Z,X,ac,ae,ab){var aa=af>>>0;ad=ad&&aa&&{"2":"0b","8":"0","16":"0x"}[Y]||"";af=ad+V(aa.toString(Y),ac||0,"0",false);return S(af,ad,Z,X,ae,ab)}function Q(ab,ac,Z,X,aa,Y){if(X!=null){ab=ab.slice(0,X)}return S(ab,"",ac,Z,aa,Y)}var R=arguments,T=0,U=R[T++];return U.replace(B.jqplot.sprintf.regex,function(aq,ad,ae,ah,at,ao,ab){if(aq=="%%"){return"%"}var ai=false,af="",ag=false,ap=false,ac=false;for(var an=0;ae&&an-1?6:(ab=="d")?0:void (0)}else{if(ao=="*"){ao=+R[T++]}else{if(ao.charAt(0)=="*"){ao=+R[ao.slice(1,-1)]}else{ao=+ao}}}var ak=ad?R[ad.slice(0,-1)]:R[T++];switch(ab){case"s":if(ak==null){return""}return Q(String(ak),ai,ah,ao,ag,ac);case"c":return Q(String.fromCharCode(+ak),ai,ah,ao,ag,ac);case"b":return W(ak,2,ap,ai,ah,ao,ag,ac);case"o":return W(ak,8,ap,ai,ah,ao,ag,ac);case"x":return W(ak,16,ap,ai,ah,ao,ag,ac);case"X":return W(ak,16,ap,ai,ah,ao,ag,ac).toUpperCase();case"u":return W(ak,10,ap,ai,ah,ao,ag,ac);case"i":var Z=parseInt(+ak,10);if(isNaN(Z)){return""}var am=Z<0?"-":af;ak=am+V(String(Math.abs(Z)),ao,"0",false);return S(ak,am,ai,ah,ag,ac);case"d":var Z=Math.round(+ak);if(isNaN(Z)){return""}var am=Z<0?"-":af;ak=am+V(String(Math.abs(Z)),ao,"0",false);return S(ak,am,ai,ah,ag,ac);case"e":case"E":case"f":case"F":case"g":case"G":var Z=+ak;if(isNaN(Z)){return""}var am=Z<0?"-":af;var aa=["toExponential","toFixed","toPrecision"]["efg".indexOf(ab.toLowerCase())];var ar=["toString","toUpperCase"]["eEfFgG".indexOf(ab)%2];ak=am+Math.abs(Z)[aa](ao);return S(ak,am,ai,ah,ag,ac)[ar]();case"p":case"P":var Z=+ak;if(isNaN(Z)){return""}var am=Z<0?"-":af;var aj=String(Number(Math.abs(Z)).toExponential()).split(/e|E/);var Y=(aj[0].indexOf(".")!=-1)?aj[0].length-1:aj[0].length;var al=(aj[1]<0)?-aj[1]-1:0;if(Math.abs(Z)<1){if(Y+al<=ao){ak=am+Math.abs(Z).toPrecision(Y)}else{if(Y<=ao-1){ak=am+Math.abs(Z).toExponential(Y-1)}else{ak=am+Math.abs(Z).toExponential(ao-1)}}}else{var X=(Y<=ao)?Y:ao;ak=am+Math.abs(Z).toPrecision(X)}var ar=["toString","toUpperCase"]["pP".indexOf(ab)%2];return S(ak,am,ai,ah,ag,ac)[ar]();case"n":return"";default:return aq}})};B.jqplot.sprintf.regex=/%%|%(\d+\$)?([-+#0& ]*)(\*\d+\$|\*|\d+)?(\.(\*\d+\$|\*|\d+))?([nAscboxXuidfegpEGP])/g})(jQuery);