New to KendoReactStart a free 30-day trial

CategoryBaseUnit
Premium

The baseUnit type of the category axis.

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>
);

ReactDOM.render(
 <ChartContainer />,
 document.querySelector('my-app')
);

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

Not finding the help you need?
Contact Support