I'm using the MPAndroidChart and am really enjoying it.
A 'little' need I have is that I can put null values to the 'entrys'. I'm monitoring the apache conections on servers of my system, and I would to see if they is down (where I put the null value) or if they just no conections (0).
I tried, but the Entry class don't accept 'null' as value showing the message: 'The constructor Entry(null, int) is undefined'
Thanks!
A possible solution for you could be to check weather the object you received is null, or not. If the object is null, you don't even create an
Entry
object instead of just setting it's value to null.Example:
This would create e.g. a
LineChart
where no circles are drawn on indices where theConnectionHolder
object was null.For a future release of the library, I will try to add the feature so that null values are supported.
My solution is to draw another DataSet with TRANSPARENT (or arbitrary) color: - chart with fixed number of X values - Y values are updated periodically - boolean flag indicate transparent part (or another color)