in src/chordChart.ts [783:800]
private calculateRadius(): number {
if (this.settings.labels.show) {
// if we have category or data labels, use a sigmoid to blend the desired denominator from 2 to 3.
// if we are taller than we are wide, we need to use a larger denominator to leave horizontal room for the labels.
let hw: number =
this.layout.viewportIn.height / this.layout.viewportIn.width;
let denom: number = 2 + 1 / (1 + Math.exp(-5 * (hw - 1)));
return (
Math.min(this.layout.viewportIn.height, this.layout.viewportIn.width) /
denom
);
}
// no labels
return (
Math.min(this.layout.viewportIn.height, this.layout.viewportIn.width) / 2
);
}