Include Chart.defaults always (#7686)

This commit is contained in:
Jukka Kurkela
2020-08-03 19:33:21 +03:00
committed by Evert Timberg
parent 256f49701d
commit bcfc85594b
2 changed files with 3 additions and 10 deletions

View 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());

View 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;