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

ChartLegendLabelsBuilder

Methods

Font(System.String)

Sets the labels font

Parameters

font - System.String

The labels font (CSS format).

Example


            @(Html.Kendo().Chart()
                      .Name("Chart")
                      .Legend(legend => legend
                            .Labels(labels => labels
                                .Font("14px Arial,Helvetica,sans-serif")
                            )
                      )
            )

Color(System.String)

Sets the labels text color

Parameters

color - System.String

The labels text color.

Example


            @(Html.Kendo().Chart()
                      .Name("Chart")
                      .Legend(legend => legend
                            .Labels(labels => labels
                                .Color("Red")
                            )
                      )    
            )

Template(System.String)

Sets the labels template.

Parameters

template - System.String

The labels template.

Example


            @(Html.Kendo().Chart()
                      .Name("Chart")
                      .Legend(legend => legend
                            .Labels(labels => labels
                                .Template("#:series.name#")
                            )
                      )          
            )

Padding(System.Int32,System.Int32,System.Int32,System.Int32)

Sets the labels padding

Parameters

top - System.Int32

The labels top padding.

right - System.Int32

The labels right padding.

bottom - System.Int32

The labels bottom padding.

left - System.Int32

The labels left padding.

Example


            @(Html.Kendo().Chart()
                      .Name("Chart")
                      .Legend(legend => legend
                            .Labels(labels => labels
                                .Padding(10, 15, 15, 10)
                            )
                      )          
            )

Padding(System.Int32)

Sets the labels padding

Parameters

padding - System.Int32

The labels padding.

Example


            @(Html.Kendo().Chart()
                      .Name("Chart")
                      .Legend(legend => legend
                            .Labels(labels => labels
                                .Padding(10)
                            )
                      )          
            )

In this article
Not finding the help you need?