DHTMLX / gantt

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

How to add multiple Gantt charts to a page? #113

Closed kevin1506 closed 3 months ago

kevin1506 commented 3 months ago

As the title suggests,I packaged the components using Vue,Add multiple components to the page, but only display the last one,Excuse me, why are they all displayed?

gearcoded commented 3 months ago

@kevin1506, The first thing is to make sure you didn't specify the same container in the init method as in that case, it is expected that both Gantt will be initialized in the same container, and only the last one will remain there:: https://snipboard.io/KhAJf4.jpg

If there are different containers, it should work correctly: https://snipboard.io/VTcvPf.jpg

Here is a Vue demo with 2 Gantts: https://files.dhtmlx.com/30d/03cdec257be6a564f4ac10a181fbf0ce/vue3+multiple-gantts.zip

If that doesn't help you, it is hard to suggest what might be wrong as I don't see your code. In that case, I will need a ready demo with all the necessary files so that I can reproduce the issue locally.

whenTheMorningDark commented 3 months ago

Thanks this is what i need