Skip to main content

baselines

Description

Shows or hides tasks baselines

Usage

baselines?: boolean;

Parameters

  • baselines - to show baselines, set the value to true. Baselines are not displayed by default (false). It's also necessary to set the start and end time for baselines via the tasks property.

Example

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

const data = getData();

const tasks = [
{
id: 1,
start: "2024-03-03",
duration: 4,
text: "Svelte Gantt Widget",
progress: 60,
type: "project",
open: true,
base_start: "2024-03-03",
base_end: "2024-03-06",
},
{
id: 2,
start: "2024-03-04",
duration: 3,
text: "Lib-Gantt",
progress: 80,
parent: 1,
type: "task",
base_start: "2024-03-04",
base_end: "2024-03-06",
},
];

</script>

<Gantt
baselines={true}
cellHeight={45}
{tasks}
links={data.links}
scales={data.scales} />