use of com.github.mikephil.charting.data.realm.implementation.RealmRadarDataSet in project MPAndroidChart by PhilJay.
the class RealmDatabaseActivityRadar method setData.
private void setData() {
RealmResults<RealmDemoData> result = mRealm.where(RealmDemoData.class).findAll();
//RealmBarDataSet<RealmDemoData> set = new RealmBarDataSet<RealmDemoData>(result, "stackValues", "xIndex"); // normal entries
// stacked entries
RealmRadarDataSet<RealmDemoData> set = new RealmRadarDataSet<RealmDemoData>(result, "yValue");
set.setLabel("Realm RadarDataSet");
set.setDrawFilled(true);
set.setColor(ColorTemplate.rgb("#009688"));
set.setFillColor(ColorTemplate.rgb("#009688"));
set.setFillAlpha(130);
set.setLineWidth(2f);
ArrayList<IRadarDataSet> dataSets = new ArrayList<IRadarDataSet>();
// add the dataset
dataSets.add(set);
// create a data object with the dataset list
RadarData data = new RadarData(dataSets);
styleData(data);
// set data
mChart.setData(data);
mChart.animateY(1400);
}
Aggregations