Proyectos de Subversion Moodle

Rev

Autoría | Ultima modificación | Ver Log |

{"version":3,"file":"chart_line.min.js","sources":["../src/chart_line.js"],"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 line.\n *\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_line\n */\ndefine(['core/chart_base'], function(Base) {\n\n    /**\n     * Line chart.\n     *\n     * @extends {module:core/chart_base}\n     * @class\n     */\n    function Line() {\n        Base.prototype.constructor.apply(this, arguments);\n    }\n    Line.prototype = Object.create(Base.prototype);\n\n    /** @override */\n    Line.prototype.TYPE = 'line';\n\n    /**\n     * Whether the line should be smooth or not.\n     *\n     * By default the chart lines are not smooth.\n     *\n     * @type {Bool}\n     * @protected\n     */\n    Line.prototype._smooth = false;\n\n    /** @override */\n    Line.prototype.create = function(Klass, data) {\n        var chart = Base.prototype.create.apply(this, arguments);\n        chart.setSmooth(data.smooth);\n        return chart;\n    };\n\n    /**\n     * Get whether the line should be smooth or not.\n     *\n     * @method getSmooth\n     * @returns {Bool}\n     */\n    Line.prototype.getSmooth = function() {\n        return this._smooth;\n    };\n\n    /**\n     * Set whether the line should be smooth or not.\n     *\n     * @method setSmooth\n     * @param {Bool} smooth True if the line chart should be smooth, false otherwise.\n     */\n    Line.prototype.setSmooth = function(smooth) {\n        this._smooth = Boolean(smooth);\n    };\n\n    return Line;\n\n});\n"],"names":["define","Base","Line","prototype","constructor","apply","this","arguments","Object","create","TYPE","_smooth","Klass","data","chart","setSmooth","smooth","getSmooth","Boolean"],"mappings":";;;;;;;AAsBAA,yBAAO,CAAC,oBAAoB,SAASC,eAQxBC,OACLD,KAAKE,UAAUC,YAAYC,MAAMC,KAAMC,kBAE3CL,KAAKC,UAAYK,OAAOC,OAAOR,KAAKE,WAGpCD,KAAKC,UAAUO,KAAO,OAUtBR,KAAKC,UAAUQ,SAAU,EAGzBT,KAAKC,UAAUM,OAAS,SAASG,MAAOC,UAChCC,MAAQb,KAAKE,UAAUM,OAAOJ,MAAMC,KAAMC,kBAC9CO,MAAMC,UAAUF,KAAKG,QACdF,OASXZ,KAAKC,UAAUc,UAAY,kBAChBX,KAAKK,SAShBT,KAAKC,UAAUY,UAAY,SAASC,aAC3BL,QAAUO,QAAQF,SAGpBd"}