NOBUG: Fixed file access permissions
[moodle.git] / lib / yuilib / 3.13.0 / axis-category-base / axis-category-base-min.js
blob48d7fe51a17c2705601159cabf26455e5afbe240
1 /*
2 YUI 3.13.0 (build 508226d)
3 Copyright 2013 Yahoo! Inc. All rights reserved.
4 Licensed under the BSD License.
5 http://yuilibrary.com/license/
6 */
8 YUI.add("axis-category-base",function(e,t){function r(){}var n=e.Lang;r.NAME="categoryImpl",r.ATTRS={calculateEdgeOffset:{value:!0}},r.prototype={formatLabel:function(e){return e},_indices:null,GUID:"yuicategoryaxis",_type:"category",_updateMinAndMax:function(){this._dataMaximum=Math.max(this.get("data").length-1,0),this._dataMinimum=0},_getKeyArray:function(e,t){var n=0,r,i=[],s=[],o=t.length;this._indices||(this._indices={});for(;n<o;++n)r=t[n],i[n]=n,s[n]=r[e];return this._indices[e]=i,s},getDataByKey:function(e){this._indices||this.get("keys");var t=this._indices;return t&&t[e]?t[e]:null},getTotalMajorUnits:function(){return this.get("data").length},_getCoordFromValue:function(e,t,r,i,s){var o,u,a;return n.isNumber(i)?(o=t-e,u=r/o,a=(i-e)*u,a=s+a):a=NaN,a},getKeyValueAt:function(e,t){var n=NaN,r=this.get("keys");return r[e]&&r[e][t]&&(n=r[e][t]),n}},e.CategoryImpl=r,e.CategoryAxisBase=e.Base.create("categoryAxisBase",e.AxisBase,[e.CategoryImpl])},"3.13.0",{requires:["axis-base"]});