Discuss anything related to web development but no technical support questions


Post by pjain007 »

Hi,

Load event is blocking chart to load. when I am trying to console its params getting undefined.
load_event.PNG
load_event.PNG (8.92 KiB) Viewed 3079 times
and ganttpanel is working fine outside of load event, please check.
before_send.PNG
before_send.PNG (17.72 KiB) Viewed 3079 times
ganttPanel :-
ganttPanel.PNG
ganttPanel.PNG (3.79 KiB) Viewed 3079 times
Regards
Piyush

Post by mats »

Sorry, you have to provide code in form of a clear test case so we can see the intent of your code. It's not clear based on your screenshots.

Post by pjain007 »

please check below url for code.

https://jsfiddle.net/5y3rronc/

Thanks

Post by mats »

That's a lot of code that's not really relevant to the question. Please make an effort to post only what's relevant to what you're asking. Also, I'd review what's been done here, you're firing off async code in the middle of the rendering process which makes no sense (recommend you remove it).
eventRenderer: function(eventRec, resourceRec, templateData) {
        // for Milestone
        //console.log('eventRec', eventRec, 'resourceRec', resourceRec, 'templateData', templateData)
        $timeout(function() {
          var hideElement = document.querySelectorAll('.hide-element');
          for (var i = 0; i < hideElement.length; i = i + 1) {
            $(hideElement[i]).parent().css({
              "display": "none"
            })
          }
        }, 2000);

Post by pjain007 »

Hi,

I have removed extra code. Please check now.

https://jsfiddle.net/5y3rronc/1/

Post by Maxim Gorkovsky »

You can listen to crudmanager events like this:
ganttPanel = new Gnt.panel.Gantt({
  crudManager: {
    listeners: {
      load: function () { console.log(ganttPanel); }
    }
  }
});

Post Reply