use of com.github.mikephil.charting.data.BarEntry in project HAR-Android by linw7.
the class BarActivity method get_bar_set_1.
private BarDataSet get_bar_set_1() {
List<BarEntry> entry_list = new ArrayList<>();
BarEntry entry_sit = new BarEntry(sit_yy, 0);
BarEntry entry_stand = new BarEntry(stand_yy, 1);
BarEntry entry_upstairs = new BarEntry(upstairs_yy, 2);
BarEntry entry_downstairs = new BarEntry(downstairs_yy, 3);
BarEntry entry_walk = new BarEntry(walk_yy, 4);
BarEntry entry_jog = new BarEntry(jog_yy, 5);
entry_list.add(entry_sit);
entry_list.add(entry_stand);
entry_list.add(entry_upstairs);
entry_list.add(entry_downstairs);
entry_list.add(entry_walk);
entry_list.add(entry_jog);
BarDataSet barSet = new BarDataSet(entry_list, "前两日数据");
barSet.setColor(Color.rgb(255, 241, 26));
barSet.setDrawValues(true);
return barSet;
}
Aggregations