Date Format Strings are supported by the
ASP.NET AJAX control for the Axis Labels, Series Labels and Series ToolTips:
-
Series Labels and Series Tooltips could be configured with
ClientTemplate property by using the kendo.format
function like this:
<
LabelsAppearance
>
<
ClientTemplate
>
#= value # units ordered on #= kendo.format(\'{0:d}\', category) #
</
ClientTemplate
>
</
LabelsAppearance
>
-
Axis Labels - only the desired date pattern must be set in the DateFormatString property (placeholders are not acceptable):
List of Standard Date Format Patterns with descriptions:
-
d - short date pattern
-
D - long date pattern
-
F - full date/time pattern
-
g - general date/time pattern (short time)
-
G - general date/time pattern (long time)
-
m|M - month/day pattern
-
u - universal sortable date/time pattern
-
y|Y - month/year pattern
The BaseUnit property of X axis can be configured with one of the following elements from
the DateTimeBaseUnit enumeration and this will aggregate the displayed data accordingly:
-
Auto
-
Seconds
-
Minutes
-
Hours
-
Days
-
Weeks
-
Months
-
Years
The most suitable BaseUnit is dependent on the chart data and the proper options in this demo
are Years, Months and Days.
MinDateValue and MaxDateValue properties of X axis are available since
Q1 2014 and they control the start and the end points of the date range that is displayed.