Java Code Examples for lecho.lib.hellocharts.view.Chart#getChartComputator()
The following examples show how to use
lecho.lib.hellocharts.view.Chart#getChartComputator() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AbstractChartRenderer.java From hellocharts-android with Apache License 2.0 | 6 votes |
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); }
Example 2
Source File: AxesRenderer.java From hellocharts-android with Apache License 2.0 | 5 votes |
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); } }
Example 3
Source File: ChartTouchHandler.java From hellocharts-android with Apache License 2.0 | 5 votes |
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); }