fix: players donut uses more space with tight margins
Reduced pie chart margins from 75px to 5px and moved labels inside the donut (.donutLabelsOutside(false)) so the chart fills the available card width instead of being squeezed. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -94,10 +94,11 @@ function ServerInfoPage(params, container) {
|
|||||||
.y(function (d) { return d.y; })
|
.y(function (d) { return d.y; })
|
||||||
.showLabels(true)
|
.showLabels(true)
|
||||||
.donut(true)
|
.donut(true)
|
||||||
|
.donutLabelsOutside(false)
|
||||||
.duration(500)
|
.duration(500)
|
||||||
.height(250)
|
.height(250)
|
||||||
.color(['#a78bfa', '#7c3aed', '#e879f9', '#2d1f3d'])
|
.color(['#a78bfa', '#7c3aed', '#e879f9', '#2d1f3d'])
|
||||||
.margin({ top: 0, right: 75, bottom: 0, left: 75 });
|
.margin({ top: 5, right: 5, bottom: 5, left: 5 });
|
||||||
playersChart.pie.startAngle(function (d) { return d.startAngle / 2 - Math.PI / 2; });
|
playersChart.pie.startAngle(function (d) { return d.startAngle / 2 - Math.PI / 2; });
|
||||||
playersChart.pie.endAngle(function (d) { return d.endAngle / 2 - Math.PI / 2; });
|
playersChart.pie.endAngle(function (d) { return d.endAngle / 2 - Math.PI / 2; });
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user