Set event color as color in source XML file

Hi All

I’m using dhtmlxScheduler v.4.0.1.

I have a timeline view that loads data from an xml file.

Up until now we have been coloring events based on a type and selecting a class dynamically using

scheduler.templates.event_class = function (start, end, event)

There are 6 types and for 5 of them we still want to use a class, but if type = “Live” I need to use the color in the XML node. One of the elements in the XML is , which contains a hex string (e.g. #ff0000)

How and where would I set the event’s background color based on the value in the XML?




You need to set required event’s color in the data object. Sample:

Thanks, I saw that sample, but I can; figure out how I’d do it when I’m loading data from XML.