I am facing an issue in bryntum Gantt Library while accessing its component(methods) for creating a Gantt chart in JS.
I have developed a Gantt chart into Salesforce org and it is showing a blank page after that I found that bryntum library does not have the Gantt components for creating a chart. Am I missing something here?
I have attached images for better reference.
/* globals bryntum : true */
import { LightningElement, api, track, wire } from "lwc";
import { NavigationMixin } from "lightning/navigation";
import { ShowToastEvent } from "lightning/platformShowToastEvent";
import { loadScript, loadStyle } from "lightning/platformResourceLoader";
//import GanttDup from "@salesforce/resourceUrl/bryntumScheduleProModuleJS";
//import GanttStyle from "@salesforce/resourceUrl/Bt_BryntumNewGanttCss";
import GanttStyle from "@salesforce/resourceUrl/BT_Bryntum_Css";
//import GANTT from "@salesforce/resourceUrl/bryntum_gantt";
import GANTTModule from "@salesforce/resourceUrl/BT_Bryntum_Js";
//import SchedulerPro from "@salesforce/resourceUrl/bryntumScheduleProModuleJS";
import GanttToolbarMixin from "./lib/GanttToolbar";
import GanttToolbarMixinDup from "./lib/GanttToolbarDup";
import data from "./data/launch-saas";
renderedCallback() {
if (this.bryntumInitialized) {
return;
}
this.bryntumInitialized = true;
Promise.all([
loadScript(this, GANTTModule),
loadStyle(this, GanttStyle + "/gantt.stockholm.css"),
// loadScript(this, Papa.unparse()), // papaparse lib..
loadScript(this, PARSER + "/PapaParse/papaparse.js"),
])
.then(() => {
console.log("*******LIBRARY LOADED SUCCESSFULLY******");
console.log('this.bryntum ',bryntum);
this.gettaskrecords();
this.loadedChart = true;
})
.catch((error) => {
console.log('error log ',error);
this.dispatchEvent(
new ShowToastEvent({
title: "Error loading Gantt Chart",
message: error,
variant: "error",
})
);
});
}
But actually with the same code and library it is working fine in another org.
Re: Can't use Gantt elements
Posted: Mon May 29, 2023 5:17 pm
by alex.l
Hi, maybe that was some caching problems then. Do you need our further assistance here?
Re: Can't use Gantt elements
Posted: Tue May 30, 2023 7:37 am
by sakina@mvclouds
Hey, Thank you for your quick response.
I will try to find some solution on my own, I will ask again if I need any help.
Re: Can't use Gantt elements
Posted: Tue May 30, 2023 4:40 pm
by sakina@mvclouds
Hey, can you please help me with this?
Question:- I would like to know how tasks' start and end dates are automatically updated based on their predecessor's start and end dates in the library where this process is happening, and is there a way to stop that from happening based on a condition?
Question:- I would like to know how tasks' start and end dates are automatically updated based on their predecessor's start and end dates in the library where this process is happening, and is there a way to stop that from happening based on a condition?
Yes there is a lag present in the task but is it possible to change value of lag on basses of drag movement or is it possible to drag a task to move to start date up when its still after the end date of it's Predecessor or any other option which can help with our requirement?