code: protected boolean isChartPointValid(int xx, int yy) {
          boolean ret = true;
  
          //check x
          if (xx < chartRect.x || xx > chartRect.x + chartRect.width) {
              ret = false;
          } else //check y bellow x axis
          if (yy > chartRect.y + chartRect.height) {
              ret = false;
          }
  
          return ret;
      }
docs: /*
  Check if the point (x,y) is contained in the chart area
  We check only minX, maxX, and maxY to avoid flickering.
  We take max(chartRect.y, y) as redering value
  This is done to prevent line out of range if new point is added
  during chart paint.