Skip to content

Commit da20669

Browse files
committed
max,min,total
1 parent b875799 commit da20669

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

Lib/SlocChart.cs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,15 @@ public static void Show(int year, List<(int day, int sloc)> slocs) {
1212
return;
1313
}
1414

15-
Console.WriteLine($" {year } in code lines");
16-
Console.WriteLine("");
1715

1816
var chars = "█▁▂▃▄▅▆▇";
19-
var max = slocs.Select(sloc => sloc.sloc).Max();
17+
var max = slocs.Max(sloc => sloc.sloc);
18+
var min = slocs.Min(sloc => sloc.sloc);
19+
var total = slocs.Sum(sloc => sloc.sloc);
20+
21+
Console.WriteLine($" {year } in code lines total: {total} max: {max} min: {min}");
22+
Console.WriteLine("");
23+
2024

2125
var columns = new List<List<ColoredString>>();
2226

0 commit comments

Comments
 (0)