Skip to main content

lengthUnit

Description

Optional. Defines the minimal unit for task bars (the task length) in a chart

Usage

lengthUnit?: "minute" | "hour" | "day" | "week" | "month" | "quarter" | "year";

Parameters

  • lengthUnit - the minimal unit of the task bars (task length) in a chart. It should be equal to or smaller than the scales unit. Possible values: "minute" | "hour" | "day" | "week" | "month" | "quarter" | "year".

Example

<script setup>
import { getData } from "./data";
import { Gantt } from "@svar-ui/vue-gantt";

const data = getData();
const lengthUnit = "week";

</script>

<template>
<Gantt
:tasks="data.tasks"
:lengthUnit="lengthUnit" />
</template>

Related sample: Length unit (rounding)