/*
YUI 3.17.2 (build 9c3c78e)
Copyright 2014 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/

YUI.add("axis-time-base",function(e,t){function r(){}var n=e.Lang;r.NAME="timeImpl",r.ATTRS={labelFormat:{value:"%b %d, %y"}},r.prototype={_type:"time",_maximumGetter:function(){var e=this._getNumber(this._setMaximum);return n.isNumber(e)||(e=this._getNumber(this.get("dataMaximum"))),parseFloat(e)},_maximumSetter:function(e){return this._setMaximum=this._getNumber(e),e},_minimumGetter:function(){var e=this._getNumber(this._setMinimum);return n.isNumber(e)||(e=this._getNumber(this.get("dataMinimum"))),parseFloat(e)},_minimumSetter:function(e){return this._setMinimum=this._getNumber(e),e},_getSetMax:function(){var e=this._getNumber(this._setMaximum);return n.isNumber(e)},_getSetMin:function(){var e=this._getNumber(this._setMinimum);return n.isNumber(e)},formatLabel:function(t,n){return t=e.DataType.Date.parse(t),n?e.DataType.Date.format(t,{format:n}):t},GUID:"yuitimeaxis",_dataType:"time",_getKeyArray:function(e,t){var r,i=[],s=0,o,u=t.length;for(;s<u;++s)r=t[s][e],n.isDate(r)?o=r.valueOf():(o=new Date(r),n.isDate(o)?o=o.valueOf():n.isNumber(r)?o=r:n.isNumber(parseFloat(r))?o=parseFloat(r):(typeof r!="string"&&(r=r),o=(new Date(r)).valueOf())),i[s]=o;return i},_updateMinAndMax:function(){var e=this.get("data"),t=0,n=0,r,i,s;if(e&&e.length&&e.length>0){r=e.length,t=n=e[0];if(r>1)for(s=1;s<r;s++){i=e[s];if(isNaN(i))continue;t=Math.max(i,t),n=Math.min(i,n)}}this._dataMaximum=t,this._dataMinimum=n},_getCoordFromValue:function(e,t,r,i,s){var o,u,a,f=n.isNumber;return i=this._getNumber(i),f(i)?(o=t-e,u=r/o,a=(i-e)*u,a=s+a):a=NaN,a},_getNumber:function(e){return n.isDate(e)?e=e.valueOf():!n.isNumber(e)&&e&&(e=(new Date(e)).valueOf()),e}},e.TimeImpl=r,e.TimeAxisBase=e.Base.create("timeAxisBase",e.AxisBase,[e.TimeImpl])},"3.17.2",{requires:["axis-base"]});
