New to Kendo UI for Angular? Start a free 30-day trial


The baseUnit type of the category axis.

The possible values are:

  • BaseUnit—The base time interval for the axis labels.
  • "auto"—The base unit is automatically determined by the minimum difference between subsequent categories.
  • "fit"—The categoryAxis.baseUnitStep and base unit are adjusted so that the number of categories does not exceed categoryAxis.maxDateGroups, and the series.aggregate function is used to aggregate data based on the selected base unit.
import { Component } from '@angular/core';
import { CategoryBaseUnit } from '@progress/kendo-angular-charts';

  selector: 'my-app',
  template: `
        <kendo-chart-category-axis-item [baseUnit]="baseUnit" >
        <kendo-chart-series-item categoryField="category" [data]="data">
class AppComponent {
  public baseUnit: CategoryBaseUnit = "months";
  public data: any[] = [{ category: new Date(2000, 0, 1), value: 1 }, { category: new Date(2001, 0, 1), value: 1}];

type CategoryBaseUnit = "milliseconds" | "seconds" | "minutes" | "hours" | "days" | "weeks" | "months" | "years" | "auto" | "fit";

In this article

Not finding the help you need?