private void drawXAxis(Canvas canvas){
  int x=getScrollX() + leftBorder;
  int y=topBorder + effectiveHeight;
  canvas.drawLine(x,y,x + effectiveWidth,y,axisPaint);
  String label=getXAxisLabel();
  Rect rect=getRect(axisPaint,label);
  int yOffset=(int)rect.height() / 2;
  canvas.drawText(label,x + effectiveWidth + spacer,y + yOffset,axisPaint);
  double interval=getXAxisInterval();
  ArrayList<Double> markerPositions=getXAxisMarkerPositions(interval);
  NumberFormat numberFormat=interval < 1 ? X_FRACTION_FORMAT : X_NUMBER_FORMAT;
  for (int i=0; i < markerPositions.size(); i++) {
    drawXAxisMarker(canvas,markerPositions.get(i),numberFormat,spacer + yOffset);
  }
}

private void drawXAxis ( Canvas canvas ) { int x = getScrollX ( ) + leftBorder ; int y = topBorder + effectiveHeight ; canvas . drawLine ( x , y , x + effectiveWidth , y , axisPaint ) ; String label = getXAxisLabel ( ) ; Rect rect = getRect ( axisPaint , label ) ; int yOffset = ( int ) rect . height ( ) / 2 ; canvas . drawText ( label , x + effectiveWidth + spacer , y + yOffset , axisPaint ) ; double interval = getXAxisInterval ( ) ; ArrayList < Double > markerPositions = getXAxisMarkerPositions ( interval ) ; NumberFormat numberFormat = interval < 1 ? X_FRACTION_FORMAT : X_NUMBER_FORMAT ; for ( int i = 0 ; i < markerPositions . size ( ) ; i ++ ) { drawXAxisMarker ( canvas , markerPositions . get ( i ) , numberFormat , spacer + yOffset ) ; } }
draws the x axis .
