feature: allow user to select the chart fill color

This commit is contained in:
leo 2024-09-24 12:14:51 +08:00
parent de15cb1ff2
commit c0f59c441b
No known key found for this signature in database
6 changed files with 88 additions and 13 deletions

View file

@ -103,7 +103,7 @@ namespace SourceGit.Models
{
Values = samples,
Stroke = null,
Fill = new SolidColorPaint(SKColors.Green),
Fill = null,
Padding = 1,
}
);
@ -117,6 +117,12 @@ namespace SourceGit.Models
_mapSamples.Clear();
}
public void ChangeColor(uint color)
{
if (Series is [ColumnSeries<DateTimePoint> series])
series.Fill = new SolidColorPaint(new SKColor(color));
}
private StaticsticsMode _mode = StaticsticsMode.All;
private Dictionary<string, int> _mapUsers = new Dictionary<string, int>();
private Dictionary<DateTime, int> _mapSamples = new Dictionary<DateTime, int>();