Autoría | Ultima modificación | Ver Log |
{"version":3,"file":"chart_builder.min.js","sources":["../src/chart_builder.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 builder.\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 */\ndefine(['jquery'], function($) {\n\n /**\n * Chart builder
.\n *\n * @exports core/chart_builder\n */\n var module = {\n\n /**\n * Make a chart instance.\n *\n * This takes data, most likely generated in PHP, and creates a chart instance from it\n * deferring most of the logic to {@link module:core/chart_base.create}.\n *\n * @param {Object} data The data.\n * @return {Promise} A promise resolved with the chart instance.\n */\n make: function(data) {\n var deferred = $.Deferred();\n require(['core/chart_' + data.type], function(Klass) {\n var instance = Klass.prototype.create(Klass, data);\n deferred.resolve(instance);\n });\n return deferred.promise();\n }\n };\n\n return module;\n\n});\n"],"names":["define","$","make","data","deferred","Deferred","require","type","Klass","instance","prototype","create","resolve","promise"],"mappings":";;;;;;AAqBAA,4BAAO,CAAC,WAAW,SAASC,SAOX,CAWTC,KAAM,SA
ASC,UACPC,SAAWH,EAAEI,kBACjBC,QAAQ,CAAC,cAAgBH,KAAKI,OAAO,SAASC,WACtCC,SAAWD,MAAME,UAAUC,OAAOH,MAAOL,MAC7CC,SAASQ,QAAQH,aAEdL,SAASS"}