Skip to content

SP5 the behavior of Bar.Label is weird when BarPlot.Horizontal is true #3520

@yui1227

Description

@yui1227

Issue: the behavior of Bar.Label is weird when BarPlot.Horizontal is true. the position of value is wrong.

ScottPlot Version: 5.0.22

Code Sample:

using ScottPlot;

var plot = new Plot();

double[] values = { 1, 2, 3, 4, 5 };
var barPlot = plot.Add.Bars(values);

foreach (var bar in barPlot.Bars)
{
    bar.Label = $"{bar.Value}";
}

plot.Save("vert.png", 500, 500);
barPlot.Horizontal = true;
plot.Save("hori.png", 500, 500);

vert
hori

Metadata

Metadata

Assignees

No one assigned

    Labels

    Good First IssueThis issue has limited complexity and may be a good start for new contributorsHelp WantedScott won't do this soon, but PRs from the community are welcome!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions