Components
    • Animation
    • Barcodes
    • Buttons
    • Charts
    • Common Utilities
    • Conversational UI
    • Data Grid
    • Data Query
    • Data Tools
    • Date Inputs
    • Date Math
    • Dialogs
    • Drawing
    • Dropdowns
    • Editor
    • Excel Export
    • File Saver
    • Form
    • Gantt
    • Gauges
    • Indicators
    • Inputs
    • Labels
    • Layout
    • ListBox
    • ListView
    • Mapbeta
    • Notification
    • PDF Processing
    • PivotGrid
    • Popup
    • Progress Bars
    • Ripple
    • Scheduler
    • ScrollView
    • Sortable
    • TaskBoard
    • Tooltips
    • TreeList
    • TreeView
    • Upload
    Sample Applications
    Styling & Themes
    Common Features
    Project Setup
    Changelog

BaseUnit

The baseUnit type of an X or Y axis.

import {
 Chart,
 ChartXAxis,
 ChartXAxisItem,
 ChartSeries,
 ChartSeriesItem
} from '@progress/kendo-react-charts';

const baseUnit = "months";
const data = [[new Date(2000, 0, 1), 1], [new Date(2001, 0, 1), 1]];

const ChartContainer = () => (
 <Chart>
   <ChartXAxis>
    <ChartXAxisItem baseUnit={baseUnit} />
   </ChartXAxis>
   <ChartSeries>
     <ChartSeriesItem type="scatter" data={data} />
   </ChartSeries>
 </Chart>
);

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

type BaseUnit = "milliseconds" | "seconds" | "minutes" | "hours" | "days" | "weeks" | "months" | "years";

In this article

Not finding the help you need?