Description Usage Arguments Value
View source: R/column_chart_functions.R
add bars to svg string
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
svg_string |
the svg string to br appended, need to be finalized after |
df |
data to be plotted - data frame in wide format |
x |
vector to be on x axis |
series |
character vector of column names representing series to split bars by it |
bar_width |
the width of plotted bar |
styles |
vector of styles of the bars |
x_offset |
how much bars should be offset to the right (negative value means offsetting to the left) |
translate |
vector of translation of the bars from the origin |
add_x_axis |
boolean flag, if true automatically adds x axis with label |
color |
optional custom color of the bars series, in svg string format, ie.: "rgb(223,12,121)" or "black" |
add_legend |
boolean flag if legend should be added |
legend_position |
string with legend position |
max_val |
maximal value that bars will be scaled to |
svg string with added bars
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.