Closed lukr90 closed 1 year ago
Hello,
Here you go :
library(billboarder)
mydata <- data.frame(
"Index" = letters[1:6],
"Male" = c(-83, -143, -100, -120, -150, -85),
"Female" = c(130, 100, 140, 175, 150, 50)
)
billboarder() %>%
bb_barchart(
data = mydata,
stacked = TRUE,
rotated = TRUE
) %>%
bb_data(
labels = list(
format = JS("function(v, id) {return Math.abs(v);}")
)
) %>%
bb_y_grid(
show = TRUE,
lines = list(
list(value = 0, class = "base-line")
)
) %>%
bb_y_axis(
tick = list(
format = JS("function(v) {return Math.abs(v);}")
)
) %>%
bb_x_axis(show = FALSE) %>%
bb_add_style(".base-line line" = "stroke-width: 3px; stroke: #000;")
Victor
great, thanks! :)
I am having difficulty reproducing a running example. Would appreciate it very much if you could post one like the below :-) https://naver.github.io/billboard.js/demo/#Axis.RotatedAxisGroupedBar