use of com.demo.xclcharts.view.SpinnerPieChart01View in project XCL-Charts by xcltapestry.
the class SpinnerActivity method renderChart.
private void renderChart(int position) {
int width = DensityUtil.dip2px(getApplicationContext(), 300);
int height = DensityUtil.dip2px(getApplicationContext(), 400);
RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(width, height);
layoutParams.addRule(RelativeLayout.CENTER_IN_PARENT);
mLaychart.removeAllViews();
if (0 == mSelected) {
SpinnerBarChart01View barChart01 = new SpinnerBarChart01View(this, position, mMoveHeight);
mLaychart.addView(barChart01, layoutParams);
} else {
SpinnerPieChart01View pieChart01 = new SpinnerPieChart01View(this, position, mMoveHeight);
mLaychart.addView(pieChart01, layoutParams);
}
}
Aggregations