title: Graph View- X axis not ral-time Refresh - Android studio
body: <p>I'm using Graph View to track and display some numbers in real time.
  The problem is that after 80 seconds the x axis is not updated and the size change is performed after 40 seconds from [0-80] to [0-200].
  Is there a way to change Xaxis every time a new number after 80 seconds will be tracked?
  this is my code:</p>
  
  <pre><code>private Handler mHandler = new Handler();
  private LineGraphSeries&lt;DataPoint&gt; series;
  private double LastXPoint=2; 
  
  @SuppressLint("ClickableViewAccessibility")
      @Override
      public void onCreate(Bundle icicle) {
          super.onCreate(icicle);
          setContentView(R.layout.main);
          GraphView graph= (GraphView) findViewById(R.id.graph);
          series = new LineGraphSeries&lt;&gt;(new DataPoint[] {
  
          });
      graph.addSeries(series);
      graph.getViewport().setMaxX(400);
  
      DatiRealTime();
  }
  
  
  private final void DatiRealTime() {
      mHandler.postDelayed(new Runnable() {
          @Override
          public void run() {
              LastXPoint++;
              series.appendData(new DataPoint(LastXPoint,plotRRG), false, 300);
              DatiRealTime();
  
          }
      }, 500);
  
  }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/gOiHY.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/gOiHY.jpg" alt="enter image description here"></a></p>
  
  <p>How could I achive it? 
  thanks in andvance</p>