Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

ツールチップのテール幅

カスタマイズ可能なツールチップのテール幅の割合です。テールの実際の幅は、ツールチップ本体の長さまたは幅のうち小さい方になります。

Tooltip.cs
ScottPlot.Plot myPlot = new();

double[] widthFraction = [0.3, 0.5, 0.7, 1.0];

for (int i = 0; i < widthFraction.Length; i++)
{

    Coordinates tip = new(0, i * 2);
    Coordinates label = tip.WithDelta(2, 1);
    var tooltip = myPlot.Add.Tooltip(tip, $"幅={widthFraction[i]}", label);
    tooltip.TailWidthPercentage = widthFraction[i];
}

myPlot.Axes.SetLimits(-3, 7, -1, 9);

myPlot.SavePng("demo.png", 400, 300);
このレシピは、ツールチップカテゴリーに含まれる多数のレシピの 1 つです