diff --git a/src/chart.js b/src/chart.js index 3b71edee925..b60129f2cf5 100644 --- a/src/chart.js +++ b/src/chart.js @@ -17,7 +17,6 @@ Chart.Element = require('./core/core.element'); Chart.elements = require('./elements/index'); Chart.Interaction = require('./core/core.interaction'); Chart.layouts = require('./core/core.layouts'); -Chart.LinearScaleBase = require('./scales/scale.linearbase'); Chart.platform = require('./platforms/platform'); Chart.plugins = require('./core/core.plugins'); Chart.Scale = require('./core/core.scale'); @@ -105,6 +104,15 @@ Chart.canvasHelpers = Chart.helpers.canvas; */ Chart.layoutService = Chart.layouts; +/** + * Provided for backward compatibility, not available anymore. + * @namespace Chart.LinearScaleBase + * @deprecated since version 2.8 + * @todo remove at version 3 + * @private + */ +Chart.LinearScaleBase = require('./scales/scale.linearbase'); + /** * Provided for backward compatibility, instead we should create a new Chart * by setting the type in the config (`new Chart(id, {type: '{chart-type}'}`). diff --git a/test/specs/global.deprecations.tests.js b/test/specs/global.deprecations.tests.js index eeda99f4b0a..822b234b417 100644 --- a/test/specs/global.deprecations.tests.js +++ b/test/specs/global.deprecations.tests.js @@ -31,6 +31,14 @@ describe('Deprecations', function() { expect(typeof Chart.helpers.aliasPixel).toBe('function'); }); }); + + describe('Chart.LinearScaleBase', function() { + it('should be defined and inherit from Chart.Scale', function() { + expect(Chart.LinearScaleBase).toBeDefined(); + expect(typeof Chart.LinearScaleBase).toBe('function'); + expect(Chart.LinearScaleBase.prototype instanceof Chart.Scale).toBeTruthy(); + }); + }); }); describe('Version 2.7.3', function() {