Search in sources :

Example 1 with SpinnerPieChart01View

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);
    }
}
Also used : SpinnerPieChart01View(com.demo.xclcharts.view.SpinnerPieChart01View) RelativeLayout(android.widget.RelativeLayout) SpinnerBarChart01View(com.demo.xclcharts.view.SpinnerBarChart01View)

Aggregations

RelativeLayout (android.widget.RelativeLayout)1 SpinnerBarChart01View (com.demo.xclcharts.view.SpinnerBarChart01View)1 SpinnerPieChart01View (com.demo.xclcharts.view.SpinnerPieChart01View)1