Gantt Library with Salesforce Lightning Aura component

Hello,

I have imported the DHTMLXGantt.js library into the salesforce static-resource to use with my aura component and it’s throwing this error when I try to load the page.

Uncaught TypeError: Cannot read property ‘atob’ of undefined

#component

<aura:component implements=“flexipage:availableForAllPageTypes”>
<ltng:require scripts="{!$Resource.jsapi + ‘/js/dhtmlxgantt.js’}" afterScriptsLoaded="{!c.initializeLibrary}" />


</aura:component>

#javascript

({
initializeLibrary : function(component, event, helper) {
let tasks = {
data: [
{
id: 1, text: “Project #2”, start_date: “01-04-2018”, duration: 18, order: 10,
progress: 0.4, open: true
},
{
id: 2, text: “Task #1”, start_date: “02-04-2018”, duration: 8, order: 10,
progress: 0.6, parent: 1
},
{
id: 3, text: “Task #2”, start_date: “11-04-2018”, duration: 8, order: 20,
progress: 0.6, parent: 1
}
],
links: [
{id: 1, source: 1, target: 2, type: “1”},
{id: 2, source: 2, target: 3, type: “0”}
]
};

    console.log('loaded.');
    
    gantt.init(cmp.find("chart").getElement());
    gantt.parse(tasks);
    }
    })

Could somebody help?
Thanks!

Hello Israel,
There are issues with the 6.2.4 and 6.2.5 versions, they aren’t loaded in the Lightning Aura component. That bug will be fixed in future versions.

Please, try to reproduce the issue with the 6.2.2 version:
https://files.dhtmlx.com/30d/385ca46377f366ccb0eb11c315827970/gantt_6.2.2_gpl.zip

If that doesn’t help you, I need to access a test page with the ability to modify the components and open the Developer Console.