mirror of
https://github.com/chartjs/Chart.js.git
synced 2025-12-08 20:36:08 +00:00
`controllers.*.js` and `core.datasetController.js` are now importable (no more function export), that's why there is so many changes mainly due to one indentation level removed. Split code for `bar/horizontalBar` and `doughnut/pie` in separate files, added a global controllers import (`src/controllers/index.js`) and add tests to check that all dataset controllers are correctly registered under `chart.controllers.{type}`.
14 lines
366 B
JavaScript
14 lines
366 B
JavaScript
'use strict';
|
|
|
|
var DoughnutController = require('./controller.doughnut');
|
|
var defaults = require('../core/core.defaults');
|
|
var helpers = require('../helpers/index');
|
|
|
|
defaults._set('pie', helpers.clone(defaults.doughnut));
|
|
defaults._set('pie', {
|
|
cutoutPercentage: 0
|
|
});
|
|
|
|
// Pie charts are Doughnut chart with different defaults
|
|
module.exports = DoughnutController;
|