Our state of the art Gantt chart


Post by tso »

Hi,

We're still playing around with Gantt v2 (non-ExtJS) in addition to the ExtJS Gantt and Scheduler components that are already integrated in our app.

In the ExtJS version of our Gantt we can make use of ResourceHistogram/ResourceUtilization panels to easily show an aggregate of the resources below the timeline. We looked in the documentation and in the demos but found no such similar panels implemented for the non-ExtJS Gantt.

Is this something that is not supported (yet?) or did we simply miss it?

In case this is unsupported, do you have any pointers as to how we could implement it? Our use case is simply to have a partnered timeline (i.e. synchronised) that tracks the resources of the panel above and which allows us to spot conflicts (e.g. the same resource being used twice at the same time). Could we implement a Scheduler with a custom event store and partner that with the Gantt?

Thanks in advance,
Tobias

Post by mats »

Is this something that is not supported (yet?) or did we simply miss it?
Correct, the Histogram has been started on and should be ready within 4 weeks.

Post by tso »

Thanks for the swift response.

Allow me to de-rail the topic slightly. In addition to show some resource allocation (use case above), we're trying to partner a Gantt with a Scheduler. We took inspiration from the Scheduler-Scheduler partnering from the examples (we had to make use of the "BottomScheduler" partner id logic to get started), but that's also how far we got. Neither passing the actual gantt timeline as the "partner" nor the id of it worked.

We recall a previous forum post where a gantt-scheduler example was being worked on, but we cannot seem to find it. Is there any reason why gantt-scheduler pairing doesn't immediately work?

Post by mats »

The gantt-scheduler demo is still being worked on, priorities shifted a big last fall but it should be ready in February. Pairing should work but Scheduler cannot (yet) consume the Gantt data.

Post by tso »

OK, thanks for the info.
For now we simply require that the Scheduler and the Gantt are synchronised on the time axis. We can load the scheduler data separately, that's not an issue. Furthermore,the scheduler will be completely readonly.

Our current setup (React-based) is something like this
    componentDidMount() {
        this.gantt = new Gantt({
            ...ganttConfig,
            partner: bryntum.get(schedulerConfig.id), // Inspiration from drag-between-schedulers react example
            appendTo: this.ganttDiv,
        });
....
  render() {
        return (
            <div id='exploded-view'>
            ...
                <div className='row no-gutter' id='timeline-app'>
                            <div id='gantt' ref={ganttDiv => this.ganttDiv = ganttDiv}/>
                </div>
                <BryntumScheduler {...schedulerConfig}/>
            </div>
        );
    }
The above code fails with a "setting getter-only property "headers"" on the gantt, which disappears when removing the "partner" key in the config.

Trying to partner the scheduler with the gantt fails with an infnite recursion error when passing it the `this.gantt` object and `brytum.get(ganttConfig.id)` returns undefined -- passing only the id does nothing.

Do you have any hints?
Bryntum Gantt v1.1.4
Bryntum Scheduler v3.0.0

Post by sergey.maltsev »

Hi, tso!

The first thing I can suggest you is to use correspondent versions of Gantt / Scheduler because Gantt's code is based on Scheduler's and some changed configs my not work across various versions.

In most cases we release compatible versions within few days. At some point we will make Gantt versions the same as all to make it much clear.

For now I suggest you to use
Gantt v1.1.4 <-> Scheduler v2.2.4
Gantt v2.0.0 <-> Scheduler v3.0.0

If you still have the problem please attach fully working zipped app code here so we can easily build and check it.

Post by tso »

Hi Sergey,
Thanks for looking into this.
We've upgrade gantt to v.2.0.0 and after tackling some migration issues it seems that the scheduler and the gantt are now trying to communicate when being passed a partner. However, the synchronisation immediately terminated when trying to set the ViewPreset across the two timelines.

Trying to set a few different ViewPresets we got errors of the following kind: ViewPreset base 'Weeks 2' does not exist/ViewPreset base 'Weeks' does not exist/ViewPreset base 'Days' does not exist. We've set the ViewPreset on the scheduler to 'daysAndWeeks', 'weeksAndMonths' and nothing. Perhaps a problem in the normalizePreset function?

Meanwhile we've simply syncronised the timelines manually by listening to the (undocumented) horizontalScroll and timeAxisChange events.

Thanks for your support.

Post by sergey.maltsev »

Hi!

We strongly don't recommend you to rely on undocumented features/methods/events because they may be removed or changed without any release notes.
If you couldn't solve anything with our public API please contact us so we can help you or make private methods available for public usage if we decide they worth it.

For this case please attach a working demo app here so we can check and give you help on this.

Post by MauriceLapre »

Hi,

What's the current status on the Resource Histogram and/or Utilization features? Really looking forward to these.

Thanks!

Post by mats »

It's on the way, hoping to have it ready late March

Post Reply