Search in sources :

Example 46 with BarEntry

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;
}
Also used : BarDataSet(com.github.mikephil.charting.data.BarDataSet) IBarDataSet(com.github.mikephil.charting.interfaces.datasets.IBarDataSet) ArrayList(java.util.ArrayList) BarEntry(com.github.mikephil.charting.data.BarEntry)

Aggregations

BarEntry (com.github.mikephil.charting.data.BarEntry)46 ArrayList (java.util.ArrayList)32 BarData (com.github.mikephil.charting.data.BarData)27 BarDataSet (com.github.mikephil.charting.data.BarDataSet)27 IBarDataSet (com.github.mikephil.charting.interfaces.datasets.IBarDataSet)18 Transformer (com.github.mikephil.charting.utils.Transformer)6 Paint (android.graphics.Paint)5 BarBuffer (com.github.mikephil.charting.buffer.BarBuffer)5 Entry (com.github.mikephil.charting.data.Entry)5 BufferedReader (java.io.BufferedReader)5 IOException (java.io.IOException)5 Drawable (android.graphics.drawable.Drawable)3 IValueFormatter (com.github.mikephil.charting.formatter.IValueFormatter)3 MPPointF (com.github.mikephil.charting.utils.MPPointF)3 InputStreamReader (java.io.InputStreamReader)3 SuppressLint (android.annotation.SuppressLint)2 HorizontalBarBuffer (com.github.mikephil.charting.buffer.HorizontalBarBuffer)2 XAxis (com.github.mikephil.charting.components.XAxis)2 IAxisValueFormatter (com.github.mikephil.charting.formatter.IAxisValueFormatter)2 File (java.io.File)2