How to Install dhtmlxGantt
You can use npm, NuGet or Bower package managers to install the dhtmlxGantt package into your project.
It's also possible to include the necessary JS/CSS files from CDN.
npm - Evaluation and PRO versions
Professional Evaluation version
Download the trial Gantt package and follow the steps mentioned in the README file. Note that the trial Gantt version is available 30 days only.
Professional version
You can access the DHTMLX private npm directly in the Client's Area by generating your login and password for npm. A detailed installation guide is also available there. Please note that access to the private npm is available only while your proprietary Gantt license is active.
npm - Community edition
You can install the free Community edition of dhtmlxGantt from npmjs.com, by executing the following command line:
npm install dhtmlx-gantt
Starting from v10, the public dhtmlx-gantt package is the Community edition under the MIT license. Earlier versions of the package (v9.x and below) are the legacy GPL edition; GPL v2 still applies to those versions.
NuGet
To install dhtmlxGantt through NuGet, execute the following command line:
nuget install DHTMLX.Gantt
If you are using Microsoft Visual Studio, run the following command from the Package Manager Console:
install-package DHTMLX.Gantt
Bower
To install dhtmlxGantt through Bower, execute the following command line:
bower install gantt
CDN
To include JS/CSS files from CDN, you should set direct links to dhtmlxgantt.js and dhtmlxgantt.css files:
<link rel="stylesheet" href="http://cdn.dhtmlx.com/gantt/edge/dhtmlxgantt.css"
type="text/css">
<script src="http://cdn.dhtmlx.com/gantt/edge/dhtmlxgantt.js"></script>
You can find the full list of links that you can include from CDN, depending on the version of dhtmlxGantt in a separate article.
For v10 and later, the CDN serves the Community edition under the MIT license.
Download the Package
Community edition
Download the package of the free dhtmlxGantt Community edition.
Legacy GPL versions
The free edition prior to v10 was distributed under the GPL license. These versions (v9.x and earlier) remain available and GPL v2 still applies to them; they live in a dedicated branch of the main GitHub repository but are no longer actively maintained.
PRO version
If you have the PRO version of the component, you need to go to the Client Area and download the PRO package from there.
Independent of the version, unpack the downloaded package into a folder of your project. Then include dhtmlxgantt.js and dhtmlxgantt.css files into a page. Make sure that you set correct relative paths to these files:
<script type="text/javascript" src="codebase/dhtmlxgantt.js"></script>
<link rel="stylesheet" href="codebase/dhtmlxgantt.css">
Adding PRO Edition into Project
Install Pro version
Before installing the Pro version of Gantt, you should uninstall the trial version package (if you've installed it)
For v10 and later, the public npm package and the CDN provide the free Community edition of the component, distributed under the MIT license. NuGet and Bower remain on the legacy GPL edition (v9.x) for now. GPL v2 applies only to those previous versions.
We also provide our private npm registry from where the Professional and Evaluation versions of the component can be installed.
If for some reason the methods described above are not available to you, there are two possible ways out:
- you can add the Pro version to your project by hand
- you can install the Pro version to your project via npm from a local directory
Installing the package from a local folder
If case of npm, you can install the Pro package from a local folder using npm install ./local_path or npm link.
There are step-by-step instructions for both variants:
npm install
- Copy the Gantt package into some local directory.
- Go to your project directory.
- Call
npm install ../gantt-local-package-path.
npm link
- Copy the Gantt package into some local directory.
- Call
npm linkin the package folder. - Go to your project directory.
- Call
npm link dhtmlx-gantt.
To see the difference between the Community and PRO versions of the dhtmlxGantt library, check the related article Community vs PRO Library Versions.
Uninstall trial version
The correct way to install the Pro version would be to remove the trial version package:
npm uninstall dhtmlx-gantt
Then you need to thoroughly check that your applications don't have the dhtmlxgantt.js file anywhere.
For Linux and MacOS, you can use the following commands in the terminal:
grep -rin "dhtmlxGantt v"
grep -rin evaluation
For Windows, you can use the following commands in the command line:
findstr /mis "dhtmlxGantt v" path_to_your_app*
findstr /mis "evaluation" path_to_your_app*
After that you can install the Pro version of the Gantt chart as described above.