New to KendoReactStart a free 30-day trial

Specifies the baseUnit type of the category axis.

The possible values are:

  • "milliseconds", "seconds", "minutes", "hours", "days", "weeks", "months", "years"—Sets a fixed base time interval for the axis labels.
  • "auto"—Automatically determines the base unit by the minimum difference between subsequent categories.
  • "fit"—Adjusts the categoryAxis.baseUnitStep and base unit so that the number of categories does not exceed categoryAxis.maxDateGroups, and uses the series.aggregate function to aggregate data based on the selected base unit.

Possible values:

  • "milliseconds"
  • "seconds"
  • "minutes"
  • "hours"
  • "days"
  • "weeks"
  • "months"
  • "years"
  • "auto"
  • "fit"
Example:
jsx
import {
 Chart,
 ChartCategoryAxis,
 ChartCategoryAxisItem,
 ChartSeries,
 ChartSeriesItem
} from '@progress/kendo-react-charts';

const baseUnit = "months";
const data = [{ category: new Date(2000, 0, 1), value: 1 }, { category: new Date(2001, 0, 1), value: 1}];

const ChartContainer = () => (
 <Chart>
   <ChartCategoryAxis>
    <ChartCategoryAxisItem baseUnit={baseUnit} />
   </ChartCategoryAxis>
   <ChartSeries>
     <ChartSeriesItem categoryField="category" data={data} />
   </ChartSeries>
 </Chart>
);
Not finding the help you need?
Contact Support