add bars to svg string
add_bars(
svg_string,
df,
x,
series,
bar_width,
styles = NULL,
x_offset = 0,
translate = c(0, 0),
add_x_axis = TRUE,
color = NULL,
add_legend = FALSE,
legend_position = "left_top",
max_val = NULL
)
the svg string to br appended, need to be finalized after
data to be plotted - data frame in wide format
vector to be on x axis
character vector of column names representing series to split bars by it
the width of plotted bar
vector of styles of the bars
how much bars should be offset to the right (negative value means offsetting to the left)
vector of translation of the bars from the origin
boolean flag, if true automatically adds x axis with label
optional custom color of the bars series, in svg string format, ie.: "rgb(223,12,121)" or "black"
boolean flag if legend should be added
string with legend position
maximal value that bars will be scaled to
svg string with added bars