(function(a){a.jqplot.CategoryAxisRenderer=function(){a.jqplot.LinearAxisRenderer.call(this)};a.jqplot.CategoryAxisRenderer.prototype=new a.jqplot.LinearAxisRenderer();a.jqplot.CategoryAxisRenderer.prototype.constructor=a.jqplot.CategoryAxisRenderer;a.jqplot.CategoryAxisRenderer.prototype.init=function(e){a.extend(true,this,{tickOptions:{formatString:"%d"}},e);var b=this._dataBounds;for(var f=0;f<this._series.length;f++){var g=this._series[f];var h=g.data;for(var c=0;c<h.length;c++){if(this.name=="xaxis"||this.name=="x2axis"){if(h[c][0]<b.min||b.min==null){b.min=h[c][0]}if(h[c][0]>b.max||b.max==null){b.max=h[c][0]}}else{if(h[c][1]<b.min||b.min==null){b.min=h[c][1]}if(h[c][1]>b.max||b.max==null){b.max=h[c][1]}}}}};a.jqplot.CategoryAxisRenderer.prototype.createTicks=function(){var A=this._ticks;var x=this.ticks;var D=this.name;var z=this._dataBounds;var q,y;var o,r;var d,c;var b,u;if(x.length){this.min=0.5;this.max=x.length+0.5;var k=this.max-this.min;this.numberTicks=2*x.length+1;for(u=0;u<x.length;u++){b=this.min+2*u*k/(this.numberTicks-1);var g=new this.tickRenderer(this.tickOptions);g.showLabel=false;g.showMark=true;g.showGridline=true;g.setTick(b,this.name);this._ticks.push(g);var g=new this.tickRenderer(this.tickOptions);g.label=x[u];g.showLabel=true;g.showMark=false;g.showGridline=false;g.setTick(b+0.5,this.name);this._ticks.push(g)}var g=new this.tickRenderer(this.tickOptions);g.showLabel=false;g.showMark=true;g.showGridline=true;g.setTick(b+1,this.name);this._ticks.push(g)}else{if(D=="xaxis"||D=="x2axis"){q=this._plotDimensions.width}else{q=this._plotDimensions.height}if(this.min!=null&&this.max!=null&&this.numberTicks!=null){this.tickInterval=null}if(this.min!=null&&this.max!=null&&this.tickInterval!=null){if(parseInt((this.max-this.min)/this.tickInterval,10)!=(this.max-this.min)/this.tickInterval){this.tickInterval=null}}var w=[];var B=0;var o=0.5;var r,C;for(var u=0;u<this._series.length;u++){var h=this._series[u];for(var p=0;p<h.data.length;p++){if(this.name=="xaxis"||this.name=="x2axis"){C=h.data[p][0]}else{C=h.data[p][1]}if(a.inArray(C,w)==-1){B+=1;w.push(C)}}}try{w.sort(function(i,e){return i-e})}catch(v){}this.ticks=w;for(var u=0;u<this._series.length;u++){var h=this._series[u];for(var p=0;p<h.data.length;p++){if(this.name=="xaxis"||this.name=="x2axis"){C=h.data[p][0]}else{C=h.data[p][1]}var l=a.inArray(C,w)+1;if(this.name=="xaxis"||this.name=="x2axis"){h.data[p][0]=l}else{h.data[p][1]=l}}}r=B+0.5;if(this.numberTicks==null){this.numberTicks=2*B+1}var k=r-o;this.min=o;this.max=r;var m=0;var f=parseInt(3+q/20,10);var n=parseInt(B/f,10);if(this.tickInterval==null){this.tickInterval=k/(this.numberTicks-1)}for(var u=0;u<this.numberTicks;u++){b=this.min+u*this.tickInterval;var g=new this.tickRenderer(this.tickOptions);if(u/2==parseInt(u/2,10)){g.showLabel=false;g.showMark=true;g.showGridline=true}else{if(n>0&&m<n){g.showLabel=false;m+=1}else{g.showLabel=true;m=0}g.label=g.formatter(g.formatString,w[(u-1)/2]);g.showMark=false;g.showGridline=false}if(!this.showTicks){g.showLabel=false;g.showMark=false}else{if(!this.showTickMarks){g.showMark=false}}g.setTick(b,this.name);this._ticks.push(g)}}}})(jQuery);