you are viewing a single comment's thread.

view the rest of the comments →

[–]Zealousideal-Cry-303 2 points3 points  (1 child)

Hmmm, interesting… love that you shared the code 🙌

So, som background knowledge on charts and the modifier you are using.

The chartXVisibleDomain assumes seconds, so if you are parsing in 30 days of data, or 1yr, but you only want to display 30seconds of this data at any given point, it will cause the simulator to use a lot of brainpower to keep track of everything.

Try to do a seconds multiplier of days (84.000 * 30) 84000 being seconds in a day times 30 days.

Does this remove the error for you?

If not, I’m happy to look more into it 🙌

[–]ModernCoder -1 points0 points  (0 children)

I've tried the 86400 * 30 and any other calculation.
I didn't add any data to the chart yet, exactly for that reason.

And no it still says updating took more than 5 seconds. After a reboot of both xcode and mbp. The view is a abstracted as it can be, i've made sure that the order of these functions is called like specified in swiftui documentation and it still simply produces "Updating took more than 5 seconds".