API Reference
HeatmapDisplayText
Provides shared formatting helpers for heatmap/report copy.
Inheritance
- Object
- HeatmapDisplayText
Methods
public static String FormatActiveDays(Int32 count) #StringFormats an active-day count label.
Parameters
- count System.Int32
- Active day count to render.
Returns
A label such as 1 active day or 30 active days.
public static String FormatCount(String countText, Int64 count, String singular, String plural) #StringFormats a caller-provided count label with the correct singular or plural noun.
Parameters
- countText System.String
- Already formatted numeric count text, such as 1.23K.
- count System.Int64
- Raw numeric count used to choose singular or plural.
- singular System.String
- Singular noun used when the count is one.
- plural System.String
- Plural noun used for all other counts.
Returns
A count label such as 1 repository or 1.23K repositories.
public static String FormatCount(Int64 count, String singular, String plural) #StringFormats a numeric count with the correct singular or plural noun.
Parameters
- count System.Int64
- Numeric count to render.
- singular System.String
- Singular noun used when the count is one.
- plural System.String
- Plural noun used for all other counts.
Returns
A count label such as 1 day or 2 days.
public static String FormatDateRange(Nullable<DateTime> startDayUtc, Nullable<DateTime> endDayUtc, String emptyLabel = "No range") #StringFormats a date range used in report subtitles and section headers.
Parameters
- startDayUtc System.Nullable{System.DateTime}
- Inclusive range start.
- endDayUtc System.Nullable{System.DateTime}
- Inclusive range end.
- emptyLabel System.String = "No range"
- Fallback label when the range is missing.
Returns
A label such as 2026-01-01 to 2026-01-31.
public static String FormatDays(Int32 count) #StringFormats a streak-style day count label.
Parameters
- count System.Int32
- Day count to render.
Returns
A label such as 1 day or 85 days.
public static String FormatDuration(TimeSpan duration) #StringFormats a compact elapsed-duration label using hour, minute, and second units.
Parameters
- duration System.TimeSpan
- Elapsed duration to render.
Returns
A label such as 45s, 12m 30s, or 2h 15m.
public static String FormatTrailingMonthWindow(Int32 months) #StringFormats a trailing month-window label for monthly charts.
Parameters
- months System.Int32
- Number of months in the window.
Returns
A label such as Trailing 13 months.
public static String JoinSummaryParts(params String[] parts) #StringJoins short summary segments with a presentation-friendly separator.
Parameters
- parts System.String[]
- Summary segments to join.
Returns
A display string such as 2000 tokens · 2 active days · peak 2026-03-10 (1200).
Inherited Methods
public override Boolean Equals(Object obj) #BooleanParameters
- obj Object