How to add String Label to MPAndroidCharts

帅比萌擦擦* 提交于 2019-12-11 12:27:19

问题


I am developing a simple Android app which shows a dataset of flot numbers on a linechart. I am using MPAndroidChart and thanks to it I am able to manage my custom linechart and its style.

However, I am trying to add a String Label in order to label both the domain (x-axes) and the range (y-axes) of my linechart, as shown in the picture below.

Any suggestions to do it using MPAndroidChart?


回答1:


Actually, what I need it is not supported by the MPAndroidChart. Hence the only way to do that is to define two TextView for domain and range label respectively. Moreover, in order to have the range label as shown in the above figure I suggest to see this question which explain how to design a vertical TextView. It works for me.



来源:https://stackoverflow.com/questions/27093531/how-to-add-string-label-to-mpandroidcharts

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!