so this is my code pretty simple flowchart. I was wondering how I could size the nodes so they're on a fixedsize (fixedsize = FALSE does not work) so they change size based on the text inside the boxes. I also was wondering is their a way to color the nodes based on information that is entered into the table? any help would be appreciated, thank you
library(DiagrammeR)
library(dplyr)
e <- read.csv("edges.csv",stringsAsFactors = FALSE)
n <- read.csv("nodes.csv", stringsAsFactors = FALSE)
e$to <- as.character(e$to)
create_graph() %>%
add_nodes_from_table(table=n,label_col = task) %>%
add_edges_from_table(table=e,from_col = from,to_col = to,from_to_map = label) %>%
set_node_attrs(
node_attr = "shape",
values = "square"
) %>%
set_node_attrs(
node_attr = "fixedsize",
values = FALSE) %>%
render_graph(layout = "tree")