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

Generate tspans to pass to a text mark? #506

Closed
mbostock opened this issue Aug 18, 2021 · 4 comments
Closed

Generate tspans to pass to a text mark? #506

mbostock opened this issue Aug 18, 2021 · 4 comments
Labels
enhancement New feature or request question Further information is needed

Comments

@mbostock
Copy link
Member

It’d be nice if instead of the text channel of strings, you could use the children channel and generate SVG tspan elements using htl.svg. Then you can more easily apply custom layout to text, for example for multiple lines. #327

@mbostock mbostock added enhancement New feature or request question Further information is needed labels Aug 18, 2021
@mbostock
Copy link
Member Author

#313 is far more convenient for multiline text, but this would be nice if you want to apply some custom formatting to the text, say for bold or italics, or to apply hyperlinks to some of the text.

@yurivish
Copy link
Contributor

yurivish commented Jan 18, 2022

Would it make sense to support something like this for tick labels too, for when you really want to customize the contents of individual ticks? E.g. making a multi-line tick with one of the lines in bold, or doing something with colors.

@mbostock
Copy link
Member Author

mbostock commented Jan 18, 2022

@yurivish See #460. Edit: Ha, I forgot you filed that issue. Anyway, perhaps it could work the same way. I’m not sure.

@mbostock
Copy link
Member Author

Going to start with multiline text in #677. Will reopen this issue if there is sufficient demand.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is needed
Projects
None yet
Development

No branches or pull requests

2 participants