New to Kendo UI for Vue? Start a free 30-day trial
CategoryBaseUnit
The baseUnit
type of the category axis.
import {
Chart,
ChartCategoryAxis,
ChartCategoryAxisItem,
ChartSeries,
ChartSeriesItem
} from '@progress/kendo-vue-charts';
<template>
<Chart>
<ChartCategoryAxis>
<ChartCategoryAxisItem :base-unit="baseUnit" />
</ChartCategoryAxis>
<ChartSeries>
<ChartSeriesItem :category-field="category" :data-items="dataItems" />
</ChartSeries>
</Chart>
</template>
<script>
export default {
components: {
Chart,
ChartCategoryAxis,
ChartCategoryAxisItem,
ChartSeries,
ChartSeriesItem
},
data () {
return {
baseUnit: "months",
dataItems: [
{ category: new Date(2000, 0, 1), value: 1 },
{ category: new Date(2001, 0, 1), value: 1}
]
};
}
}
</script>
type
CategoryBaseUnit = "milliseconds" | "seconds" | "minutes" | "hours" | "days" | "weeks" | "months" | "years" | "auto" | "fit";