(#684) Enable setting the color of the values in a BreakdownChart

This commit is contained in:
Nils Andresen
2023-09-15 20:12:06 +02:00
parent 037e109699
commit bef21e8a21
6 changed files with 45 additions and 1 deletions

View File

@@ -297,4 +297,21 @@ public static class BreakdownChartExtensions
chart.Compact = compact;
return chart;
}
/// <summary>
/// Sets the <see cref="BreakdownChart.ValueColor"/>.
/// </summary>
/// <param name="chart">The breakdown chart.</param>
/// <param name="color">The <see cref="Color"/> to set.</param>
/// <returns>The same instance so that multiple calls can be chained.</returns>
public static BreakdownChart WithValueColor(this BreakdownChart chart, Color color)
{
if (chart is null)
{
throw new ArgumentNullException(nameof(chart));
}
chart.ValueColor = color;
return chart;
}
}