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

Defines the fluent API for configuring ChartYAxis

Definition

Namespace:Kendo.Mvc.UI.Fluent

Assembly:Kendo.Mvc.dll

Type Parameters:

T

Syntax:

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

Inheritance: objectChartYAxisBuilder<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 ChartYAxisBuilder<T> class.

C#
public ChartYAxisBuilder(ChartYAxis<T> container)
Parameters:containerChartYAxis<T>

The ChartYAxis<T> container

Properties

Gets the ChartYAxis<T> container.

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

Methods

Value at which the Y axis crosses this axis. (Only for object)Value indices at which the Y axes cross the value axis. (Only for array)Date at which the Y axis crosses this axis. (Only for date)

C#
public ChartYAxisBuilder<T> AxisCrossingValue(params object[] value)
Parameters:valueobject[]

The value for AxisCrossingValue

Returns:

ChartYAxisBuilder<T>

Returns the current ChartYAxisBuilder<T> instance.

The background color of the axis.

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

The value for Background

Returns:

ChartYAxisBuilder<T>

Returns the current ChartYAxisBuilder<T> instance.

The base time interval for the axis labels. The default baseUnit is determined automatically from the value range. Available options: milliseconds; seconds; minutes; hours; days; weeks; months or years.

C#
public ChartYAxisBuilder<T> BaseUnit(string value)
Parameters:valuestring

The value for BaseUnit

Returns:

ChartYAxisBuilder<T>

Returns the current ChartYAxisBuilder<T> instance.

The category names. Applicable for charts with X and Y category axes (heatmap).

C#
public ChartYAxisBuilder<T> Categories(params object[] value)
Parameters:valueobject[]

The value for Categories

Returns:

ChartYAxisBuilder<T>

Returns the current ChartYAxisBuilder<T> instance.

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

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

The value for Color

Returns:

ChartYAxisBuilder<T>

Returns the current ChartYAxisBuilder<T> instance.

The crosshair configuration options.

C#
public ChartYAxisBuilder<T> Crosshair(Action<ChartYAxisCrosshairSettingsBuilder<T>> configurator)
Parameters:configuratorAction<ChartYAxisCrosshairSettingsBuilder<T>>

The ChartYAxisCrosshairSettingsBuilder<T> for the crosshair setting.

Returns:

ChartYAxisBuilder<T>

Returns the current instance of ChartYAxisBuilder<T> .

Sets the axis type to date for displaying chronological data.

C#
public ChartYAxisBuilder<T> Date()
Returns:

ChartYAxisBuilder<T>

Returns the current ChartYAxisBuilder<T> instance.

Example:
C#
@(Html.Kendo().Chart(Model)
.Name("chart")
.Series(series =&gt; {
series.ScatterLine(model =&gt; model.Date, model =&gt; model.Close);
})
.YAxis(axis =&gt; axis
.Date()
)
)

The axis labels configuration.

C#
public ChartYAxisBuilder<T> Labels(Action<ChartYAxisLabelsSettingsBuilder<T>> configurator)
Parameters:configuratorAction<ChartYAxisLabelsSettingsBuilder<T>>

The ChartYAxisLabelsSettingsBuilder<T> for the labels setting.

Returns:

ChartYAxisBuilder<T>

Returns the current instance of ChartYAxisBuilder<T> .

The configuration of the axis lines. Also affects the major and minor ticks, but not the grid lines.

C#
public ChartYAxisBuilder<T> Line(Action<ChartYAxisLineSettingsBuilder<T>> configurator)
Parameters:configuratorAction<ChartYAxisLineSettingsBuilder<T>>

The ChartYAxisLineSettingsBuilder<T> for the line setting.

Returns:

ChartYAxisBuilder<T>

Returns the current instance of ChartYAxisBuilder<T> .

Sets the axis type to logarithmic.

C#
public ChartYAxisBuilder<T> Logarithmic()
Returns:

ChartYAxisBuilder<T>

Returns the current ChartYAxisBuilder<T> instance.

Example:
C#
@(Html.Kendo().Chart()
.Name("chart")
.Series(series =&gt;
{
series.Scatter(new int[][] {
new[] { 5, 2 },
new[] { 7, 2 },
new[] { 11123, 2 }
});
})
.YAxis(axis =&gt; axis
.Logarithmic()
)
)

The configuration of the major grid lines. These are the lines that are an extension of the major ticks through the body of the chart.

C#
public ChartYAxisBuilder<T> MajorGridLines(Action<ChartYAxisMajorGridLinesSettingsBuilder<T>> configurator)
Parameters:configuratorAction<ChartYAxisMajorGridLinesSettingsBuilder<T>>

The ChartYAxisMajorGridLinesSettingsBuilder<T> for the majorgridlines setting.

Returns:

ChartYAxisBuilder<T>

Returns the current instance of ChartYAxisBuilder<T> .

The configuration of the scatter chart y axis major ticks.

C#
public ChartYAxisBuilder<T> MajorTicks(Action<ChartYAxisMajorTicksSettingsBuilder<T>> configurator)
Parameters:configuratorAction<ChartYAxisMajorTicksSettingsBuilder<T>>

The ChartYAxisMajorTicksSettingsBuilder<T> for the majorticks setting.

Returns:

ChartYAxisBuilder<T>

Returns the current instance of ChartYAxisBuilder<T> .

The interval between major divisions. If this is a date axis the value represents the number of xAxis.baseUnits between major divisions. If the yAxis.type is set to "log", the majorUnit value will be used for the base of the logarithm.

C#
public ChartYAxisBuilder<T> MajorUnit(double value)
Parameters:valuedouble

The value for MajorUnit

Returns:

ChartYAxisBuilder<T>

Returns the current ChartYAxisBuilder<T> instance.

The maximum value of the axis.

C#
public ChartYAxisBuilder<T> Max(object value)
Parameters:valueobject

The value for Max

Returns:

ChartYAxisBuilder<T>

Returns the current ChartYAxisBuilder<T> instance.

The minimum value of the axis.

C#
public ChartYAxisBuilder<T> Min(object value)
Parameters:valueobject

The value for Min

Returns:

ChartYAxisBuilder<T>

Returns the current ChartYAxisBuilder<T> instance.

The configuration of the minor grid lines. These are the lines that are an extension of the minor ticks through the body of the chart.

C#
public ChartYAxisBuilder<T> MinorGridLines(Action<ChartYAxisMinorGridLinesSettingsBuilder<T>> configurator)
Parameters:configuratorAction<ChartYAxisMinorGridLinesSettingsBuilder<T>>

The ChartYAxisMinorGridLinesSettingsBuilder<T> for the minorgridlines setting.

Returns:

ChartYAxisBuilder<T>

Returns the current instance of ChartYAxisBuilder<T> .

The configuration of the y axis minor ticks.

C#
public ChartYAxisBuilder<T> MinorTicks(Action<ChartYAxisMinorTicksSettingsBuilder<T>> configurator)
Parameters:configuratorAction<ChartYAxisMinorTicksSettingsBuilder<T>>

The ChartYAxisMinorTicksSettingsBuilder<T> for the minorticks setting.

Returns:

ChartYAxisBuilder<T>

Returns the current instance of ChartYAxisBuilder<T> .

The interval between minor divisions. It defaults to 1/5 of the yAxis.majorUnit. If the yAxis.type is set to "log", the minorUnit value represents the number of divisions between two major units and defaults to the major unit minus one.

C#
public ChartYAxisBuilder<T> MinorUnit(double value)
Parameters:valuedouble

The value for MinorUnit

Returns:

ChartYAxisBuilder<T>

Returns the current ChartYAxisBuilder<T> instance.

The unique axis name. Used to associate a series with a y axis using the series.yAxis option.

C#
public ChartYAxisBuilder<T> Name(string value)
Parameters:valuestring

The value for Name

Returns:

ChartYAxisBuilder<T>

Returns the current ChartYAxisBuilder<T> instance.

If set to true the chart will prevent the automatic axis range from snapping to 0. Setting it to false will force the automatic axis range to snap to 0.

C#
public ChartYAxisBuilder<T> NarrowRange()
Returns:

ChartYAxisBuilder<T>

Returns the current ChartYAxisBuilder<T> instance.

If set to true the chart will prevent the automatic axis range from snapping to 0. Setting it to false will force the automatic axis range to snap to 0.

C#
public ChartYAxisBuilder<T> NarrowRange(bool value)
Parameters:valuebool

The value for NarrowRange

Returns:

ChartYAxisBuilder<T>

Returns the current ChartYAxisBuilder<T> instance.

The y axis notes configuration.

C#
public ChartYAxisBuilder<T> Notes(Action<ChartYAxisNotesSettingsBuilder<T>> configurator)
Parameters:configuratorAction<ChartYAxisNotesSettingsBuilder<T>>

The ChartYAxisNotesSettingsBuilder<T> for the notes setting.

Returns:

ChartYAxisBuilder<T>

Returns the current instance of ChartYAxisBuilder<T> .

Sets the axis type to numeric.

C#
public ChartYAxisBuilder<T> Numeric()
Returns:

ChartYAxisBuilder<T>

Returns the current ChartYAxisBuilder<T> instance.

Example:
C#
@(Html.Kendo().Chart()
.Name("chart")
.Series(series =&gt;
{
series.Scatter(new double[][] {
new[] { 16.4, 5.4 },
new[] { 21.7, 2 },
new[] { 25.4, 3 }
});
})
.YAxis(axis =&gt; axis
.Numeric()
)
)

Sets the axis type to numeric.

C#
public ChartYAxisBuilder<T> Numeric(string name)
Parameters:namestring

The value that configures the axis name.

Returns:

ChartYAxisBuilder<T>

Returns the current ChartYAxisBuilder<T> instance.

Example:
C#
@(Html.Kendo().Chart()
.Name("chart")
.Series(series =&gt;
{
series.Scatter(new double[][] {
new[] { 16.4, 5.4 },
new[] { 21.7, 2 },
new[] { 25.4, 3 }
});
})
.YAxis(axis =&gt; axis
.Numeric("axis1")
)
)

The name of the pane that the axis should be rendered in. The axis will be rendered in the first (default) pane if not set.

C#
public ChartYAxisBuilder<T> Pane(string value)
Parameters:valuestring

The value for Pane

Returns:

ChartYAxisBuilder<T>

Returns the current ChartYAxisBuilder<T> instance.

The plot bands of the y axis.

C#
public ChartYAxisBuilder<T> PlotBands(Action<ChartYAxisPlotBandFactory<T>> configurator)
Parameters:configuratorAction<ChartYAxisPlotBandFactory<T>>

The ChartYAxisPlotBandFactory<T> for the plotbands setting.

Returns:

ChartYAxisBuilder<T>

Returns the current instance of ChartYAxisBuilder<T> .

Sets the axis type to polar.

C#
public ChartYAxisBuilder<T> Polar()
Returns:

ChartYAxisBuilder<T>

Returns the current ChartYAxisBuilder<T> instance.

Example:
C#
@(Html.Kendo().Chart(Model)
.Name("chart")
.Series(series =&gt;
{
series.PolarLine(model =&gt; model.Azimuth, model =&gt; model.Altitude);
})
.YAxis(axis =&gt; axis
.Polar()
)
)

If set to true the value axis direction will be reversed. By default values increase from left to right and from bottom to top.

C#
public ChartYAxisBuilder<T> Reverse()
Returns:

ChartYAxisBuilder<T>

Returns the current ChartYAxisBuilder<T> instance.

If set to true the value axis direction will be reversed. By default values increase from left to right and from bottom to top.

C#
public ChartYAxisBuilder<T> Reverse(bool value)
Parameters:valuebool

The value for Reverse

Returns:

ChartYAxisBuilder<T>

Returns the current ChartYAxisBuilder<T> instance.

The title configuration of the scatter chart y axis.

C#
public ChartYAxisBuilder<T> Title(Action<ChartYAxisTitleSettingsBuilder<T>> configurator)
Parameters:configuratorAction<ChartYAxisTitleSettingsBuilder<T>>

The ChartYAxisTitleSettingsBuilder<T> for the title setting.

Returns:

ChartYAxisBuilder<T>

Returns the current instance of ChartYAxisBuilder<T> .

Sets the title of the axis.

C#
public ChartYAxisBuilder<T> Title(string value)
Parameters:valuestring

The value that configures the title.

Returns:

ChartYAxisBuilder<T>

Returns the current ChartYAxisBuilder<T> instance.

Example:
C#
@(Html.Kendo().Chart()
.Name("chart")
.YAxis(axis =&gt; axis
.Numeric()
.Title(title =&gt; title.Text("Wind Speed [km/h]"))
)
)

The axis type.The supported values are: "numeric" - numeric axis.; "date" - specialized axis for displaying chronological data. or "log" - logarithmic axis..

C#
public ChartYAxisBuilder<T> Type(string value)
Parameters:valuestring

The value for Type

Returns:

ChartYAxisBuilder<T>

Returns the current ChartYAxisBuilder<T> instance.

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

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

The value for Visible

Returns:

ChartYAxisBuilder<T>

Returns the current ChartYAxisBuilder<T> instance.