如何添加字符串标签来MPAndroidCharts [英] How to add String Label to MPAndroidCharts

查看:323
本文介绍了如何添加字符串标签来MPAndroidCharts的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开发一个简单的Andr​​oid应用程序,显示海军报数字上线型图的数据集。
我使用的 MPAndroidChart 并感谢它,我能够管理我的自定义线型图和它的风格。

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.

不过,我尝试添加一个字符串标签,以标示这两个域(X轴)和我的线型图的范围(Y轴),如下面的图片。

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.

任何建议使用MPAndroidChart办呢?

Any suggestions to do it using MPAndroidChart?

推荐答案

其实,我需要什么不被MPAndroidChart支持。
因此,要做到这一点的唯一方法是分别定义两个的TextView 的定义域和值域的标签。
此外,为了有范围的标签,如图如上图,我建议看看<一个href=\"http://stackoverflow.com/questions/1258275/vertical-rotated-label-in-android/7855852#7855852\">this问题解释如何设计一个垂直的TextView 。它为我工作。

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.

这篇关于如何添加字符串标签来MPAndroidCharts的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆