-
Notifications
You must be signed in to change notification settings - Fork 985
Closed
Labels
Description
Steps to reproduce
- Create a dotnet console app
- Copy the following code into the Program.cs.
using OxyPlot;
using OxyPlot.Series;
using OxyPlot.ImageSharp;
PlotModel normalModel = new PlotModel
{
TitleFontWeight = FontWeights.Normal,
Background = OxyColors.White,
Series = {
new PieSeries
{
InsideLabelFormat = "{1}",
OutsideLabelFormat = "{1} {2:0}%",
FontWeight = FontWeights.Normal,
Slices =
{
new PieSlice("A", 10),
new PieSlice("B", 20),
new PieSlice("C", 30),
new PieSlice("D", 40),
}
},
},
};
PlotModel boldModel = new PlotModel
{
TitleFontWeight = FontWeights.Bold,
Background = OxyColors.White,
Series = {
new PieSeries
{
InsideLabelFormat = "{1}",
OutsideLabelFormat = "{1} {2:0}%",
FontWeight = FontWeights.Bold,
Slices =
{
new PieSlice("A", 10),
new PieSlice("B", 20),
new PieSlice("C", 30),
new PieSlice("D", 40),
}
},
}
};
PngExporter.Export(normalModel, "normal.png", 600, 400);
PngExporter.Export(boldModel, "bold.png", 600, 400);- View the two outputted images.
Platform:
.NET version:
6.0.201
Expected behaviour
The inner and outer labels of the pie chart inside "bold.png" should have thicker text than the inner and outer labels for the pie chart inside "normal.png".
Actual behaviour
The font-weight appears not to be applied to the labels of the pie chart inside bold.png.

