MCPcopy Create free account
hub / github.com/chartjs/Chart.js / _getRingWeight

Method _getRingWeight

src/controllers/controller.doughnut.js:391–393  ·  view source on GitHub ↗

* @private

(datasetIndex)

Source from the content-addressed store, hash-verified

389 * @private
390 */
391 _getRingWeight(datasetIndex) {
392 return Math.max(valueOrDefault(this.chart.data.datasets[datasetIndex].weight, 1), 0);
393 }
394
395 /**
396 * Returns the sum of all visible data set weights.

Callers 2

updateMethod · 0.95
_getRingWeightOffsetMethod · 0.95

Calls 1

valueOrDefaultFunction · 0.85

Tested by

no test coverage detected