amcharts / amcharts5

The newest, fastest, and most advanced amCharts charting library for JavaScript and TypeScript apps.
Other
353 stars 95 forks source link

How to invalidate labels on seriese in amcharts5 #1650

Closed Ashishvkale closed 3 months ago

Ashishvkale commented 3 months ago

This what we were doing in amcharts4 previously to force reload the label :

lineSeries.invalidateLabels()
columnSeries.invalidateLabels()

Is there any way to achieve the same and force reload the labels in amcharts5 ?

martynasma commented 3 months ago

How about this:

am5.array.each(series.dataItems, function(dataItem) {
  am5.array.each(dataItem.bullets, function(bullet) {
    bullet.get("sprite").markDirty();
  })
});
Ashishvkale commented 3 months ago

Awesome! It woked. @martynasma Thanks for that.