DHTMLX / gantt

GPL version of Javascript Gantt Chart
https://dhtmlx.com/docs/products/dhtmlxGantt/
GNU General Public License v2.0
1.49k stars 324 forks source link

Gantt is undefined #124

Open ATestEnG opened 1 month ago

ATestEnG commented 1 month ago

version "dhtmlx-gantt": "8.0.6", import {gantt,Gantt} from "dhtmlx-gantt"; image i try many time, it is aways undefined little "g" is an Object but capital 'G' is undefined image

ATestEnG commented 1 month ago

by the way construct is vue3 + ts + vite

gearcoded commented 1 month ago

@ATestEnG, it seems that you try to use the GPL version. It doesn't have the feature of creating a new Gantt instance, so the Gantt object is not available. This feature is available in the Pro versions (Commercial, Enterprise, Ultimate licenses): https://docs.dhtmlx.com/gantt/desktop__multiple_gantts.html

So, you need to purchase the license and install the Pro version to get this feature. Or you can continue using the GPL version, but you need to manually reset everything when you switch to another page/tab/view instead of using the destructor method. The following article explains what should be done: https://docs.dhtmlx.com/gantt/desktop__gantt_instance.html

Here is the demo: https://files.dhtmlx.com/30d/c0a7cdde5ff4139e785733d9bfdbc9fb/vue3+gantt-gpl.zip