Skip to content

Adjust Border and BackColor with multiLine text. #3371

@NicolasLairNET

Description

@NicolasLairNET

Issue: When I add text plot with multiple lines and I configure a background color and BorderColor, some of the text is outside the borders.

ScottPlot Version: ScottPlot 5

    public Form1()
    {
        InitializeComponent();

        var ohlcs = Generate.RandomOHLCs(12_000);
        formsPlot1.Plot.Add.Candlestick(ohlcs);
        var label = formsPlot1.Plot.Add.Text("First line\nSecond line", 55_000, 300);

        label.Label.BorderColor = Colors.Blue;
        label.Label.BackColor = Colors.Blue.WithAlpha(.5);
        label.Label.Padding = 3;
    }

image

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