title: How to show X labels on marker view in Line Chart?
body: <p>How to show the x-axis values in the line chart on the marker view.I have used the getVal() function to get the y-axis values but how to get the x-axis values on the marker view..Below is my code for the marker view.</p>
  
  <pre><code>    public class MymarkerView extends MarkerView
  {
  private TextView indices;
  
  public MymarkerView(Context context, int layoutResource) {
      super(context, layoutResource);
      indices = (TextView) findViewById(R.id.indices);
  }
  
  // callbacks everytime the MarkerView is redrawn, can be used to update the
  // content (user-interface)
  @Override
  public void refreshContent(Entry e, Highlight highlight) {
  
          indices.setText("Indices:" +e.getVal());
    }
  
  @Override
  public int getXOffset(float xpos) {
      // this will center the marker-view horizontally
      return -(getWidth() / 2);
  
  }
  
  @Override
  public int getYOffset(float ypos) {
      // this will cause the marker-view to be above the selected value
      return -getHeight();
  }
  public void draw(Canvas canvas, float posx, float posy)
  {
      // take offsets into consideration
      posx += getXOffset(posx);
      posy=0;
      // AVOID OFFSCREEN
      if(posx&lt;65)
          posx=65;
      if(posx&gt;350)
          posx=350;
  
      // translate to the correct position and draw
      canvas.translate(posx, posy);
      draw(canvas);
      canvas.translate(-posx, -posy);
    }
  
  }
  </code></pre>