Mixing categories and subtasks in HighCharts Gantt?
Hello,
As I tried explaining here : https://stackoverflow.com/questions/54947746/mix-categories-and-subtasks-in-highcharts-gantt
I was wondering if, in Gantt, it was possible to use parent/subtask (folding and unfolding) while also having multiple tasks on a same "line" (mixing "Interactive gantt" demo with the "subtasks" one). Apparently it is not and so I'm wondering if this behavior can be expected in the future.
For now, I think I will use css classes (or another way of identifying the parents/children) to add a bold + folding icon to parents, and to .hide() the depending yAxis when clicked (that means having an event on the label, but I'm not sure if the custom-events plugin is up to date) but if a similar behavior is being developed, I could probably postpone my project.
-
Filipe commented
Sorry Jon, I expected to receive some kind of notification and therefore didn't come back to check.
demo with subtasks: https://jsfiddle.net/gh/get/library/pure/highcharts/highcharts/tree/master/samples/gantt/demo/subtasks/
demo with multiple tasks per line: https://jsfiddle.net/gh/get/library/pure/highcharts/highcharts/tree/master/samples/gantt/demo/interactive-gantt/
If I use your example:
- I would expect all labels to be shown, and hidden only when their parent is folded
- Parents, Sub Tasks and Sub Sub tasks have different styles (let's say, bold, normal and italic)
- Parents and Sub Tasks with children are clickable (a simple arrow pointing down to mark them as different for instance) and this causes said children to be shown/hidden
- Clicking on a Parent un/folds everything (now Ideally, it would unfold showing the Sub Tasks in the "state" they were before being folded, meaning that if some were folded, and others weren't, they are in this state again. But since we are only using 3 levels max, I believe showing all Sub Tasks in a folded state wouldn't be much of an issue.
- For multiple tasks per line, I believe the index is currently based on their instantiation order. I think it could be a great plus to simply bring to front any clicked task (though we run the risk of hiding a milestone behind a task). I guess we would need some kind of parameter like "completed" that takes two decimal values (start and finish) between 0 and 1 corresponding to the "area", in percentage, of the task that should be "stripped" if that makes sense, that would be ideal. Say we have
[---A---] and [---B---], should B be moved over A, we could see something link [---A-[//-B---]|-- Parent 1
...|-- Sub 1
......|-- Sub Sub 1
...|-- Sub 2
|-- Parent 2
...|-- Sub 1clicking on Parent 1 gives
|-- Parent 1
|-- Parent 2
...|-- Sub 1clicking on Parent 1 again gives
|-- Parent 1
...|-- Sub 1
......|-- Sub Sub 1
...|-- Sub 2
|-- Parent 2
...|-- Sub 1OR, in case "remembering" the states of children (folded or not) is too annoying, every children is shown as folded by default (that is just my personal choice, but if that was configurable,
|-- Parent 1
...|-- Sub 1 (folded)
...|-- Sub 2
|-- Parent 2
...|-- Sub 1 -
Unfortunately the editor stripped away the leading spaces in my previous comment.
The tree structure was supposed to look like:
|-- Parent 1
...|-- Sub Task 1
......|-- Sub Sub Task 1
...|-- Sub Task 2 -
Hi Filipe,
Thanks for submitting this feature request.
I was wondering if you could elaborate a bit on expected behaviour.
Imagine you have a tree structure similar to the following:
|-- Parent 1
|-- Sub Task 1
|-- Sub Sub Task 1
|-- Sub Task 2Then there is a few cases I am wondering how it should behave:
- Which labels should be shown, and how should the label placement be like?
- Should both "Parent 1" and "Sub Task 1" be able to fold/unfold its sub tasks, or just one of them?
- Also, when multiple tasks are placed on the same line they can sometimes visually overlap, should this be handled, and if so how?If you can elaborate a bit around some of these, or show examples, then it will be very helpful.
Best regards
Jon