From: Jukka Kurkela Date: Wed, 24 Feb 2021 23:13:51 +0000 (+0200) Subject: Remove unused getRingIndex from Doughnut (#8521) X-Git-Tag: v3.0.0-beta.12~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=12e9020ab7d842eca51e70f9153ba49dd180c9b8;p=thirdparty%2FChart.js.git Remove unused getRingIndex from Doughnut (#8521) --- diff --git a/docs/docs/getting-started/v3-migration.md b/docs/docs/getting-started/v3-migration.md index 6b9137911..2cd03da0a 100644 --- a/docs/docs/getting-started/v3-migration.md +++ b/docs/docs/getting-started/v3-migration.md @@ -303,6 +303,7 @@ The following properties and methods were removed: * `DatasetController.addElementAndReset` * `DatasetController.createMetaData` * `DatasetController.createMetaDataset` +* `DoughnutController.getRingIndex` #### Removed from Elements diff --git a/src/controllers/controller.doughnut.js b/src/controllers/controller.doughnut.js index d2b75f32a..6c5753153 100644 --- a/src/controllers/controller.doughnut.js +++ b/src/controllers/controller.doughnut.js @@ -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 */ diff --git a/types/index.esm.d.ts b/types/index.esm.d.ts index 5231d1f34..93f8979f6 100644 --- a/types/index.esm.d.ts +++ b/types/index.esm.d.ts @@ -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; }