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>(); dataSets.add(set); // add the dataset // 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); }
private void setData() { RealmResults<RealmDemoData> result = mRealm.allObjects(RealmDemoData.class); RealmBubbleDataSet<RealmDemoData> set = new RealmBubbleDataSet<RealmDemoData>(result, "value", "xIndex", "bubbleSize"); set.setLabel("Realm BubbleDataSet"); set.setColors(ColorTemplate.COLORFUL_COLORS, 110); ArrayList<IBubbleDataSet> dataSets = new ArrayList<IBubbleDataSet>(); dataSets.add(set); // add the dataset // create a data object with the dataset list RealmBubbleData data = new RealmBubbleData(result, "xValue", dataSets); styleData(data); // set data mChart.setData(data); mChart.animateY(1400, Easing.EasingOption.EaseInOutQuart); }