This function adds XY (scatter or line) data to a SveltePlot chart. It supports customization of aesthetics such as color, size, opacity, and more. It is used to overlay data points, lines, or other XY elements onto the chart.
add_xy(
sp,
current_data,
group_name,
color_mapping,
size,
alpha,
facet,
tooltip,
type,
second_axis,
include_legend
)
A SveltePlot htmlwidget object to which the data will be added.
A list of data frames representing the XY data series.
A character vector of group names corresponding to each data series.
A named list mapping group names to colors.
A numeric value specifying the size of the points or line thickness.
A numeric value between 0 and 1 specifying the opacity of the series.
A list of facets, specifying how the data should be split across multiple panels.
A logical value indicating whether tooltips should be displayed on hover.
A character string specifying the chart type ('line', 'points', etc.).
A logical value indicating if the series should be plotted on a secondary y-axis.
A logical value indicating whether to include the series in the chart legend.