Skip to content

Commit

Permalink
Remove unused bar property and confusing docs referring to it
Browse files Browse the repository at this point in the history
  • Loading branch information
benmccann committed May 8, 2020
1 parent 00f726b commit 0ab8abf
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
3 changes: 0 additions & 3 deletions docs/docs/developers/charts.md
Expand Up @@ -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.
3 changes: 2 additions & 1 deletion docs/docs/getting-started/v3-migration.md
Expand Up @@ -185,8 +185,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`
Expand Down
1 change: 0 additions & 1 deletion src/controllers/controller.bar.js
Expand Up @@ -246,7 +246,6 @@ export default class BarController extends DatasetController {

const meta = me._cachedMeta;
meta.stack = me.getDataset().stack;
meta.bar = true;
}

update(mode) {
Expand Down

0 comments on commit 0ab8abf

Please sign in to comment.