New to Telerik UI for ASP.NET MVC? Download free 30-day trial

ChartAxisLabelsDateFormatsBuilder

Methods

Seconds(System.String)

Sets the date format when the base date unit is

Parameters

format - System.String

The date format.

Example


            @(Html.Kendo().Chart()
                      .Name("Chart")
                      .CategoryAxis(axis => axis
                          .Date()
                          .Labels(labels => labels
                              .DateFormats(formats => formats
                                  .Seconds("HH:mm:ss")
                              )
                          )
                       )
            )

Minutes(System.String)

Sets the date format when the base date unit is

Parameters

format - System.String

The date format.

Example


            @(Html.Kendo().Chart()
                      .Name("Chart")
                      .CategoryAxis(axis => axis
                          .Date()
                          .Labels(labels => labels
                              .DateFormats(formats => formats
                                  .Minutes("ss")
                              )
                          )
                       )
            )

Hours(System.String)

Sets the date format when the base date unit is

Parameters

format - System.String

The date format.

Example


            @(Html.Kendo().Chart()
                      .Name("Chart")
                      .CategoryAxis(axis => axis
                          .Date()
                          .Labels(labels => labels
                              .DateFormats(formats => formats
                                  .Hours("HH:mm")
                              )
                          )
                       )
            )

Days(System.String)

Sets the date format when the base date unit is

Parameters

format - System.String

The date format.

Example


            @(Html.Kendo().Chart()
                      .Name("Chart")
                      .CategoryAxis(axis => axis
                          .Date()
                          .Labels(labels => labels
                              .DateFormats(formats => formats
                                  .Days("dddd dd")
                              )
                          )
                       )
            )

Months(System.String)

Sets the date format when the base date unit is

Parameters

format - System.String

The date format.

Example


            @(Html.Kendo().Chart()
                      .Name("Chart")
                      .CategoryAxis(axis => axis
                          .Date()
                          .Labels(labels => labels
                              .DateFormats(formats => formats
                                  .Months("MMMM MM")
                              )
                          )
                       )
            )

Weeks(System.String)

Sets the date format when the base date unit is

Parameters

format - System.String

The date format.

Example


            @(Html.Kendo().Chart()
                      .Name("Chart")
                      .CategoryAxis(axis => axis
                          .Date()
                          .Labels(labels => labels
                              .DateFormats(formats => formats
                                  .Weeks("dddd")
                              )
                          )
                       )
            )

Years(System.String)

Sets the date format when the base date unit is

Parameters

format - System.String

The date format.

Example


            @(Html.Kendo().Chart()
                      .Name("Chart")
                      .CategoryAxis(axis => axis
                          .Date()
                          .Labels(labels => labels
                              .DateFormats(formats => formats
                                  .Years("yyyy")
                              )
                          )
                       )
            )

In this article
Not finding the help you need?