@Test public void measureInnerChartBottom_HasAxisLabelsOutside_Result() { when(mStyleMock.hasXAxis()).thenReturn(true); when(mStyleMock.getAxisThickness()).thenReturn(6.f); when(mStyleMock.getFontMaxHeight()).thenReturn(6); when(mStyleMock.getAxisLabelsSpacing()).thenReturn(6); when(mStyleMock.getXLabelsPositioning()).thenReturn(AxisRenderer.LabelPosition.OUTSIDE); assertEquals(6.f, mXRndr.measureInnerChartBottom(24), RESULT_THRESHOLD); }
protected float measureInnerChartBottom(int bottom) { float result = bottom; if (style.hasXAxis()) result -= style.getAxisThickness(); if (style.getXLabelsPositioning() == LabelPosition.OUTSIDE) result -= style.getFontMaxHeight() + style.getAxisLabelsSpacing(); return result; }
XRenderer extends AxisRenderer { protected float measureInnerChartBottom(int bottom) { float result = bottom; if (style.hasXAxis()) result -= style.getAxisThickness(); if (style.getXLabelsPositioning() == LabelPosition.OUTSIDE) result -= style.getFontMaxHeight() + style.getAxisLabelsSpacing(); return result; } }
XRenderer extends AxisRenderer { protected float measureInnerChartBottom(int bottom) { float result = bottom; if (style.hasXAxis()) result -= style.getAxisThickness(); if (style.getXLabelsPositioning() == LabelPosition.OUTSIDE) result -= style.getFontMaxHeight() + style.getAxisLabelsSpacing(); return result; } XRenderer(); }
XRenderer extends AxisRenderer { protected float measureInnerChartBottom(int bottom) { float result = bottom; if (style.hasXAxis()) result -= style.getAxisThickness(); if (style.getXLabelsPositioning() == LabelPosition.OUTSIDE) result -= style.getFontMaxHeight() + style.getAxisLabelsSpacing(); return result; } XRenderer(); @Override void dispose(); @Override void measure(int left, int top, int right, int bottom); @Override void draw(Canvas canvas); @Override float parsePos(int index, double value); }
XRenderer extends AxisRenderer { protected float measureInnerChartBottom(int bottom) { float result = bottom; if (style.hasXAxis()) result -= style.getAxisThickness(); if (style.getXLabelsPositioning() == LabelPosition.OUTSIDE) result -= style.getFontMaxHeight() + style.getAxisLabelsSpacing(); return result; } XRenderer(); @Override void dispose(); @Override void measure(int left, int top, int right, int bottom); @Override void draw(Canvas canvas); @Override float parsePos(int index, double value);  }