Class DateTimeAxis
An axis that displays numeric values.
Inheritance
Inherited Members
Namespace: System.Windows.Controls.DataVisualization.Charting
Assembly: Controls.DataVisualization.OpenSilver.dll
Syntax
public class DateTimeAxis : RangeAxis, IRequireSeriesHost, IRangeAxis, IAxis, IRangeConsumer, IValueMarginConsumer
Constructors
| Improve this Doc View SourceDateTimeAxis()
Instantiates a new instance of the DateTimeAxis2 class.
Declaration
public DateTimeAxis()
Fields
| Improve this Doc View SourceActualIntervalProperty
Identifies the ActualInterval dependency property.
Declaration
public static readonly DependencyProperty ActualIntervalProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
ActualMaximumProperty
Identifies the ActualMaximum dependency property.
Declaration
public static readonly DependencyProperty ActualMaximumProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
ActualMinimumProperty
Identifies the ActualMinimum dependency property.
Declaration
public static readonly DependencyProperty ActualMinimumProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
IntervalProperty
Identifies the Interval dependency property.
Declaration
public static readonly DependencyProperty IntervalProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
IntervalTypeProperty
Identifies the InternalIntervalType dependency property.
Declaration
public static readonly DependencyProperty IntervalTypeProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
MaximumProperty
Identifies the Maximum dependency property.
Declaration
public static readonly DependencyProperty MaximumProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
MinimumProperty
Identifies the Minimum dependency property.
Declaration
public static readonly DependencyProperty MinimumProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
Properties
| Improve this Doc View SourceActualDateTimeRange
Gets the actual range of DateTime values.
Declaration
protected Range<DateTime> ActualDateTimeRange { get; }
Property Value
Type | Description |
---|---|
Range<System.DateTime> |
ActualInterval
Gets the actual interval.
Declaration
public double ActualInterval { get; }
Property Value
Type | Description |
---|---|
System.Double |
ActualMaximum
Gets the actual maximum value plotted on the chart.
Declaration
public DateTime? ActualMaximum { get; }
Property Value
Type | Description |
---|---|
System.Nullable<System.DateTime> |
ActualMinimum
Gets the actual maximum value plotted on the chart.
Declaration
public DateTime? ActualMinimum { get; }
Property Value
Type | Description |
---|---|
System.Nullable<System.DateTime> |
Interval
Gets or sets the axis interval.
Declaration
public double? Interval { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Double> |
IntervalType
Gets or sets the interval to use for the axis.
Declaration
public DateTimeIntervalType IntervalType { get; set; }
Property Value
Type | Description |
---|---|
DateTimeIntervalType |
Maximum
Gets or sets the maximum value plotted on the axis.
Declaration
public DateTime? Maximum { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.DateTime> |
Minimum
Gets or sets the minimum value to plot on the axis.
Declaration
public DateTime? Minimum { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.DateTime> |
Origin
Gets the origin value on the axis.
Declaration
protected override IComparable Origin { get; }
Property Value
Type | Description |
---|---|
System.IComparable |
Overrides
Methods
| Improve this Doc View SourceCanPlot(Object)
Returns a value indicating whether a value can plot.
Declaration
public override bool CanPlot(object value)
Parameters
Type | Name | Description |
---|---|---|
System.Object | value | The value to plot. |
Returns
Type | Description |
---|---|
System.Boolean | A value indicating whether a value can plot. |
Overrides
| Improve this Doc View SourceCreateAxisLabel()
Creates a new instance of the DateTimeAxisLabel class.
Declaration
protected override Control CreateAxisLabel()
Returns
Type | Description |
---|---|
Control | Returns a new instance of the DateTimeAxisLabel class. |
Overrides
| Improve this Doc View SourceGetLabelValues(Size)
Returns a sequence of values to plot on the axis.
Declaration
protected override IEnumerable<IComparable> GetLabelValues(Size availableSize)
Parameters
Type | Name | Description |
---|---|---|
Size | availableSize | The available size. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.IComparable> | A sequence of values to plot on the axis. |
Overrides
| Improve this Doc View SourceGetMajorAxisValues(Size)
Returns a sequence of major values.
Declaration
protected virtual IEnumerable<DateTime> GetMajorAxisValues(Size availableSize)
Parameters
Type | Name | Description |
---|---|---|
Size | availableSize | The available size. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.DateTime> | A sequence of major values. |
GetMajorTickMarkValues(Size)
Returns a sequence of values to create major tick marks for.
Declaration
protected override IEnumerable<IComparable> GetMajorTickMarkValues(Size availableSize)
Parameters
Type | Name | Description |
---|---|---|
Size | availableSize | The available size. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.IComparable> | A sequence of values to create major tick marks for. |
Overrides
| Improve this Doc View SourceGetPlotAreaCoordinate(Object, Double)
Returns the plot area coordinate of a value.
Declaration
protected override UnitValue GetPlotAreaCoordinate(object value, double length)
Parameters
Type | Name | Description |
---|---|---|
System.Object | value | The value to plot. |
System.Double | length | The length of the axis. |
Returns
Type | Description |
---|---|
UnitValue | The plot area coordinate of a value. |
Overrides
| Improve this Doc View SourceGetPlotAreaCoordinate(Object, Range<IComparable>, Double)
Returns the plot area coordinate of a value.
Declaration
protected override UnitValue GetPlotAreaCoordinate(object value, Range<IComparable> currentRange, double length)
Parameters
Type | Name | Description |
---|---|---|
System.Object | value | The value to plot. |
Range<System.IComparable> | currentRange | The range to use determine the coordinate. |
System.Double | length | The length of the axis. |
Returns
Type | Description |
---|---|
UnitValue | The plot area coordinate of a value. |
Overrides
| Improve this Doc View SourceGetValueAtPosition(UnitValue)
Returns the value range given a plot area coordinate.
Declaration
protected override IComparable GetValueAtPosition(UnitValue value)
Parameters
Type | Name | Description |
---|---|---|
UnitValue | value | The position. |
Returns
Type | Description |
---|---|
System.IComparable | A range of values at that plot area coordinate. |
Overrides
| Improve this Doc View SourceOnActualRangeChanged(Range<IComparable>)
Updates the typed actual maximum and minimum properties when the actual range changes.
Declaration
protected override void OnActualRangeChanged(Range<IComparable> range)
Parameters
Type | Name | Description |
---|---|---|
Range<System.IComparable> | range | The actual range. |
Overrides
| Improve this Doc View SourceOverrideDataRange(Range<IComparable>)
Overrides the actual range to ensure that it is never set to an empty range.
Declaration
protected override Range<IComparable> OverrideDataRange(Range<IComparable> range)
Parameters
Type | Name | Description |
---|---|---|
Range<System.IComparable> | range | The range to override. |
Returns
Type | Description |
---|---|
Range<System.IComparable> | The overridden range. |
Overrides
| Improve this Doc View SourcePrepareAxisLabel(Control, Object)
Prepares an instance of the DateTimeAxisLabel class by setting its IntervalType property.
Declaration
protected override void PrepareAxisLabel(Control label, object dataContext)
Parameters
Type | Name | Description |
---|---|---|
Control | label | An instance of the DateTimeAxisLabel class. |
System.Object | dataContext | The data context to assign to the label. |