CategoryBaseUnit

The baseUnit type of the category axis.

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

Values

  • "milliseconds"
  • "seconds"
  • "minutes"
  • "hours"
  • "days"
  • "weeks"
  • "months"
  • "years"
  • "auto"
  • "fit"
 /