Skip to content

Commit

Permalink
Fix label not appearing in donut hole on pie charts
Browse files Browse the repository at this point in the history
  • Loading branch information
Blake-Madden committed Dec 14, 2024
1 parent da787f5 commit 2c52eb2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/graphs/piechart.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1388,6 +1388,7 @@ namespace Wisteria::Graphs
const double holeRadius{ (pieDrawArea.GetWidth() * GetDonutHoleProportion()) / 2 };
donutHole->SetRadius(donutHole->DownscaleFromScreenAndCanvas(holeRadius));

queueObjectForOffsetting(std::move(donutHole));
if (GetDonutHoleLabel().GetText().length())
{
auto donutHoleLabel = std::make_unique<Label>(GetDonutHoleLabel());
Expand All @@ -1408,7 +1409,6 @@ namespace Wisteria::Graphs
dc, GetScaling());
queueObjectForOffsetting(std::move(donutHoleLabel));
}
queueObjectForOffsetting(std::move(donutHole));
}

// Resplits labels that may be been split. This is meant to take advantage
Expand Down

0 comments on commit 2c52eb2

Please sign in to comment.