From: Jukka Kurkela Date: Mon, 3 Aug 2020 16:33:21 +0000 (+0300) Subject: Include `Chart.defaults` always (#7686) X-Git-Tag: v3.0.0-beta.2~20 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2ea01d9beb41cd7e7800b89f8800e79f32078506;p=thirdparty%2FChart.js.git Include `Chart.defaults` always (#7686) --- diff --git a/src/core/core.controller.js b/src/core/core.controller.js index 35267d7b3..490c4029f 100644 --- a/src/core/core.controller.js +++ b/src/core/core.controller.js @@ -1170,16 +1170,11 @@ class Chart { } } -Chart.version = version; - -/** - * NOTE(SB) We actually don't use this container anymore but we need to keep it - * for backward compatibility. Though, it can still be useful for plugins that - * would need to work on multiple charts?! - */ +// These are available to both, UMD and ESM packages +Chart.defaults = defaults; Chart.instances = {}; - Chart.registry = registry; +Chart.version = version; // @ts-ignore const invalidatePlugins = () => each(Chart.instances, (chart) => chart._plugins.invalidate()); diff --git a/src/index.js b/src/index.js index d8b7abf27..ac3f0d39e 100644 --- a/src/index.js +++ b/src/index.js @@ -12,7 +12,6 @@ import animator from './core/core.animator'; import animationService from './core/core.animations'; import * as controllers from './controllers'; import DatasetController from './core/core.datasetController'; -import defaults from './core/core.defaults'; import Element from './core/core.element'; import * as elements from './elements/index'; import Interaction from './core/core.interaction'; @@ -35,7 +34,6 @@ Chart.animator = animator; Chart.animationService = animationService; Chart.controllers = registry.controllers.items; Chart.DatasetController = DatasetController; -Chart.defaults = defaults; Chart.Element = Element; Chart.elements = elements; Chart.Interaction = Interaction;