Legend nodes become right aligned when the shape is set to "dot" and a label is provided. This causes the label text to become illegible if the label is long. Example provided below.
library(visNetwork)
## legend node is center aligned when only shape provided
visNetwork(data.frame(id = 1)) %>%
visLegend(addNodes = data.frame(shape = "dot"))
## legend node is center aligned when only label provided
visNetwork(data.frame(id = 1)) %>%
visLegend(addNodes = data.frame(label = "test"))
## legend node is right aligned when label and shape provided
visNetwork(data.frame(id = 1)) %>%
visLegend(addNodes = data.frame(shape = "dot", label = "test"))
Legend nodes become right aligned when the shape is set to "dot" and a label is provided. This causes the label text to become illegible if the label is long. Example provided below.