Your IP : 216.73.216.95


Current Path : /var/www/ljmtc/cbt/lib/amd/build/
Upload File :
Current File : /var/www/ljmtc/cbt/lib/amd/build/chart_bar.min.js.map

{"version":3,"sources":["../src/chart_bar.js"],"names":["define","Base","Bar","prototype","constructor","apply","arguments","Object","create","_horizontal","_stacked","TYPE","Klass","data","chart","setHorizontal","horizontal","setStacked","stacked","_setDefaults","axis","getYAxis","setMin","getHorizontal","getStacked","getXAxis","getMin"],"mappings":"AAuBAA,OAAM,kBAAC,CAAC,iBAAD,CAAD,CAAsB,SAASC,CAAT,CAAe,CASvC,QAASC,CAAAA,CAAT,EAAe,CACXD,CAAI,CAACE,SAAL,CAAeC,WAAf,CAA2BC,KAA3B,CAAiC,IAAjC,CAAuCC,SAAvC,CACH,CACDJ,CAAG,CAACC,SAAJ,CAAgBI,MAAM,CAACC,MAAP,CAAcP,CAAI,CAACE,SAAnB,CAAhB,CAQAD,CAAG,CAACC,SAAJ,CAAcM,WAAd,IAQAP,CAAG,CAACC,SAAJ,CAAcO,QAAd,IAGAR,CAAG,CAACC,SAAJ,CAAcQ,IAAd,CAAqB,KAArB,CAGAT,CAAG,CAACC,SAAJ,CAAcK,MAAd,CAAuB,SAASI,CAAT,CAAgBC,CAAhB,CAAsB,CACzC,GAAIC,CAAAA,CAAK,CAAGb,CAAI,CAACE,SAAL,CAAeK,MAAf,CAAsBH,KAAtB,CAA4B,IAA5B,CAAkCC,SAAlC,CAAZ,CACAQ,CAAK,CAACC,aAAN,CAAoBF,CAAI,CAACG,UAAzB,EACAF,CAAK,CAACG,UAAN,CAAiBJ,CAAI,CAACK,OAAtB,EACA,MAAOJ,CAAAA,CACV,CALD,CAQAZ,CAAG,CAACC,SAAJ,CAAcgB,YAAd,CAA6B,UAAW,CACpClB,CAAI,CAACE,SAAL,CAAegB,YAAf,CAA4Bd,KAA5B,CAAkC,IAAlC,CAAwCC,SAAxC,EACA,GAAIc,CAAAA,CAAI,CAAG,KAAKC,QAAL,CAAc,CAAd,IAAX,CACAD,CAAI,CAACE,MAAL,CAAY,CAAZ,CACH,CAJD,CAWApB,CAAG,CAACC,SAAJ,CAAcoB,aAAd,CAA8B,UAAW,CACrC,MAAO,MAAKd,WACf,CAFD,CASAP,CAAG,CAACC,SAAJ,CAAcqB,UAAd,CAA2B,UAAW,CAClC,MAAO,MAAKd,QACf,CAFD,CAWAR,CAAG,CAACC,SAAJ,CAAcY,aAAd,CAA8B,SAASC,CAAT,CAAqB,CAC/C,GAAII,CAAAA,CAAI,CAAG,KAAKK,QAAL,CAAc,CAAd,IAAX,CACA,GAAsB,IAAlB,GAAAL,CAAI,CAACM,MAAL,EAAJ,CAA4B,CACxBN,CAAI,CAACE,MAAL,CAAY,CAAZ,CACH,CACD,KAAKb,WAAL,GAA2BO,CAC9B,CAND,CAcAd,CAAG,CAACC,SAAJ,CAAcc,UAAd,CAA2B,SAASC,CAAT,CAAkB,CACzC,KAAKR,QAAL,GAAwBQ,CAC3B,CAFD,CAIA,MAAOhB,CAAAA,CAEV,CA7FK,CAAN","sourcesContent":["// This file is part of Moodle - http://moodle.org/\n//\n// Moodle is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// Moodle is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.\n\n/**\n * Chart bar.\n *\n * @package    core\n * @copyright  2016 Frédéric Massart - FMCorz.net\n * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n * @module     core/chart_bar\n */\ndefine(['core/chart_base'], function(Base) {\n\n    /**\n     * Bar chart.\n     *\n     * @alias module:core/chart_bar\n     * @extends {module:core/chart_base}\n     * @class\n     */\n    function Bar() {\n        Base.prototype.constructor.apply(this, arguments);\n    }\n    Bar.prototype = Object.create(Base.prototype);\n\n    /**\n     * Whether the bars should be displayed horizontally or not.\n     *\n     * @type {Bool}\n     * @protected\n     */\n    Bar.prototype._horizontal = false;\n\n    /**\n     * Whether the bars should be stacked or not.\n     *\n     * @type {Bool}\n     * @protected\n     */\n    Bar.prototype._stacked = false;\n\n    /** @override */\n    Bar.prototype.TYPE = 'bar';\n\n    /** @override */\n    Bar.prototype.create = function(Klass, data) {\n        var chart = Base.prototype.create.apply(this, arguments);\n        chart.setHorizontal(data.horizontal);\n        chart.setStacked(data.stacked);\n        return chart;\n    };\n\n    /** @override */\n    Bar.prototype._setDefaults = function() {\n        Base.prototype._setDefaults.apply(this, arguments);\n        var axis = this.getYAxis(0, true);\n        axis.setMin(0);\n    };\n\n    /**\n     * Get whether the bars should be displayed horizontally or not.\n     *\n     * @returns {Bool}\n     */\n    Bar.prototype.getHorizontal = function() {\n        return this._horizontal;\n    };\n\n    /**\n     * Get whether the bars should be stacked or not.\n     *\n     * @returns {Bool}\n     */\n    Bar.prototype.getStacked = function() {\n        return this._stacked;\n    };\n\n    /**\n     * Set whether the bars should be displayed horizontally or not.\n     *\n     * It sets the X Axis to zero if the min value is null.\n     *\n     * @param {Bool} horizontal True if the bars should be displayed horizontally, false otherwise.\n     */\n    Bar.prototype.setHorizontal = function(horizontal) {\n        var axis = this.getXAxis(0, true);\n        if (axis.getMin() === null) {\n            axis.setMin(0);\n        }\n        this._horizontal = Boolean(horizontal);\n    };\n\n    /**\n     * Set whether the bars should be stacked or not.\n     *\n     * @method setStacked\n     * @param {Bool} stacked True if the chart should be stacked or false otherwise.\n     */\n    Bar.prototype.setStacked = function(stacked) {\n        this._stacked = Boolean(stacked);\n    };\n\n    return Bar;\n\n});\n"],"file":"chart_bar.min.js"}