diff --git a/src/index.js b/src/index.js index 586dcc38295..a8286b302c1 100644 --- a/src/index.js +++ b/src/index.js @@ -51,6 +51,15 @@ if (typeof window !== 'undefined') { // DEPRECATIONS +/** + * Provided for backward compatibility, not available anymore + * @namespace Chart.Chart + * @deprecated since version 2.8.0 + * @todo remove at version 3 + * @private + */ +Chart.Chart = Chart; + /** * Provided for backward compatibility, not available anymore * @namespace Chart.Legend diff --git a/test/specs/global.deprecations.tests.js b/test/specs/global.deprecations.tests.js index d9e705a1c32..437a316fe0b 100644 --- a/test/specs/global.deprecations.tests.js +++ b/test/specs/global.deprecations.tests.js @@ -24,6 +24,12 @@ describe('Deprecations', function() { }); }); + describe('Chart.Chart', function() { + it('should be defined as an alias to Chart', function() { + expect(Chart.Chart).toBe(Chart); + }); + }); + describe('Chart.helpers.aliasPixel', function() { it('should be defined as a function', function() { expect(typeof Chart.helpers.aliasPixel).toBe('function');