hi @s44
consider this:
this data is retrieved when you select the calendar date, something like Filter(yourData, dateArriv >= SelectedDateInCal && dateFin <= SelectedDateInCal)
Data
ClearCollect(colGantt,
{__name: "a", __start: 10, __end: 12, __stat: "active"},
{__name: "b", __start: 14, __end: 18, __stat: "delayed"},
{__name: "c", __start: 07, __end: 08, __stat: "completed"}
)
Gannt Hour header (Gallery)
ForAll(Sequence(24,0),{_hour: Text(Value,"#00") &":00"})
Add two galleries
Gal1: Blank vertical
Gal2: blank horizontal (sub/child gallery to Gal1)
add the status to see if time is booked, where the time starts and status of the "project"
With(
{ __Object: LookUp(colGantt, __name = lblSelectedName.Text)},
AddColumns(
ForAll(Sequence(24,0),{_hour: Value}),
"_booked", //this is true is the value is between the start and end hour
And(
_hour >= Value(Left(__Object.__start, 2)) ,
_hour <= Value(Left(__Object.__end, 2))
),
"_stat", //status of the projetc
ThisItem.__stat,
"_firstcol", //the first hor when this is true, to be used later
_hour = Value(Left(__Object.__start, 2))
)
)
Galleries design, i will leave that up to you
Gal1:
add two labels
lbSelectedStatus: ThisItem.__stat // to determine the color code later
lblSelectedName = ThisItem.__name //to highlight the project name later and to do come conditional statement in Gal2
Gal2
Add the first code bit to the Items = With(
{ __Object: LookUp(colGantt, __name = lblSelectedName.Text)},... //as above
Add a labelt to the Gal2
Size the label as you need
Set the Fill as you need, here i used (_booked and _stat are those columns added above)
Switch(true,
ThisItem._booked && ThisItem._stat = "active", Orange,
ThisItem._booked && ThisItem._stat = "delayed", Red,
ThisItem._booked && ThisItem._stat = "completed", Green,
White
)
Last step
set the Text = If(ThisItem._firstcol, lblSelectedName.Text) //if it i sthe first hour the project name will display
Result

Hope it helps,
R