1. Is it possible to use autorange for a datetime x axis that will display one label for each month
If you want to be able to show values per day - no, the above is not possible, because it would need an unevenly distributed axis scale.
I appologize if I did not understand you correctly.
2. Setting the ticks and step labels doesn't seem like a fix.
May be this approach simply doesn't fit your scenario. If you show less than 15 months may be this would work for you - specify a start date for the axis (say the 15th day). With a step of 30 the next tick should get the 14th day of the next month, the next tick should get the 13th day of the month after that and so forth.
Another possible work-around would be to have a step of 1. This way you will have many labels. Then you will need to iterate through these labels and change their visibility - Visible if the label represents the 1st day of the month and Collapsed otherwise. This is a hacky way to do things and you should consider this as the least preferred way to accomplish your goals.
The above can be achieve with the code below:
3. XCategory has the potential to have months out of order when using multiple series mappings.
chartArea.AxisX.RangeChanged += AxisX_RangeChanged;
sender, EventArgs e)
chartArea.LayoutUpdated += chartArea_LayoutUpdated;
sender, EventArgs e)
var axisPanel = Telerik.Windows.Controls.ChildrenOfTypeExtensions.ChildrenOfType<Telerik.Windows.Controls.Charting.HorizontalAxisLabelsPanel>(chartArea).FirstOrDefault();
var textBoxes = Telerik.Windows.Controls.ChildrenOfTypeExtensions.ChildrenOfType<TextBlock>(chartArea);
// if 1st of the month - Visibility.Visible, if not - collapsed
textBox.Visibility = System.Windows.Visibility.Collapsed;
Yes, and this can easily be corrected by including all possible categories in the first series, with null values for the categories that do not belong in this first series.
Feel free to contact us again if needed.
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>