gantt icon indicating copy to clipboard operation
gantt copied to clipboard

Add hour view mode

Open anto-christo opened this issue 5 years ago • 7 comments

This PR adds an option to view tasks in hourly mode. Just add the hour value after the date and set the view_mode option to Hour.

Example

<script>
        var tasks = [
            {
                start: '2018-10-01 00',
                end: '2018-10-01 05',
                name: 'Redesign website',
                id: "Task 0",
                progress: 20
            },
            {
                start: '2018-10-01 01',
                end: '2018-10-01 08',
                name: 'Write new content',
                id: "Task 1",
                progress: 5,
                dependencies: 'Task 0'
            },
            {
                start: '2018-10-01 07',
                end: '2018-10-01 18',
                name: 'Apply new styles',
                id: "Task 2",
                progress: 10,
                dependencies: 'Task 1'
            }
        ]
        var gantt_chart = new Gantt(".gantt-target", tasks, {
            view_mode: 'Hour',
            language: 'en'
        });
    </script>

Output hour-view

Note The chart may take a long time to load or the page may crash if Hour view mode is used with long tasks that span over multiple years.

@netchampfaris kindly review.

anto-christo avatar Jul 08 '19 12:07 anto-christo

Hello can someone explain how to use this version with the Hour View. The latest vailable version doesn't include it ? Thanks, Maarten,

MaartenMostert avatar Aug 02 '19 07:08 MaartenMostert

Hi Maarten Did you figure out how to use this version? I would also like to know. Regards, Wayne

WayneExall avatar Dec 09 '19 12:12 WayneExall

I have tested the hour view mode and it seems to work with simple data ;)

rhayart avatar Jan 16 '20 14:01 rhayart

this is awesome, any hope getting it in? I'll put in some work for this if needed

mgaitan09 avatar Jun 10 '20 03:06 mgaitan09

Hello can someone explain how to use this version with the Hour View. Does latest version includes hour view ? Can someone please help me on this ? Thanks, Pankti,

PanktiDoshi95 avatar Aug 11 '20 07:08 PanktiDoshi95

The PR is not merged into the master at the moment. I had to fork the project to merged the PR and use this feature.

rhayart avatar Aug 12 '20 11:08 rhayart

Is anyone downloaded this version of library? How do I get this version?

dhyunk avatar Jan 20 '21 14:01 dhyunk

Thank you very much ;). I haven't merged the PR directly as it's old and conflicts have grown, but have used your code to make the commit.

safwansamsudeen avatar Apr 05 '24 09:04 safwansamsudeen