JohnCoene / echarts4r

🐳 ECharts 5 for R
http://echarts4r.john-coene.com/
Other
595 stars 81 forks source link

graph nodes are broken #545

Closed munoztd0 closed 1 year ago

munoztd0 commented 1 year ago
library(echarts4r)

les <- jsonlite::fromJSON("https://gist.githubusercontent.com/tylerlittlefield/0d7a53f2a1f55cb3c6ffe22c67618267/raw/0684a839c3e49dac1157721ddd906eff8f9491d4/les-miserables.json")

e_charts() |> 
  e_graph(
    layout = "circular", 
    circular = list(
      rotateLabel = TRUE
    ),
    roam = TRUE,
    lineStyle = list(
      color = "source",
      curveness = 0.3
    ),
    label = list(
      position = "right",
      formatter = "{b}"
    )
  ) |>
  e_graph_nodes(
    nodes = les$nodes, 
    names = name, 
    value = value, 
    size = size, 
    category = grp
  ) |> 
  e_graph_edges(
    edges = les$edges, 
    source = from,
    target = to
  ) |>
  e_tooltip()
#> Error in eval(expr, envir, enclos): object 'library(echarts4r)\n\nles <- jsonlite::fromJSON("https://gist.githubusercontent.com/tylerlittlefield/0d7a53f2a1f55cb3c6ffe22c67618267/raw/0684a839c3e49dac1157721ddd906eff8f9491d4/les-miserables.json")\n\n\ne_charts() |> \n  e_graph(\n    layout = "circular", \n    circular = list(\n      rotateLabel = TRUE\n    ),\n    roam = TRUE,\n    lineStyle = list(\n      color = "source",\n      curveness = 0.3\n    ),\n    label = list(\n      position = "right",\n      formatter = "{b}"\n    )\n  ) |>\n  e_graph_nodes(\n    nodes = les$nodes, \n    names = name, \n    value = value, \n    size = size, \n    category = grp\n  ) |> \n  e_graph_edges(\n    edges = les$edges, \n    source = from,\n    target = to\n  ) |>\n  e_tooltip()' not found

Created on 2023-06-13 with reprex v2.0.2.9000

Expects (v-0.4.4) image

But gets (v-0.4.5)

image

munoztd0 commented 1 year ago

fixed with #547