I am working with achartengine. I have to read a txt file and plot the graph. I get the graph plot. But, what I want to do is when the graph reaches the end of the layout view, it should get plotted from the beginning view as similar to oscilloscope view. I want my graph exactly similar to the graph in this link
http://www.youtube.com/watch?v=N6BuRqeUhqc.
What I have done so far is:
private class ChartTask extends AsyncTask<Void, String, Void>{
String[] values = new String[2];int i1=0;
// Generates dummy data in a non-ui thread
@Override
protected Void doInBackground(Void... params) {
int i = 0;
try{
do{
values[0] = Integer.toString(i);
values[1] = Integer.toString(amplitude[i]);
if(i<=600){
multiRenderer.setXAxisMax(600);
}
else if(i>600){
double minX = amplitudeSeries.getMaxX();
multiRenderer.setXAxisMin(minX);
}
publishProgress(values);
Thread.sleep(1);
i++;
}while(i<=amplitude.length);}
catch (Exception e1){
}
return null;
}
Can someone help me with this. Thanks for anyone's help.