Class DateTimeAxis
Class implementation for DateTimeAxis
Inherited Members
Namespace: Syncfusion.UI.Xaml.Charts
Assembly: Syncfusion.SfChart.WPF.dll
Syntax
public class DateTimeAxis : RangeAxisBase, ICloneable, IRangeAxis
Constructors
DateTimeAxis()
Declaration
public DateTimeAxis()
Fields
AutoScrollingDeltaTypeProperty
Using a DependencyProperty as the backing store for AutoScrollingDeltaType. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty AutoScrollingDeltaTypeProperty
Field Value
| Type |
|---|
| System.Windows.DependencyProperty |
CloseTimeProperty
The DependencyProperty for CloseTime property.
Declaration
public static readonly DependencyProperty CloseTimeProperty
Field Value
| Type |
|---|
| System.Windows.DependencyProperty |
EnableBusinessHoursProperty
The DependencyProperty for EnableBusinessHours property.
Declaration
public static readonly DependencyProperty EnableBusinessHoursProperty
Field Value
| Type |
|---|
| System.Windows.DependencyProperty |
IntervalProperty
The DependencyProperty for Interval property.
Declaration
public static readonly DependencyProperty IntervalProperty
Field Value
| Type |
|---|
| System.Windows.DependencyProperty |
IntervalTypeProperty
The DependencyProperty for IntervalType property.
Declaration
public static readonly DependencyProperty IntervalTypeProperty
Field Value
| Type |
|---|
| System.Windows.DependencyProperty |
MaximumProperty
The DependencyProperty for Maximum property.
Declaration
public static readonly DependencyProperty MaximumProperty
Field Value
| Type |
|---|
| System.Windows.DependencyProperty |
MinimumProperty
The DependencyProperty for Minimum property.
Declaration
public static readonly DependencyProperty MinimumProperty
Field Value
| Type |
|---|
| System.Windows.DependencyProperty |
OpenTimeProperty
The DependencyProperty for OpenTime property.
Declaration
public static readonly DependencyProperty OpenTimeProperty
Field Value
| Type |
|---|
| System.Windows.DependencyProperty |
RangePaddingProperty
The DependencyProperty for RangePadding property.
Declaration
public static readonly DependencyProperty RangePaddingProperty
Field Value
| Type |
|---|
| System.Windows.DependencyProperty |
WorkingDaysProperty
The DependencyProperty for WorkingDays property.
Declaration
public static readonly DependencyProperty WorkingDaysProperty
Field Value
| Type |
|---|
| System.Windows.DependencyProperty |
Properties
AutoScrollingDeltaType
Gets or sets the date time unit of the value specified in the AutoScrollingDelta property.
Declaration
public DateTimeIntervalType AutoScrollingDeltaType { get; set; }
Property Value
| Type |
|---|
| DateTimeIntervalType |
CloseTime
Gets or sets the business closing time.
Declaration
public double CloseTime { get; set; }
Property Value
| Type |
|---|
| System.Double |
EnableBusinessHours
Gets or sets a value indicating whether to enable only the business hours for the DateTime axis.
Declaration
public bool EnableBusinessHours { get; set; }
Property Value
| Type |
|---|
| System.Boolean |
Interval
Gets or sets a value that determines the interval between labels. If this property is not set, interval will be calculated automatically.
Declaration
public double Interval { get; set; }
Property Value
| Type |
|---|
| System.Double |
IntervalType
Gets or sets the type of interval to be displayed in axis.
Declaration
public DateTimeIntervalType IntervalType { get; set; }
Property Value
| Type |
|---|
| DateTimeIntervalType |
Remarks
This property hold the values ranges from Year, Months to Milliseconds.
Maximum
Gets or sets the maximum value for the axis range. This is nullable property.
Declaration
public DateTime? Maximum { get; set; }
Property Value
| Type |
|---|
| System.Nullable<System.DateTime> |
Remarks
If we didn't set the maximum value, it will be calculate from the underlying collection.
Minimum
Gets or sets the minimum value for the axis range. This is nullable property.
Declaration
public DateTime? Minimum { get; set; }
Property Value
| Type |
|---|
| System.Nullable<System.DateTime> |
Remarks
If we didn't set the minimum value, it will be calculate from the underlying collection.
OpenTime
Gets or sets the business open time.
Declaration
public double OpenTime { get; set; }
Property Value
| Type |
|---|
| System.Double |
RangePadding
Gets or sets the padding used to shift the DateTimeAxis range inside or outside.
Declaration
public DateTimeRangePadding RangePadding { get; set; }
Property Value
| Type | Description |
|---|---|
| DateTimeRangePadding |
|
WorkingDays
Gets or sets the flagged enum to selected the list of working days in a business week.
Declaration
public Day WorkingDays { get; set; }
Property Value
| Type |
|---|
| Day |
Methods
ApplyRangePadding(DoubleRange, Double)
Apply padding based on interval
Declaration
protected override DoubleRange ApplyRangePadding(DoubleRange range, double interval)
Parameters
| Type | Name | Description |
|---|---|---|
| DoubleRange | range | |
| System.Double | interval |
Returns
| Type |
|---|
| DoubleRange |
Overrides
CalcNonWorkingHours(DateTime, DateTime, String, Double)
Calculate the non working hours between two dates
Declaration
public double CalcNonWorkingHours(DateTime startDate, DateTime endDate, string workingDays, double nonWorkingHoursPerDay)
Parameters
| Type | Name | Description |
|---|---|---|
| System.DateTime | startDate | |
| System.DateTime | endDate | |
| System.String | workingDays | |
| System.Double | nonWorkingHoursPerDay |
Returns
| Type |
|---|
| System.Double |
CalculateActualInterval(DoubleRange, Size)
Calculates actual interval
Declaration
protected override double CalculateActualInterval(DoubleRange range, Size availableSize)
Parameters
| Type | Name | Description |
|---|---|---|
| DoubleRange | range | |
| System.Windows.Size | availableSize |
Returns
| Type |
|---|
| System.Double |
Overrides
CalculateActualRange()
Calculates actual range
Declaration
protected override DoubleRange CalculateActualRange()
Returns
| Type |
|---|
| DoubleRange |
Overrides
CalculateNiceInterval(DoubleRange, Size)
Calculates nice interval.
Declaration
protected override double CalculateNiceInterval(DoubleRange actualRange, Size availableSize)
Parameters
| Type | Name | Description |
|---|---|---|
| DoubleRange | actualRange | |
| System.Windows.Size | availableSize |
Returns
| Type | Description |
|---|---|
| System.Double | Axis interval based on available size |
Overrides
CalculateVisibleRange(Size)
Calculates the visible range.
Declaration
protected override void CalculateVisibleRange(Size availableSize)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Size | availableSize |
Overrides
CloneAxis(DependencyObject)
Declaration
protected override DependencyObject CloneAxis(DependencyObject obj)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.DependencyObject | obj |
Returns
| Type |
|---|
| System.Windows.DependencyObject |
Overrides
GenerateVisibleLabels()
Method implementation for Create VisibleLabels for DateTime axis
Declaration
protected override void GenerateVisibleLabels()
Overrides
GetLabelContent(Double)
Return object value from the given double value
Declaration
public override object GetLabelContent(double position)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Double | position |
Returns
| Type |
|---|
| System.Object |
Overrides
OnIntervalChanged(DependencyPropertyChangedEventArgs)
Called when Interval property changed
Declaration
protected virtual void OnIntervalChanged(DependencyPropertyChangedEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.DependencyPropertyChangedEventArgs | e |
OnMaximumChanged(DependencyPropertyChangedEventArgs)
Called when Maximum property changed
Declaration
protected virtual void OnMaximumChanged(DependencyPropertyChangedEventArgs args)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.DependencyPropertyChangedEventArgs | args |
OnMinimumChanged(DependencyPropertyChangedEventArgs)
Called when minimum property Changed
Declaration
protected virtual void OnMinimumChanged(DependencyPropertyChangedEventArgs args)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.DependencyPropertyChangedEventArgs | args |