links
Description
Defines links between tasks in GanttAn array of objects containing the links data
Usage
links?: [
{
id: string | number,
source: string | number,
target: string | number,
type: "s2s" | "s2e" | "e2s" | "e2e"
}
{...}
];
Parameters
id
- (required) the link IDsource
- (required) the source task IDtarget
- (required) the target task IDtype
- (required) the link type; possible link type values:- e2s - "End-to-start"
- s2s - "Start-to-start"
- e2e - "End-to-end"
- s2e - "Start-to-end"
Example
<script>
import { getData } from "./common/data";
import { Gantt } from "wx-svelte-gantt";
const {tasks, scales, columns} = getData();
const links = [
{ id: 1, source: 3, target: 4, type: "e2s" },
{ id: 2, source: 1, target: 2, type: "e2s" },
{ id: 21, source: 8, target: 1, type: "s2s" },
{ id: 22, source: 1, target: 6, type: "s2s" },
];
</script>
<Gantt {tasks} {scales} {columns} {links} />