This function adds series to a SveltePlot chart, updating the internal data structure. It supports grouped and stacked bar charts with customization of colors and legend entries.
add_bars(sp, current_data, color_mapping, group_name, include_legend)
A SveltePlot htmlwidget object to which the series will be added.
The current data frame which contains the series.
A named list mapping group names to colors.
The names of the series.
A logical value indicating whether to include the data series in the legend.