Scrollable legend on Android


I’ve got a chart with 8+ series with rather long names. As a result on some lower res hdpi, and pretty much any mdpi device the legend doesn’t fit on screen even in landscape mode. Apart from hackig my way through the view hierarchy of the legend view and wrapping it in a ScrollView, is there a better way to do it? Could the legend view be wrapped in a ScrollView by default?


Hi ptashek,

In the current version of ShinobiCharts for Android the only customisation you can do for a the Legend is through its style object. Making the Legend more customisable is a feature on our roadmap and our overall aim is to provide similar functionality between the ourselves and the iOS version - in the iOS version, for example, you are able to give the chart your own subclass of Legend. I am unable to say when this feature will be available, however, we prioritise development based on customer demand and so will certainly take note this request.

The legend should be the same size on both hdpi and mdpi devices - so rather than density being the issue I would have expected you to come into trouble with physically smaller screens. One thing you could do is provide different titles based on the width of the screen: e.g. define some short string constants in res/values/strings.xml for the series’ titles such as S1, S2 etc. (or some more appropriate abbreviation!) and then create a res/values-sw600dp folder with a strings.xml file defining the same string constants but with longer names for the series, such as Series 1, Series 2 etc.

Obviously this does depend on your data so many not be applicable but by the same principle you could define different styling options for the legend based on the width of the screen.

I hope that helps,



Is there an update on whether this is yet possible?


Hello xvia,

Thanks for getting in touch!

I am afraid that currently this feature is still not available in ShinobiCharts for Android. We do aim for parity with the iOS version of ShinobiCharts, but we do prioritise features based on customer demand. Unfortunately to date, having a more customisable Legend is a feature which we have a lower demand for. As such we must prioritise the features which most people ask for. This is not to say we won’t be implementing this feature, but at present there are other features which hold a greater priority, which we must work on first.

I apologise for any inconvenience this may cause you, please don’t hesitate to get back in touch if you need any further help.

Thanks and kind regards,