/*
jQWidgets v3.7.1 (2015-Feb)
Copyright (c) 2011-2015 jQWidgets.
License: http://jqwidgets.com/license/
*/
(function(n){n.extend(n.jqx._jqxChart.prototype,{_moduleApi:!0,getItemsCount:function(n,t){var r=this.seriesGroups[n],i,u;return this._isSerieVisible(n,t)?(i=this._renderData,!r||!i||i.length<=n)?0:(u=r.series[t],!u)?0:i[n].offsets[t].length:0},getXAxisRect:function(n){var t=this._renderData;return!t||t.length<=n?undefined:t[n].xAxis?t[n].xAxis.rect:undefined},getXAxisLabels:function(n){var r=[],t=this._renderData,f,e,i;if(!t||t.length<=n||(t=t[n].xAxis,!t))return r;if(f=this.seriesGroups[n],f.polar||f.spider){for(i=0;i<t.polarLabels.length;i++)e=t.polarLabels[i],r.push({offset:{x:e.x,y:e.y},value:e.value});return r}var o=this._getXAxis(n),u=this.getXAxisRect(n),s=o.position=="top"||o.position=="right",h=f.orientation=="horizontal";for(i=0;i<t.data.length;i++)h?r.push({offset:{x:u.x+(s?0:u.width),y:u.y+t.data.data[i]},value:t.data.xvalues[i]}):r.push({offset:{x:u.x+t.data.data[i],y:u.y+(s?u.height:0)},value:t.data.xvalues[i]});return r},getValueAxisRect:function(n){var t=this._renderData;return!t||t.length<=n?undefined:t[n].valueAxis?t[n].valueAxis.rect:undefined},getValueAxisLabels:function(n){var r=[],t=this._renderData,u,i;if(!t||t.length<=n||(t=t[n].valueAxis,!t))return r;var e=this._getValueAxis(n),o=e.position=="top"||e.position=="right",f=this.seriesGroups[n],s=f.orientation=="horizontal";if(f.polar||f.spider){for(i=0;i<t.polarLabels.length;i++)u=t.polarLabels[i],r.push({offset:{x:u.x,y:u.y},value:u.value});return r}for(i=0;i<t.items.length;i++)s?r.push({offset:{x:t.itemOffsets[t.items[i]].x+t.itemWidth/2,y:t.rect.y+(o?t.rect.height:0)},value:t.items[i]}):r.push({offset:{x:t.rect.x+t.rect.width,y:t.itemOffsets[t.items[i]].y+t.itemWidth/2},value:t.items[i]});return r},getPlotAreaRect:function(){return this._plotRect},getRect:function(){return this._rect},getItemCoord:function(n,t,i){var u,r,e,s,h,f;if(!this._isSerieVisible(n,t)||!this._renderData||this._renderData.length<=n)return{x:NaN,y:NaN};if(u=this.seriesGroups[n],r=this._getItemCoord(n,t,i,!1),this._isPieGroup(n))return{x:r.x,y:r.y,innerRadius:r.innerRadius,outerRadius:r.outerRadius,fromAngle:r.fromAngle,toAngle:r.toAngle,centerOffset:r.centerOffset};if(u.polar||u.spider){var c=this._renderData[n].xoffsets.data[i],l=this._renderData[n].offsets[t][i],o=this._toPolarCoord(this._renderData[n].polarCoords,this._plotRect,c,l.to);return r.x=o.x,r.y=o.y,r}return e=u.orientation=="horizontal",e?(s=r.x,r.x=r.y,r.y=s,r.width=r.x.from-r.x.to,r.x=r.x.to,h=this.getXAxisRect(n),r.y+=-this._plotRect.x+h.y):(r.height=r.y.from-r.y.to,r.y=r.y.to),u.type.indexOf("column")!=-1&&(f=this._getColumnSerieWidthAndOffset(n,t),e?(r.y+=f.offset,r.height=f.width):(r.x+=f.offset,r.width=f.width)),r},_getItemCoord:function(n,t,i,r){var s=this.seriesGroups[n],e,u,l,o,f,h,c;if(!s||!this._renderData)return{x:NaN,y:NaN};if(l=s.series[t],!l)return{x:NaN,y:NaN};if(o=this._plotRect,this._isPieGroup(n)){if(f=this._renderData[n].offsets[t][i],!f)return{x:NaN,y:NaN};if(r===!1)return f;h=(f.fromAngle+f.toAngle)/2*(Math.PI/180);c=(f.innerRadius+f.outerRadius)/2;e=o.x+f.x+Math.cos(h)*c;u=o.y+f.y-Math.sin(h)*c}else{if(e=o.x+this._renderData[n].xoffsets.data[i],u=this._renderData[n].offsets[t][i],isNaN(e)||!u)return{x:NaN,y:NaN};if(s.polar==!0||s.spider==!0){var a=this._getPolarAxisCoords(n,o),y=this._toPolarCoord(a,o,e,u.from),v=this._toPolarCoord(a,o,e,u.to);e=v.x;u={from:y.y,to:v.y}}if(r===!1)return{x:e,y:u};u=s.polar==!0||s.spider==!0?u.to:(u.from+u.to)/2}return{x:e,y:u}},showToolTip:function(n,t,i,r,u){var f=this.getItemCoord(n,t,i);isNaN(f.x)||isNaN(f.y)||this._startTooltipTimer(n,t,i,f.x,f.y,r,u)},hideToolTip:function(n){isNaN(n)&&(n=0);var t=this;t._cancelTooltipTimer();setTimeout(function(){t._hideToolTip(0)},n)}})})(jqxBaseFramework)