Hi Bob,
Thanks for the update.
Based on your updated details, we have modified the sample with Timeline views and resources and that can be available in below link.
In the above sample, we have applied the category color of the events based on the status.
Data.ts
{
Id: 2,
Subject: 'Art & Painting Gallery',
StartTime: new Date(2018, 1, 12, 12, 0),
EndTime: new Date(2018, 1, 12, 14, 0),
EventType: 'public-event',
City: 'Costa Rica',
CategoryColor: '#357cd2',
TaskId: 1
}, {
Id: 3,
Subject: 'Dany Birthday Celebration',
StartTime: new Date(2018, 1, 13, 10, 0),
EndTime: new Date(2018, 1, 13, 11, 30),
EventType: 'family-event',
City: 'Kirkland',
CategoryColor: '#7fa900',
TaskId: 3
}, {
Id: 4,
Subject: 'John Wedding Anniversary',
StartTime: new Date(2018, 1, 14, 9, 0),
EndTime: new Date(2018, 1, 14, 10, 0),
EventType: 'family-event',
City: 'Redmond',
CategoryColor: '#ea7a57',
TaskId: 4
},
App.component.ts
oneventRendered(args: EventRenderedArgs): void {
let categoryColor: string = args.data.CategoryColor as string;
if (!args.element || !categoryColor) {
return;
}
if (this.scheduleObj.currentView === "Agenda") {
(args.element
.firstChild as HTMLElement).style.borderLeftColor = categoryColor;
} else {
args.element.style.backgroundColor = categoryColor;
}
}
Output:
Here the appointment color in not based on the resources but is based on the category color which we already mentioned in the event object.
Kindly check the above and get back to us if you need any further assistance.
Regards,
Vengatesh.