我想使用这个库DHTMLX
:我想使用这个视图:时间线视图
所以我将我的视图更改index.cshtml
为这个:
<!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>
结果我想看到这个视图
但我有这样的看法:
那么片段中的问题是什么?我怎样才能改变它以获得好的结果?