IsXValueIndexed Property

Series.IsXValueIndexed Property

.NET Framework (current version)

Gets or sets a flag that indicates whether data point indices will be used for the X-values.

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

public bool IsXValueIndexed { get; set; }

Property Value

Type: System.Boolean

true if the indices of data points that belong to the series will be used for X-values; false if they will not. The default value is false.

All data points in a series use sequential indices, and if this property is true then data points will be plotted sequentially, regardless of their associated X-values. This means that there will be no "missing" data points.

For example, assume there are three (3) data points in a series having X-values of 1, 2 and 4. If this property was false, there would be a data point missing at the X-axis location labeled "3". However, if you set this property to true, the three data points will be plotted at points 1, 2, and 4, sequentially, and there will be no missing data point. The X-axis location labeled "3" will not appear on the chart.

This is useful when you do not want to have missing data points for intervals that you know you will not have data for, such as weekends.


If you are displaying multiple series and at least one series uses indexed X-values, then all series must be aligned—that is, have the same number of data points—and the corresponding points must have the same X-values.

.NET Framework
Available since 4.0
Return to top
© 2016 Microsoft