使x轴在使用AChartEngine垂直中心 [英] Make x-axis in vertical center using AChartEngine

查看:234
本文介绍了使x轴在使用AChartEngine垂直中心的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我打算做一个应用程序,在那里我想创建一个XY图。 AchartEngine API看起来很吸引我。我都看见了他们的榜样和演示,搜查他们的论坛,但不能看着办吧,如果能能够满足我的要求。

I am am going to make a app where i want to create a xy graph. AchartEngine API looks very attractive to me. I have seen all their examples and demos, Searched their forum but cant figure it out that if it can able to match my requirements.

因此​​,这里是我的问题: 我希望有一个XY图,其中:

So here is my question: I want a xy graph where:

  1. 请在图形非滚动。 (待定)
  2. 请与x轴垂直居中,如图形象。 (待定)
  3. 仅在x轴上显示标签。 (待定)

第二个问题是最重要的是我。可一些冬青唯一的建议我aChartengine是否做必要的工作。

The Second Question is most important to me. Can some holly sole suggest me whether aChartengine do the required job.

http://s16.postimage.org/bqcewws4l/graph.png

推荐答案

一切皆有可能与AChartEngine:)

Everything is possible with AChartEngine :)

问题1:

renderer.setPanEnabled(false, false);
renderer.setZoomEnabled(false, false);

问题2:您可以通过设置Y轴的最小值和最大值控制这一点。他们必须是这样的方式选择的0是在中间。例如:

Question #2: You can control this by setting the yaxis min and max. They have to be such way chosen that 0 is in the middle. Example:

renderer.setYAxisMin(-10); 
renderer.setYAxisMax(10);

问题3:

renderer.setYLabels(0);

这篇关于使x轴在使用AChartEngine垂直中心的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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