Class Axis
- Namespace
- MiniTui
- Assembly
- MiniTui.dll
One axis of a ChartBuilder (1.x spec §8.4).
public sealed record Axis : IEquatable<Axis>
- Inheritance
-
Axis
- Implements
- Inherited Members
Properties
Formatter
Formats the default labels' values, instead of LabelFormat (1.x spec §19.4).
public Func<double, string>? Formatter { get; init; }
Property Value
Grid
Draw a dotted line across the plot at each label, behind the data (1.x spec §19.5).
public bool Grid { get; init; }
Property Value
LabelCount
How many labels to spread along the axis when Labels is null. Default 3, at least 2.
public int LabelCount { get; init; }
Property Value
LabelFormat
The .NET numeric format of the default labels, in the invariant culture. Default "0.##".
public string LabelFormat { get; init; }
Property Value
Labels
Labels spread evenly along the axis, or null for LabelCount of them from Min to Max.
public IReadOnlyList<string>? Labels { get; init; }
Property Value
Max
The value at the end of the axis, or null for the largest value in the data.
public double? Max { get; init; }
Property Value
Min
The value at the start of the axis, or null for the smallest value in the data.
public double? Min { get; init; }
Property Value
Ticks
Draw a tick on the axis line at each label: ┬ on the X axis, ┤ on the Y axis (1.x spec §19.5).
public bool Ticks { get; init; }
Property Value
Title
The axis title, or null for none.
public string? Title { get; init; }
Property Value
Methods
Duration(string)
An axis of durations: values are seconds, labelled with a TimeSpan format,
with - before negative ones (1.x spec §19.4).
public static Axis Duration(string format = "m\\:ss")
Parameters
formatstring
Returns
Time(string)
An axis of times: values are seconds since the Unix epoch (ChartTime), labelled in local time
with a DateTime format in the invariant culture (1.x spec §19.4).
public static Axis Time(string format = "HH:mm:ss")
Parameters
formatstring