Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Features requested #380

Open
coda1024 opened this issue Feb 27, 2024 · 2 comments
Open

Features requested #380

coda1024 opened this issue Feb 27, 2024 · 2 comments

Comments

@coda1024
Copy link

Hi, I dont know if you are taking feature requests but heres a few:

  • show the day of week on the top of the chart when zoomed to day level (eg, M T W)
  • vertical bands support - eg for the end date of a project, a red line down the chart would make that date obvious
  • support handler for single click. double click is supported currently and thats great. single would be good too (eg to show a side panel detail for a clicked task etc)

thanks

@safwansamsudeen
Copy link
Contributor

safwansamsudeen commented Apr 4, 2024

Thanks for the list!

These sound good - though I don't fully get point 3. You want a different popup for a single click?

@coda1024
Copy link
Author

coda1024 commented Apr 4, 2024

I was thinking it would be very nice to have more of a single click handler,

eg this on_click below actually triggers on double-click (unless I am doing it wrong),

    ganttChart = new Gantt('#gantt', tasks, {
        header_height: 50,
        view_modes: ['Quarter Day', 'Half Day', 'Day', 'Week', 'Month'],
        view_mode: 'Day',

        on_date_change: (task, start, end) => {
            debouncedSave(task.id, 'start', start);
            debouncedSave(task.id, 'end', end);
        },
        on_progress_change: function(task, progress) {
            debouncedSave(task.id, 'progress', progress);
        },
        on_click: function(task) {
            if (task.id.startsWith('task-')) {
                const taskId = task.id.replace('task-', ''); // Extract the integer part
                edit_task(taskId);

            } else if (task.id.startsWith('group-')) {
                const groupId = task.id.replace('group-', ''); // Extract the integer part
                edit_group(groupId);
            }
        },
        language: 'en'
    });

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants