This function creates a horizontal stacked bar chart in plotly with bar labels displaying category labels, values, and percentages.
Examples
BC_h(
cat_labels=c("Yes", "No", "not applicable"),
values=c(10, 2, 4),
colors=c("#90c916", "#FED976", "#eeeeee"),
title="The publication contained a preregistered replication attempt")
BC_h(
cat_labels=c("Yes", "No"),
values=c(10, 2),
colors=c("#90c916", "#FED976"))
BC_h(cat_labels=c("Yes"), values=c(10), colors=c("#90c916"))