Category / Section
How to implement DateTime values in Chart?
1 min read
It is by setting ChartValueType as DateTime and setting interval type as days or months or years using ChartDateTimeIntervalType class.
C#
this.chartControl1.PrimaryXAxis.ValueType = ChartValueType.DateTime;
this.chartControl1.PrimaryXAxis.IntervalType = ChartDateTimeIntervalType.Months;
VB
Me.chartControl1.PrimaryXAxis.ValueType = ChartValueType.DateTime
Me.chartControl1.PrimaryXAxis.IntervalType = ChartDateTimeIntervalType.Months