Android - How to Align Point in the Center of Graph? -


i'm user achartengine plot graph. when plot more 1 point there no problem, because evrey point shown in graph, when point 1 align on left side of graph, on x axis , isn't shown.

enter image description here

so how move point in center of graph?

thx in advance!

after adding first point, supposing location of point @ x, y, following:

renderer.setxaxismin(x - 1); renderer.setxaxismax(x + 1); renderer.setyaxismin(y - 1); renderer.setyaxismax(y + 1); 

or short version:

renderer.setrange(new double[] {x - 1, x + 1, y - 1, y + 1}, 0); 

later, when add second point, make sure either set other visible ranges using approach above or reset visible ranges using this:

renderer.setrange(new double[] {mathhelper.null_value, mathhelper.null_value, mathhelper.null_value, mathhelper.null_value}, 0); 

Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -