code: public void setContentRect(int width, int height, int paddingLeft, int paddingTop, int paddingRight,
                                 int paddingBottom) {
          chartWidth = width;
          chartHeight = height;
          maxContentRect.set(paddingLeft, paddingTop, width - paddingRight, height - paddingBottom);
          contentRectMinusAxesMargins.set(maxContentRect);
          contentRectMinusAllMargins.set(maxContentRect);
      }
docs: Calculates available width and height. Should be called when chart dimensions change. ContentRect is relative to
  chart view not the device's screen.