翻譯|使用教程|編輯:秦林|2022-10-13 13:11:32.133|閱讀 1 次
概述:這篇文章給大家講解dhtmlxGantt如何調(diào)整網(wǎng)格的行大小。
# 界面/圖表報(bào)表/文檔/IDE等千款熱門軟控件火熱銷售中 >>
相關(guān)鏈接:
這篇文章給大家講解dhtmlxGantt如何調(diào)整網(wǎng)格的行大小。
可以更改網(wǎng)格中單獨(dú)行的高度,dhtmlxGantt 庫(kù)提供了兩種管理行高的方法:
gantt.config.columns = [ {name:"wbs", label:"WBS", width:40, template:gantt.getWBSCode }, {name:"text", label:"Task name", tree:true, width:170 }, {name:"start_date", align:"center", width: 90}, {name:"duration", align:"center", width: 60}, {name:"add", width:40} ];
您可以根據(jù)需要調(diào)整特定行的高度。
為此,您需要重新定義 的row_height 和 bar_height屬性: 數(shù)據(jù)集中任務(wù)對(duì)象
gantt.parse({ data: [ { id: 11, text: "Project #1", type: "project", progress: 0.6, open: true, row_height: 70, bar_height: 60 }, { id: 12, text: "Task #1", start_date: "03-04-2018", duration: "5", parent: "11", progress: 1, open: true }, { id: 13, text: "Task #2", start_date: "03-04-2018", type: "project", parent: "11", progress: 0.5, open: true } ], links: [] });
或者您可以動(dòng)態(tài)實(shí)現(xiàn)它:
gantt.getTask(11).row_height = 50; gantt.getTask(11).bar_height = 25; // re-render Gantt to apply the changes gantt.render();
要讓用戶可以通過拖動(dòng)行的底部邊框來調(diào)整網(wǎng)格中的行大小,請(qǐng)將 gantt.config.resize_rows 選項(xiàng)設(shè)置為 true :
gantt.config.resize_rows = true;
gantt.config.min_task_grid_row_height : 選項(xiàng)提供了定義在調(diào)整大小期間可以為任務(wù)設(shè)置的最小行高的能力
gantt.config.min_task_grid_row_height = 45;
dhtmlxGantt是用于跨瀏覽器和跨平臺(tái)應(yīng)用程序的功能齊全的Gantt圖表,可滿足項(xiàng)目管理控件應(yīng)用程序的所有需求,是最完善的甘特圖圖表庫(kù)。了解更多DhtmlxGantt相關(guān)內(nèi)容和資訊,歡迎在線咨詢或者私信我獲取正版試用版及報(bào)價(jià)。
甘特圖控件交流群:764148812 歡迎進(jìn)群交流討論
更多正版甘特圖軟件下載、購(gòu)買、授權(quán)咨詢,請(qǐng)點(diǎn)這里!
本站文章除注明轉(zhuǎn)載外,均為本站原創(chuàng)或翻譯。歡迎任何形式的轉(zhuǎn)載,但請(qǐng)務(wù)必注明出處、不得修改原文相關(guān)鏈接,如果存在內(nèi)容上的異議請(qǐng)郵件反饋至chenjj@fc6vip.cn