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.
21 * @copyright 2016 Frédéric Massart - FMCorz.net
22 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
23 * @module core/chart_output_base
25 define(['jquery'], function($) {
30 * The constructor of an output class must instantly generate and display the
31 * chart. It is also the responsability of the output module to check that
32 * the node received is of the appropriate type, if not a new node can be
35 * The output module has total control over the content of the node and can
36 * clear it or output anything to it at will. A node should not be shared by
37 * two simultaneous output modules.
40 * @param {Node} node The node to output with/in.
41 * @param {Chart} chart A chart object.
43 function Base(node, chart) {
51 * This is the public method through which an output instance in informed
52 * that the chart instance has been updated and they need to update the
58 Base.prototype.update = function() {
59 throw new Error('Not supported.');