Employee Week View in Timeline Sample?


#1

Using the example here, do you have a version that shows the Employees name on the left and a Week view at the top?

https://dhtmlx.com/docs/products/dhtmlxScheduler/sample_timeline.shtml

We are looking for a way to make it easy to schedule employees based on which construction project they should be on for that day.

THanks
Steve


#2

Hi Steve,
Sorry for the delay. Regarding this question:

Using the example here, do you have a version that shows the Employees name on the left and a Week view at the top?

If I understood you correctly, you want to show the Employees name on the y-axis and days of the week on x_axis. You can customize the X-scale step and size in the Timeline view to show one week on X-axis there.
Please, use the createTimelineView method and properties of the configuration object of the Timeline view to solve it:

var sections=[
  {key:1, label:"James Smith"},
  {key:2, label:"John Williams"},
  {key:3, label:"David Miller"},
  {key:4, label:"Linda Brown"}
];

scheduler.createTimelineView({
  name:    "timeline",
  x_unit:    "day",
  x_date:    "%D, %j %F",
  x_step:    1,
  x_size: 7,
  y_unit:    sections,
  y_property:    "section_id",
  render:"bar"
});
scheduler.date.timeline_start = scheduler.date.week_start;

A snippet with week scale in the Timeline view:
https://snippet.dhtmlx.com/5/6a3336c08

We are looking for a way to make it easy to schedule employees based on which construction project they should be on for that day.

Using the dhtmlxscheduler_treetimeline.js extension, you can display constructions and employees as children in the scheduler. In order for the same employee relate to different constructions, you can make them as a child elements with the same labels, but with the different ids:

var elements = [
  {key:10, label:"Construction 1", open: true, children: [
    {key:1.10, label:"Emploee 1"},
    {key:2.10, label:"Emploee 2"}
  ]},
  {key:20, label:"Construction 2", open:true, children: [
    {key:1.20, label:"Emploee 1"},
{key:2.20, label:"Emploee 2"}
  ]}
];

Here is a demo:
http://snippet.dhtmlx.com/5/1b307b123

If you need something different, please describe your question with more details or send us some image of how it should look.