xieziyu / ngx-echarts

An angular (ver >= 2.x) directive for ECharts (ver >= 3.x)
https://xieziyu.github.io/ngx-echarts/
MIT License
1.11k stars 197 forks source link

series still present after removing them #180

Open kgrigorian opened 5 years ago

kgrigorian commented 5 years ago

When updating chart both using setOption or merge with new series (removed 1 for example) it still shows on legend and tooltip.

ileodo commented 2 years ago

got the same problem. and I did check the config.series, the series was definitely removed..

dspasyuk commented 2 years ago

I have this issue too using setOption, can add more series but cannot unset the old one. How do I fix that?

maq0n commented 1 year ago

try to use notMerge={true}

sbruno-insight-decision commented 8 months ago

I have the same problem. Maybe the ngx-echarts library can use the second option explained in the ECharts documentation: https://echarts.apache.org/en/api.html#echartsInstance.setOption

There are two ways to remove components:

  1. Totally removal: use notMerge: true, all of the components will be removed.
  2. Partially removal: use replaceMerge: [...], the specified types of components will be removed if no id matched. This mode is useful to keep the state (e.g., highlight / animation / selected area) of the other components while make removal.