-
Notifications
You must be signed in to change notification settings - Fork 985
Open
Description
I'm creating a pie chart for a document using QuestPDF. The problem is that I'm displaying percentages in this chart, and the issue arises when there's a very high percentage; the other percentages get grouped together and overlap each other. I've tried separating them by adding or removing lines, but the small values aren't displayed correctly.
`private static PlotModel CreatePieChart(string titulo, PieSlice[] data)
{
var model = new PlotModel
{
Title = titulo,
DefaultFont = "SourceSansPro",
TitleFont = "SourceSansPro",
SubtitleFont = "SourceSansPro",
DefaultFontSize = 8,
TitleFontSize = 8,
SubtitleFontSize = 8,
TextColor = OxyColor.Parse("#231f20"),
};
PieSeries? ps = new()
{
StrokeThickness = .25,
InsideLabelPosition = .25,
AngleSpan = 360,
StartAngle = 20,
Font = "SourceSansPro",
FontSize = 8,
TextColor = OxyColor.Parse("#231f20"),
TickRadialLength = 10,
TickHorizontalLength = 15,
InsideLabelFormat = "",
OutsideLabelFormat = "{2:#0.00}%",
TickLabelDistance = 5,
InnerDiameter = 0.6,
};
foreach (var item in data)
{
ps.Slices.Add(item);
}
model.Series.Add(ps);
return model;
}`

Metadata
Metadata
Assignees
Labels
No labels