Plot dumbbell chart
A data frame contains data to be plotted.
A category variable in data.
Variable indicate start point.
Variable indicate end point.
Top n values to be plotted.
Sort options.
Legends.
Colors of the start and end points.
Integer. Indicating the line type of the grids.
Color of the background grid.
Main title of the plot.
A dumbbell plot.
asr <- create_asr(canregs[[1]], year, cancer, show_ci = TRUE) |>
drop_others() |>
drop_total() |>
add_labels(lang = "en", label_type = "abbr")
draw_dumbbell(asr, site, asr_lower_cn2000, asr_upper_cn2000, topn = 15)