Question

I'd like to use the library DHTMLX : i'd like to use this view : Time Line View so i change my view index.cshtml to this one :

<!DOCTYPE html>
<html>
<head>
    <title>DHXScheduler initialization sample</title>
    <script src="~/Scripts/dhtmlxScheduler/ext/dhtmlxscheduler_timeline.js" ></script>
    <script src="~/Scripts/dhtmlxScheduler/ext/dhtmlxscheduler_treetimeline.js" ></script>
    <script>
        scheduler.locale.labels.timeline_tab = "Timeline";
        scheduler.createTimelineView({
            name: "timeline",
            x_unit: "minute",//measuring unit of the X-Axis.
            x_date: "%H:%i", //date format of the X-Axis
            x_step: 30,      //X-Axis step in 'x_unit's
            x_size: 24,      //X-Axis length specified as the total number of 'x_step's
            x_start: 16,     //X-Axis offset in 'x_unit's
            x_length: 48,    //number of 'x_step's that will be scrolled at a time
            y_unit:         //sections of the view (titles of Y-Axis)
               [{ key: 1, label: "Section A" },
                { key: 2, label: "Section B" },
                { key: 3, label: "Section C" },
                { key: 4, label: "Section D" }],
            y_property: "section_id", //mapped data property
            render: "bar"             //view mode
        });
</script>
    <style>
        body
        {
            background-color:#eee;
        }
    </style>
</head>
<body>
    <div style="height:700px;width:900px;margin:0 auto">
       @Html.Raw(Model.Render())
         </div>
    <div id="scheduler_here" class="dhx_cal_container" >
    <div class="dhx_cal_navline">
    <div class="dhx_cal_tab" name="timeline_tab" style="right:280px;">
     </div>
    </div>
    </div>
    
</body>
</html>

i'd like to see as a result this view result1

but i have this view : result2

So what is the problem in the snippet? How can i change it to get a good result?

Était-ce utile?

La solution

scheduler.Initialview="viewname";
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top