How to setup up timelineview to display days on x-axis?

Any tips on how to display days on the x-axis of a timelineview? I copied the code from the car rental mvc 5 sample, and in the simple example below it displays 00:00 for each x-axis item. I added a second scale for testing and that displays exactly what I need, but I don’t need the second scale, only the first scale.

        var timeline = new TimelineView("timeline", "room_id");//initializes the view
        timeline.X_Step = 1;
        timeline.X_Size = 30;
        timeline.X_Unit = TimelineView.XScaleUnits.Day;
        timeline.AddSecondScale(TimelineView.XScaleUnits.Day, "%M %d");
        timeline.RenderMode = TimelineView.RenderModes.Tree;


Hello,
try this config:

timeline.X_Date =  "%M %d";

Thanks, that’s exactly what I needed.

Is is possible to have two x axis values split across two lines? For example, instead of having a second x axis element, can we have the following format split across two lines, without the need for two cells:

unitsFourWeek.X_Date = “%d %D”

I tried putting a newline char between them, but that broke the page.


Hi,
the date template returns a HTML string, so you need to use
tag for linebreaks

[code]
// increase height of the scale bar
scheduler.XY.scale_height = 40;

timeline.X_Date = “%d
%D”;[/code]

Thanks, Aliaksandr.