Our state of the art Gantt chart


Post by brian.cronin »

Hello,

I am facing an issue in Brythum Gantt Library.

I have developed a Gantt chart into Salesforce org and it is showing a blank page after that I found that the bryntum library does not have the Gantt components for creating a chart.

In order to solve this issue I follow the steps in this guide https://bryntum.com/products/gantt/docs/guide/Gantt/integration/salesforce/readme
but then also face the same issue.

I thought that it might be some caching problem but it was not.

The library is loaded successfully but its methods are missing, as shown in the attached image below.

I have attached images for better reference.

Please let me know if there are any troubleshooting steps I should try or if you require any further information to investigate and resolve this issue. I appreciate your prompt attention to this matter.

It would be great if you could hop on a call.

Thank you for your understanding and support.

/* 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",
      })
    );
  });
  }
Attachments
image (1).png
image (1).png (265.24 KiB) Viewed 180 times

Post by Maxim Gorkovsky »

Hello.
It looks like Gantt bundle was loaded and defined a global variable, but somehow stopped initialization early. First of all, I would recommend using newer version, if there was a problem it might have been solved between 4.3.5 and 5.3.6.
If that's not an option, try to enable "stop on caught exceptions" and checking if there was a problem during load.


Post by brian.cronin »

thanks, Maxim for your quick response. I will try both ways and come back here.


Post by brian.cronin »

I tried both the ways that you suggested, In the second way I couldn't find anything identical to troubleshooting, However, by changing the version to the latest one getting a CSS issue in the Gantt chart taskbar and toolbar.
Do I need to change something along with the library?
Image


Post by alex.l »

Hi

However, by changing the version to the latest one getting a CSS issue in the Gantt chart taskbar and toolbar.

Did you replace CSS file with latest version along with JS file? Make sure cache is cleared.

All the best,
Alex


Post by brian.cronin »

That fixed my issue.
thanks a lot, Alex.


Post Reply