Page 1 of 2

Can't use Gantt elements

Posted: Mon May 29, 2023 9:37 am
by sakina@mvclouds

Hello,

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",
      })
    );
  });
  }

Re: Can't use Gantt elements

Posted: Mon May 29, 2023 9:59 am
by Maxim Gorkovsky

Hello. It looks like you downloaded a grid trial. Please try with Gantt: https://bryntum.com/download/?product=gantt


Re: Can't use Gantt elements

Posted: Mon May 29, 2023 10:34 am
by sakina@mvclouds

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?


Re: Can't use Gantt elements

Posted: Tue May 30, 2023 5:01 pm
by marcio

Hey sakina,

Please check this guide for more information regarding task scheduling https://bryntum.com/products/gantt/docs/guide/engine/gantt_events_scheduling

You can use the manuallyScheduled flag for stopping the automatically calculation, check more information here https://bryntum.com/products/gantt/docs/guide/engine/gantt_events_scheduling#manually-scheduled-events


Re: Can't use Gantt elements

Posted: Sat Jun 03, 2023 2:48 pm
by sakina@mvclouds

Hey,

No, it's not a caching issue. Can we pleas hop on a call?


Re: Can't use Gantt elements

Posted: Sun Jun 04, 2023 10:37 am
by mats

We don't offer live debugging help as part of our forums I'm afraid. Did you follow the steps in this guide? https://bryntum.com/products/gantt/docs/guide/Gantt/integration/salesforce/readme

Also, please post new questions in a new thread.

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?

You can mark dependencies as not active, then it will be a purely visual arrow with no effect on the scheduling. https://bryntum.com/products/gantt/docs/api/Gantt/model/DependencyModel#field-active


Re: Can't use Gantt elements

Posted: Thu Jun 22, 2023 7:13 am
by sakina@mvclouds

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?