Class Year
- Namespace
- ScottPlot.TickGenerators.TimeUnits
- Assembly
- ScottPlot.dll
public class Year : ITimeUnit
- Inheritance
-
Year
- Implements
- Inherited Members
- Extension Methods
Properties
Divisors
An array of integers that serve as good divisors to subdivide this time unit
public IReadOnlyList<int> Divisors { get; }
Property Value
MinSize
Minimum span this time unit can represent. To represent spans smaller than this, try the next smaller unit.
public TimeSpan MinSize { get; }
Property Value
Methods
GetDateTimeFormatString()
Returns the format string used to display tick labels of this time unit. https://learn.microsoft.com/en-us/dotnet/api/system.datetime.tostring
public string GetDateTimeFormatString()
Returns
Next(DateTime, int)
Return the DateTime N units relative to this one
public DateTime Next(DateTime dateTime, int increment = 1)
Parameters
Returns
Snap(DateTime)
Return a given date "snapped" back to the nearest nice tick position. Use this to find a good tick position for a given DateTime.
public DateTime Snap(DateTime dt)
Parameters
dt
DateTime