Skip to content

Legend location doesn't work with Pie charts #3450

@aespitia

Description

@aespitia

Version: 5.0.21 : the legend location doesn't seem to apply to Pie charts.

    List<PieSlice> slices = new()
    {
        new PieSlice() { Value = 5, FillColor = Colors.Red, Label = "Red" },
        new PieSlice() { Value = 2, FillColor = Colors.Orange, Label = "Orange" },
        new PieSlice() { Value = 8, FillColor = Colors.Gold, Label = "Yellow" },
        new PieSlice() { Value = 4, FillColor = Colors.Green, Label = "Green" },
        new PieSlice() { Value = 8, FillColor = Colors.Blue, Label = "Blue" },
    };

    var pie = myPlot.Add.Pie(slices);
    pie.ExplodeFraction = .1;
    myPlot.Legend.Location = Alignment.UpperCenter;

    myPlot.ShowLegend();

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions