@Override public void resetRenderer() { this.computator = chart.getChartComputator(); }
public void resetRenderer() { this.computator = chart.getChartComputator(); }
private void insetContentRectWithAxesMargins(int axisMargin, int position) { if (LEFT == position) { chart.getChartComputator().insetContentRect(axisMargin, 0, 0, 0); } else if (RIGHT == position) { chart.getChartComputator().insetContentRect(0, 0, axisMargin, 0); } else if (TOP == position) { chart.getChartComputator().insetContentRect(0, axisMargin, 0, 0); } else if (BOTTOM == position) { chart.getChartComputator().insetContentRect(0, 0, 0, axisMargin); } }
@Override public void onChartSizeChanged() { final ChartComputator computator = chart.getChartComputator(); Rect contentRect = computator.getContentRectMinusAllMargins(); if (contentRect.width() < contentRect.height()) { isBubbleScaledByX = true; } else { isBubbleScaledByX = false; } }
public void resetTouchHandler() { this.computator = chart.getChartComputator(); this.renderer = chart.getChartRenderer(); }
public AxesRenderer(Context context, Chart chart) { this.chart = chart; computator = chart.getChartComputator(); density = context.getResources().getDisplayMetrics().density; scaledDensity = context.getResources().getDisplayMetrics().scaledDensity; axisMargin = ChartUtils.dp2px(density, DEFAULT_AXIS_MARGIN_DP); for (int position = 0; position < 4; ++position) { labelPaintTab[position].setStyle(Paint.Style.FILL); labelPaintTab[position].setAntiAlias(true); namePaintTab[position].setStyle(Paint.Style.FILL); namePaintTab[position].setAntiAlias(true); linePaintTab[position].setStyle(Paint.Style.STROKE); linePaintTab[position].setAntiAlias(true); } }
public AbstractChartRenderer(Context context, Chart chart) { this.density = context.getResources().getDisplayMetrics().density; this.scaledDensity = context.getResources().getDisplayMetrics().scaledDensity; this.chart = chart; this.computator = chart.getChartComputator(); labelMargin = ChartUtils.dp2px(density, DEFAULT_LABEL_MARGIN_DP); labelOffset = labelMargin; labelPaint.setAntiAlias(true); labelPaint.setStyle(Paint.Style.FILL); labelPaint.setTextAlign(Align.LEFT); labelPaint.setTypeface(Typeface.defaultFromStyle(Typeface.BOLD)); labelPaint.setColor(Color.WHITE); labelBackgroundPaint.setAntiAlias(true); labelBackgroundPaint.setStyle(Paint.Style.FILL); }
public ChartTouchHandler(Context context, Chart chart) { this.chart = chart; this.computator = chart.getChartComputator(); this.renderer = chart.getChartRenderer(); gestureDetector = new GestureDetector(context, new ChartGestureListener()); scaleGestureDetector = new ScaleGestureDetector(context, new ChartScaleGestureListener()); chartScroller = new ChartScroller(context); chartZoomer = new ChartZoomer(context, ZoomType.HORIZONTAL_AND_VERTICAL); }