Customize the sidebars using the columns (left) and rightGrid (right, optional) arrays. Each column object supports:
name: The data field name.width, min_width, max_width: Dimensional constraints.tree: Boolean indicating if the column should act as the tree structure.label: Header text.resize: Boolean for resizability.template: Function returning an HTML string for the cell content.editor: Configuration for inline editing.
javascriptgantt.options.columns = [
{
name: "text",
width: 245,
min_width: 80,
max_width: 300,
tree: true,
label: "Name",
resize: true,
template: (task) => `<span>${task.parent == 0 ? task.text : task.subject}</span>`,
editor: {type: "text", map_to: "text"},
},
{
name: "estimated_hours",
width: 100,
align: "center",
label: "Planned Hour",
template: (task) => `<span>${task.estimated_hours || ""} </span>`,
},
];
javascriptgantt.options.rightGrid = [
{
name: "estimated_hours",
label: "Total",
width: 100,
align: "center",
template: (task) => `<b>${task.estimated_hours}</b>`,
}
];