Skip to main content

lengthUnit

Description

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

Usage

lengthUnit?: "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: "hour" | "day" | "week" | "month" | "quarter" | "year".

Example

<script>
import { getData } from "./data";
import { Gantt } from "wx-svelte-gantt";

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

</script>

<Gantt
tasks={data.tasks}
{lengthUnit} />