Series.XValueType Property

.NET Framework (current version)

Gets or sets the value types plotted along the X-axis.

Namespace:   System.Web.UI.DataVisualization.Charting
Assembly:  System.Web.DataVisualization (in System.Web.DataVisualization.dll)

public ChartValueType XValueType { get; set; }

Property Value

Type: System.Web.UI.DataVisualization.Charting.ChartValueType

A ChartValueType enumeration value that determines the type of X-value data stored by the series. The default value is Auto.

The XValueType property determines the type of data stored by the series.

Set this property to DateTime to allow the X-value to be entered as a DateTime value, and not as a Double. Date and time values are internally stored by .NET Framework as Double values. The same holds true for the ToPosition and FromPosition properties of CustomLabel objects.

The IntervalType property found in axis label, tick mark, and grid classes determines the interval type.


To correctly apply a DateTime format to axis labels that are generated from data point X-values, using the Format property, this property must be set to DateTime.

This property can also be used to determine the data type to which the X-values are bound.

.NET Framework
Available since 4.0
Return to top