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

Defines the fluent API for configuring ChartCategoryAxisLabelsSettings

Definition

Namespace:Kendo.Mvc.UI.Fluent

Assembly:Kendo.Mvc.dll

Type Parameters:

T

Syntax:

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

Inheritance: objectChartCategoryAxisLabelsSettingsBuilder<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 ChartCategoryAxisLabelsSettingsBuilder<T> class.

C#
public ChartCategoryAxisLabelsSettingsBuilder(ChartCategoryAxisLabelsSettings<T> container)
Parameters:containerChartCategoryAxisLabelsSettings<T>

The ChartCategoryAxisLabelsSettings<T> container

Properties

Gets the ChartCategoryAxisLabelsSettings<T> container.

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

Methods

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

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

The value for Background

Returns:

ChartCategoryAxisLabelsSettingsBuilder<T>

Returns the current ChartCategoryAxisLabelsSettingsBuilder<T> instance.

The border of the labels.

C#
public ChartCategoryAxisLabelsSettingsBuilder<T> Border(Action<ChartCategoryAxisLabelsBorderSettingsBuilder<T>> configurator)
Parameters:configuratorAction<ChartCategoryAxisLabelsBorderSettingsBuilder<T>>

The ChartCategoryAxisLabelsBorderSettingsBuilder<T> for the border setting.

Returns:

ChartCategoryAxisLabelsSettingsBuilder<T>

Returns the current instance of ChartCategoryAxisLabelsSettingsBuilder<T> .

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

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

The value for Color

Returns:

ChartCategoryAxisLabelsSettingsBuilder<T>

Returns the current ChartCategoryAxisLabelsSettingsBuilder<T> instance.

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

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

The value for Culture

Returns:

ChartCategoryAxisLabelsSettingsBuilder<T>

Returns the current ChartCategoryAxisLabelsSettingsBuilder<T> instance.

The format used to display labels for date category axis. The {0} placeholder represents the category value.The chart will choose the appropriate format for the current categoryAxis.baseUnit. Setting the categoryAxis.labels.format option will override the date formats.See also: kendo.format.

C#
public ChartCategoryAxisLabelsSettingsBuilder<T> DateFormats(Action<ChartCategoryAxisLabelsDateFormatsSettingsBuilder<T>> configurator)
Parameters:configuratorAction<ChartCategoryAxisLabelsDateFormatsSettingsBuilder<T>>

The ChartCategoryAxisLabelsDateFormatsSettingsBuilder<T> for the dateformats setting.

Returns:

ChartCategoryAxisLabelsSettingsBuilder<T>

Returns the current instance of ChartCategoryAxisLabelsSettingsBuilder<T> .

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

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

The value for Font

Returns:

ChartCategoryAxisLabelsSettingsBuilder<T>

Returns the current ChartCategoryAxisLabelsSettingsBuilder<T> instance.

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

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

The value for Format

Returns:

ChartCategoryAxisLabelsSettingsBuilder<T>

Returns the current ChartCategoryAxisLabelsSettingsBuilder<T> instance.

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

C#
public ChartCategoryAxisLabelsSettingsBuilder<T> Margin(Action<ChartCategoryAxisLabelsMarginSettingsBuilder<T>> configurator)
Parameters:configuratorAction<ChartCategoryAxisLabelsMarginSettingsBuilder<T>>

The ChartCategoryAxisLabelsMarginSettingsBuilder<T> for the margin setting.

Returns:

ChartCategoryAxisLabelsSettingsBuilder<T>

Returns the current instance of ChartCategoryAxisLabelsSettingsBuilder<T> .

Sets the labels margin.

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

The labels top margin.

rightint

The labels right margin.

bottomint

The labels bottom margin.

leftint

The labels left margin.

Returns:

ChartCategoryAxisLabelsSettingsBuilder<T>

Example:
C#
@(Html.Kendo().Chart()
.Name("Chart")
.CategoryAxis(categoryAxis =&gt; categoryAxis.Labels(labels =&gt; labels.Margin(10, 5, 10, 5)))
)

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 ChartCategoryAxisLabelsSettingsBuilder<T> Mirror()
Returns:

ChartCategoryAxisLabelsSettingsBuilder<T>

Returns the current ChartCategoryAxisLabelsSettingsBuilder<T> instance.

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 ChartCategoryAxisLabelsSettingsBuilder<T> Mirror(bool value)
Parameters:valuebool

The value for Mirror

Returns:

ChartCategoryAxisLabelsSettingsBuilder<T>

Returns the current ChartCategoryAxisLabelsSettingsBuilder<T> instance.

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

C#
public ChartCategoryAxisLabelsSettingsBuilder<T> Padding(Action<ChartCategoryAxisLabelsPaddingSettingsBuilder<T>> configurator)
Parameters:configuratorAction<ChartCategoryAxisLabelsPaddingSettingsBuilder<T>>

The ChartCategoryAxisLabelsPaddingSettingsBuilder<T> for the padding setting.

Returns:

ChartCategoryAxisLabelsSettingsBuilder<T>

Returns the current instance of ChartCategoryAxisLabelsSettingsBuilder<T> .

Sets the labels padding.

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

The labels top padding.

rightint

The labels right padding.

bottomint

The labels bottom padding.

leftint

The labels left padding.

Returns:

ChartCategoryAxisLabelsSettingsBuilder<T>

Example:
C#
@(Html.Kendo().Chart()
.Name("Chart")
.CategoryAxis(categoryAxis =&gt; categoryAxis.Labels(labels =&gt; labels.Padding(10, 5, 10, 5)))
)

Specifies the position of the labels.

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

The value for Position

Returns:

ChartCategoryAxisLabelsSettingsBuilder<T>

Returns the current ChartCategoryAxisLabelsSettingsBuilder<T> instance.

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

C#
public ChartCategoryAxisLabelsSettingsBuilder<T> Rotation(Action<ChartCategoryAxisLabelsRotationSettingsBuilder<T>> configurator)
Parameters:configuratorAction<ChartCategoryAxisLabelsRotationSettingsBuilder<T>>

The ChartCategoryAxisLabelsRotationSettingsBuilder<T> for the rotation setting.

Returns:

ChartCategoryAxisLabelsSettingsBuilder<T>

Returns the current instance of ChartCategoryAxisLabelsSettingsBuilder<T> .

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

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

The value for Rotation

Returns:

ChartCategoryAxisLabelsSettingsBuilder<T>

Example:
C#
@(Html.Kendo().Chart()
.Name("Chart")
.CategoryAxis(categoryAxis =&gt; categoryAxis.Labels(labels =&gt; labels.Rotation(45)))
)

The rotation angle of the labels.

C#
public ChartCategoryAxisLabelsSettingsBuilder<T> Rotation(string value)
Parameters:valuestring

The value for Rotation

Returns:

ChartCategoryAxisLabelsSettingsBuilder<T>

Example:
C#
@(Html.Kendo().Chart()
.Name("Chart")
.CategoryAxis(categoryAxis =&gt; categoryAxis.Labels(labels =&gt; labels.Rotation("45")))
)

The number of labels to skip. By default no labels are skipped.

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

The value for Skip

Returns:

ChartCategoryAxisLabelsSettingsBuilder<T>

Returns the current ChartCategoryAxisLabelsSettingsBuilder<T> instance.

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

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

The value for Step

Returns:

ChartCategoryAxisLabelsSettingsBuilder<T>

Returns the current ChartCategoryAxisLabelsSettingsBuilder<T> instance.

The template which renders the labels.The fields which can be used in the template are: value - the category value; dataItem - the data item, in case a field has been specified. If the category does not have a corresponding item in the data then an empty object will be passed.; format - the default format of the label; culture - the default culture (if set) on the label; index - the 0-based index of the current label or count - the total number of labels on the axis.

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

The value for Template

Returns:

ChartCategoryAxisLabelsSettingsBuilder<T>

Returns the current ChartCategoryAxisLabelsSettingsBuilder<T> instance.

The template which renders the labels.The fields which can be used in the template are: value - the category value; dataItem - the data item, in case a field has been specified. If the category does not have a corresponding item in the data then an empty object will be passed.; format - the default format of the label; culture - the default culture (if set) on the label; index - the 0-based index of the current label or count - the total number of labels on the axis.

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

A Template component that configures the template.

Returns:

ChartCategoryAxisLabelsSettingsBuilder<T>

Returns the current ChartCategoryAxisLabelsSettingsBuilder<T> instance.

The template which renders the labels.The fields which can be used in the template are: value - the category value; dataItem - the data item, in case a field has been specified. If the category does not have a corresponding item in the data then an empty object will be passed.; format - the default format of the label; culture - the default culture (if set) on the label; index - the 0-based index of the current label or count - the total number of labels on the axis.

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

The handler that returs the template for Template

Returns:

ChartCategoryAxisLabelsSettingsBuilder<T>

Returns the current ChartCategoryAxisLabelsSettingsBuilder<T> instance.

The template which renders the labels.The fields which can be used in the template are: value - the category value; dataItem - the data item, in case a field has been specified. If the category does not have a corresponding item in the data then an empty object will be passed.; format - the default format of the label; culture - the default culture (if set) on the label; index - the 0-based index of the current label or count - the total number of labels on the axis.

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

The ID of the template element for Template

Returns:

ChartCategoryAxisLabelsSettingsBuilder<T>

Returns the current ChartCategoryAxisLabelsSettingsBuilder<T> instance.

The template which renders the labels.The fields which can be used in the template are: value - the category value; dataItem - the data item, in case a field has been specified. If the category does not have a corresponding item in the data then an empty object will be passed.; format - the default format of the label; culture - the default culture (if set) on the label; index - the 0-based index of the current label or count - the total number of labels on the axis.

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

The view that contains the template for Template

Returns:

ChartCategoryAxisLabelsSettingsBuilder<T>

Returns the current ChartCategoryAxisLabelsSettingsBuilder<T> instance.

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

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

The value for Visible

Returns:

ChartCategoryAxisLabelsSettingsBuilder<T>

Returns the current ChartCategoryAxisLabelsSettingsBuilder<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; dataItem - the data item, in case a field has been specified; 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 ChartCategoryAxisLabelsSettingsBuilder<T> Visual(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

ChartCategoryAxisLabelsSettingsBuilder<T>

Returns the current ChartCategoryAxisLabelsSettingsBuilder<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; dataItem - the data item, in case a field has been specified; 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 ChartCategoryAxisLabelsSettingsBuilder<T> Visual(string handler)
Parameters:handlerstring

The name of the JavaScript function that will be evaluated.

Returns:

ChartCategoryAxisLabelsSettingsBuilder<T>

Returns the current ChartCategoryAxisLabelsSettingsBuilder<T> instance.