gantt icon indicating copy to clipboard operation
gantt copied to clipboard

Collapse bars and resize GANTT diagram

Open SebLeich opened this issue 7 years ago • 8 comments

Hey there,

does someone know a possibility to collapse bars? I already used the custom-class but i don't know how to resize the diagram (hide the row of the bar) and hide the arrows.

CSS "hide"

.hide { display: none; }

JS

function hideTask(index){ tasks[index].custom_class = "hide"; gantt_chart.refresh(tasks); }

SebLeich avatar Nov 27 '17 14:11 SebLeich

I don't think this is easily doable using CSS. We might have to do this as a feature.

netchampfaris avatar Jan 18 '18 16:01 netchampfaris

Hello, I started working on this feature because for a gantt view, it's fundamental, it seems and "frappe-gantt" is really interesting according to use. Otherwise, just with css ... I don't know to do that and I wonder if it's possible or easy indeed when most of the objects are nested from svg... but it would be perfect, of course!

Short answer, I use d3.js to create depths in the groups of bars according to the tasks but each one implement this with its own method because it's not so simple anyway For now I am still at the experimental stage with frappe-gantt ;) It then allows to hide or show groups of dependent bars as seen on the gif ... Still a lot to do anyway for me ;)

frappe002

jgorene avatar Feb 12 '18 10:02 jgorene

@jgorene If you have a working version, why not open a PR?

netchampfaris avatar May 20 '18 15:05 netchampfaris

@netchampfaris Of course, it would be nice! Unfortunately, I still use github on minimal features and I should make an effort for that;) In addition, I worked around your very interesting library 2 months ago already, I'm on other things in this moment. In fact, I could not progress anymore to try to get what I wanted ... too complex for me. I would look at it later probably.

jgorene avatar May 21 '18 10:05 jgorene

@jgorene please open PR

Anurag810 avatar Apr 29 '19 06:04 Anurag810

@jgorene Are you still working on it or have some workable solution. Please suggest how i can integrate D3 with frappe-gantt to have expand collapse feature. It would be very helpful if you share your thoughts.

abhishekk2304 avatar Jul 12 '20 06:07 abhishekk2304

Wow,I think I need this, my project need to collapse gantt, I have no idea how to implement 😢

haoolii avatar Aug 10 '20 11:08 haoolii

Hello ! Sorry for the delay... Although still open, this issue is old and frappe-gantt has also evolved a lot since...

UPDATED Anyway, I tried to review this without adding other libraries but without being able to open a PR, unfortunately. Problem: dragging is only available after expanded the bars (only in this case).

Despite, it could be interesting to work by adding a "display" property to each task... for example and among others. Of course, this is to be adapted according to your needs and is probably perfectible but if it can help someone.

Working codepen

jgorene avatar Mar 13 '22 07:03 jgorene