Josh Miller
This week I set out to design a system to display visual representations of the user's progress. Having planned ahead, I already designed the app's database to store a list of the user's completed routines and other historical data, so the only things left for me to do were to parse through said data and display it to the user.
In order to do this, I used a library called MPAndroidChart. This would allow me to easily include the graph object in an xml layout file and allow it to scale according to device screen sizes without worrying about the data becoming visually distorted. The only issue was that I had never used it before, so I would have to read through the documentation. Luckily, the library's author provided plenty of it.
After experimenting with the library in a separate project, I felt good enough to begin using it within the main project. I begin by plotting basic points on a graph to astounding success, but they were not yet properly scaled over time. The most difficult part of the entire process was figuring out an efficient way to convert Java's Date objects into a primitive datatype to set as the x-axis on the graph. After trying a few methods, I found a way to convert dates into milliseconds, and then another method to eliminate any other values that occur on the same day.
The last step was simply making the graph look more visually appealing. I started by adjusting the grid line width and style and using a smoothing function to make the graph more pleasing to look at.
![]() |
An earlier stage of the historical graph |
![]() |
Final(?) version |