LiveCharts map live updates from subscription #34
houstonhaynes
started this conversation in
Show and tell
Replies: 1 comment 1 reply
-
I’m loving the real time Map Dashboard! |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This was gratifying to figure out - largely from the examples and help from @JordanMarr while working on the previous version of this library. This is kind of a hot mess on purpose because of the multiple subscriptions that are running on a scattered cycle. The "magic" is a timeseries DB that's running behind the scenes - dropping in records every second to maintain "fresh" data that - when queried for the most recent minute of records - always has a bit of variation in the numbers that come back.
Here's a gist with the ViewModel and View definitions. And here's what it looks like when run against the DB I have on my local network that's processing simulated data "on the backplane". The subs run every 3 seconds, give or take a few milliseconds. I put that little random spread in there to keep from causing too much of a bottleneck when updating the model. The init is a "hot mess" too - with hard-coded values for the HeatLandSeries - simply because it was too much of a PITA to go fetch the data and return it - especially when the data never shifts all that much. That's largely because of the distribution method I use in seeding the data. So as long as it "starts" close enough the grandient in the map never shifts enough to really show any big moves anyway. But the COO_GridData is "live" from the first pass. So it's - well - a hot mess. 😸
Recording.2023-12-13.121108.mp4
Beta Was this translation helpful? Give feedback.
All reactions