Search code examples
achartenginezeropoints

aChartengine - the point X still zero but the Y point apears in front


I'm using aChartEngine to do some graphics in real time. The thing is when I´m adding points to make tests to the graph intentionally asigned zero '0' in all the points to the 'X' value. Then I tought: 'All the points in the 'Y' axis gonna be in the same place, at zero int the 'X' axis' but that wasn't the result. The result was that all the points were added and the 'X' axis value had an autoincrement instead of keep in the zero. I've been checking the values, methods and all that I was doing but I still getting the same result. Can you help me? Thanks for the attention.


Solution

  • You can either set the visible range to something wider or add some extra values that don't have the X as zero. Example:

    renderer.setXAxisMin(-1);
    renderer.setXAxisMax(1);