在angularjs的DHtmlX调度程序上添加时间线事件

编程入门 行业动态 更新时间:2024-10-11 07:32:30
本文介绍了在angularjs的DHtmlX调度程序上添加时间线事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我已经在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调度程序上添加时间线事件

本文发布于:2023-11-25 13:04:57,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1629869.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:添加时间   事件   程序   angularjs   DHtmlX

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!