Configures the date category axis for the Chart<T>.
Definition
Namespace:Kendo.Mvc.UI.Fluent
Assembly:Kendo.Mvc.dll
Type Parameters:
TModel
The type of the data item to which the chart is bound to
Syntax:
public class ChartDateCategoryAxisBuilder<TModel> : ChartAxisBuilderBase<IChartDateCategoryAxis, DateTime, ChartDateCategoryAxisBuilder<TModel>> where TModel : class
Inheritance: objectChartAxisBuilderBase<IChartDateCategoryAxis, DateTime, ChartDateCategoryAxisBuilder<TModel>>ChartDateCategoryAxisBuilder<TModel>
Inherited Members
Constructors
Initializes a new instance of the ChartCategoryAxisBuilder<TModel> class.
public ChartDateCategoryAxisBuilder(Chart<TModel> chart, IChartDateCategoryAxis axis)
The chart.
axisIChartDateCategoryAxisThe date category axis.
Properties
Methods
Specifies the discrete baseUnitStep values when either BaseUnit is set to Fit or BaseUnitStep is set to 0 (auto).
public ChartDateCategoryAxisBuilder<TModel> AutoBaseUnitSteps(Action<ChartAxisBaseUnitStepsBuilder> configurator)
The configuration action.
Returns:ChartDateCategoryAxisBuilder<TModel>
Sets value at which the first perpendicular axis crosses this axis.
public ChartDateCategoryAxisBuilder<TModel> AxisCrossingValue(double axisCrossingValue)
The value at which the first perpendicular axis crosses this axis.
Returns:ChartDateCategoryAxisBuilder<TModel>
Sets value at which perpendicular axes cross this axis.
public ChartDateCategoryAxisBuilder<TModel> AxisCrossingValue(IEnumerable<double> axisCrossingValues)
The values at which perpendicular axes cross this axis.
Returns:ChartDateCategoryAxisBuilder<TModel>
Sets value at which perpendicular axes cross this axis.
public ChartDateCategoryAxisBuilder<TModel> AxisCrossingValue(params double[] axisCrossingValues)
The values at which perpendicular axes cross this axis.
Returns:ChartDateCategoryAxisBuilder<TModel>
Sets the date category axis base unit.
public ChartDateCategoryAxisBuilder<TModel> BaseUnit(ChartAxisBaseUnit baseUnit)
The date category axis base unit
Returns:ChartDateCategoryAxisBuilder<TModel>
Sets the step (interval) between categories in base units. Specifiying 0 (auto) will set the step to such value that the total number of categories does not exceed MaxDateGroups.
public ChartDateCategoryAxisBuilder<TModel> BaseUnitStep(int baseUnitStep)
the step (interval) between categories in base units. Set 0 for automatic step. The default value is 1.
Returns:ChartDateCategoryAxisBuilder<TModel>
This option is ignored if baseUnit is set to "fit".
Defines bound categories.
public ChartDateCategoryAxisBuilder<TModel> Categories(Expression<Func<TModel, DateTime>> expression)
The expression used to extract the categories value from the chart model
Returns:ChartDateCategoryAxisBuilder<TModel>
Defines categories.
public ChartDateCategoryAxisBuilder<TModel> Categories(IEnumerable<DateTime> categories)
The list of categories
Returns:ChartDateCategoryAxisBuilder<TModel>
Defines categories.
public ChartDateCategoryAxisBuilder<TModel> Categories(params DateTime[] categories)
The list of categories
Returns:ChartDateCategoryAxisBuilder<TModel>
Positions categories and series points on major ticks. This removes the empty space before and after the series. This option will be ignored if either Bar, Column, OHLC or Candlestick series are plotted on the axis.
public ChartDateCategoryAxisBuilder<TModel> Justify()
ChartDateCategoryAxisBuilder<TModel>
Positions categories and series points on major ticks. This removes the empty space before and after the series. This option will be ignored if either Bar, Column, OHLC or Candlestick series are plotted on the axis.
public ChartDateCategoryAxisBuilder<TModel> Justify(bool justified)
A boolean value that indicates if the empty space before and after the series should be removed. The default value is false.
Returns:ChartDateCategoryAxisBuilder<TModel>
Configures the axis labels.
public ChartDateCategoryAxisBuilder<TModel> Labels(Action<ChartDateAxisLabelsBuilder> configurator)
The configuration action.
Returns:ChartDateCategoryAxisBuilder<TModel>
Sets the date category axis maximum (end) date.
public ChartDateCategoryAxisBuilder<TModel> Max(DateTime max)
The date category axis maximum (end) date
Returns:ChartDateCategoryAxisBuilder<TModel>
Specifies the maximum number of groups (categories) that the chart will attempt to produce when either BaseUnit is set to Fit or BaseUnitStep is set to 0 (auto). This option is ignored in all other cases.
public ChartDateCategoryAxisBuilder<TModel> MaxDateGroups(int maxDateGroups)
the maximum number of groups (categories). The default value is 10.
Returns:ChartDateCategoryAxisBuilder<TModel>
The maximum number of ticks and labels to display. Applicabable for date category axis.
public ChartDateCategoryAxisBuilder<TModel> MaxDivisions(double value)
The value for MaxDivisions
Returns:ChartDateCategoryAxisBuilder<TModel>
Sets the date category axis minimum (start) date.
public ChartDateCategoryAxisBuilder<TModel> Min(DateTime min)
The date category axis minimum (start) date
Returns:ChartDateCategoryAxisBuilder<TModel>
Defines the items.
public ChartDateCategoryAxisBuilder<TModel> Notes(Action<ChartAxisNotesBuilder> configurator)
The items of the notes.
Returns:ChartDateCategoryAxisBuilder<TModel>
If set to false, the min and max dates will not be rounded off to the nearest baseUnit. This option is most useful in combination with explicit min and max dates. It will be ignored if either Bar, Column, OHLC or Candlestick series are plotted on the axis.
public ChartDateCategoryAxisBuilder<TModel> RoundToBaseUnit(bool roundToBaseUnit)
A boolean value that indicates if the axis range should be rounded to the nearest base unit. The default value is true.
Returns:ChartDateCategoryAxisBuilder<TModel>
Configures the selection
public ChartDateCategoryAxisBuilder<TModel> Select(Action<ChartAxisSelectionBuilder> configurator)
The configuration action.
Returns:ChartDateCategoryAxisBuilder<TModel>
Sets the selection range
public ChartDateCategoryAxisBuilder<TModel> Select(DateTime? from, DateTime? to)
The selection range start.
toDateTime?The selection range end. Note: The specified date is not included in the selected range unless the axis is justified. In order to select all categories specify a value larger than the last date.
Returns:ChartDateCategoryAxisBuilder<TModel>
Sets the week start day.
public ChartDateCategoryAxisBuilder<TModel> WeekStartDay(DayOfWeek weekStartDay)
The week start day when the base unit is Weeks. The default is Sunday.
Returns:ChartDateCategoryAxisBuilder<TModel>