showing multi day events in a timeline view

Hi All,

How to show multi day events in a scheduler timeline view, below is the scenario for multi day event.

i have an event with start time 10:00 PM today and End Time: 4:00 AM tomorrow.

basically my first hour and last hour of a scheduler falls on two different dates.

Thanks ,
L Sreedhar

Hello,

Yes, it’s possible. Check next samples with multi day events:
docs.dhtmlx.com/scheduler/sample … scale.html
docs.dhtmlx.com/scheduler/sample … lines.html

Hi Pollina ,

I am building timeline view in the controller class in c#. (basically scheduler is created in controller class in my app), i am not getting the option to set second_scale .

can you give me the link where i can find samples regarding multi day events time line views creating in a controller class in c#.

below is the code i have used

var timeline = new TimelineView(“timeline”, “crew_id”);
timeline.X_Unit = TimelineView.XScaleUnits.Hour;
timeline.X_Size = 24;
timeline.X_Start = 0;
timeline.X_Length = 12;
//timeline.AddSecondScale(TimelineView.XScaleUnits.Day, “%j, %M”);
timeline.X_Step = 3;
timeline.ResizeEvents = false;
timeline.FitEvents = false;
timeline.TabClass = “dhx_cal_tab_second”;

Thanks ,
L Sreedhar

Please, add the following lines instead of “timeline.AddSecondScale(…);” to set second_scale.

timeline.second_scale = {
x_unit:“day”,
x_date: “%j, %M”
};

its working now

Thanks ,
L Sreedhar

how to show hours in 24 hour format in timeline view

Thanks ,
L Sreedhar

how to show two complete days in timeline view,

iam able to show only one full day and part of second day using below code

       timeline.AddSecondScale(TimelineView.XScaleUnits.Day, "%j %F %Y");
        timeline.X_Unit = TimelineView.XScaleUnits.Hour;
        timeline.X_Step = 1;
        timeline.X_Size = endtime - starttime;
        timeline.X_Start = starttime;
        timeline.X_Length = 24;

when i show two full days (multi day) in time line view , how to show hours in 24 hour format .

Thanks ,
L Sreedhar

Hello,

Please, check the article how to specify date format
docs.dhtmlx.com/scheduler/settings_format.html

All available properties to configure Timeline view:
docs.dhtmlx.com/scheduler/api__s … eview.html

Demo with two full days on Timeline view scale:
docs.dhtmlx.com/scheduler/snippet/5c06045f

Hi All,

In scheduler timeline we want to show multiple days. We want to show today’s date time with yesterdays date time also.
Here is my code-
var units = new TimelineView(“Orders”, “car_id”);
units.AddSecondScale(TimelineView.XScaleUnits.Day, “%F %d”);
//units.Name = “Hi”;
units.X_Date = “%H”;
units.X_Step = 01;
units.X_Size = 20;
units.X_Start = 05;
units.X_Length = 24;

        //width of the first column
        units.Dx = 120;
        //row height
        units.Dy = 60;
        //order bar height Added on 22-11-2017
        units.EventDy = 20;
        units.AddOptions(cars);
        units.RenderMode = TimelineView.RenderModes.Bar;
        scheduler.Views.Clear();
        scheduler.Views.Add(units);
        scheduler.InitialView = scheduler.Views[0].Name;

What changes need to be done, in order to get yesterdays datetime with today’s datetime?

Hi All,
In time line i wanted to show as it is in screen shot.

My code is live below. In page load i had given like below:-
scheduler.InitialDate = System.DateTime.Now.AddHours(-24);

And in ConfigureView my looks as below-
var units = new TimelineView(“Orders”, “car_id”);
units.AddSecondScale(TimelineView.XScaleUnits.Day, “%F %d”);
//units.Name = “Hi”;
units.X_Date = “%H”;
// To Get D-12,D,D+12 hrs 27-11-2017
units.X_Step = 1;
units.X_Length = 24;
units.X_Size = 24 * 2;
units.X_Start = 12;
//width of the first column
units.Dx = 150;
//row height
units.Dy = 60;
//order bar height Added on 22-11-2017

        units.EventDy = 20;
        units.AddOptions(cars);

Am showing D-12, D and D+12 hrs in scheduler time line. So according to that i have to show 3 days range on timline_date.
What and all changes need to be done in coding. Please help me out as soon as possible. Thanks in advance.


Hi,
You should use timeline_date template to set the required date in the header docs.dhtmlx.com/scheduler/timel … lates.html