Skip to content

<br> in Node tooltips should be \n instead to render correctly in Chrome and Edge #251

Description

@mac471

This is a new issue for an old problem: how text displays in tooltips. For "links", the two lines are separated by a newline character \n. For "nodes", the two lines are separated by a <br> tag.

While this works in Safari, it does not appear to work in Chrome or Edge. The <br> tag is just ignored and the two lines run together.

I believe the answer is simple. In the line below, just replace <br> with \n (like the way links are handled) to fix the problem. I've edited my local copy of sankeyNetwork.js and this now works on Safari, Chrome and Edge.

.html(function(d) { return "<pre>" + d.name + "<br>" + format(d.value) +

As an aside, I believe using <br> should work in Chrome and Edge. I've posted a question on StackOverflow to ask this question

Do you want me to make this change via pull request?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions