New to Telerik UI for WinForms? Start a free 30-day trial
How Do I add Axis Labels Programmatically?
Updated over 6 months ago
To add labels along an Axis programmatically:
-
Set AutoScale to false.
-
Add a range of items to the axis.
-
Populate the Items.

C#
radChart1.PlotArea.XAxis.AutoScale = false;
radChart1.PlotArea.XAxis.AddRange(1, 7, 1);
radChart1.PlotArea.XAxis[0].TextBlock.Text = "Mon";
radChart1.PlotArea.XAxis[1].TextBlock.Text = "Tue";
radChart1.PlotArea.XAxis[2].TextBlock.Text = "Wed";
radChart1.PlotArea.XAxis[3].TextBlock.Text = "Thu";
radChart1.PlotArea.XAxis[4].TextBlock.Text = "Fri";
radChart1.PlotArea.XAxis[5].TextBlock.Text = "Sat";
radChart1.PlotArea.XAxis[6].TextBlock.Text = "Sun";