我已经在angularjs应用程序借助此链接. 我已经按照上述链接的所有步骤操作,并且可以正常工作.
I have injected DHtmlX scheduler in my angularjs app with the help of this link. I have followed all the steps of the above link and it's working.
现在,我正在尝试在角度DHtmlX调度程序中添加时间线事件.但是我没有办法在上面添加时间线事件.请帮忙.
Now, I am trying to add timeline event in angular DHtmlX scheduler. But I am not getting the way how can I add timeline event on it. please help out on this.
任何建议或帮助将不胜感激,在此先感谢
Any suggestion or help would be appreciated , thanks in advance
推荐答案我有办法在angularjs的DHtmlX调度程序上添加时间线事件,
I have got the way to add timeline event on DHtmlX scheduler in angularjs,
首先添加此js文件在您的angularjs项目中添加了dhtmlxscheduler_timeline.js .(将其添加到src/assets/js文件夹中并调用此文件)
First add this js file dhtmlxscheduler_timeline.js in your angularjs project.(add this in src/assets/js folder and call this file )
其次在'dhxScheduler'指令中添加此代码
Second add this code in directive of 'dhxScheduler' `
var sections=[ {key:1, label:"Section A"}, {key:2, label:"Section B"} ]; 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:0, //X-Axis offset in 'x_unit's x_length:48, first_hour:10, last_hour:18, y_unit: sections, y_property:"unit_id", render:"bar" }); //--------------- end of timeline -----------// scheduler.init($element[0], $scope.scheduler.date, $scope.scheduler.mode); scheduler.parse([ {id:1, text:"Task1", start_date:"12/10/2013 12:00", end_date:"12/10/2013 21:00", unit_id:"1"}, {id:2, text:"Task2", start_date:"17/10/2013 09:00", end_date:"17/10/2013 15:00", unit_id:"2"} ],"json");`有关此访问的更多详细信息,请访问以下两个链接 1) Link1 2) Link2
for more detail on this visit these two links 1) Link1 2) Link2
第三行在视图文件(html文件)中添加
Third add this line in view file(html file)
<div class="dhx_cal_tab" name="timeline_tab" style="right:280px;"></div>第四次在'dhxTemplate'指令中添加此行
Fourth add this line in directive of 'dhxTemplate'
scheduler.locale.labels.timeline_tab ="Timeline";
这对我有用,希望这对大家也有用,谢谢
this works for me, hope this will also works for you all, thanks
更多推荐
在angularjs的DHtmlX调度程序上添加时间线事件
发布评论