]> git.ipfire.org Git - thirdparty/Chart.js.git/commit
Make `Chart.defaults/Ticks/Interaction` importable (#4512)
authorSimon Brunel <simonbrunel@users.noreply.github.com>
Sun, 16 Jul 2017 17:38:19 +0000 (19:38 +0200)
committerGitHub <noreply@github.com>
Sun, 16 Jul 2017 17:38:19 +0000 (19:38 +0200)
commit889ecd560bba46a81a29ca29d02f0691aaadc8d2
treea0058a9fdc1bca67df4270e3aa5d61cd9065d7f9
parent1833614e1d8a82c6c111ce8d1d31eba6df22e7ee
Make `Chart.defaults/Ticks/Interaction` importable (#4512)

Default options can now be accessed by importing `core/core.defaults`. The returned object acts as a singleton and is populated when importing classes that expose their own default values (meaning that importing only `code.defaults` results in an empty object). Also make `Chart.Ticks` and `Chart.Interaction` importable since existing defaults rely on these values.

Add the `defaults._set` method that make easier declaring new defaults by merging given values with existing ones for a specific scope (`global`, `scale`, `bar`, etc).
32 files changed:
src/chart.js
src/charts/Chart.Scatter.js
src/controllers/controller.bar.js
src/controllers/controller.bubble.js
src/controllers/controller.doughnut.js
src/controllers/controller.line.js
src/controllers/controller.polarArea.js
src/controllers/controller.radar.js
src/controllers/controller.scatter.js [new file with mode: 0644]
src/core/core.animation.js
src/core/core.controller.js
src/core/core.defaults.js [new file with mode: 0644]
src/core/core.helpers.js
src/core/core.interaction.js
src/core/core.js
src/core/core.plugin.js
src/core/core.scale.js
src/core/core.scaleService.js
src/core/core.ticks.js
src/core/core.tooltip.js
src/elements/element.arc.js
src/elements/element.line.js
src/elements/element.point.js
src/elements/element.rectangle.js
src/plugins/plugin.filler.js
src/plugins/plugin.legend.js
src/plugins/plugin.title.js
src/scales/scale.linear.js
src/scales/scale.linearbase.js
src/scales/scale.logarithmic.js
src/scales/scale.radialLinear.js
src/scales/scale.time.js