MDL-55030 core: Support min and max in axes
[moodle.git] / lib / amd / build / chart_axis.min.js
CommitLineData
46de49dc 1define([],function(){function a(){}return a.prototype.POS_DEFAULT=null,a.prototype.POS_BOTTOM="bottom",a.prototype.POS_LEFT="left",a.prototype.POS_RIGHT="right",a.prototype.POS_TOP="top",a.prototype._label=null,a.prototype._max=null,a.prototype._min=null,a.prototype._position=null,a.prototype._stepSize=null,a.prototype.create=function(b){var c=new a;return c.setPosition(b.position),c.setLabel(b.label),c.setStepSize(b.stepSize),c.setMax(b.max),c.setMin(b.min),c},a.prototype.getLabel=function(){return this._label},a.prototype.getMax=function(){return this._max},a.prototype.getMin=function(){return this._min},a.prototype.getPosition=function(){return this._position},a.prototype.getStepSize=function(){return this._stepSize},a.prototype.setLabel=function(a){this._label=a||null},a.prototype.setMax=function(a){this._max="undefined"!=typeof a?a:null},a.prototype.setMin=function(a){this._min="undefined"!=typeof a?a:null},a.prototype.setPosition=function(a){if(a!=this.POS_DEFAULT&&a!=this.POS_BOTTOM&&a!=this.POS_LEFT&&a!=this.POS_RIGHT&&a!=this.POS_TOP)throw new Error("Invalid axis position.");this._position=a},a.prototype.setStepSize=function(a){if("undefined"==typeof a||null===a)a=null;else{if(isNaN(Number(a)))throw new Error("Value for stepSize is not a number.");a=Number(a)}this._stepSize=a},a});