Hello,
I got the PRO version of the scheduler timeline.
I want to group lines with render: “tree”
Unfortunatly it’s not working, it only show 2 normal lines:
Production Department
Sales and Marketing
Here is my code :
scheduler.skin = 'material';
scheduler.config.header = [
'date',
{ html: "+", click: () => { this.zoomIn(); }, css: "dhx_zoom_in_button" },
{ html: "-", click: () => { this.zoomOut(); }, css: "dhx_zoom_out_button" },
'prev',
'today',
'next'
];
scheduler.config.readonly = true;
scheduler.createTimelineView({
name: "timeline",
render: "tree", // view mode
x_unit: "day", // measuring unit of the X-Axis.
x_date: "%d/%m", // date format of the X-Axis
x_step: 1, // X-Axis step in 'x_unit's
x_size: 180, // X-Axis length specified as the total number of 'x_step's
x_start: 0, // X-Axis offset in 'x_unit's
x_length: 7, // number of 'x_step's that will be scrolled at a time
// y_unit: // sections of the view (titles of Y-Axis)
// scheduler.serverList("groups"),
y_unit: [
{
key: "production", label: "Production Department", children: [
{
key: "p1", label: "Managers", children: [
{ key: "pm1", label: "John Williams" },
{ key: "pm2", label: "David Miller" }
]
},
{ key: "p2", label: "Linda Brown" },
{ key: "p3", label: "George Lucas" }
]
},
{
key: "sales", label: "Sales and Marketing", children: [
{ key: "s1", label: "Kate Moss" },
{ key: "s2", label: "Dian Fossey" }
]
}
],
y_property: "trainer_id", // mapped data property
scrollable: true,
column_width: 210,
//the cell interval will be daytime from 8.00 till 18.00
first_hour: 8,
last_hour: 18,
second_scale: {
x_unit: "week", // the measuring unit of the axis (by default, 'minute')
x_date: "Week %W" //the date format of the axis ("July 01")
}
});