Closed octaviancorlade closed 6 years ago
Fixes #147, numeric values are currently rounded to integer in the tooltips.
A way to fix trying not to completely break backwards compatibility is to check whether the provided values are strings and in that case avoid formatting them.
Simple example:
library(networkD3) links <- data.frame(source=c(0, 0), target=c(1, 2), value=c(0.5, 0.95)) nodes <- data.frame(names = c("first", "second", "third")) sankeyNetwork(Links = links, Nodes = nodes, Source = 'source', Target = 'target', Value = 'value')
links$value <- as.character(links$value) sankeyNetwork(Links = links, Nodes = nodes, Source = 'source', Target = 'target', Value = 'value')
Fixes #147, numeric values are currently rounded to integer in the tooltips.
A way to fix trying not to completely break backwards compatibility is to check whether the provided values are strings and in that case avoid formatting them.
Simple example: