use of com.db.chart.view.BarChartView in project WilliamChart by diogobernardino.
the class BarFragment method onCreateView.
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View layout = inflater.inflate(R.layout.fragment_bar, container, false);
mChart = (BarChartView) layout.findViewById(R.id.chart);
mFirstStage = true;
layout.setOnClickListener(this);
mChart.setOnClickListener(this);
BarSet dataset = new BarSet(mLabels, mValues[0]);
dataset.setColor(Color.parseColor("#eb993b"));
mChart.addData(dataset);
mChart.setBarSpacing(Tools.fromDpToPx(3));
mChart.setXLabels(AxisRenderer.LabelPosition.NONE).setYLabels(AxisRenderer.LabelPosition.NONE).setXAxis(false).setYAxis(false);
mChart.show(new Animation().setEasing(new BounceInterpolator()));
return layout;
}
Aggregations