mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
10 lines
1.1 KiB
JavaScript
10 lines
1.1 KiB
JavaScript
/**
|
|
* Chart bar.
|
|
*
|
|
* @copyright 2016 Frédéric Massart - FMCorz.net
|
|
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
|
* @module core/chart_bar
|
|
*/
|
|
define("core/chart_bar",["core/chart_base"],(function(Base){function Bar(){Base.prototype.constructor.apply(this,arguments)}return Bar.prototype=Object.create(Base.prototype),Bar.prototype._horizontal=!1,Bar.prototype._stacked=!1,Bar.prototype.TYPE="bar",Bar.prototype.create=function(Klass,data){var chart=Base.prototype.create.apply(this,arguments);return chart.setHorizontal(data.horizontal),chart.setStacked(data.stacked),chart},Bar.prototype._setDefaults=function(){Base.prototype._setDefaults.apply(this,arguments);var axis=this.getYAxis(0,!0);axis.setMin(0)},Bar.prototype.getHorizontal=function(){return this._horizontal},Bar.prototype.getStacked=function(){return this._stacked},Bar.prototype.setHorizontal=function(horizontal){var axis=this.getXAxis(0,!0);null===axis.getMin()&&axis.setMin(0),this._horizontal=Boolean(horizontal)},Bar.prototype.setStacked=function(stacked){this._stacked=Boolean(stacked)},Bar}));
|
|
|
|
//# sourceMappingURL=chart_bar.min.js.map
|