use of com.github.mikephil.charting.data.realm.implementation.RealmBubbleDataSet in project MPAndroidChart by PhilJay.
the class RealmDatabaseActivityBubble method setData.
private void setData() {
RealmResults<RealmDemoData> result = mRealm.where(RealmDemoData.class).findAll();
RealmBubbleDataSet<RealmDemoData> set = new RealmBubbleDataSet<RealmDemoData>(result, "xValue", "yValue", "bubbleSize");
set.setLabel("Realm BubbleDataSet");
set.setColors(ColorTemplate.COLORFUL_COLORS, 110);
ArrayList<IBubbleDataSet> dataSets = new ArrayList<IBubbleDataSet>();
// add the dataset
dataSets.add(set);
// create a data object with the dataset list
BubbleData data = new BubbleData(dataSets);
styleData(data);
// set data
mChart.setData(data);
mChart.animateY(1400, Easing.EasingOption.EaseInOutQuart);
}
Aggregations