10-04-2021 04:11
10-04-2021 04:11
is it possible to an external tool lile lightening chart js
to create line charts of heart rate data versus time and displayed on the monitor screen while qpp is running in the developer mode on the watch ?
thank you
Answered! Go to the Best Answer.
10-04-2021 18:58
10-04-2021 18:58
Yes, it's possible, but difficult. The trick is to send data via companion to a server, via fetch or WebSocket. (WebSocket is probably better for real-time.) The server can run on the same device as the companion, which can simplify security issues. The server can draw the graph, or onforward it to some other app to do so.
10-04-2021 12:54
10-04-2021 12:54
Do you mean real-time data (as opposed to synced)?
10-04-2021 18:48
10-04-2021 18:48
yes the real time data
10-04-2021 18:58
10-04-2021 18:58
Yes, it's possible, but difficult. The trick is to send data via companion to a server, via fetch or WebSocket. (WebSocket is probably better for real-time.) The server can run on the same device as the companion, which can simplify security issues. The server can draw the graph, or onforward it to some other app to do so.
10-04-2021 19:33
10-04-2021 19:33
ahaa i understand
that makes sense
thank you so much for the help
one more question
can we similar create a watch app that has the same functionality and shows a line chart of heartrate vs time data ?
thank you
10-04-2021 19:55
10-04-2021 19:55
Yes. That's easier because you don't need all the communications stuff. However, drawing graphs on the watch is tricky because you need to do it by manipulating an array of SVG elements (eg, lines).
In either case, your app will need to be running to collect real-time data.
10-04-2021 20:18
10-04-2021 20:18
thank you so much thats vry helpful