带有 Reactjs 的 DHTMLX 甘特图不显示滚动
DHTMLX Gantt Chart with Reactjs doesn't show scroll
我使用的是 React ver 16.7.0 和 DHTMLX Gantt ver 7.0.11,标准版。问题是滚动列未显示在 24" 或更大的显示器中,但它可以显示在我的笔记本电脑显示器 (14")
我的布局代码
gantt.config.grid_elastic_columns = true;
gantt.config.columns=[
{name:"text", label:"Task name", width: '*', min_width: 300, max_width: 1200, tree:true, },
{name:"assignTo", label:"Assign To", align: "center", width: '*', min_width: 100, max_width: 1200, },
{name:"start_date", label:"Start Date", align: "center", width: '*', min_width: 100, max_width:200, },
{name:"endDate", label:"Date Line", align: "center", width: '*', min_width: 100, max_width:200, },
// {name:"duration", label:"Duration", align: "center" },
{name:"budgetHour", label:"Budget Hour", align: "center" },
];
gantt.config.grid_width = 500;
gantt.config.layout = {
css: "gantt_container",
cols: [
{
width: 500,
min_width: 300,
// adding horizontal scrollbar to the grid via the scrollX attribute
rows:[
{view: "grid", scrollX: "gridScroll", scrollable: true, scrollY: "scrollVer"},
{view: "scrollbar", id: "gridScroll"}
]
},
{resizer: true, width: 1},
{
rows:[
{view: "timeline", scrollX: "scrollHor", scrollY: "scrollVer"},
{view: "scrollbar", id: "scrollHor"}
]
},
{view: "scrollbar", id: "scrollVer"}
],
};
14" 显示器有滚动条
这里是 24 英寸显示器
*我尝试显示 19" 显示器滚动条
修复只是输入
gantt.config.scroll_size = 20;
我使用的是 React ver 16.7.0 和 DHTMLX Gantt ver 7.0.11,标准版。问题是滚动列未显示在 24" 或更大的显示器中,但它可以显示在我的笔记本电脑显示器 (14")
我的布局代码
gantt.config.grid_elastic_columns = true;
gantt.config.columns=[
{name:"text", label:"Task name", width: '*', min_width: 300, max_width: 1200, tree:true, },
{name:"assignTo", label:"Assign To", align: "center", width: '*', min_width: 100, max_width: 1200, },
{name:"start_date", label:"Start Date", align: "center", width: '*', min_width: 100, max_width:200, },
{name:"endDate", label:"Date Line", align: "center", width: '*', min_width: 100, max_width:200, },
// {name:"duration", label:"Duration", align: "center" },
{name:"budgetHour", label:"Budget Hour", align: "center" },
];
gantt.config.grid_width = 500;
gantt.config.layout = {
css: "gantt_container",
cols: [
{
width: 500,
min_width: 300,
// adding horizontal scrollbar to the grid via the scrollX attribute
rows:[
{view: "grid", scrollX: "gridScroll", scrollable: true, scrollY: "scrollVer"},
{view: "scrollbar", id: "gridScroll"}
]
},
{resizer: true, width: 1},
{
rows:[
{view: "timeline", scrollX: "scrollHor", scrollY: "scrollVer"},
{view: "scrollbar", id: "scrollHor"}
]
},
{view: "scrollbar", id: "scrollVer"}
],
};
14" 显示器有滚动条
这里是 24 英寸显示器
*我尝试显示 19" 显示器滚动条
修复只是输入
gantt.config.scroll_size = 20;