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);
    }
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 ) ; }
Calculates available width and height. Should be called when chart dimensions change. ContentRect is relative to
chart view not the device's screen.