Enhancing a Kotlin Chart With Advanced Charting Kit (Part 2)

In part 1 of this blog series, I demonstrated how the Advanced Charting Kit can be used to enhance a shinobichart using Kotlin. In this blog post, I’d like to show you how you can improve your chart a little further. Again, I’ll demonstrate this using the heart rate chart that I used in part 1. At the end of part 1, we had a chart that looked as below:

While the chart now shows pace as well as heart rate, I feel it looks a little crowded. The relationships between the data series are not immediately obvious and I feel — to some degree — adding the pace data clutters the chart when it is viewed fully zoomed out. Rather than display all of the pace data upon the initial loading of the chart, I think this could be a great fit for ACK’s drill down animation feature. Why don’t we have the pace data appear as the user zooms in on the x or time axis?

Enhancing a Kotlin Chart With Advanced Charting Kit (Part 1)

Ever since Google announced support for Kotlin on Android back in 2017, its popularity amongst developers has continued. Having initially experimented with Kotlin, I was keen to see how it would get along with the shinobicharts and Advanced Charting Kit libraries. Being the owner of a wearable fitness tracking device, I decided to write a simple app that would display a chart showing my heart rate over a typical working day.

I began by taking a day’s worth of data and placing into a simple file. The data is presented as a timestamp value and an integer showing the beats per minute at that time. A typical data row looks like this: