-
Notifications
You must be signed in to change notification settings - Fork 981
Closed
Labels
Description
Question: Hi, I have a barplot with a multiline label. Is there a way to center each row of the label?

I would like the following result:
-------Row top
--Row in the middle
-----Row bottom
ScottPlot Version: ScottPlot 5.0.34
Code Sample:
Bar[] bars =
{
new()
{
Position = 1,
Value = 60000,
BorderColor = Colors.White,
FillColor = Color.FromHex("E56646"),
ValueBase = 0,
Label = $"Row top\nRow in the middle\nRow bottom",
CenterLabel = true
},
new ()
{
Position = 1,
Value = 60000 + 40000,
BorderColor = Colors.White,
FillColor = Color.FromHex("68BC5A"),
ValueBase = 60000,
Label = $"Row top\nRow in the middle\nRow bottom",
CenterLabel = true
}
};
var barPlot = plot.Add.Bars(bars);
barPlot.ValueLabelStyle.ForeColor = Colors.White;
barPlot.ValueLabelStyle.Bold = true;
barPlot.ValueLabelStyle.FontSize = 16;This is just a snippet of my code. I could provide a minimum full example if needed.
I would really appreciate some help.
Regards
Karl
Reactions are currently unavailable