TimeSpanTickProviderBase

StockSharp.Xaml.Charting.Visuals.Axes

A Common base class for TimeSpan and DateTimeTickProviders, which provide tick coordinates for the DateTimeAxis and TimeSpanAxis

Inherits: TickProvider<IComparable>

Methods

AddDelta
protected abstract IComparable AddDelta(IComparable current, TimeSpan delta)
result = timeSpanTickProviderBase.AddDelta(current, delta)

When overriden in a derived class, Adds the IComparable to the nearest TimeSpan specified by

current
The current value.
delta
The delta.

Returns: The addition result

ConvertTicks
protected override double[] ConvertTicks(IComparable[] ticks)
result = timeSpanTickProviderBase.ConvertTicks(ticks)

Converts ticks in generic format to Double, e.g. cast to double for numeric types, or cast DateTime.Ticks to double for DateTime types

ticks
GetMajorTicks
public override IComparable[] GetMajorTicks(IAxisParams axis)
result = timeSpanTickProviderBase.GetMajorTicks(axis)

Returns Generic-typed representation of major ticks array

axis
The AxisParams for the axis

Returns: The array of ticks to display (data values converted to T)

GetMajorTicks
private IComparable[] GetMajorTicks(IRange tickRange, IAxisDelta<TimeSpan> tickDelta)
result = timeSpanTickProviderBase.GetMajorTicks(tickRange, tickDelta)

Given a date tick range with Min, Max, MajorDelta and MinorDelta, return an array of absolute values for major ticks

GetMinorTicks
public override IComparable[] GetMinorTicks(IAxisParams axis)
result = timeSpanTickProviderBase.GetMinorTicks(axis)

Returns Generic-typed representation of minor ticks array

axis
The AxisParams for the axis

Returns: The array of ticks to display (data values converted to T)

GetMinorTicks
private IComparable[] GetMinorTicks(IRange tickRange, IAxisDelta<TimeSpan> tickDelta)
result = timeSpanTickProviderBase.GetMinorTicks(tickRange, tickDelta)

Given a date tick range with Min, Max, MajorDelta and MinorDelta, return an array of absolute values for major ticks

GetTicks
protected abstract double GetTicks(IComparable value)
result = timeSpanTickProviderBase.GetTicks(value)

Returns Ticks or Ticks depending on derived type

value
IsAdditionValid
protected abstract bool IsAdditionValid(IComparable current, TimeSpan delta)
result = timeSpanTickProviderBase.IsAdditionValid(current, delta)

Determines whether addition is valid between the current IComparable and the TimeSpan specified by

current
The current.
delta
The delta.

Returns: If True, addition is valid

IsDivisibleBy
protected abstract bool IsDivisibleBy(IComparable current, TimeSpan delta)
result = timeSpanTickProviderBase.IsDivisibleBy(current, delta)

When overriden in a derived class, Determines whether the IComparable is divisible by the TimeSpan specified by

current
The current value.
delta
The delta.

Returns: If True, IsDivisibleBy

RoundUp
protected abstract IComparable RoundUp(IComparable current, TimeSpan delta)
result = timeSpanTickProviderBase.RoundUp(current, delta)

When overriden in a derived class, Rounds up the IComparable to the nearest TimeSpan specified by

current
The current value.
delta
The delta.

Returns: The rounded value