如何显示自定义X轴的标签格:achartengine [英] How to show grid for a custom x axis label: achartengine

查看:172
本文介绍了如何显示自定义X轴的标签格:achartengine的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想,如果用户点击该图,其中,如果在x坐标的合作已经接近我们的XY线图点,然后我要显示该点的垂直网格功能。

I want a functionality where if user clicks on the the graph and if the x co ordinate is close to our point on XY line graph then I want to show a vertical grid for that point.

这似乎与唯一的功能是
mRenderer.setShowCustomTextGridY(布尔showGrid)

The only function that seems related is mRenderer.setShowCustomTextGridY(boolean showGrid)

但对于其值应在网格显示不是在文档中明确的。

But for which value should the grid be shown is not clear in the documentation.

请帮忙。我应该使用哪种功能?

Please help. Which function should I use?

推荐答案

一旦你有X轴值,您可以添加自定义文本标签是这样的:

Once you have the X axis value, you can add a custom text label this way:

renderer.addXTextLabel(x, "label");

然后,如果你调用一个 mChartView.repaint(),自定义文本格就会显示出来。

Then, if you call a mChartView.repaint(), the custom text grid will be displayed.

这篇关于如何显示自定义X轴的标签格:achartengine的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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