Chart.js with firestore data

Hi, I am an intern web developer.

  1. I have been working on a feature that display firestore data on chart.js and that’s working fine. However, every time the firestore collection is updated, the data on the chart.js graph duplicate. At first, i found out the chart.js was creating a new instance every time the firestore is updated but i manage to prevent that. The problem is still there. I have done everything i could and nothing work. Please somebody, help if you have encountered the same issue.
  2. Another issue i am facing is that i have two page that perform editing of some data, i can access the first page of editing, see the draft data and editind but once i click btn save updates to move to next page, it redirect back to first page immediately.
  3. I am using google place api and then geocode to convert the street address into coordinates lat long, then i calculate the distance betwee the point a and b. After i get the distance, i then calculate an amount that has to be paid based on the distance. This process is taking about 20sec plus to compute regardless of which method i use. How can make it compute faster?

Please help

I am on ionic v7+ and angular v17+.
Looking forward to your feedback my seniors.

Create a project that clearly replicates your 3 different scenarios and share here.

Thanks, I am doing it right away. Chart.js with firestore data (codes), that is the topic name with codes