]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Include `Chart.defaults` always (#7686)
authorJukka Kurkela <jukka.kurkela@gmail.com>
Mon, 3 Aug 2020 16:33:21 +0000 (19:33 +0300)
committerGitHub <noreply@github.com>
Mon, 3 Aug 2020 16:33:21 +0000 (12:33 -0400)
src/core/core.controller.js
src/index.js

index 35267d7b380b2924a53b175299eb134bf65a32ee..490c4029f460c71005419c28e8bbb75d4f25e275 100644 (file)
@@ -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());
index d8b7abf27942eda728692470f5286fd8366c858b..ac3f0d39e7efe9a50f157d1ce33665bbf857260e 100644 (file)
@@ -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;