mirror of
https://github.com/chartjs/Chart.js.git
synced 2025-12-08 20:36:08 +00:00
The `fill` option now accepts the index of the target dataset (number) or a string starting by "+" or "-" followed by a number representing the dataset index relative to the current one (e.g. `fill: "-2"` on dataset at index 3 will fill to dataset at index 1). It's also possible to "propagate" the filling to the target of an hidden dataset (`options.plugins.filler.propagate`). Fill boundaries `zero`, `top` and `bottom` have been deprecated and replaced by `origin`, `start` and `end`. Implementation has been moved out of the line element into a new plugin (`src/plugins/plugin.filler.js`) and does not rely anymore on the deprecated model `scaleTop`, `scaleBottom` and `scaleZero` values. Drawing Bézier splines has been refactored in the canvas helpers (note that `Chart.helpers.canvas` is now an alias of `Chart.canvasHelpers`). Add 3 new examples and extend utils with a pseudo-random number generator that can be initialized with `srand`. That makes possible to design examples starting always with the same initial data.
60 lines
2.0 KiB
JavaScript
60 lines
2.0 KiB
JavaScript
/**
|
|
* @namespace Chart
|
|
*/
|
|
var Chart = require('./core/core.js')();
|
|
|
|
require('./core/core.helpers')(Chart);
|
|
require('./platforms/platform.js')(Chart);
|
|
require('./core/core.canvasHelpers')(Chart);
|
|
require('./core/core.element')(Chart);
|
|
require('./core/core.plugin.js')(Chart);
|
|
require('./core/core.animation')(Chart);
|
|
require('./core/core.controller')(Chart);
|
|
require('./core/core.datasetController')(Chart);
|
|
require('./core/core.layoutService')(Chart);
|
|
require('./core/core.scaleService')(Chart);
|
|
require('./core/core.ticks.js')(Chart);
|
|
require('./core/core.scale')(Chart);
|
|
require('./core/core.title')(Chart);
|
|
require('./core/core.legend')(Chart);
|
|
require('./core/core.interaction')(Chart);
|
|
require('./core/core.tooltip')(Chart);
|
|
|
|
require('./elements/element.arc')(Chart);
|
|
require('./elements/element.line')(Chart);
|
|
require('./elements/element.point')(Chart);
|
|
require('./elements/element.rectangle')(Chart);
|
|
|
|
require('./scales/scale.linearbase.js')(Chart);
|
|
require('./scales/scale.category')(Chart);
|
|
require('./scales/scale.linear')(Chart);
|
|
require('./scales/scale.logarithmic')(Chart);
|
|
require('./scales/scale.radialLinear')(Chart);
|
|
require('./scales/scale.time')(Chart);
|
|
|
|
// Controllers must be loaded after elements
|
|
// See Chart.core.datasetController.dataElementType
|
|
require('./controllers/controller.bar')(Chart);
|
|
require('./controllers/controller.bubble')(Chart);
|
|
require('./controllers/controller.doughnut')(Chart);
|
|
require('./controllers/controller.line')(Chart);
|
|
require('./controllers/controller.polarArea')(Chart);
|
|
require('./controllers/controller.radar')(Chart);
|
|
|
|
require('./charts/Chart.Bar')(Chart);
|
|
require('./charts/Chart.Bubble')(Chart);
|
|
require('./charts/Chart.Doughnut')(Chart);
|
|
require('./charts/Chart.Line')(Chart);
|
|
require('./charts/Chart.PolarArea')(Chart);
|
|
require('./charts/Chart.Radar')(Chart);
|
|
require('./charts/Chart.Scatter')(Chart);
|
|
|
|
// Loading built-it plugins
|
|
var plugins = [];
|
|
|
|
plugins.push(require('./plugins/plugin.filler.js')(Chart));
|
|
|
|
Chart.plugins.register(plugins);
|
|
|
|
window.Chart = module.exports = Chart;
|