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

Defines the fluent API for configuring ChartXAxisLabelsSettings

Definition

Namespace:Kendo.Mvc.UI.Fluent

Assembly:Kendo.Mvc.dll

Type Parameters:

T

Syntax:

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

Inheritance: objectChartXAxisLabelsSettingsBuilder<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 ChartXAxisLabelsSettingsBuilder<T> class.

C#
public ChartXAxisLabelsSettingsBuilder(ChartXAxisLabelsSettings<T> container)
Parameters:containerChartXAxisLabelsSettings<T>

The ChartXAxisLabelsSettings<T> container

Properties

Gets the ChartXAxisLabelsSettings<T> container.

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

Methods

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

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

The value for Background

Returns:

ChartXAxisLabelsSettingsBuilder<T>

Returns the current ChartXAxisLabelsSettingsBuilder<T> instance.

The border of the labels.

C#
public ChartXAxisLabelsSettingsBuilder<T> Border(Action<ChartXAxisLabelsBorderSettingsBuilder<T>> configurator)
Parameters:configuratorAction<ChartXAxisLabelsBorderSettingsBuilder<T>>

The ChartXAxisLabelsBorderSettingsBuilder<T> for the border setting.

Returns:

ChartXAxisLabelsSettingsBuilder<T>

Returns the current instance of ChartXAxisLabelsSettingsBuilder<T> .

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

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

The value for Color

Returns:

ChartXAxisLabelsSettingsBuilder<T>

Returns the current ChartXAxisLabelsSettingsBuilder<T> instance.

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

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

The value for Culture

Returns:

ChartXAxisLabelsSettingsBuilder<T>

Returns the current ChartXAxisLabelsSettingsBuilder<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 ChartXAxisLabelsSettingsBuilder<T> DateFormats(Action<ChartXAxisLabelsDateFormatsSettingsBuilder<T>> configurator)
Parameters:configuratorAction<ChartXAxisLabelsDateFormatsSettingsBuilder<T>>

The ChartXAxisLabelsDateFormatsSettingsBuilder<T> for the dateformats setting.

Returns:

ChartXAxisLabelsSettingsBuilder<T>

Returns the current instance of ChartXAxisLabelsSettingsBuilder<T> .

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

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

The value for Font

Returns:

ChartXAxisLabelsSettingsBuilder<T>

Returns the current ChartXAxisLabelsSettingsBuilder<T> instance.

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

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

The value for Format

Returns:

ChartXAxisLabelsSettingsBuilder<T>

Returns the current ChartXAxisLabelsSettingsBuilder<T> instance.

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

C#
public ChartXAxisLabelsSettingsBuilder<T> Margin(Action<ChartXAxisLabelsMarginSettingsBuilder<T>> configurator)
Parameters:configuratorAction<ChartXAxisLabelsMarginSettingsBuilder<T>>

The ChartXAxisLabelsMarginSettingsBuilder<T> for the margin setting.

Returns:

ChartXAxisLabelsSettingsBuilder<T>

Returns the current instance of ChartXAxisLabelsSettingsBuilder<T> .

Sets the margin of the axis labels.

C#
public ChartXAxisLabelsSettingsBuilder<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:

ChartXAxisLabelsSettingsBuilder<T>

Returns the current instance of ChartXAxisLabelsSettingsBuilder<T> .

Example:
C#
@(Html.Kendo().Chart()
.Name("chart")
.XAxis(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 ChartXAxisLabelsSettingsBuilder<T> Mirror(bool value)
Parameters:valuebool

The value for Mirror

Returns:

ChartXAxisLabelsSettingsBuilder<T>

Returns the current ChartXAxisLabelsSettingsBuilder<T> instance.

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

C#
public ChartXAxisLabelsSettingsBuilder<T> Padding(Action<ChartXAxisLabelsPaddingSettingsBuilder<T>> configurator)
Parameters:configuratorAction<ChartXAxisLabelsPaddingSettingsBuilder<T>>

The ChartXAxisLabelsPaddingSettingsBuilder<T> for the padding setting.

Returns:

ChartXAxisLabelsSettingsBuilder<T>

Returns the current instance of ChartXAxisLabelsSettingsBuilder<T> .

Sets the padding of the axis labels.

C#
public ChartXAxisLabelsSettingsBuilder<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:

ChartXAxisLabelsSettingsBuilder<T>

Returns the current instance of ChartXAxisLabelsSettingsBuilder<T> .

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

Specifies the position of the labels.

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

The value for Position

Returns:

ChartXAxisLabelsSettingsBuilder<T>

Returns the current ChartXAxisLabelsSettingsBuilder<T> instance.

The rotation angle of the labels. By default the labels are not rotated. Can be set to "auto" in which case the labels will be rotated only if the slot size is not sufficient for the entire labels.

C#
public ChartXAxisLabelsSettingsBuilder<T> Rotation(Action<ChartXAxisLabelsRotationSettingsBuilder<T>> configurator)
Parameters:configuratorAction<ChartXAxisLabelsRotationSettingsBuilder<T>>

The ChartXAxisLabelsRotationSettingsBuilder<T> for the rotation setting.

Returns:

ChartXAxisLabelsSettingsBuilder<T>

Returns the current instance of ChartXAxisLabelsSettingsBuilder<T> .

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

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

The value of the rotation angle.

Returns:

ChartXAxisLabelsSettingsBuilder<T>

Returns the current instance of ChartXAxisLabelsSettingsBuilder<T> .

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

The rotation angle of the labels. By default the labels are not rotated. Can be set to "auto" in which case the labels will be rotated only if the slot size is not sufficient for the entire labels.

C#
public ChartXAxisLabelsSettingsBuilder<T> Rotation(string rotation)
Parameters:rotationstring

The rotation.

Returns:

ChartXAxisLabelsSettingsBuilder<T>

Returns the current instance of ChartXAxisLabelsSettingsBuilder<T> .

The number of labels to skip.

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

The value for Skip

Returns:

ChartXAxisLabelsSettingsBuilder<T>

Returns the current ChartXAxisLabelsSettingsBuilder<T> instance.

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

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

The value for Step

Returns:

ChartXAxisLabelsSettingsBuilder<T>

Returns the current ChartXAxisLabelsSettingsBuilder<T> instance.

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

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

The value for Template

Returns:

ChartXAxisLabelsSettingsBuilder<T>

Returns the current ChartXAxisLabelsSettingsBuilder<T> instance.

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

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

A Template component that configures the template.

Returns:

ChartXAxisLabelsSettingsBuilder<T>

Returns the current ChartXAxisLabelsSettingsBuilder<T> instance.

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

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

The handler that returs the template for Template

Returns:

ChartXAxisLabelsSettingsBuilder<T>

Returns the current ChartXAxisLabelsSettingsBuilder<T> instance.

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

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

The ID of the template element for Template

Returns:

ChartXAxisLabelsSettingsBuilder<T>

Returns the current ChartXAxisLabelsSettingsBuilder<T> instance.

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

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

The view that contains the template for Template

Returns:

ChartXAxisLabelsSettingsBuilder<T>

Returns the current ChartXAxisLabelsSettingsBuilder<T> instance.

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

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

The value for Visible

Returns:

ChartXAxisLabelsSettingsBuilder<T>

Returns the current ChartXAxisLabelsSettingsBuilder<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 ChartXAxisLabelsSettingsBuilder<T> Visual(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

ChartXAxisLabelsSettingsBuilder<T>

Returns the current ChartXAxisLabelsSettingsBuilder<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 ChartXAxisLabelsSettingsBuilder<T> Visual(string handler)
Parameters:handlerstring

The name of the JavaScript function that will be evaluated.

Returns:

ChartXAxisLabelsSettingsBuilder<T>

Returns the current ChartXAxisLabelsSettingsBuilder<T> instance.