CategoryDateTimeAxis

StockSharp.Xaml.Charting.Visuals.Axes

Provides a Linear, Category DateTime Axis, capable of rendering DateTime ticks on the X-Axis of a UltrachartSurface. The CategoryDateTimeAxis is specifically used in stock-charts or financial charts, since the category-nature of the axis automatically collapses weekend gaps and overnight gaps in trading charts. Each data-point is treated as equidistant despite the X Data-value.

Inherits: AxisBase

Implements: ICategoryAxis, IAxis, IAxisParams, IHitTestable, ISuspendable, IInvalidatableElement, IDrawable

Constructors

CategoryDateTimeAxis
public CategoryDateTimeAxis()
categoryDateTimeAxis = CategoryDateTimeAxis()

Initializes a new instance of the CategoryDateTimeAxis class.

Properties

BarTimeFrame
public double BarTimeFrame { get; set; }
value = categoryDateTimeAxis.BarTimeFrame
categoryDateTimeAxis.BarTimeFrame = value

Gets or sets the Bar Time Frame in seconds. This is the number of seconds that each data-point represents on the CategoryDateTimeAxis and is required for proper rendering. A default value of -1 allows the CategoryDateTimeAxis to estimate the timeframe

CurrentDatapointPixelSize
public override double CurrentDatapointPixelSize { get; }
value = categoryDateTimeAxis.CurrentDatapointPixelSize

Gets the current data-point width, which is the width of one data-point in pixels on the category axis

IsCategoryAxis
public override bool IsCategoryAxis { get; }
value = categoryDateTimeAxis.IsCategoryAxis

Gets a value indicating whether this instance is category axis.

MinimalZoomConstrain
public int? MinimalZoomConstrain { get; set; }
value = categoryDateTimeAxis.MinimalZoomConstrain
categoryDateTimeAxis.MinimalZoomConstrain = value

Gets or sets the MinimalZoomConstrain of the Axis. This is used to set minimum distance between Min and Max of the VisibleRange

SubDayTextFormatting
public string SubDayTextFormatting { get; set; }
value = categoryDateTimeAxis.SubDayTextFormatting
categoryDateTimeAxis.SubDayTextFormatting = value

Gets or sets the Text Formatting String used for Axis Tick Labels when the range of the axis is sub-day

Methods

CalculateDataRange
protected override IRange CalculateDataRange()
result = categoryDateTimeAxis.CalculateDataRange()

Calculates data range of current axis

CalculateDelta
protected override void CalculateDelta()
categoryDateTimeAxis.CalculateDelta()

Calcuates the delta's for use in this render pass

CalculateYRange
public override IRange CalculateYRange(RenderPassInfo renderPassInfo)
result = categoryDateTimeAxis.CalculateYRange(renderPassInfo)

Calculates the zoom-to-fit Y-Range of the axis, accounting for the data that is in the viewport and applying any GrowBy margin

renderPassInfo
Struct containing data for the current render pass

Returns: The VisibleRange of the axis

Clone
public override IAxis Clone()
result = categoryDateTimeAxis.Clone()

Clones this instance.

ConvertTickToDataValue
protected override IComparable ConvertTickToDataValue(IComparable value)
result = categoryDateTimeAxis.ConvertTickToDataValue(value)

When overridden in a derived class, converts a tick value to a data value. For instance, this may be overridden in the CategoryDateTimeAxis to convert between indices and DateTimes

value
GetAxisParams
public override AxisParams GetAxisParams()
result = categoryDateTimeAxis.GetAxisParams()

Gets an AxisParams struct with info about the current axis setup

GetCoordinate
public override double GetCoordinate(IComparable value)
result = categoryDateTimeAxis.GetCoordinate(value)

Given the Data Value, returns the x or y pixel coordinate at that value on the Axis. This operation is the opposite of Point)

value
The DataValue as input

Returns: The pixel coordinate on this Axis corresponding to the input DataValue

GetDataValue
public override IComparable GetDataValue(double pixelCoordinate)
result = categoryDateTimeAxis.GetDataValue(pixelCoordinate)

Transforms a pixel coordinate into a data value for this axis.

pixelCoordinate
GetDefaultNonZeroRange
public override IRange GetDefaultNonZeroRange()
result = categoryDateTimeAxis.GetDefaultNonZeroRange()

Returns an default non zero IRange, called internally by Ultrachart to reset the VisibleRange of an axis to an undefined state

GetDeltaCalculator
protected override IDeltaCalculator GetDeltaCalculator()
result = categoryDateTimeAxis.GetDeltaCalculator()

Returns an instance of an IDeltaCalculator which is used to compute the data-values of MajorDelta, MinorDelta. Overridden by derived types to allow calculations specific to that axis type.

Returns: An IDeltaCalculator instance

GetMaximumRange
public override IRange GetMaximumRange()
result = categoryDateTimeAxis.GetMaximumRange()

Gets the Maximum Range of the axis, which is equal to the DataRange including any GrowBy factor applied

GetSupportedTypes
protected override List<Type> GetSupportedTypes()
result = categoryDateTimeAxis.GetSupportedTypes()

Returns a list of types which current axis is designed to work with

GetUndefinedRange
public override IRange GetUndefinedRange()
result = categoryDateTimeAxis.GetUndefinedRange()

Returns an undefined IRange, called internally by Ultrachart to reset the VisibleRange of an axis to an undefined state

IsOfValidType
public override bool IsOfValidType(IRange range)
result = categoryDateTimeAxis.IsOfValidType(range)

Checks whether is of valid type for this axis

range
OnBeginRenderPass
public override void OnBeginRenderPass(RenderPassInfo renderPassInfo, IPointSeries firstPointSeries)
categoryDateTimeAxis.OnBeginRenderPass(renderPassInfo, firstPointSeries)

Called at the start of a render pass, passing in the root IPointSeries which will define the categories

renderPassInfo
firstPointSeries
the root IPointSeries which will define the categories
ToDateRange
public DateRange ToDateRange(IndexRange visibleRange)
result = categoryDateTimeAxis.ToDateRange(visibleRange)

Converts the CategoryDateTimeAxis's VisibleRange of type IndexRange to a DateRange of concrete date-values. Note: If either index is outside of the range of data on the axis, the date values will be inteporlated.

visibleRange
The input IndexRange

Returns: The DateRange with transformed dates that correspond to input indices

Fields

BarTimeFrameProperty
public static readonly DependencyProperty BarTimeFrameProperty
value = CategoryDateTimeAxis.BarTimeFrameProperty

Defines the BarTimeFrame DependencyProperty. A default value of -1 allows the CategoryDateTimeAxis to estimate the timeframe

SubDayTextFormattingProperty
public static readonly DependencyProperty SubDayTextFormattingProperty
value = CategoryDateTimeAxis.SubDayTextFormattingProperty

Defines the SubDayTextFormatting DependencyProperty