Open maltinho8 opened 1 year ago
Hi, did you find a solution for this yet?
Not yet - but I think you have to manipulate the y-Position of the task in combination with the displayOrder
Hi I am also in need of this feature. Did you already find a solution for this?
No - do you have an approach?
No, I don’t. The client for which I want to implement an interactive Gantt chart will need this functionality, so if we choose this library then I will try to add this. If I start, I will let you know.
I have an approach. It does need the displayorder to be correct. So, it tries to add the task in the same row and if not possible, adds a new row. My approach doesn't sort the tasks in the right way to make them fit. You really need to prepare the data to make sure this is reflected in an ascending displayorder. But, if you do that, my approach will work. Let me know if you want me to share it with you.
I have an approach. It does need the displayorder to be correct. So, it tries to add the task in the same row and if not possible, adds a new row. My approach doesn't sort the tasks in the right way to make them fit. You really need to prepare the data to make sure this is reflected in an ascending displayorder. But, if you do that, my approach will work. Let me know if you want me to share it with you.
please share with us
@ivosturm it would be awesome if you can share your solution with us!
@ivosturm It would be great if you could share your approach. I need something like that and I could really use it. Thank you.
@ivosturm , could you please share your solution? It is an interesting feature that I need to add to a project.
Thanks in advance.
@ivosturm Could you please share your solution with me? Thank you so much!
I forked the project and added all needed changes to the code I think. The tricky part is my code (not on public GitHub) has a lot more features than only the horizontal displaying. So, I tried to pull out only that change in the forked code on my public GitHub account. It should be as simple as just adding isHorizontalDisplay = false as a property for the Gantt component. I hope I didn't miss anything. Please try my code and let me know if it works for you. If so, I will ask to pull my changes.
There is one other complexity added: if the label wouldn't fit the task bar, it would be displayed outside the bar. For horizontal mode this is unwanted as then labels could overlap other tasks on the same horizontal lane. So I added logic that will always show the label inside and will abbreviate it if the label doesn't fit, ending the label in that case with three dots to show it has been abbreviated.
The list of changes of my forked version:
Example would be something like this: