Enhance the Chart date axis label format, so that it's culture-aware in globalization scenarios, and there is no need to set ChartCategoryAxisLabels Format explicitly.
In the meantime, here are a few workarounds for the case when the ChartCategoryAxis BaseUnit is Days and the Chart shows MM/dd labels even to non-US users.
<ChartCategoryAxis BaseUnit="ChartCategoryAxisBaseUnit.Days"
Type="ChartCategoryAxisType.Date">
<ChartCategoryAxisLabels Format="d" />
</ChartCategoryAxis>
<ChartCategoryAxis BaseUnit="ChartCategoryAxisBaseUnit.Days"
Type="ChartCategoryAxisType.Date">
<ChartCategoryAxisLabels Format="@( CultureInfo.CurrentUICulture.DateTimeFormat.MonthDayPattern )" />
</ChartCategoryAxis>
Razor
<ChartCategoryAxis BaseUnit="ChartCategoryAxisBaseUnit.Days"
Type="ChartCategoryAxisType.Date">
<ChartCategoryAxisLabels Format="@( GetShortDayMonthPattern() )" />
</ChartCategoryAxis>
C#
private string GetShortDayMonthPattern()
{
var mdp = CultureInfo.CurrentUICulture.DateTimeFormat.MonthDayPattern;
var separator = CultureInfo.CurrentUICulture.DateTimeFormat.DateSeparator;
string pattern = mdp.IndexOf("M") < mdp.IndexOf("d") ? $"MM{separator}dd" : $"dd{separator}MM";
return pattern;
}
Regards, Author nickname Progress Telerik