ChartCategoryAxisBuilder
Methods
Date()
Sets the category axis type to date for displaying chronological data.
RETURNS
Returns the current instance of ChartCategoryAxisBuilder .
Example
@(Html.Kendo().Chart(Model)
.Name("chart")
.CategoryAxis(axis => axis
.Date()
.BaseUnit(ChartAxisBaseUnit.Weeks)
)
)
Categories(System.Linq.Expressions.Expression)
Defines the bound categories.
Parameters
expression - System.Linq.Expressions.Expression<Func>
The expression used to extract the categories value from the chart model.
RETURNS
Returns the current instance of ChartCategoryAxisBuilder .
Example
@(Html.Kendo().Chart<ChartViewModel>()
.Name("chart")
.CategoryAxis(axis => axis
.Categories(x => x.VisitorsData)
)
)
Categories(System.String[])
Sets the axis categories.
Parameters
categories - System.String[]
The array that holds the category values.
RETURNS
Returns the current instance of ChartCategoryAxisBuilder .
Example
@(Html.Kendo().Chart()
.Name("chart")
.CategoryAxis(axis => axis
.Categories("Jan", "Feb", "Mar", "Apr", "May", "Jun")
)
)
Categories(System.DateTime[])
Sets the axis categories.
Parameters
value - System.DateTime[]
The array that holds the category values.
RETURNS
Returns the current instance of ChartCategoryAxisBuilder .
Example
@(Html.Kendo().Chart()
.Name("chart")
.CategoryAxis(axis => axis
.Categories(DateTime.Now, DateTime.Now.AddDays(1), DateTime.Now.AddDays(2))
)
)
Select(System.Object,System.Object)
Sets the selected axis range. The range is index based, starting from 0. Categories with indexes in the range will be selected. The last category in the range will not be included in the selection. If the categories are dates, the range must be specified with DateTime values.
Parameters
from - System.Object
The selection range start.
to - System.Object
The selection range end.
RETURNS
Returns the current instance of ChartCategoryAxisBuilder .
Example
@(Html.Kendo().Chart()
.Name("chart")
.CategoryAxis(axis => axis.Select(0, 3))
)
Title(System.String)
Sets the title of the category axis.
Parameters
value - System.String
The value that configures the title.
RETURNS
Returns the current instance of ChartCategoryAxisBuilder .
Example
@(Html.Kendo().Chart()
.Name("chart")
.CategoryAxis(axis => axis.Title("Years"))
)
AutoBaseUnitSteps(System.Action)
The discrete categoryAxis.baseUnitStep values when either categoryAxis.baseUnit is set to "fit" orcategoryAxis.baseUnitStep is set to "auto".The axis will try to divide the active period into successively larger intervals. It will start from x-second intervals, where x is picked from the autoBaseUnitSteps.seconds array. Then it will move to minutes, seconds and so on. This will continue until the number of intervals is less thanmaxDateGroups.
Parameters
configurator - System.Action<ChartCategoryAxisAutoBaseUnitStepsSettingsBuilder>
The configurator for the autobaseunitsteps setting.
RETURNS
Returns the current instance of ChartCategoryAxisBuilder .
AxisCrossingValue(System.Object[])
Category index at which the first value axis crosses this axis (when set as an object).Category indices at which the value axes cross the category axis (when set as an array).
Parameters
value - System.Object[]
The value for AxisCrossingValue
RETURNS
Returns the current ChartCategoryAxisBuilder instance.
Background(System.String)
The background color of the axis.
Parameters
value - System.String
The value for Background
RETURNS
Returns the current ChartCategoryAxisBuilder instance.
BaseUnitStep(System.Int32)
The step (interval) between categories in base units. Setting it to "auto" will set the step to such value that the total number of categories does not exceed categoryAxis.maxDateGroups.This option is ignored if categoryAxis.baseUnit is set to "fit".
Parameters
value - System.Int32
The value for BaseUnitStep
RETURNS
Returns the current ChartCategoryAxisBuilder instance.
Color(System.String)
The color to apply to all axis elements. Accepts a valid CSS color string, including hex and rgb. Can be overridden by categoryAxis.labels.color andcategoryAxis.line.color.
Parameters
value - System.String
The value for Color
RETURNS
Returns the current ChartCategoryAxisBuilder instance.
Crosshair(System.Action)
The crosshair configuration options.
Parameters
configurator - System.Action<ChartCategoryAxisCrosshairSettingsBuilder>
The configurator for the crosshair setting.
RETURNS
Returns the current instance of ChartCategoryAxisBuilder .
Field(System.String)
The data item field which contains the category name. Requires the dataSource option to be set. The field name should be a valid Javascript identifier and should contain only alphanumeric characters (or "$" or "_"), and may not start with a digit.
Parameters
value - System.String
The value for Field
RETURNS
Returns the current ChartCategoryAxisBuilder instance.
Justify(System.Boolean)
If set to true the chart will position categories and series points on major ticks. This removes the empty space before and after the series.The default value is false except for "area", "verticalArea", "rangeArea" and "verticalRangeArea".
Parameters
value - System.Boolean
The value for Justify
RETURNS
Returns the current ChartCategoryAxisBuilder instance.
Justify()
If set to true the chart will position categories and series points on major ticks. This removes the empty space before and after the series.The default value is false except for "area", "verticalArea", "rangeArea" and "verticalRangeArea".
RETURNS
Returns the current ChartCategoryAxisBuilder instance.
Labels(System.Action)
The axis labels configuration.
Parameters
configurator - System.Action<ChartCategoryAxisLabelsSettingsBuilder>
The configurator for the labels setting.
RETURNS
Returns the current instance of ChartCategoryAxisBuilder .
Line(System.Action)
The configuration of the axis lines. Also affects the major and minor ticks, but not the grid lines.
Parameters
configurator - System.Action<ChartCategoryAxisLineSettingsBuilder>
The configurator for the line setting.
RETURNS
Returns the current instance of ChartCategoryAxisBuilder .
MajorGridLines(System.Action)
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.
Parameters
configurator - System.Action<ChartCategoryAxisMajorGridLinesSettingsBuilder>
The configurator for the majorgridlines setting.
RETURNS
Returns the current instance of ChartCategoryAxisBuilder .
MajorTicks(System.Action)
The configuration of the category axis major ticks.
Parameters
configurator - System.Action<ChartCategoryAxisMajorTicksSettingsBuilder>
The configurator for the majorticks setting.
RETURNS
Returns the current instance of ChartCategoryAxisBuilder .
Max(System.Object)
The last date displayed on the category date axis. By default, the minimum date is the same as the last category. This is often used in combination with the categoryAxis.min and categoryAxis.roundToBaseUnit options to set up a fixed date range.
Parameters
value - System.Object
The value for Max
RETURNS
Returns the current ChartCategoryAxisBuilder instance.
MaxDateGroups(System.Double)
The maximum number of groups (categories) to display whencategoryAxis.baseUnit is set to "fit" orcategoryAxis.baseUnitStep is set to "auto".
Parameters
value - System.Double
The value for MaxDateGroups
RETURNS
Returns the current ChartCategoryAxisBuilder instance.
MaxDivisions(System.Double)
The maximum number of ticks, labels and grid lines to display. Applicable for date category axis. You can combine this property with a bigger value of the maxDateGroups property to increase the number of rendered data points in the Chart without drawing too many labels, ticks, and grid lines.
Parameters
value - System.Double
The value for MaxDivisions
RETURNS
Returns the current ChartCategoryAxisBuilder instance.
Min(System.Object)
The first date displayed on the category date axis. By default, the minimum date is the same as the first category. This is often used in combination with the categoryAxis.min and categoryAxis.roundToBaseUnit options to set up a fixed date range.
Parameters
value - System.Object
The value for Min
RETURNS
Returns the current ChartCategoryAxisBuilder instance.
MinorGridLines(System.Action)
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.
Parameters
configurator - System.Action<ChartCategoryAxisMinorGridLinesSettingsBuilder>
The configurator for the minorgridlines setting.
RETURNS
Returns the current instance of ChartCategoryAxisBuilder .
MinorTicks(System.Action)
The configuration of the category axis minor ticks.
Parameters
configurator - System.Action<ChartCategoryAxisMinorTicksSettingsBuilder>
The configurator for the minorticks setting.
RETURNS
Returns the current instance of ChartCategoryAxisBuilder .
Name(System.String)
The unique axis name. Used to associate a series with a category axis using the series.categoryAxis option.
Parameters
value - System.String
The value for Name
RETURNS
Returns the current ChartCategoryAxisBuilder instance.
Pane(System.String)
The name of the pane that the category axis should be rendered in. The axis will be rendered in the first (default) pane if not set.
Parameters
value - System.String
The value for Pane
RETURNS
Returns the current ChartCategoryAxisBuilder instance.
PlotBands(System.Action)
The plot bands of the category axis.
Parameters
configurator - System.Action<ChartCategoryAxisPlotBandFactory>
The configurator for the plotbands setting.
RETURNS
Returns the current instance of ChartCategoryAxisBuilder .
RangeLabels(System.Action)
The configuration of the date axis date range labels.
Parameters
configurator - System.Action<ChartCategoryAxisRangeLabelsSettingsBuilder>
The configurator for the rangelabels setting.
RETURNS
Returns the current instance of ChartCategoryAxisBuilder .
Reverse(System.Boolean)
If set to true the category axis direction will be reversed. By default categories are listed from left to right and from bottom to top.
Parameters
value - System.Boolean
The value for Reverse
RETURNS
Returns the current ChartCategoryAxisBuilder instance.
Reverse()
If set to true the category axis direction will be reversed. By default categories are listed from left to right and from bottom to top.
RETURNS
Returns the current ChartCategoryAxisBuilder instance.
RoundToBaseUnit(System.Boolean)
If set to true the chart will round the first and last date to the nearest base unit.The roundToBaseUnit option will be ignored if series.type is set to "bar", "column", "boxPlot", "ohlc", "candlestick" or "waterfall".
Parameters
value - System.Boolean
The value for RoundToBaseUnit
RETURNS
Returns the current ChartCategoryAxisBuilder instance.
Select(System.Action)
The selected axis range. If set, axis selection will be enabled.The range is index based, starting from 0. Categories with indexes in the range [select.from, select.to) will be selected. That is, the last category in the range will not be included in the selection.If the categories are dates, the range must also be specified with date values.
Parameters
configurator - System.Action<ChartCategoryAxisSelectSettingsBuilder>
The configurator for the select setting.
RETURNS
Returns the current instance of ChartCategoryAxisBuilder .
StartAngle(System.Double)
The angle (degrees) of the first category on the axis.Angles increase clockwise and zero is to the left. Negative values are acceptable.
Parameters
value - System.Double
The value for StartAngle
RETURNS
Returns the current ChartCategoryAxisBuilder instance.
Title(System.Action)
The title configuration of the category axis.
Parameters
configurator - System.Action<ChartCategoryAxisTitleSettingsBuilder>
The configurator for the title setting.
RETURNS
Returns the current instance of ChartCategoryAxisBuilder .
Visible(System.Boolean)
If set to true the chart will display the category axis. By default the category axis is visible.
Parameters
value - System.Boolean
The value for Visible
RETURNS
Returns the current ChartCategoryAxisBuilder instance.
WeekStartDay(System.Double)
The week start day when categoryAxis.baseUnit is set to "weeks".The supported values are: kendo.days.Sunday - equal to 0; kendo.days.Monday - equal to 1; kendo.days.Tuesday - equal to 2; kendo.days.Wednesday - equal to 3; kendo.days.Thursday - equal to 4; kendo.days.Friday - equal to 5 or kendo.days.Saturday - equal to 6.
Parameters
value - System.Double
The value for WeekStartDay
RETURNS
Returns the current ChartCategoryAxisBuilder instance.
Notes(System.Action)
The category axis notes configuration.
Parameters
configurator - System.Action<ChartCategoryAxisNotesSettingsBuilder>
The configurator for the notes setting.
RETURNS
Returns the current instance of ChartCategoryAxisBuilder .
BaseUnit(Kendo.Mvc.UI.ChartAxisBaseUnit)
Specifies the base time interval for the axis.
Parameters
value - ChartAxisBaseUnit
The value for BaseUnit
RETURNS
Returns the current ChartCategoryAxisBuilder instance.
Type(Kendo.Mvc.UI.ChartCategoryAxisType)
Specifies the category axis type.
Parameters
value - ChartCategoryAxisType
The value for Type
RETURNS
Returns the current ChartCategoryAxisBuilder instance.