翻譯|使用教程|編輯:秦林|2022-09-30 10:20:42.333|閱讀 232 次
概述:這篇文章給大家講解如何利用dhtmlxGantt加載任務(wù)日期。
# 界面/圖表報(bào)表/文檔/IDE等千款熱門(mén)軟控件火熱銷(xiāo)售中 >>
相關(guān)鏈接:
這篇文章給大家講解如何利用dhtmlxGantt加載任務(wù)日期。
設(shè)置任務(wù)計(jì)劃
可以通過(guò)三種方式為數(shù)據(jù)饋送中的任務(wù)定義計(jì)劃:
未指定的屬性將根據(jù)數(shù)據(jù)對(duì)象中定義的屬性進(jìn)行計(jì)算。
end_date的優(yōu)先級(jí)高于duration參數(shù)。如果任務(wù)對(duì)象中指定了3個(gè)參數(shù),甘特圖將忽略持續(xù)時(shí)間參數(shù),任務(wù)將加載不同的持續(xù)時(shí)間值。例如:
{ "id":"20", "text":"Project #2", "start_date":"01-04-2025", "duration":3, "end_date":"05-04-2025", "order":10,"progress":0.4, "type": "project", "open": true } // the task above will be loaded with the duration value calculated in accordance // with the specified 'start_date' and 'end_date' { "id":"20", "text":"Project #2", "start_date":"01-04-2025", "duration":4, "end_date":"05-04-2025", "order":10,"progress":0.4, "type": "project", "open": true }
您可以在甘特圖中使用ISO日期格式。為此,您需要重新定義在甘特圖中解析和序列化日期的函數(shù):
gantt.templates.parse_date = function(date) { return new Date(date); }; gantt.templates.format_date = function(date) { return date.toISOString(); };
dhtmlxGantt是用于跨瀏覽器和跨平臺(tái)應(yīng)用程序的功能齊全的Gantt圖表,可滿(mǎn)足項(xiàng)目管理控件應(yīng)用程序的所有需求,是最完善的甘特圖圖表庫(kù)。了解更多DhtmlxGantt相關(guān)內(nèi)容和資訊,歡迎在線(xiàn)咨詢(xún)或者私信我獲取正版試用版及報(bào)價(jià)。
甘特圖控件交流群:764148812 歡迎進(jìn)群交流討論
更多正版甘特圖軟件下載、購(gòu)買(mǎi)、授權(quán)咨詢(xún),請(qǐng)點(diǎn)這里!
本站文章除注明轉(zhuǎn)載外,均為本站原創(chuàng)或翻譯。歡迎任何形式的轉(zhuǎn)載,但請(qǐng)務(wù)必注明出處、不得修改原文相關(guān)鏈接,如果存在內(nèi)容上的異議請(qǐng)郵件反饋至chenjj@fc6vip.cn