Premium support for our pure JavaScript UI components


Post by fdyrs »

Hi,

I have AnotherStartDate and AnotherFinishDate in my task data set. I want to draw that as a "shadow activity" in the gantt. Would that be possible? (see image)

I did try using indicators but it does not look like it will support endDate

You manage to do it with the early and late dates. So I want the exact same posibility with a custom time span

https://www.bryntum.com/docs/gantt/api/Gantt/feature/Indicators#config-items

Thank you!

Attachments
Untitled11.png
Untitled11.png (9.18 KiB) Viewed 151 times

Post by tasnim »

Hi,
We have an example of the indicators here https://bryntum.com/examples/gantt/indicators/

    features : {
        // Enabling and configuring the Indicators feature
        indicators : {
            items : {
                // Early start/end dates indicator disabled
                earlyDates : false,

            // Custom indicator added
            beer : taskRecord =>  taskRecord.name.startsWith('C') ? {
                // you can replace taskRecord.endDate with your custom timespan
                startDate : DateHelper.add(taskRecord.endDate, 2, 'day'),
                cls       : 'beer',
                iconCls   : 'b-fa b-fa-beer',
                name      : 'Post-task celebration beer'
            } : null
        }
    }
},

By the way, There is a similar thing available here https://bryntum.com/docs/gantt/api/Gantt/model/Baseline
And here is a demo of that https://bryntum.com/examples/gantt/baselines/


Post by fdyrs »

Can you send me the same indicator example as you refere to above, but for the "LateDates" ? Since the late dates accepts an end date.


Post by tasnim »

Hi,
I've just changed the baseline date

                                "baselines"   : [
                                    {
                                        "startDate" : "2019-01-15T23:00:00",
                                        "endDate"   : "2019-01-20T23:00:00"
                                    }
                                ]

You can also check it in the sources that you've downloaded in Gantt/examples/baselines

Attachments
D1eErtFvZG.png
D1eErtFvZG.png (14.98 KiB) Viewed 140 times

Post by fdyrs »

You are referring to baseline, as I already wrote, we have already implemented baselines, and that is working fine!

What I want is something else, something that is similar to "lateDates" and "earlyDates" as you have in your documentation for indicators. But do you have any examples for how I can make something similar like the lateDates, as an indicator

Attachments
Capture.PNG
Capture.PNG (8.94 KiB) Viewed 138 times

Post by tasnim »

Sorry that I misunderstood, Here is an example of lateDates and earlyDates

    features : {
        // Enabling and configuring the Indicators feature
        indicators : {
            items : {
                earlyDates : taskRecord => taskRecord.earlyStartDate && !taskRecord.isMilestone ? {
                    startDate : taskRecord.earlyStartDate,
                    endDate   : taskRecord.earlyEndDate,
                    cls       : 'b-bottom b-early-dates',
                    name      : 'World'
                } : null,

            lateDates : taskRecord => taskRecord.lateStartDate && !taskRecord.isMilestone ? {
                startDate : taskRecord.lateStartDate,
                endDate   : taskRecord.lateEndDate,
                cls       : 'b-bottom b-late-dates',
                name      : 'Hello'
            } : null,
        }
    }
}

Good Luck :),
Tasnim


Post by fdyrs »

Perfect! Thank you very much! :)


Post Reply