50 Dictionary<SwimmingStyles, string> styleNameStringsDict = numberStartsPerStyle.ToDictionary(kv => kv.Key, kv => EnumCoreLocalizedStringHelper.Convert(kv.Key));
51 int maxStyleNameStrLen = styleNameStringsDict.Max(kv => kv.Value?.Length) ?? 12;
53 int maxNumStarts = numberStartsPerStyle.Max(kv => kv.Value);
56 string moduleString =
string.Join(Environment.NewLine,
60 SwimmingStyles style = kv.Key;
61 string styleString = EnumCoreLocalizedStringHelper.Convert(style);
63 double percentage = PercentageStartsPerStyle.TryGetValue(style, out var p) ? p : 0;
64 return $
"{styleNameStringsDict[kv.Key]}: ".PadRight(maxStyleNameStrLen + 2) +
65 $
"{count,2}x | {new string('#', count).PadRight(maxNumStarts)} {percentage.ToString("N1
")}%";
68 foreach (
string placeholder
in Placeholders.Placeholders_AnalyticsStartsPerStyle) { textPlaceholder.Add(placeholder, moduleString); }
69 return textPlaceholder;