# NOT RUN {
set.seed(666)
lwr <- rpois(20, 5)
dat <- data.frame(
comparison = paste0("Ctrl vs. ", LETTERS[1:20]),
lwr = lwr,
upr = lwr + rpois(20, 10)
)
amHorizontalDumbbellChart(
width = "500px", height = "450px",
data = dat,
draggable = TRUE,
category = "comparison",
values = rbind(c("lwr", "upr")),
xLimits = c(0, 30),
segmentsStyle = amSegment(width = 1, color = "darkred"),
bullets = amCircle(strokeWidth = 0, color = "darkred"),
tooltip = amTooltip("left: {valueX}\nright: {openValueX}", scale = 0.75),
xAxis = list(
title = amText(
"difference",
fontSize = 17, fontWeight = "bold", fontFamily = "Helvetica"
),
gridLines = amLine("darkblue", width = 2, opacity = 0.8, dash = "2,2"),
breaks = amAxisBreaks(c(0,10,20,30))
),
yAxis = list(
title = amText(
"comparison",
fontSize = 17, fontWeight = "bold", fontFamily = "Helvetica"
),
labels = amAxisLabels(fontSize = 15),
gridLines = amLine(color = "red", width = 1, opacity = 0.6, dash = "1,3")
),
backgroundColor = "lightsalmon"
)
# }
Run the code above in your browser using DataLab