Our state of the art Gantt chart


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

Post by Maxim Gorkovsky »

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


Post by sakina@mvclouds »

But actually with the same code and library it is working fine in another org.

Attachments
image (2).png
image (2).png (705.45 KiB) Viewed 400 times

Post by alex.l »

Hi, maybe that was some caching problems then. Do you need our further assistance here?

All the best,
Alex


Post 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.


Post 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?


Post 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

Best regards,
Márcio


Post by sakina@mvclouds »

Hey,

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


Post 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


Post 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?


Post Reply