Skip to content

Sankey hover text placement #2014

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
jackparmer opened this issue Sep 19, 2017 · 6 comments
Closed

Sankey hover text placement #2014

jackparmer opened this issue Sep 19, 2017 · 6 comments
Assignees

Comments

@jackparmer
Copy link
Contributor

jackparmer commented Sep 19, 2017

@alexcjohnson noticed a hover placement issue with Sankey - here the 633 appears on top of the white box instead of inside it. Not sure if it's a JSON construction issue or a Plotly.js issue.

image

The wapo hover text can also go off into the ether and does not always seem to point at the selected line:

image

Both of these examples are from https://medium.com/@plotlygraphs/4-interactive-sankey-diagram-made-in-python-3057b9ee8616

/cc @monfera @alishobeiri

@monfera
Copy link
Contributor

monfera commented Sep 19, 2017

This codepen example also has links both with and without label, and both render fine:

image

image

I'll look at how the data is different here.

@monfera
Copy link
Contributor

monfera commented Sep 19, 2017

Reopening to be able to link the other fix (closing only when that's done too)

@monfera monfera reopened this Sep 19, 2017
@monfera
Copy link
Contributor

monfera commented Sep 20, 2017

@alexcjohnson the only remaining problem is the sometimes misplaced tooltip, seen when the browser window here is wide and div.svg-container gets a margin: auto, as inlined style. Any quick thought on where this auto is coming from? I copied data and layout and I didn't get that. I can look it up if it'd take time.

@monfera
Copy link
Contributor

monfera commented Sep 20, 2017

Added an effective fix, and, depending on the answer I'd need to add an appropriate test. It looks like our guideline on fluid layout tampers with the gd margin rather than the paperdiv (=== div.svg-container) margin.

@monfera
Copy link
Contributor

monfera commented Sep 20, 2017

With the above last PR (thanks @alexcjohnson for the review) I think the two problems reported in this issue, and a third one I ran into (node became invisible if value was comparatively low), and a fourth one surfaced by the preceding item (reworking node/link pixel alignment as the small mismatch looked off when the node was very small) are taken care of and merged into master.

@monfera
Copy link
Contributor

monfera commented Sep 20, 2017

As discussed with @alexcjohnson we're closing these issues as fixed by the linked four PRs.

@monfera monfera closed this as completed Sep 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants