From 29553130de2d89f82ef2a19466e0e9a00c602373 Mon Sep 17 00:00:00 2001 From: Ben McCann <322311+benmccann@users.noreply.github.com> Date: Tue, 12 May 2020 13:42:48 -0700 Subject: [PATCH] Remove unused bar property and confusing docs referring to it (#7333) --- docs/docs/developers/charts.md | 3 --- docs/docs/getting-started/v3-migration.md | 3 ++- src/controllers/controller.bar.js | 1 - 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/docs/docs/developers/charts.md b/docs/docs/developers/charts.md index 383223286..75b3a1c4a 100644 --- a/docs/docs/developers/charts.md +++ b/docs/docs/developers/charts.md @@ -114,6 +114,3 @@ new Chart(ctx, { options: options }); ``` - -### Bar Controller -The bar controller has a special property that you should be aware of. To correctly calculate the width of a bar, the controller must determine the number of datasets that map to bars. To do this, the bar controller attaches a property `bar` to the dataset during initialization. If you are creating a replacement or updated bar controller, you should do the same. This will ensure that charts with regular bars and your new derived bars will work seamlessly. diff --git a/docs/docs/getting-started/v3-migration.md b/docs/docs/getting-started/v3-migration.md index 653938e6e..c9f573112 100644 --- a/docs/docs/getting-started/v3-migration.md +++ b/docs/docs/getting-started/v3-migration.md @@ -197,8 +197,9 @@ The following properties and methods were removed: * `Chart.Tooltip` is now provided by the tooltip plugin. The positioners can be accessed from `tooltipPlugin.positioners` * `ILayoutItem.minSize` -#### Dataset Controller +#### Dataset Controllers +* `BarController.getDatasetMeta().bar` * `DatasetController.addElementAndReset` * `DatasetController.createMetaData` * `DatasetController.createMetaDataset` diff --git a/src/controllers/controller.bar.js b/src/controllers/controller.bar.js index fa0806ed0..0b21e96b3 100644 --- a/src/controllers/controller.bar.js +++ b/src/controllers/controller.bar.js @@ -246,7 +246,6 @@ export default class BarController extends DatasetController { const meta = me._cachedMeta; meta.stack = me.getDataset().stack; - meta.bar = true; } update(mode) { -- 2.47.2