# generate historical quarterly outcome ggplot(table_data, aes(x = factor(eval(period_var)), fill = simple_outcome)) + geom_bar(position = position_fill(reverse = TRUE), alpha = 0.8) + coord_flip() + scale_fill_manual(values = c("#EE0200","#000000")) + labs(title = title, caption = "Missing values removed from plot", fill = "Outcome", x = x_label, y = "Proportion") + theme(legend.position = "top")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.