Make x-axis in vertical center using AChartEngine

情到浓时终转凉″ 提交于 2019-12-21 22:30:22

问题


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.

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

  1. Make the graph non scrollable. (Pending)
  2. Make the x-axis vertically center as shown in image. (Pending)
  3. Show labels only on x-axis. (Pending)

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


回答1:


Everything is possible with AChartEngine :)

Question #1:

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

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);

Question #3:

renderer.setYLabels(0);


来源:https://stackoverflow.com/questions/10979790/make-x-axis-in-vertical-center-using-achartengine

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