R's partial matching of arguments made it such that a single value passed as argument icon to e_legend when multiple legend$data objects are present in the chart causes this error:
Error in echarts4r::e_legend(e, icon = "circle") :
invalid number of icons; 1 icons passed but 4 legend items.
This modifies e_legend to allow for the expected behavior which uses it as the icon argument in opts$legend effectively changing the icon for the entire legend.
R's partial matching of arguments made it such that a single value passed as argument
icon
toe_legend
when multiplelegend$data
objects are present in the chart causes this error:This modifies
e_legend
to allow for the expected behavior which uses it as theicon
argument inopts$legend
effectively changing the icon for the entire legend.