neuronetio / gantt-elastic

Gantt Chart [ javascript gantt chart, gantt component, vue gantt, vue gantt chart, responsive gantt, project manager , vue projects ]
https://neuronet.io/gantt-elastic/
MIT License
1.3k stars 315 forks source link

Feature: Multiple tasks for a user on the same row #17

Closed otabekgb closed 5 years ago

otabekgb commented 5 years ago

Multiple tasks for a user on the same row. At the moment gantt elastic creates multiple rows. Is it possible?

neuronetio commented 5 years ago

It could be possible, but there are some problems to figure out. If one row will contain two or more tasks:

mdieudonne commented 5 years ago

How about having a master task & date (the blue one below) ? Then offer possibility to add more dates and durations (and colors) on the same row, but keep them secondary without subtasks. No overlapping allowed.

Would be great to have custom names for each secondary tasks, but that's maybe too much to ask :)

image

neuronetio commented 5 years ago

Yeah, or make something like groups instead of master task, which will group multiple tasks in one row and only group options will be displayed in task list (maybe some summary of the whole row or somethink like that). Theoretically text could be inside task&progress bar that will appear when zoom is enough. I don't want to add functionality like tooltips because i will block custom actions that peoples will attach to hover/click depends on their needs i think.

iNeedToCopy commented 5 years ago

How about having a master task & date (the blue one below) ? Then offer possibility to add more dates and durations (and colors) on the same row, but keep them secondary without subtasks. No overlapping allowed.

Would be great to have custom names for each secondary tasks, but that's maybe too much to ask :)

image

Can I ask if the multi-task function of one line has been realized? I also face this need.

neuronetio commented 5 years ago

sorry, not implemented yet, I don't know when exactly it will be

leanwebstart commented 5 years ago

Need this too...

loicspace commented 5 years ago

So do I.

carueda commented 5 years ago

👍

neuronetio commented 5 years ago

I'm closing this issue for now I will back to this later

demaryhuerto commented 5 years ago

I'm working on this feature. I've implemented a new row component (Group.vue) that renders a new task type (called "group"). Group task has an array of tasks as property. Group component renders these child subtasks. This is enough for my use case, but I would like to write some test, documentation and to think and implement a coherent logic (for example, maybe a group task can't have start, duration and percent properties and have to be calculated at init phase from child subtasks...).

Repo: https://github.com/demaryhuerto/gantt-elastic/tree/feature/group-task-type

Example model:

{
    id: 1,
    label: 'Make some noise',
    user:
        '<a href="https://www.google.com/search?q=John+Doe" target="_blank" style="color:#0077c0;">John Doe</a>',
    start: getDate(-24 * 5),
    duration: 15 * 24 * 60 * 60 * 1000,
    percent: 85,
    type: 'project',
  },
{
    id: 2,
    label: 'Group',
    user: '<a href="https://www.google.com/search?q=Clark+Kent" target="_blank" style="color:#0077c0;">Clark Kent</a>',
    start: getDate(-24 * 2),
    duration: 6 * 24 * 60 * 60 * 1000,
    percent: 25,
    type: 'group',
    tasks: [
      {
        id: 21,
        label: 'Group subtask 1',
        user: '<a href="https://www.google.com/search?q=Clark+Kent" target="_blank" style="color:#0077c0;">Clark Kent</a>',
        start: getDate(-24 * 2),
        duration: 2 * 24 * 60 * 60 * 1000,
        percent: 50,
        type: 'project',
      },
      {
        id: 22,
        label: 'Group subtask 2',
        user: '<a href="https://www.google.com/search?q=Clark+Kent" target="_blank" style="color:#0077c0;">Clark Kent</a>',
        start: getDate(24 * 2),
        duration: 2 * 24 * 60 * 60 * 1000,
        percent: 50,
        type: 'task',
      },
    ],
  },