Hi,
How to set the event colour, if the event is multi section and Repeated?
Hi,
How to set the event colour, if the event is multi section and Repeated?
Hi,
have you checked this demo?
docs.dhtmlx.com/scheduler/sample … vents.html
If so, can you please clarify your question - what configs/extensions do you use, how do you coloring your events, and what is not working?
Hi,
Thanks for the demo, But there is no repeat event in this demo. I have created time line view with multi section and repeatable event. Please check below code.
Example:
var elements = [ // original hierarhical array to display
{key:10, label:“Delhi”, open: true, children: [
{key:20, label:“Resource1”},
{key:30, label:“Resource2”}
]},
{key:40, label:“Mumbai”, open:true, children: [
{key:50, label:“Resource3”},
{key:60, label:“Resource4”}
]},
{key:70, label:“Chennai”, open: true, children: [
{key:80, label:“Resource5”},
{key:90, label:“Resource6”}
]},
{key:100, label:“Bangalore”, open:true, children: [
{key:110, label:“Resource7”},
{key:120, label:“Resource8”}
]},
{key:130, label:“Hyderabad”, open:true, children: [
{key:140, label:“Resource9”},
{key:150, label:“Resource10”}
]}
];
//console.log(elements);
scheduler.createTimelineView({
section_autoheight: false,
name: "timeline",
x_unit: "minute",
x_date: "%H:%i",
x_step: 30,
x_size: 24,
x_start: 0,
x_length:0,
y_unit: elements,
y_property: "section_id",
render: "tree",
folder_dy:20,
dy:60
});
scheduler.config.lightbox.sections=[
{name:“description”, height:130, map_to:“text”, type:“textarea” , focus:true},
{name:“custom”, height:23, type:“timeline”, options:null , map_to:“section_id” }, //type should be the same as name of the tab
{name:“time”, height:72, type:“time”, map_to:“auto”}
]
scheduler.init('scheduler_here',new Date(),"timeline");
scheduler.parse([
[u]{ start_date: "2012-07-01 00:00", end_date: "9999-01-31 00:00", text:"Task A-12458", section_id:'20,30', "event_pid":"","event_length":7200, "rec_type":"day_1___#10",id:"1",color:'red'}[/u],
{ start_date: "2016-01-15 03:00", end_date: "2016-01-15 05:00", text:"Task A-89411", section_id:20, color:"green",id:"2"},
{ start_date: "2016-01-15 10:00", end_date: "2016-01-15 14:00", text:"Task A-64168", section_id:20, color:"blue",id:"3"},
{ start_date: "2016-01-15 16:00", end_date: "2016-01-15 17:00", text:"Task A-46598", section_id:20, color:"green",id:"4"},
{ start_date: "2016-01-15 12:00", end_date: "2016-01-15 14:00", text:"Task B-48865", section_id:30,color:"blue",id:"5"},
{ start_date: "2016-01-15 14:00", end_date: "2016-01-15 16:00", text:"Task B-44864", section_id:30,color:"green",id:"6"},
{ start_date: "2016-01-15 16:30", end_date: "2016-01-15 18:00", text:"Task B-46558", section_id:30,color:"blue",id:"7"},
{ start_date: "2016-01-15 18:30", end_date: "2016-01-15 20:00", text:"Task B-45564", section_id:30,color:"green",id:"8"},
{ start_date: "2016-01-15 08:00", end_date: "2016-01-15 10:00", text:"Task C-32421", section_id:50,color:"blue",id:"9"},
{ start_date: "2016-01-15 14:30", end_date: "2016-01-15 16:45", text:"Task C-14244", section_id:50,color:"green",id:"10"},
{ start_date: "2016-01-15 09:20", end_date: "2016-01-15 10:20", text:"Task D-52688", section_id:60,color:"blue",id:"11"},
{ start_date: "2016-01-15 11:40", end_date: "2016-01-15 12:30", text:"Task D-46588", section_id:60,color:"green",id:"12"},
{ start_date: "2016-01-15 12:40", end_date: "2016-01-15 14:00", text:"Task D-12458", section_id:60,color:"blue",id:"13"},
{ start_date: "2016-01-15 01:20", end_date: "2016-01-15 02:30", text:"Task D-12345", section_id:80,color:"green",id:"14"},
{ start_date: "2016-01-15 03:40", end_date: "2016-01-15 4:50", text:"Task D-23456", section_id:80,color:"blue",id:"15"},
{ start_date: "2016-01-15 5:00", end_date: "2016-01-15 6:00", text:"Task D-34567", section_id:80,color:"green",id:"16"},
{ start_date: "2016-01-15 00:20", end_date: "2016-01-15 02:30", text:"Task D-45678", section_id:90,color:"blue",id:"17"},
{ start_date: "2016-01-15 3:40", end_date: "2016-01-15 5:50", text:"Task D-56789", section_id:90,color:"green",id:"18"},
{ start_date: "2016-01-15 6:00", end_date: "2016-01-15 8:00", text:"Task D-67890", section_id:90,color:"blue",id:"19"},
{ start_date: "2016-01-15 00:20", end_date: "2016-01-15 02:30", text:"Task D-45678", section_id:120},
{ start_date: "2016-01-15 3:40", end_date: "2016-01-15 5:50", text:"Task D-56789", section_id:120},
{ start_date: "2016-01-15 6:00", end_date: "2016-01-15 8:00", text:"Task D-67890", section_id:120}
],"json");
In This above code, my underlined event is repeated (from :2012-07-01 00:00 ,to:9999-01-31 00:00) and multi section(for 20,30) and i have given color ‘red’ to that event. i’m unable to apply red color to that event.
please suggest or give sample code to resolve the issue.
Thanks