First I need to know if it is possible to show highlighted regions like this on the ChartData2d graph, the closest thing I found to it was the HighlightDataPoints function.
I referred to this post for help https://community.appinventor.mit.edu/t/chartdata2d-and-highlightdatapoints-shows-no-highlighted-data/94205 but I do not know how to implement to the line graph that updates live every second with only 10 data points at one time with random y values generated by the random number function.
I attempted to integrate but I do not know why it does not work.
Here is the .aia file for reference.
realtimeXHighlight vlaues.aia (4.0 KB)
Initially, the random integer range was 60-100 and I wanted to highlight values from 75-80 but it did not work. I decreased the range to 73-76 and attempted to highlight 75 only on any x value and eventually gave up and set the data point to (1,75) and waited for that coordinate to appear there but it still did not get highlighted which I do not know why anymore.
At the end of the day, if I have the above figured out, I want to integrate to my main project which would be displayed the float values received via bluetooth onto the chart, highlighting any values between 60-90 green and 30-60 orange.
Here is .aia file of my current main project:
main_project.aia (287.3 KB)
One more key feature of the main project would be calculating the percentage of green since the beginning of the timer so that it can be an indication of the score (more green = better score). The score will be displayed on like a pie chart maybe or just a label in a circle saying the percentage score of greens. I think the main idea is taking the total time that was green divided by the total time since start of timer multiply by 100%. That is the idea but I do not know what are the MIT app inventor steps.
I have questions like how do I find the time that it was green when it happened at several intervals. I do not have an idea on where to start yet so I was hoping to get some advice on this. Do I use a tiny database to store all the values since the start?
That is all, thank you if you have read all the way, any help is appreciated, thank you for sharing your knowledge with me!