Skip to content

Plot.text halo option(s) #666

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

Closed
Fil opened this issue Jan 12, 2022 · 0 comments · Fixed by #703
Closed

Plot.text halo option(s) #666

Fil opened this issue Jan 12, 2022 · 0 comments · Fixed by #703
Labels
enhancement New feature or request

Comments

@Fil
Copy link
Contributor

Fil commented Jan 12, 2022

It's a CSS design question + an API design question.

stroke-width: 4;
fill: none;
stroke: white; 

The stroke: white is controversial, since we don't know that currentColor is black (or any dark color).

API design question: do we need three options (halo: true, haloStroke = "white", haloWidth = 4)?

(This can't be done by applying two text marks, because the halos are also there to fight overlapping texts.)

Ref. #27 and https://observablehq.com/@mbostock/inequality-in-american-cities

Fil added a commit that referenced this issue Jan 12, 2022
@Fil Fil mentioned this issue Jan 12, 2022
2 tasks
@mbostock mbostock added the enhancement New feature or request label Jan 16, 2022
@mbostock mbostock mentioned this issue Jan 24, 2022
Fil added a commit that referenced this issue Jan 25, 2022
…ke and strokeWidth to 3 if the stroke option is specified.

supersedes #667
closes #666
mbostock pushed a commit that referenced this issue Jan 25, 2022
…ke and strokeWidth to 3 if the stroke option is specified.

supersedes #667
closes #666
mbostock added a commit that referenced this issue Jan 25, 2022
* make it easier to create a text halo by defaulting paintOrder to stroke and strokeWidth to 3 if the stroke option is specified.
supersedes #667
closes #666

* default paintOrder

* currentColor, not black

Co-authored-by: Mike Bostock <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants