* @private
()
| 145 | * @private |
| 146 | */ |
| 147 | _updateRadius() { |
| 148 | const chart = this.chart; |
| 149 | const chartArea = chart.chartArea; |
| 150 | const opts = chart.options; |
| 151 | const minSize = Math.min(chartArea.right - chartArea.left, chartArea.bottom - chartArea.top); |
| 152 | |
| 153 | const outerRadius = Math.max(minSize / 2, 0); |
| 154 | const innerRadius = Math.max(opts.cutoutPercentage ? (outerRadius / 100) * (opts.cutoutPercentage) : 1, 0); |
| 155 | const radiusLength = (outerRadius - innerRadius) / chart.getVisibleDatasetCount(); |
| 156 | |
| 157 | this.outerRadius = outerRadius - (radiusLength * this.index); |
| 158 | this.innerRadius = this.outerRadius - radiusLength; |
| 159 | } |
| 160 | |
| 161 | updateElements(arcs, start, count, mode) { |
| 162 | const reset = mode === 'reset'; |
no test coverage detected