ClearAll method in ui.chart doesn’t remove legend.
Hi @AndS
The legend
is defined separately from dataset and even may not match series
completely (the order of these two arrays is always cohesive, but it is possible to provide a partial legend).
This also allows to load the data on demand or reload it with new records/updated values while the rest of the config is the same.
Since the legend and series can exist without the dataset, they need to be reset separately: Code Snippet