gantt-task-react
gantt-task-react copied to clipboard
How to disable the Name, To, From, & percent fields from the display?
Is it possible to disable
- the
Name, To, From
section and only display the gantt chart? - The
percent
field It wasn't clear from the Readme and display options if this was possible?

Thanks, Derek
Looks like i can hide the Name, From, To
with
listCellWidth=''
But still trying to figuring the percent
https://github.com/MaTeMaTuK/gantt-task-react/blob/main/src/components/other/tooltip.tsx#L140-L143 looks like if you set task.progress
to be undefined it should work.
However, the typescript is not optional

I can override it with, but be nice if i can just pass in a undefined for progress
but not sure if there is other code that depend on it like the coloring.
task: Task;
fontSize: string;
fontFamily: string;
}> = ({ task, fontSize, fontFamily }) => {
const style = {
fontSize,
fontFamily,
};
return (
<div className={css({
background: "#fff",
padding: 12,
boxShadow: "0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23)"
})} style={style}>
<b style={{ fontSize: fontSize + 6 }}>{`${
task.name
}: ${task.start.getDate()}-${
task.start.getMonth() + 1
}-${task.start.getFullYear()} - ${task.end.getDate()}-${
task.end.getMonth() + 1
}-${task.end.getFullYear()}`}</b>
{task.end.getTime() - task.start.getTime() !== 0 && (
<p className={css({
fontSize: 12,
marginBottom: 6,
color: "#666"
})}>{`Duration: ${~~(
(task.end.getTime() - task.start.getTime()) /
(1000 * 60 * 60 * 24)
)} day(s)`}</p>
)}
</div>
);
}