Our state of the art Gantt chart


Post by alex.l »

Looks like we have a bug related to export classes for recurring time ranges implementation. Here is a ticket: https://github.com/bryntum/support/issues/2391

Regarding to regular timeRanges, please check if you have any timeRanges specified in your server response. If so, they will be used instead of those that you set in your configs.

But anyway, we need to wait until this bug is fixed. Thank you for your question and sorry for inconvenience.

All the best,
Alex


Post by abhilashlr »

Hi Alex, No our server doesn't send any timeRanges. We have all of the data manually compiled and transformed in frontend to show in the gantt view.


Post by alex.l »

This is how it works to me in our react taskeditor examples:


<BryntumGantt	
	[.....]
	timeRangesFeature="true"
	timeRanges={[
                    {
                        "id"       : 1,
                        "startDate": "2019-01-20", // <--- make sure you have correct date
                        "duration" : 1,
                        "durationUnit" : "d"
                      }
                ]}

All the best,
Alex


Post by abhilashlr »

alex.l wrote: Wed Feb 17, 2021 3:36 pm

This is how it works to me in our react taskeditor examples:


<BryntumGantt	
	[.....]
	timeRangesFeature="true"
	timeRanges={[
                    {
                        "id"       : 1,
                        "startDate": "2019-01-20", // <--- make sure you have correct date
                        "duration" : 1,
                        "durationUnit" : "d"
                      }
                ]}

Hey Alex, Thank you for spending time and helping me out.

I can confirm that this definitely works to show only once on the Gantt view.Even if I add recurrenceRule: 'FREQ=WEEKLY;BYDAY=SA', then also it's the same result. The time range is visible only once as I had shared in the previous screenshots.


Post by alex.l »

Yes, I've opened a ticket to fix it: https://github.com/bryntum/support/issues/2391

After it will be fixed, we will be needed to add some code to make it works, but only after the bug will be fixed:

import { RecurringTimeSpan, RecurringTimeSpansMixin } from 'bryntum-gantt';
// Define a new Model extending TimeSpan class
// with RecurringTimeSpan mixin which adds recurrence support
class MyTimeRange extends RecurringTimeSpan(TimeSpan) {}

// Define a new store extending the Store class
// with RecurringTimeSpansMixin mixin to add recurrence support to the store.
// This store will contain time ranges.
class MyTimeRangeStore extends RecurringTimeSpansMixin(Store) {
    static get defaultConfig() {
        return {
            // use our new MyTimeRange model
            modelClass : MyTimeRange,
            storeId    : 'timeRanges'
        };
    }
}

[....]

const timeRangeStore = new MyTimeRangeStore({
        data : [{
            "id"       : 1,
            "startDate": "2019-01-20",
            "duration" : 1,
            "durationUnit" : "d"
          }]
    });
    
return ( <BryntumGantt timeRangesFeature={{ store : timeRangeStore }}

All the best,
Alex


Post by abhilashlr »

alex.l wrote: Wed Feb 17, 2021 4:02 pm

Yes, I've opened a ticket to fix it: https://github.com/bryntum/support/issues/2391

After it will be fixed, we will be needed to add some code to make it works, but only after the bug will be fixed:

import { RecurringTimeSpan, RecurringTimeSpansMixin } from 'bryntum-gantt';
// Define a new Model extending TimeSpan class
// with RecurringTimeSpan mixin which adds recurrence support
class MyTimeRange extends RecurringTimeSpan(TimeSpan) {}

// Define a new store extending the Store class
// with RecurringTimeSpansMixin mixin to add recurrence support to the store.
// This store will contain time ranges.
class MyTimeRangeStore extends RecurringTimeSpansMixin(Store) {
    static get defaultConfig() {
        return {
            // use our new MyTimeRange model
            modelClass : MyTimeRange,
            storeId    : 'timeRanges'
        };
    }
}

[....]

const timeRangeStore = new MyTimeRangeStore({
        data : [{
            "id"       : 1,
            "startDate": "2019-01-20",
            "duration" : 1,
            "durationUnit" : "d"
          }]
    });
    
return ( <BryntumGantt timeRangesFeature={{ store : timeRangeStore }}

I was also trying this from the example and the imports didn't work. Thought that is an incorrect way. It would be nice if this bug can be prioritised so we can start using the imports for custom time range store.

Thanks :)


Post by abhilashlr »

Do we know when this will be prioritised for fix?


Post by alex.l »

Hi abhilashlr,

This bug will be fixed as a part of https://github.com/bryntum/support/issues/1808 and will be available in 4.1.0 release.

All the best,
Alex

All the best,
Alex


Post Reply