Skip to content

Commit 12e9020

Browse files
authored
Remove unused getRingIndex from Doughnut (#8521)
1 parent 8796a1b commit 12e9020

File tree

3 files changed

+1
-14
lines changed

3 files changed

+1
-14
lines changed

docs/docs/getting-started/v3-migration.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,7 @@ The following properties and methods were removed:
303303
* `DatasetController.addElementAndReset`
304304
* `DatasetController.createMetaData`
305305
* `DatasetController.createMetaDataset`
306+
* `DoughnutController.getRingIndex`
306307

307308
#### Removed from Elements
308309

src/controllers/controller.doughnut.js

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -60,19 +60,6 @@ export default class DoughnutController extends DatasetController {
6060
}
6161
}
6262

63-
// Get index of the dataset in relation to the visible datasets. This allows determining the inner and outer radius correctly
64-
getRingIndex(datasetIndex) {
65-
let ringIndex = 0;
66-
67-
for (let j = 0; j < datasetIndex; ++j) {
68-
if (this.chart.isDatasetVisible(j)) {
69-
++ringIndex;
70-
}
71-
}
72-
73-
return ringIndex;
74-
}
75-
7663
/**
7764
* @private
7865
*/

types/index.esm.d.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,6 @@ export interface DoughnutController extends DatasetController {
314314
readonly offsetX: number;
315315
readonly offsetY: number;
316316

317-
getRingIndex(datasetIndex: number): number;
318317
calculateTotal(): number;
319318
calculateCircumference(value: number): number;
320319
}

0 commit comments

Comments
 (0)