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

gantt: syntax for multi-line section titles? #743

Closed
rhz opened this issue Oct 10, 2018 · 17 comments · Fixed by #1188
Closed

gantt: syntax for multi-line section titles? #743

rhz opened this issue Oct 10, 2018 · 17 comments · Fixed by #1188

Comments

@rhz
Copy link

rhz commented Oct 10, 2018

I'd like to have multi-line section titles. Is there a syntax for that?

@rhz
Copy link
Author

rhz commented Oct 10, 2018

I tried with tspan as suggested in this SO answer but it doesn't work.

@rhz
Copy link
Author

rhz commented Oct 11, 2018

I tried all the suggestions in #384. None worked.

@rhz
Copy link
Author

rhz commented Oct 11, 2018

Replacing .text by .html in line 274 of ganttRenderer.js and having a section title like

section <tspan x="10" dy="0em">Line 1</tspan><tspan x="10" dy="1.4em">Line 2</tspan>

does the trick. However, the position along the y axis of the section title isn't quite right anymore.

@rhz
Copy link
Author

rhz commented Oct 11, 2018

A bit off-topic: while tinkering with the code that computes the position along the y axis of the section title I found that the for loop in line 280 of ganttRenderer.js seems to be unnecessary (its body should be kept though). prevGap is accumulated by iterating over numOccurances with .data(numOccurances). Also, the for loop never gets to run its body more than once since it returns immediately.

@wgroeneveld
Copy link

Yes please, struggling with the same, also tried everything in #384 - no avail.

@stale
Copy link

stale bot commented Jun 29, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Type: New Shape Request for new shape label Jun 29, 2019
@rhz
Copy link
Author

rhz commented Jul 1, 2019

What will happen with this feature request? Will it be implemented?

@stale stale bot removed the Type: New Shape Request for new shape label Jul 1, 2019
@github-actions
Copy link
Contributor

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you are still interested in it, and it is still relevant, you can comment or remove the label to revive it.

@github-actions github-actions bot added the Type: New Shape Request for new shape label Sep 24, 2019
@rhz
Copy link
Author

rhz commented Sep 24, 2019

Is this project still alive? Any contributor would like to chime in?

@IOrlandoni
Copy link
Member

The project is still alive and well however there's more feature requests than pull requests so it might fall through the cracks....

@rhz
Copy link
Author

rhz commented Sep 24, 2019

Hi @dunning-kruger! It's good that the project is alive and well :)
Before a pull request can be made for this feature request, perhaps it would be would to talk about what the ideal solution would look like and what other solutions are acceptable.
For example, could the little patch I commented above be a good or acceptable solution?

@IOrlandoni
Copy link
Member

@rhz I can't comment on the proposed solution. If it's a small effort, feel free to get a pull request up. If not, feel free to drop by our slack community and talk with people who know more about the platform than I do! Thanks for the interest!

@rhz
Copy link
Author

rhz commented Sep 29, 2019

It is indeed a tiny patch, just one line change. However, doing a pull request would involve first learning how to do one (or maybe I could just do it on github's web interface directly?). Since I doubt it will be accepted, I don't think I'll be learning how to do a pull request at the moment. Regarding the link to join the slack community, it says "This invite link is no longer active" when I go through it.

@stale stale bot removed the Type: New Shape Request for new shape label Sep 29, 2019
@IOrlandoni
Copy link
Member

@rhz Link was updated here: #866

@rhz
Copy link
Author

rhz commented Oct 1, 2019

Thanks @dunning-kruger

@GDFaber
Copy link
Member

GDFaber commented Jan 7, 2020

I suggest splitting the lines up into tspan items and appending them to the text in one turn with its creation. As mentioned by @rhz, the y position should be updated as well for multiline texts. I'd like to take a look at it but it may take some time.

@GDFaber
Copy link
Member

GDFaber commented Jan 8, 2020

PR is ready

@github-actions github-actions bot locked and limited conversation to collaborators Jan 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants