1 // This file is part of Moodle - http://moodle.org/
3 // Moodle is free software: you can redistribute it and/or modify
4 // it under the terms of the GNU General Public License as published by
5 // the Free Software Foundation, either version 3 of the License, or
6 // (at your option) any later version.
8 // Moodle is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 // GNU General Public License for more details.
13 // You should have received a copy of the GNU General Public License
14 // along with Moodle. If not, see <http://www.gnu.org/licenses/>.
19 * This takes a chart object and draws it.
22 * @copyright 2016 Frédéric Massart - FMCorz.net
23 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
24 * @module core/chart_output_base
26 define(['jquery'], function($) {
31 * The constructor of an output class must instantly generate and display the
32 * chart. It is also the responsability of the output module to check that
33 * the node received is of the appropriate type, if not a new node can be
36 * The output module has total control over the content of the node and can
37 * clear it or output anything to it at will. A node should not be shared by
38 * two simultaneous output modules.
41 * @alias module:core/chart_output_base
42 * @param {Node} node The node to output with/in.
43 * @param {Chart} chart A chart object.
45 function Base(node, chart) {
53 * This is the public method through which an output instance in informed
54 * that the chart instance has been updated and they need to update the
60 Base.prototype.update = function() {
61 throw new Error('Not supported.');