Skip to content
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

Linebreaks in node label? #25

Open
SchmidtPaul opened this issue Dec 20, 2021 · 0 comments
Open

Linebreaks in node label? #25

SchmidtPaul opened this issue Dec 20, 2021 · 0 comments

Comments

@SchmidtPaul
Copy link

SchmidtPaul commented Dec 20, 2021

So far, I've tried these, but they don't seem work:

\n
\r
<br/>

Here's a reprex:

links <- data.frame(
  source = c(0, 0, 1, 2),
  target = c(1, 2, 3, 3),
  value = c(10, 20, 10, 20)
)

nodes <- data.frame(
  label = c("I am using \n in this string",
            "I am using \r in this string",
            "I am using <br/> in this string",
            "I am using
            in this string")
)

sankeyD3::sankeyNetwork(
  Links = links,
  Nodes = nodes,
  Source = "source",
  Target = "target",
  Value  = "value",
  NodeID = "label",
  numberFormat = ",.0f",
  fontFamily = "Arial",
  fontSize = 12,
  width  = 400,
  height = 300)

Created on 2021-12-22 by the reprex package (v2.0.1)

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

1 participant