> ## Documentation Index
> Fetch the complete documentation index at: https://learn.nextedy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Disable Dependency Linking

> Prevent users from creating or editing dependency links in the Nextedy GANTT chart while keeping existing dependencies visible.

export const LastReviewed = ({date}) => {
  if (!date) return null;
  const formatted = new Date(`${date}T00:00:00Z`).toLocaleDateString("en-US", {
    year: "numeric",
    month: "long",
    day: "numeric",
    timeZone: "UTC"
  });
  return <p className="mt-10 text-sm text-gray-400 dark:text-zinc-500 not-prose">
      Last reviewed on {formatted}
    </p>;
};

## When to Disable Linking

You may want to disable dependency link creation when:

* The Gantt chart is used for read-only reporting
* Dependencies are managed exclusively in Polarion rather than on the chart
* You want to prevent accidental link creation during drag operations

## Method 1 -- Remove the Dependency Role

The simplest way to hide all dependency links entirely is to leave the **Dependency Role** widget parameter empty.

1. Open the page in **Edit mode**.
2. Click the widget gear icon to open **Widget Parameters**.
3. Navigate to the **Dependency Role** parameter.
4. Ensure no link roles are selected.
5. Click **Apply**.

With no Dependency Role configured, the Gantt will not display any dependency arrows and users cannot create new links.

<Note title="This hides existing dependencies">
  Removing the Dependency Role hides all dependency arrows from the chart. The underlying Polarion work item links are not deleted -- they are simply not displayed.
</Note>

## Method 2 -- Disable Drag-to-Link Only

If you want to keep existing dependency links **visible** but prevent users from creating new ones by dragging, use a Gantt Config Script:

1. Open the page in **Edit mode**.
2. Open **Widget Parameters > Advanced > Gantt Config Script**.
3. Add the following line:

```javascript theme={null}
gantt.config.drag_links = false;
```

4. Click **Apply**.

This disables the link creation handles (the circles at the start and end of each task bar) while still rendering all existing dependency arrows.

## Comparison of Methods

| Method                            | Existing Links Visible | New Links Allowed | Link Handles Shown |
| --------------------------------- | :--------------------: | :---------------: | :----------------: |
| Empty Dependency Role             |           No           |         No        |         No         |
| `gantt.config.drag_links = false` |           Yes          |         No        |         No         |
| Both configured (normal)          |           Yes          |        Yes        |         Yes        |

<Tip title="Combine with readonly mode">
  If you want a fully read-only Gantt chart with no editing at all, enable the `readonly` widget parameter. This disables all editing including dependency link creation, task dragging, and resizing.
</Tip>

<Warning title="Plans Gantt does not support dependency links">
  Dependency links apply to work items only. In Plans Gantt mode, plans have parent-child relationships but do not support direct dependency links between them.
</Warning>

## Verification

You should now see:

* **Method 1:** No dependency arrows drawn on the Gantt chart
* **Method 2:** Existing dependency arrows visible, but no link creation circles appear when hovering over task bars in edit mode

## See Also

* [Create and Configure Dependency Links](/gantt/guides/dependencies/create-dependency-links)
* [Configure Advanced Dependency Types (FS, SS, FF, SF)](/gantt/guides/dependencies/advanced-dependency-types)
* [Write Gantt Config Scripts](/gantt/guides/scripting/gantt-config-script)

<LastReviewed date="2026-07-02" />
