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

Defines the fluent API for configuring ChartValueAxisLabelsSettings

Definition

Namespace:Kendo.Mvc.UI.Fluent

Assembly:Kendo.Mvc.dll

Type Parameters:

T

Syntax:

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

Inheritance: objectChartValueAxisLabelsSettingsBuilder<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 ChartValueAxisLabelsSettingsBuilder<T> class.

C#
public ChartValueAxisLabelsSettingsBuilder(ChartValueAxisLabelsSettings<T> container)
Parameters:containerChartValueAxisLabelsSettings<T>

The ChartValueAxisLabelsSettings<T> container

Properties

Gets the ChartValueAxisLabelsSettings<T> container.

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

Methods

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

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

The value for Background

Returns:

ChartValueAxisLabelsSettingsBuilder<T>

Returns the current ChartValueAxisLabelsSettingsBuilder<T> instance.

The border of the labels.

C#
public ChartValueAxisLabelsSettingsBuilder<T> Border(Action<ChartValueAxisLabelsBorderSettingsBuilder<T>> configurator)
Parameters:configuratorAction<ChartValueAxisLabelsBorderSettingsBuilder<T>>

The ChartValueAxisLabelsBorderSettingsBuilder<T> for the border setting.

Returns:

ChartValueAxisLabelsSettingsBuilder<T>

Returns the current instance of ChartValueAxisLabelsSettingsBuilder<T> .

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

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

The value for Color

Returns:

ChartValueAxisLabelsSettingsBuilder<T>

Returns the current ChartValueAxisLabelsSettingsBuilder<T> instance.

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

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

The value for Font

Returns:

ChartValueAxisLabelsSettingsBuilder<T>

Returns the current ChartValueAxisLabelsSettingsBuilder<T> instance.

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

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

The value for Format

Returns:

ChartValueAxisLabelsSettingsBuilder<T>

Returns the current ChartValueAxisLabelsSettingsBuilder<T> instance.

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

C#
public ChartValueAxisLabelsSettingsBuilder<T> Margin(Action<ChartValueAxisLabelsMarginSettingsBuilder<T>> configurator)
Parameters:configuratorAction<ChartValueAxisLabelsMarginSettingsBuilder<T>>

The ChartValueAxisLabelsMarginSettingsBuilder<T> for the margin setting.

Returns:

ChartValueAxisLabelsSettingsBuilder<T>

Returns the current instance of ChartValueAxisLabelsSettingsBuilder<T> .

Sets the labels margin.

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

The value for the top margin.

rightint

The value for the right margin.

bottomint

The value for the bottom margin.

leftint

The value for the left margin.

Returns:

ChartValueAxisLabelsSettingsBuilder<T>

Example:
C#
@(Html.Kendo().Chart(Model)
.Name("Chart")
.Series(series =&gt; series
.Area(s =&gt; s.Sales)
)
.ValueAxis(valueAxis =&gt; valueAxis
.Labels(labels =&gt; labels
.Margin(margin =&gt; margin
.Top(10)
.Right(10)
.Bottom(10)
.Left(20)
)
)
)
)

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

The value for Mirror

Returns:

ChartValueAxisLabelsSettingsBuilder<T>

Returns the current ChartValueAxisLabelsSettingsBuilder<T> instance.

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

C#
public ChartValueAxisLabelsSettingsBuilder<T> Padding(Action<ChartValueAxisLabelsPaddingSettingsBuilder<T>> configurator)
Parameters:configuratorAction<ChartValueAxisLabelsPaddingSettingsBuilder<T>>

The ChartValueAxisLabelsPaddingSettingsBuilder<T> for the padding setting.

Returns:

ChartValueAxisLabelsSettingsBuilder<T>

Returns the current instance of ChartValueAxisLabelsSettingsBuilder<T> .

Sets the labels padding.

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

The value for the top padding.

rightint

The value for the right padding.

bottomint

The value for the bottom padding.

leftint

The value for the left padding.

Returns:

ChartValueAxisLabelsSettingsBuilder<T>

Example:
C#
@(Html.Kendo().Chart(Model)
.Name("Chart")
.Series(series =&gt; series
.Area(s =&gt; s.Sales)
)
.ValueAxis(valueAxis =&gt; valueAxis
.Labels(labels =&gt; labels
.Padding(padding =&gt; padding
.Top(10)
.Right(10)
.Bottom(10)
.Left(20)
)
)
)
)

Specifies the position of the labels.

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

The value for Position

Returns:

ChartValueAxisLabelsSettingsBuilder<T>

Returns the current ChartValueAxisLabelsSettingsBuilder<T> instance.

The rotation angle (in degrees) of the labels. By default the labels are not rotated. Angles increase clockwise and zero is to the left. Negative values are acceptable. 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 ChartValueAxisLabelsSettingsBuilder<T> Rotation(Action<ChartValueAxisLabelsRotationSettingsBuilder<T>> configurator)
Parameters:configuratorAction<ChartValueAxisLabelsRotationSettingsBuilder<T>>

The ChartValueAxisLabelsRotationSettingsBuilder<T> for the rotation setting.

Returns:

ChartValueAxisLabelsSettingsBuilder<T>

Returns the current instance of ChartValueAxisLabelsSettingsBuilder<T> .

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

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

The value for Rotation

Returns:

ChartValueAxisLabelsSettingsBuilder<T>

Example:
C#
@(Html.Kendo().Chart(Model)
.Name("Chart")
.Series(series =&gt; series
.Area(s =&gt; s.Sales)
)
.ValueAxis(valueAxis =&gt; valueAxis
.Labels(labels =&gt; labels
.Rotation(90)
)
)
)

The rotation angle (in degrees) of the labels. By default the labels are not rotated. Angles increase clockwise and zero is to the left. Negative values are acceptable. 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 ChartValueAxisLabelsSettingsBuilder<T> Rotation(string rotation)
Parameters:rotationstring

The rotation.

Returns:

ChartValueAxisLabelsSettingsBuilder<T>

Returns the current instance of ChartValueAxisLabelsSettingsBuilder<T> .

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

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

The value for Skip

Returns:

ChartValueAxisLabelsSettingsBuilder<T>

Returns the current ChartValueAxisLabelsSettingsBuilder<T> instance.

Label rendering step. Every n-th label is rendered where n is the step

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

The value for Step

Returns:

ChartValueAxisLabelsSettingsBuilder<T>

Returns the current ChartValueAxisLabelsSettingsBuilder<T> instance.

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

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

The value for Template

Returns:

ChartValueAxisLabelsSettingsBuilder<T>

Returns the current ChartValueAxisLabelsSettingsBuilder<T> instance.

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

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

A Template component that configures the template.

Returns:

ChartValueAxisLabelsSettingsBuilder<T>

Returns the current ChartValueAxisLabelsSettingsBuilder<T> instance.

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

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

The handler that returs the template for Template

Returns:

ChartValueAxisLabelsSettingsBuilder<T>

Returns the current ChartValueAxisLabelsSettingsBuilder<T> instance.

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

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

The ID of the template element for Template

Returns:

ChartValueAxisLabelsSettingsBuilder<T>

Returns the current ChartValueAxisLabelsSettingsBuilder<T> instance.

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

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

The view that contains the template for Template

Returns:

ChartValueAxisLabelsSettingsBuilder<T>

Returns the current ChartValueAxisLabelsSettingsBuilder<T> instance.

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

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

The value for Visible

Returns:

ChartValueAxisLabelsSettingsBuilder<T>

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

The handler code wrapped in a text tag.

Returns:

ChartValueAxisLabelsSettingsBuilder<T>

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

The name of the JavaScript function that will be evaluated.

Returns:

ChartValueAxisLabelsSettingsBuilder<T>

Returns the current ChartValueAxisLabelsSettingsBuilder<T> instance.