0

How to remove a particular data by a attribute. Amcharts have option to remove item by Index. is there any way that we can remove a particular data from series by a attribute value?

pointSeries.data.removeIndex(0);

we want something like

pointSeries.data.removeByAttributeValue({id:12});
Lavan Giri
  • 83
  • 1
  • 2
  • 6

1 Answers1

1

Find the index of the item you want to remove

    var index = pointSeries.data._values.findIndex(obj => obj.id == "12");

Then use removeIndex

    pointSeries.data.removeIndex(index);
Dennis
  • 482
  • 7
  • 17
  • Then how to remove data points between the particular range? and re-add new array between that range? – Prasanna Aug 10 '23 at 18:36