使x轴在使用AChartEngine垂直中心 [英] Make x-axis in vertical center using 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:
- 请在图形非滚动。 (待定)
- 请与x轴垂直居中,如图形象。 (待定)
- 仅在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屋!