Skip to main content

Tooltip

Description

Tooltip helper

Usage

<Tooltip content={{someTooltipContent}} />

You can import the component from "wx-svelte-gantt".

Parameters

  • content - (optional) the Svelte component

If the attribute is not added, then the tooltip will display the task name.

Example

The example below shows how to add the default tooltip. Do not forget to pass the api object to Tooltip (for more details, refer to How to access Gantt API). Other usage examples see here: Adding tooltips

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

const data = getData();
let api;
</script>

<Tooltip {api}>
<Gantt
tasks={data.tasks}
links={data.links}
scales={data.scales}
bind:api
/>
</Tooltip>

Related articles: