Skip to content

Commit

Permalink
Remove unused getRingIndex from Doughnut (#8521)
Browse files Browse the repository at this point in the history
  • Loading branch information
kurkle authored Feb 24, 2021
1 parent 8796a1b commit 12e9020
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 14 deletions.
1 change: 1 addition & 0 deletions docs/docs/getting-started/v3-migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,7 @@ The following properties and methods were removed:
* `DatasetController.addElementAndReset`
* `DatasetController.createMetaData`
* `DatasetController.createMetaDataset`
* `DoughnutController.getRingIndex`

#### Removed from Elements

Expand Down
13 changes: 0 additions & 13 deletions src/controllers/controller.doughnut.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,19 +60,6 @@ export default class DoughnutController extends DatasetController {
}
}

// Get index of the dataset in relation to the visible datasets. This allows determining the inner and outer radius correctly
getRingIndex(datasetIndex) {
let ringIndex = 0;

for (let j = 0; j < datasetIndex; ++j) {
if (this.chart.isDatasetVisible(j)) {
++ringIndex;
}
}

return ringIndex;
}

/**
* @private
*/
Expand Down
1 change: 0 additions & 1 deletion types/index.esm.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,6 @@ export interface DoughnutController extends DatasetController {
readonly offsetX: number;
readonly offsetY: number;

getRingIndex(datasetIndex: number): number;
calculateTotal(): number;
calculateCircumference(value: number): number;
}
Expand Down

0 comments on commit 12e9020

Please sign in to comment.