New to Telerik UI for ASP.NET Core? Start a free 30-day trial

Defines the fluent API for configuring ChartYAxisLabelsSettings

Definition

Namespace:Kendo.Mvc.UI.Fluent

Assembly:Kendo.Mvc.dll

Type Parameters:

T

Syntax:

C#
public class ChartYAxisLabelsSettingsBuilder<T> where T : class

Inheritance: objectChartYAxisLabelsSettingsBuilder<T>

Inherited Members object.GetType()object.MemberwiseClone()object.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()...

Constructors

Initializes a new instance of the ChartYAxisLabelsSettingsBuilder<T> class.

C#
public ChartYAxisLabelsSettingsBuilder(ChartYAxisLabelsSettings<T> container)
Parameters:containerChartYAxisLabelsSettings<T>

The ChartYAxisLabelsSettings<T> container

Properties

Gets the ChartYAxisLabelsSettings<T> container.

C#
protected ChartYAxisLabelsSettings<T> Container { get; }

Methods

The background color of the labels. Accepts a valid CSS color string, including hex and rgb.

C#
public ChartYAxisLabelsSettingsBuilder<T> Background(string value)
Parameters:valuestring

The value for Background

Returns:

ChartYAxisLabelsSettingsBuilder<T>

Returns the current ChartYAxisLabelsSettingsBuilder<T> instance.

The border of the labels.

C#
public ChartYAxisLabelsSettingsBuilder<T> Border(Action<ChartYAxisLabelsBorderSettingsBuilder<T>> configurator)
Parameters:configuratorAction<ChartYAxisLabelsBorderSettingsBuilder<T>>

The ChartYAxisLabelsBorderSettingsBuilder<T> for the border setting.

Returns:

ChartYAxisLabelsSettingsBuilder<T>

Returns the current instance of ChartYAxisLabelsSettingsBuilder<T> .

The text color of the labels. Accepts a valid CSS color string, including hex and rgb.

C#
public ChartYAxisLabelsSettingsBuilder<T> Color(string value)
Parameters:valuestring

The value for Color

Returns:

ChartYAxisLabelsSettingsBuilder<T>

Returns the current ChartYAxisLabelsSettingsBuilder<T> instance.

The culture to use when formatting date values. See the globalization overview for more information.

C#
public ChartYAxisLabelsSettingsBuilder<T> Culture(string value)
Parameters:valuestring

The value for Culture

Returns:

ChartYAxisLabelsSettingsBuilder<T>

Returns the current ChartYAxisLabelsSettingsBuilder<T> instance.

The format used to display the labels when the x values are dates. Uses kendo.format. Contains one placeholder ("{0}") which represents the category value.

C#
public ChartYAxisLabelsSettingsBuilder<T> DateFormats(Action<ChartYAxisLabelsDateFormatsSettingsBuilder<T>> configurator)
Parameters:configuratorAction<ChartYAxisLabelsDateFormatsSettingsBuilder<T>>

The ChartYAxisLabelsDateFormatsSettingsBuilder<T> for the dateformats setting.

Returns:

ChartYAxisLabelsSettingsBuilder<T>

Returns the current instance of ChartYAxisLabelsSettingsBuilder<T> .

The font style of the labels. Accepts a valid CSS color string, for example "20px 'Courier New'".

C#
public ChartYAxisLabelsSettingsBuilder<T> Font(string value)
Parameters:valuestring

The value for Font

Returns:

ChartYAxisLabelsSettingsBuilder<T>

Returns the current ChartYAxisLabelsSettingsBuilder<T> instance.

The format used to display the labels. Uses kendo.format. Contains one placeholder ("{0}") which represents the category value.

C#
public ChartYAxisLabelsSettingsBuilder<T> Format(string value)
Parameters:valuestring

The value for Format

Returns:

ChartYAxisLabelsSettingsBuilder<T>

Returns the current ChartYAxisLabelsSettingsBuilder<T> instance.

The margin of the labels. A numeric value will set all margins.

C#
public ChartYAxisLabelsSettingsBuilder<T> Margin(Action<ChartYAxisLabelsMarginSettingsBuilder<T>> configurator)
Parameters:configuratorAction<ChartYAxisLabelsMarginSettingsBuilder<T>>

The ChartYAxisLabelsMarginSettingsBuilder<T> for the margin setting.

Returns:

ChartYAxisLabelsSettingsBuilder<T>

Returns the current instance of ChartYAxisLabelsSettingsBuilder<T> .

Sets the margin of the axis labels.

C#
public ChartYAxisLabelsSettingsBuilder<T> Margin(int top, int right, int bottom, int left)
Parameters:topint

The top margin of the labels.

rightint

The right margin of the labels.

bottomint

The bottom margin of the labels.

leftint

The left margin of the labels.

Returns:

ChartYAxisLabelsSettingsBuilder<T>

Returns the current ChartYAxisLabelsSettingsBuilder<T> instance.

Example:
C#
@(Html.Kendo().Chart()
.Name("chart")
.YAxis(axis =&gt; axis
.Numeric()
.Labels(labels =&gt; labels.Margin(10,10,10,10))
)
)

If set to true the chart will mirror the axis labels and ticks. If the labels are normally on the left side of the axis, mirroring the axis will render them to the right.

C#
public ChartYAxisLabelsSettingsBuilder<T> Mirror(bool value)
Parameters:valuebool

The value for Mirror

Returns:

ChartYAxisLabelsSettingsBuilder<T>

Returns the current ChartYAxisLabelsSettingsBuilder<T> instance.

The padding of the labels. A numeric value will set all paddings.

C#
public ChartYAxisLabelsSettingsBuilder<T> Padding(Action<ChartYAxisLabelsPaddingSettingsBuilder<T>> configurator)
Parameters:configuratorAction<ChartYAxisLabelsPaddingSettingsBuilder<T>>

The ChartYAxisLabelsPaddingSettingsBuilder<T> for the padding setting.

Returns:

ChartYAxisLabelsSettingsBuilder<T>

Returns the current instance of ChartYAxisLabelsSettingsBuilder<T> .

Sets the padding of the axis labels.

C#
public ChartYAxisLabelsSettingsBuilder<T> Padding(int top, int right, int bottom, int left)
Parameters:topint

The top padding of the labels.

rightint

The right padding of the labels.

bottomint

The bottom padding of the labels.

leftint

The left padding of the labels.

Returns:

ChartYAxisLabelsSettingsBuilder<T>

Returns the current ChartYAxisLabelsSettingsBuilder<T> instance.

Example:
C#
@(Html.Kendo().Chart()
.Name("chart")
.YAxis(axis =&gt; axis
.Numeric()
.Labels(labels =&gt; labels.Padding(10,10,10,10))
)
)

Specifies the position of the labels.

C#
public ChartYAxisLabelsSettingsBuilder<T> Position(ChartAxisLabelsPosition value)
Parameters:valueChartAxisLabelsPosition

The value for Position

Returns:

ChartYAxisLabelsSettingsBuilder<T>

Returns the current ChartYAxisLabelsSettingsBuilder<T> instance.

The rotation angle of the labels. By default the labels are not rotated.

C#
public ChartYAxisLabelsSettingsBuilder<T> Rotation(Action<ChartYAxisLabelsRotationSettingsBuilder<T>> configurator)
Parameters:configuratorAction<ChartYAxisLabelsRotationSettingsBuilder<T>>

The ChartYAxisLabelsRotationSettingsBuilder<T> for the rotation setting.

Returns:

ChartYAxisLabelsSettingsBuilder<T>

Returns the current instance of ChartYAxisLabelsSettingsBuilder<T> .

Defines the rotation angle of the labels. By default, the labels are not rotated.

C#
public ChartYAxisLabelsSettingsBuilder<T> Rotation(double value)
Parameters:valuedouble

The value of the rotation angle.

Returns:

ChartYAxisLabelsSettingsBuilder<T>

Returns the current ChartYAxisLabelsSettingsBuilder<T> instance.

Example:
C#
@(Html.Kendo().Chart()
.Name("chart")
.YAxis(axis =&gt; axis
.Numeric()
.Labels(labels =&gt; labels.Rotation(90))
)
)

The number of labels to skip.

C#
public ChartYAxisLabelsSettingsBuilder<T> Skip(double value)
Parameters:valuedouble

The value for Skip

Returns:

ChartYAxisLabelsSettingsBuilder<T>

Returns the current ChartYAxisLabelsSettingsBuilder<T> instance.

The label rendering step - render every n-th label. By default every label is rendered.

C#
public ChartYAxisLabelsSettingsBuilder<T> Step(double value)
Parameters:valuedouble

The value for Step

Returns:

ChartYAxisLabelsSettingsBuilder<T>

Returns the current ChartYAxisLabelsSettingsBuilder<T> instance.

The template which renders the labels.The fields which can be used in the template are: value - the category value.

C#
public ChartYAxisLabelsSettingsBuilder<T> Template(string value)
Parameters:valuestring

The value for Template

Returns:

ChartYAxisLabelsSettingsBuilder<T>

Returns the current ChartYAxisLabelsSettingsBuilder<T> instance.

The template which renders the labels.The fields which can be used in the template are: value - the category value.

C#
public ChartYAxisLabelsSettingsBuilder<T> Template<TModel>(TemplateBuilder<TModel> template)
Parameters:templateTemplateBuilder<TModel>

A Template component that configures the template.

Returns:

ChartYAxisLabelsSettingsBuilder<T>

Returns the current ChartYAxisLabelsSettingsBuilder<T> instance.

The template which renders the labels.The fields which can be used in the template are: value - the category value.

C#
public ChartYAxisLabelsSettingsBuilder<T> TemplateHandler(string templateHandler)
Parameters:templateHandlerstring

The handler that returs the template for Template

Returns:

ChartYAxisLabelsSettingsBuilder<T>

Returns the current ChartYAxisLabelsSettingsBuilder<T> instance.

The template which renders the labels.The fields which can be used in the template are: value - the category value.

C#
public ChartYAxisLabelsSettingsBuilder<T> TemplateId(string templateId)
Parameters:templateIdstring

The ID of the template element for Template

Returns:

ChartYAxisLabelsSettingsBuilder<T>

Returns the current ChartYAxisLabelsSettingsBuilder<T> instance.

The template which renders the labels.The fields which can be used in the template are: value - the category value.

C#
public ChartYAxisLabelsSettingsBuilder<T> TemplateView(IHtmlContent templateView)
Parameters:templateViewIHtmlContent

The view that contains the template for Template

Returns:

ChartYAxisLabelsSettingsBuilder<T>

Returns the current ChartYAxisLabelsSettingsBuilder<T> instance.

If set to true the chart will display the y axis labels. By default the y axis labels are visible.

C#
public ChartYAxisLabelsSettingsBuilder<T> Visible(bool value)
Parameters:valuebool

The value for Visible

Returns:

ChartYAxisLabelsSettingsBuilder<T>

Returns the current ChartYAxisLabelsSettingsBuilder<T> instance.

A function that can be used to create a custom visual for the labels. The available argument fields are: createVisual - a function that can be used to get the default visual.; culture - the default culture (if set) on the label; format - the default format of the label; options - the label options.; rect - the kendo.geometry.Rect that defines where the visual should be rendered.; sender - the chart instance (may be undefined).; text - the label text. or value - the category value.

C#
public ChartYAxisLabelsSettingsBuilder<T> Visual(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

ChartYAxisLabelsSettingsBuilder<T>

Returns the current ChartYAxisLabelsSettingsBuilder<T> instance.

A function that can be used to create a custom visual for the labels. The available argument fields are: createVisual - a function that can be used to get the default visual.; culture - the default culture (if set) on the label; format - the default format of the label; options - the label options.; rect - the kendo.geometry.Rect that defines where the visual should be rendered.; sender - the chart instance (may be undefined).; text - the label text. or value - the category value.

C#
public ChartYAxisLabelsSettingsBuilder<T> Visual(string handler)
Parameters:handlerstring

The name of the JavaScript function that will be evaluated.

Returns:

ChartYAxisLabelsSettingsBuilder<T>

Returns the current ChartYAxisLabelsSettingsBuilder<T> instance.