Class DateTimeAxis
Represents a specialized axis to plot data with date time values. This class contains properties to customize grid lines, ticks and labels.
Inherited Members
Namespace: Syncfusion.SfChart.XForms
Assembly: Syncfusion.SfChart.XForms.dll
Syntax
public class DateTimeAxis : RangeAxisBase, IThemeElement
Examples
SfChart chart = new SfChart();
DateTimeAxis primary = new DateTimeAxis();
primary.Title = new ChartAxisTitle();
primary.Title.Text = "Sales Across Products";
primary.Minimum = new DateTime(2010, 1, 1);
priamry.Maximum = new DateTime(2015, 12, 30);
chart.PrimaryAxis = primary;
chart.SecondaryAxis = new NumericalAxis();
Constructors
DateTimeAxis()
Initializes a new instance of the DateTimeAxis class.
Declaration
public DateTimeAxis()
Fields
AutoScrollingDeltaTypeProperty
Gets or sets the date time unit of the value specified in the AutoScrollingDelta property. This is a bindable property.
Declaration
public static readonly BindableProperty AutoScrollingDeltaTypeProperty
Field Value
| Type |
|---|
| Xamarin.Forms.BindableProperty |
IntervalProperty
Gets or sets the interval value that represents the number of division required in the DateTimeAxis. This is a bindable property.
Declaration
public static readonly BindableProperty IntervalProperty
Field Value
| Type |
|---|
| Xamarin.Forms.BindableProperty |
IntervalTypeProperty
Gets or sets the date time unit of the value specified in the Interval property. This is a bindable property.
Declaration
public static readonly BindableProperty IntervalTypeProperty
Field Value
| Type |
|---|
| Xamarin.Forms.BindableProperty |
MaximumProperty
Gets or sets the maximum value of the time period to be displayed on chart axis. This is a bindable property.
Declaration
public static readonly BindableProperty MaximumProperty
Field Value
| Type |
|---|
| Xamarin.Forms.BindableProperty |
MinimumProperty
Gets or sets the minimum value of the time period to be displayed on chart axis. This is a bindable property.
Declaration
public static readonly BindableProperty MinimumProperty
Field Value
| Type |
|---|
| Xamarin.Forms.BindableProperty |
RangePaddingProperty
Gets or sets a padding type for the date time axis range. This is a bindable property.
Declaration
public static readonly BindableProperty RangePaddingProperty
Field Value
| Type |
|---|
| Xamarin.Forms.BindableProperty |
StripLinesProperty
Gets or sets the collection of strip lines to be added to the chart axis.
Declaration
public static readonly BindableProperty StripLinesProperty
Field Value
| Type |
|---|
| Xamarin.Forms.BindableProperty |
Properties
AutoScrollingDeltaType
Gets or sets the date time unit of the value specified in the AutoScrollingDelta property. This is a bindable property.
Declaration
public DateTimeDeltaType AutoScrollingDeltaType { get; set; }
Property Value
| Type | Description |
|---|---|
| DateTimeDeltaType | This property takes the DateTimeDeltaType. |
Interval
Gets or sets the interval value that represents the number of division required in the DateTimeAxis. This is a bindable property.
Declaration
public Nullable<double> Interval { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Nullable<System.Double> | This property takes the double value. |
Remarks
The DateTimeAxis time period will be divided into specified interval based on type of interval defined.
IntervalType
Gets or sets the date time unit of the value specified in the Interval property. This is a bindable property.
Declaration
public DateTimeIntervalType IntervalType { get; set; }
Property Value
| Type | Description |
|---|---|
| DateTimeIntervalType | This property takes DateTimeIntervalType as value. |
Maximum
Gets or sets the maximum value of the time period to be displayed on chart axis. This is a bindable property.
Declaration
public Nullable<DateTime> Maximum { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Nullable<System.DateTime> | This property takes System.DateTime as its value. |
Minimum
Gets or sets the minimum value of the time period to be displayed on chart axis. This is a bindable property.
Declaration
public Nullable<DateTime> Minimum { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Nullable<System.DateTime> | This property takes System.DateTime as its value. |
RangePadding
Gets or sets a padding type for the date time axis range. This is a bindable property.
Declaration
public DateTimeRangePadding RangePadding { get; set; }
Property Value
| Type | Description |
|---|---|
| DateTimeRangePadding | This property takes the DateTimeRangePadding as value. |
StripLines
Gets or sets the collection of strip lines to be added to the chart axis.
Declaration
public DateTimeStripLineCollection StripLines { get; set; }
Property Value
| Type | Description |
|---|---|
| DateTimeStripLineCollection | Strip Lines Collection. |
Methods
GetActualIntervalType()
Gets the DateTimeAxis interval type which is automatically calculated based on the data.
Declaration
public DateTimeIntervalType GetActualIntervalType()
Returns
| Type | Description |
|---|---|
| DateTimeIntervalType | The DateTimeIntervalType for axis. |
OnBindingContextChanged()
Override this method to execute an action when the BindingContext changes.
Declaration
protected override void OnBindingContextChanged()
Overrides
OnParentSet()
Declaration
protected override void OnParentSet()