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

Make fontSize = also affect xAxisDomain and the vertical distance between nodes #27

Open
SchmidtPaul opened this issue Jun 13, 2022 · 0 comments

Comments

@SchmidtPaul
Copy link

SchmidtPaul commented Jun 13, 2022

Currently, increasing the font size

  • does increase the font size of node labels
  • does increase the font size of node values
  • does not increase the font size of the x-axis labels, i.e. xAxisDomain
  • does not increase the space between nodes on top of each other so that the larger node values overlap with the nodes
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("A", "B", "C", "D")
)

xAxisDomain <-  c("Tick", "Trick", "Track")

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

image

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

image

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