jsgantt-improved
jsgantt-improved copied to clipboard
Change duration format
Describe the solution you'd like I want to display the duration in the column in hours instead of days.
I think this is dup to https://github.com/jsGanttImproved/jsgantt-improved/issues/253#issuecomment-529994760 right?
No. I don't want an hour view. I want the duration on the column to be shown in hours instead of days, weeks or months depending on the view mode.
Makes sense, so in the day view, when the duration is less than a day, show the duration in hours.
is this correct?
I want to have a fixed duration format independent of view. In my case, all tasks are counted in hours, so in day, week, month and quarter view, the duration will display the value I sent in hours.
I see.. well.. this should not be hard to implement
-
create a new option for the gantchart will include a durationFormat. https://github.com/jsGanttImproved/jsgantt-improved/blob/master/src/options.ts#L77
-
You can make a logic here using this durationFormat to change how it calculates: https://github.com/jsGanttImproved/jsgantt-improved/blob/master/src/task.ts#L249
-
include the hour format here https://github.com/jsGanttImproved/jsgantt-improved/blob/master/src/task.ts#L263