sr_plot_grouped_bar | R Documentation |
Produces a highcharts grouped bar chart. Since the data, axis, and grouping variables are parameters in the function, this function will work with any data.
sr_plot_grouped_bar(
.data,
x_col,
y_col,
group_col,
plt_title = NULL,
x_var_title = NULL,
y_var_title = NULL,
y_percentage = FALSE
)
.data |
The data frame to plot. |
x_col |
The column name, as a string, of the plot's x-axis. Generally, this will be a time variable such as years. |
y_col |
The column name, as a string, of the y-axis. If this column is a percentage, it should be as a whole number (78.8) and not a decimal (.788). |
group_col |
The column name, as a string, of the grouping column. The plot will produce different lines for each group in this column. |
plt_title |
The plot title, as a string. |
x_var_title |
The x-axis title, as a string. |
y_var_title |
The y-axis title, as a string. |
y_percentage |
Boolean, signifying whether the y-axis is a percentage.
Defaults to |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.