-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
textposition: "avoid overlap" #4674
Comments
|
Looks like there is some nice prior art: https://github.com/tinker10/D3-Labeler (cc @archmoj )
Yes! Speaking with @derek179 today, this was apparently the method Tableau uses. |
yeah, we'd also need like a |
Our |
Might be nice if there were a modebar button in scatter plots where you could toggle these labels. |
True, contour automatically moves labels around on the contour lines in order to keep them as far apart as possible (with adjustments to bias them toward horizontal and away from the edges). Might be something we could borrow from that...
Or a legend feature, so you could toggle text on each trace independently. |
team, the background here is a question was raised by a potential
technology partner on how we could build new features, such as the ability
for labels to show cleanly on outliers. It's not just this one feature but
good to see we approach the idea from multiple perspectives and can offer
usability options. thanks.
…On Tue, Mar 24, 2020 at 8:19 PM alexcjohnson ***@***.***> wrote:
Our contour seems to have a similar feature.
True, contour automatically moves labels around on the contour lines in
order to keep them as far apart as possible (with adjustments to bias them
toward horizontal and away from the edges). Might be something we could
borrow from that...
Might be nice if there were a modebar button in scatter plots where you
could toggle these labels.
Or a legend feature, so you could toggle text on each trace independently.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#4674 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ANP6QF5FHT2CIZEKL3ZYTI3RJFEY7ANCNFSM4LR7VBZQ>
.
|
It would be great also to have an equivalent of |
That's definitely a new issue :) |
Not sure if this is what you meant, @alexj, but we could also add the notion that first, the engine tries to find a combination of |
This issue has been tagged with A community PR for this feature would certainly be welcome, but our experience is deeper features like this are difficult to complete without the Plotly maintainers leading the effort. What Sponsorship includes:
Please include the link to this issue when contacting us to discuss. |
FWIW, I'd love to see this feature take inspiration from the R package |
One solution is to alternate the text position, see: plotly/plotly.py#925 (comment) |
As a workaround some people might find this useful. This code from ckjellson is intended for matplotlib but can be adapted to work with dash. I've done that for this dash app and I've included a demo in the readme to show it working. I'm new to dash and a recent graduate so I'm sure there are plenty of issues. The basic idea is to get the x and y limits in a callback
Then to calculate the x and y range per pixel
Then the allocate_text function from the linked repo can be modified to work with dash as below:
Where the font argument is a pillow ImageFont object:
|
Is there any timeframe for the implementation a similar feature to |
Anyone updates on this for Scattergeo maps? |
Hi - we are trying to tidy up the stale issues and PRs in Plotly's public repositories so that we can focus on things that are still important to our community. Since this one has been sitting for a while, I'm going to close it; if it is still a concern, please add a comment letting us know what recent version of our software you've checked it with so that I can reopen it and add it to our backlog. Alternatively, if it's a request for tech support, please post in our community forum. Thank you - @gvwilson |
This is obviously still an issue. Text labels overlapping. Modern libraries like Syncfusion don't have this problem. Would be nice if Plotly can do the same. Using version 2.34 |
I'd say this is an important feature that other modern libraries already handle |
Does anyone have a good example showing this problem? I'm interested in all charts, though I imagine that this is most apparent on scatter plots. |
Not sure if we have an open issue for this but it would be great to have more-automatic text positioning to avoid text overlapping on e.g. scatters.
The text was updated successfully, but these errors were encountered: