Android Shinobi Date Format Problem


Dear All,

I set a date format in my Shinobi graph X-Axis, as below:

DateFormat df = DateFormat.getDateInstance(DateFormat.MEDIUM, Locale.PRC);


The problem is no matter how much i zoom in the graph, the date is always shown as “2014-1-13”, it won’t show in hours and minutes. Is this a bug?




I try changing the code to:

NumberFormat nf = NumberFormat.getInstance();


However, there is NULL pointer error, xAxis.getLabelFormat() returns NULL pointer. Is this a bug in Shinobi?


there is an example for shinobi iOS, how about Android?


Hello Victor,

Thanks for getting in touch.

Please try this:

DateFormat df = DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.MEDIUM,  Locale.PRC);

This worked for me and correctly showed the time as well as the date.

xAxis.getLabelFormat() returns a user supplied label formatter. If you do not set this value in advance using setLabelFormat(), calling the method getLabelFormat() will return null.

I hope that this helps you, please get back in touch if you have any further questions.




hi Kai,

Thank you for your reply. This is the way i set the date format in Android, just sharing it with shinobi forum.

  SimpleDateFormat sdf = new SimpleDateFormat(“yyyy-MM-dd,H:mm”);





Hello Victor,

Thank you for sharing this and contributing to the community.

Kind regards,