# GM - Gantt Chart

## **Documentation** <a href="#documentation" id="documentation"></a>

**GM – Gantt Chart** component provides clarity to complex project timelines with numerous tasks, shifting deadlines, and overlapping dependencies. It helps you see the bigger picture while tracking details. With GridMate’s Gantt Chart, this clarity stays within your projects no need to switch between spreadsheets or external tools, as everything is connected to your live data.

## **Specification**

<table data-full-width="true"><thead><tr><th width="206.4388427734375">Property</th><th width="145.1551513671875">Type</th><th width="690.79541015625">Description</th></tr></thead><tbody><tr><td>Gantt Id</td><td>String</td><td>Identifier for the Gantt chart parent record.</td></tr><tr><td>Icon name</td><td>String</td><td>Icon displayed for the Gantt chart, You can get the icon name from <a href="https://lightningdesignsystem.com/icons/">https://lightningdesignsystem.com/icons<strong>/</strong></a></td></tr><tr><td>Title</td><td>String</td><td>Title displayed at the top of the Gantt chart.</td></tr><tr><td>Can select</td><td>Boolean</td><td>Determines if tasks can be selected in the chart.</td></tr><tr><td>Can reorder</td><td>Boolean</td><td>Indicates if tasks can be reordered by user interaction.</td></tr><tr><td>Can edit</td><td>Boolean</td><td>Indicates if tasks can be edited directly in the chart.</td></tr><tr><td>Columns</td><td>String</td><td>Configuration for the columns displayed in the chart.</td></tr><tr><td>Relation config</td><td>String</td><td>JSON configuration that defines the data modal for the Gantt Chart. <a href="/pages/371OJeKOuPnbWI97S4Gl#gantt-chart-relation-configuration">JSON string configuration </a></td></tr><tr><td>Show only work hours</td><td>Boolean</td><td>Option to show only defined work hours in the chart.</td></tr><tr><td>Work day start</td><td>Integer</td><td>Hour at which the workday starts (1-24).</td></tr><tr><td>Work day end</td><td>Integer</td><td>Hour at which the workday ends (1-24).</td></tr><tr><td>Hour span</td><td>Integer</td><td>The time interval that defines a task slot’s length and the step size for moving tasks on the timeline (max 12h).</td></tr><tr><td>Work week start</td><td>Integer</td><td>The day the workweek starts, default is 1 (Monday).</td></tr><tr><td>Work week end</td><td>Integer</td><td>The day the workweek ends, default is 5 (Friday).</td></tr><tr><td>First day of week</td><td>Integer</td><td>Representation of the first day of the week (1-7).</td></tr><tr><td>Default displayed tasks</td><td>Integer</td><td>The number of tasks displayed by default.</td></tr><tr><td>Slot size</td><td>Integer</td><td>Width of each task slot in pixels.</td></tr><tr><td>Row height</td><td>Integer</td><td>Height of each row in pixels.</td></tr><tr><td>Left panel width (%)</td><td>Integer</td><td>Width of the left panel as a percentage of total width, up to 100%.</td></tr><tr><td>Right panel width (%)</td><td>Integer</td><td>Width of the right panel as a percentage of total width, up to 100%.</td></tr><tr><td>Default view</td><td>String</td><td>Initial view setting, e.g., “month” for monthly view.</td></tr></tbody></table>

## **API Reference** <a href="#api-reference" id="api-reference"></a>

{% tabs fullWidth="true" %}
{% tab title="ganttChartLwc.js-meta.xml" %}
{% code fullWidth="false" %}

```xml
<?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
    <apiVersion>64.0</apiVersion>
    <masterLabel>GM - Gantt Chart</masterLabel>
    <isExposed>true</isExposed>
    <targets>
        <target>lightning__RecordPage</target>
        <target>lightning__AppPage</target>
        <target>lightning__HomePage</target>
        <target>lightningCommunity__Page</target>
        <target>lightningCommunity__Default</target>
    </targets>

    <targetConfigs>
        <targetConfig targets="lightning__RecordPage,lightning__AppPage,lightning__HomePage">
            <property name="parentRecordId" type="String" default="" label="Gantt id" />
            <property name="iconName" type="String" default="standard:chart" label="Icon name" />
            <property name="title" type="String" default="Gantt chart" label="Title" />
            <property name="canSelect" type="Boolean" default="false" label="Can select" />
            <property name="canReorder" type="Boolean" default="false" label="Can reorder" />
            <property name="canEdit" type="Boolean" default="false" label="Can edit" />
            <property name="columns" type="String" default="" label="Columns" />
            <property name="taskProps" type="String" label="Relation config" />
            <property name="showWorkHours" type="Boolean" default="false" label="Show only work hours" />
            <property name="workDayStart" type="Integer" default="8" label="Work day start" min="1" max="24" />
            <property name="workDayEnd" type="Integer" default="17" label="Work day end" min="1" max="24" />
            <property name="hourSpan" type="Integer" default="1" label="Hour span" max="12" />
            <property name="workWeekStart" type="Integer" default="1" label="Work week start" />
            <property name="workWeekEnd" type="Integer" default="5" label="Work week end" />
            <property name="firstDayOfWeek" type="Integer" default="1" label="First day of week" />
            <property name="displayedTasks" type="Integer" default="10" label="Default displayed tasks" />
            <property name="slotSize" type="Integer" default="200" label="Slot size" />
            <property name="rowHeight" type="Integer" default="40" label="Row height" />
            <property name="listPanelWidth" type="Integer" default="40" label="Left panel width (%)" max="100" />
            <property name="editorPanelWidth" type="Integer" default="30" label="Right panel width (%)" max="100" />
            <property name="defaultView" type="String" default="month" label="default view" />
            <supportedFormFactors>
                <supportedFormFactor type="Large" />
                <supportedFormFactor type="Small" />
            </supportedFormFactors>
        </targetConfig>

        <targetConfig targets="lightningCommunity__Default">
            <property name="parentRecordId" type="String" default="" label="Gantt id" />
            <property name="iconName" type="String" default="standard:chart" label="Icon name" />
            <property name="title" type="String" default="Gantt chart" label="Title" />
            <property name="canSelect" type="Boolean" default="false" label="Can select" />
            <property name="canReorder" type="Boolean" default="false" label="Can reorder" />
            <property name="canEdit" type="Boolean" default="false" label="Can edit" />
            <property name="columns" type="String" default="" label="Columns" />
            <property name="taskProps" type="String" label="Relation config" />
            <property name="showWorkHours" type="Boolean" default="false" label="Show only work hours" />
            <property name="workDayStart" type="Integer" default="8" label="Work day start" min="1" max="24" />
            <property name="workDayEnd" type="Integer" default="17" label="Work day end" min="1" max="24" />
            <property name="hourSpan" type="Integer" default="1" label="Hour span" max="12" />
            <property name="workWeekStart" type="Integer" default="1" label="Work week start" />
            <property name="workWeekEnd" type="Integer" default="5" label="Work week end" />
            <property name="firstDayOfWeek" type="Integer" default="1" label="First day of week" />
            <property name="displayedTasks" type="Integer" default="10" label="Default displayed tasks" />
            <property name="slotSize" type="Integer" default="200" label="Slot size" />
            <property name="rowHeight" type="Integer" default="40" label="Row height" />
            <property name="listPanelWidth" type="Integer" default="40" label="Left panel width (%)" max="100" />
            <property name="editorPanelWidth" type="Integer" default="30" label="Right panel width (%)" max="100" />
            <property name="defaultView" type="String" default="month" label="default view" />
        </targetConfig>
    </targetConfigs>
</LightningComponentBundle>

```

{% endcode %}
{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.gridmate.io/package-reference/components-library/gm-gantt-chart.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
