0

How to install dhtmlx gantt

"dhtmlx-gantt": "^5.1.0"

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

Marioanzas
  • 1,663
  • 2
  • 10
  • 33

1 Answers1

0

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';
gearcoded
  • 561
  • 5
  • 11