Event color on timeline based on parameter

Hi everybody,
i wrote yesterday asking for some question: i’ve solved it using timeline.

Now i’ve another problem: i need to set different colour to the event in the timeline. The color choosing policies is based on a parameter passed in the xml data.

Is there some solutions to this issue?

Thank you a lot

I’ve found some code on the documentation but using it, i can’t get the result i expece.

I past my code below:

function init(){
                var units = [..omiss..];
                var ticket_state = [..omiss..]
                var pdp_state =    [..omiss..];
                    name:	    "timeline",
                    x_unit:	    "day",
                    x_date:	    "%d %M",
                    x_step:	    1,
                    x_size:	    7,
                    y_unit:     units,
                    y_property: "section_id",
                    render:	    "bar"
                //configurazione finestra dettaglio/inserimento
	   scheduler.config.xml_date = "%d/%m/%Y %H:%i";
                scheduler.config.details_on_create = true;
                scheduler.config.details_on_dblclick = true;
	    scheduler.config.lightbox.sections = [
			        { name: "description", height: 130, map_to: "text", type: "textarea", focus: true },
			        { name: "custom", height: 23, type: "select", options: units, map_to: "section_id" },
                    { name: "custom_ticket_state", height: 23, type: "select", options: ticket_state, map_to: "ticket_state_id" },
                    { name: "custom_pdp_state", height: 23, type: "select", options: pdp_state, map_to: "pdp_state_id" },
			        { name: "time", height: 72, type: "time", map_to: "auto" }

                //load data
                scheduler.init('scheduler_here', new Date(), "timeline");
                    return 'past_event';
                    return "Text:<b> "+event.text+"</b><br>"+"Date."+event.start_date;

the two last instruction seems not to be interpretated.

Can anyone help me?


Solved… in timeline i have to use:
scheduler.templates.event_bar_text instead of scheduler.templates.event_text

Thanks anyway