How to install dhtmlx

159 views Asked by At

How to install dhtmlx gantt

"dhtmlx-gantt": "^5.1.0"

I am developing a webpart in spfx. require('dhtmlx'); I am using this line.

1

There are 1 answers

0
gearcoded On

I found this Sharepoint demo on GitHub:

https://github.com/kmosti/spfx-gantt

There, Gantt is imported the following way:

require("gantt");

https://github.com/kmosti/spfx-gantt/blob/master/src/webparts/ganttChart/components/GanttChart.tsx#L28

I am not familiar with Sharepoint, so, I cannot suggest if you need to do something else.

The official documentation describes various ways of how to successfully connect DHTMLX Gantt:

https://docs.dhtmlx.com/gantt/desktop__initializing_gantt_chart.html

For React, you usually need to import Gantt this way:

import { gantt } from 'dhtmlx-gantt';