Creating a Custom Axis Label to Set the Mark at the Middle of the Year
Use custom axis labels to set the mark at the middle of year like in the following code:
chart.View.AxisX.ItemsSource = New DateTime() {New DateTime(2006, 1, 1).AddDays(0.5 * 365), New DateTime(2007, 1, 1).AddDays(0.5 * 365)}
•C#
chart.View.AxisX.ItemsSource = new DateTime[]
{
new DateTime(2006,1,1).AddDays(0.5*365),
new DateTime(2007,1,1).AddDays(0.5*365),
//...
};