You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be very helpful to be able to add outlines to text layers. This allows for text to be legible on any background (eg white text with black outline, or black text with white outline).
Google maps uses dark text with a white outline, while white text with a dark outline also works. It's the most effective way to make text readable on any background
Reacted by etpinard and Marco Aurélio Guerra Pereira
A note on implementation: for SVG, it requires two copies of the text element with different stroke-width properties (that is, it's possible but not just a simple property, which means it requires a bit more effort)
Our much-neglected polar charts do this with the text-shadow style:
<text dy="0" y="0" x="0" dx="0" transform="rotate(45) translate(0,15)" style="
text-anchor: start;
font-size: 15px;
font-family: Tahoma, sans-serif;
fill: gray;
text-shadow: white -1px 0px 0px, white 1px -1px 0px, white -1px 1px 0px, white 1px 1px 0px;
">0</text>
Might cease to look good at a greater thickness though, as that's not going to increase the radius of curvature. But it at least avoids having to copy everything. Kind of an odd collection of offsets, I wonder if that was intentional...
I'll also note that applying this to mathjax will require a completely distinct implementation regardless, as it generates its own SVG paths.
Definitely an improvement! I'm just wondering if we want to go one step further and make a new attribute (tickshadow?) that defaults to paper_bgcolor but people could set it to whatever they want (including transparent).
@etpinard : After reading through this issue it is not clear to me what the solution is.
Imagine the following case: on top of a choropleth map you add a text trace to indicate a value permanently (not just through a hover). Considering that the heatmap has colors from light yellow to dark blue, it is almost impossible to choose a font color of the text trace which is visible on the map. What would you suggest?
Hi - this issue has been sitting for a while, so as part of our effort to tidy up our public repositories I'm going to close it. If it's still a concern, we'd be grateful if you could open a new issue (with a short reproducible example if appropriate) so that we can add it to our stack. Cheers - @gvwilson
It seems very odd to close multiple issues that team members have acknowledged as useful potential changes, and this does not make me inclined to contribute further, whether by documenting issues or making code contributions
@alanocallaghan thanks for your feedback - we're trying to sort through over 3500 open issues across more than 100 repositories and figure out which ones people do still care about. I'll reopen this one and assign it to myself for further triage.
By all means carry on, I imagine there's hundreds of good ideas and valid bug reports in here but dealing with a huge backlog is difficult. Probably just a grumpy Monday response from me
Activity
etpinard commentedon Apr 14, 2017
Those shouldn't even be displayed in the docs pages. Thanks for pointing this out.
alanocallaghan commentedon Apr 14, 2017
No worries, fyi there are a few similar things hanging around in the documentation, eg
https://plot.ly/javascript/reference/#bar-marker-colorbar-tickvalssrc
etpinard commentedon Apr 17, 2017
About this here, can you share a screenshot to help us understand what you're looking for?
alanocallaghan commentedon Apr 17, 2017
Google maps uses dark text with a white outline, while white text with a dark outline also works. It's the most effective way to make text readable on any background
rreusser commentedon Apr 17, 2017
A note on implementation: for SVG, it requires two copies of the text element with different
stroke-widthproperties (that is, it's possible but not just a simple property, which means it requires a bit more effort)alexcjohnson commentedon Apr 18, 2017
Our much-neglected polar charts do this with the text-shadow style:

Might cease to look good at a greater thickness though, as that's not going to increase the radius of curvature. But it at least avoids having to copy everything. Kind of an odd collection of offsets, I wonder if that was intentional...
I'll also note that applying this to mathjax will require a completely distinct implementation regardless, as it generates its own SVG paths.
rreusser commentedon Apr 18, 2017
Oh wow, I stand corrected! Thanks for that. I missed that in my googling.
[-]Outline for text layers and documentation of options[/-][+]Outline for text layers[/+]etpinard commentedon Oct 31, 2018
From #3191 (comment)
fgenoese commentedon May 11, 2022
@etpinard : After reading through this issue it is not clear to me what the solution is.
Imagine the following case: on top of a choropleth map you add a text trace to indicate a value permanently (not just through a hover). Considering that the heatmap has colors from light yellow to dark blue, it is almost impossible to choose a font color of the text trace which is visible on the map. What would you suggest?
gvwilson commentedon Jun 10, 2024
Hi - this issue has been sitting for a while, so as part of our effort to tidy up our public repositories I'm going to close it. If it's still a concern, we'd be grateful if you could open a new issue (with a short reproducible example if appropriate) so that we can add it to our stack. Cheers - @gvwilson
alanocallaghan commentedon Jun 10, 2024
It seems very odd to close multiple issues that team members have acknowledged as useful potential changes, and this does not make me inclined to contribute further, whether by documenting issues or making code contributions
gvwilson commentedon Jun 10, 2024
@alanocallaghan thanks for your feedback - we're trying to sort through over 3500 open issues across more than 100 repositories and figure out which ones people do still care about. I'll reopen this one and assign it to myself for further triage.
alanocallaghan commentedon Jun 10, 2024
By all means carry on, I imagine there's hundreds of good ideas and valid bug reports in here but dealing with a huge backlog is difficult. Probably just a grumpy Monday response from me
alexcjohnson commentedon Jun 10, 2024
Is this already solved by the new
font.shadowattributes? #6983 ?archmoj commentedon Jun 17, 2024
This is resolved by
font.shadowoptions including auto in #6983.Closing...