@Override public DataSet<BubbleEntry> copy() { List<BubbleEntry> entries = new ArrayList<BubbleEntry>(); for (int i = 0; i < mValues.size(); i++) { entries.add(mValues.get(i).copy()); } BubbleDataSet copied = new BubbleDataSet(entries, getLabel()); copy(copied); return copied; }
BubbleDataSet set1 = new BubbleDataSet(values1, "DS 1"); set1.setDrawIcons(false); set1.setColor(ColorTemplate.COLORFUL_COLORS[0], 130); set1.setDrawValues(true); BubbleDataSet set2 = new BubbleDataSet(values2, "DS 2"); set2.setDrawIcons(false); set2.setIconsOffset(new MPPointF(0, 15)); set2.setDrawValues(true); BubbleDataSet set3 = new BubbleDataSet(values3, "DS 3"); set3.setColor(ColorTemplate.COLORFUL_COLORS[2], 130); set3.setDrawValues(true);
private BubbleData generateBubbleData() { BubbleData bd = new BubbleData(); ArrayList<BubbleEntry> entries = new ArrayList<>(); for (int index = 0; index < count; index++) { float y = getRandom(10, 105); float size = getRandom(100, 105); entries.add(new BubbleEntry(index + 0.5f, y, size)); } BubbleDataSet set = new BubbleDataSet(entries, "Bubble DataSet"); set.setColors(ColorTemplate.VORDIPLOM_COLORS); set.setValueTextSize(10f); set.setValueTextColor(Color.WHITE); set.setHighlightCircleWidth(1.5f); set.setDrawValues(true); bd.addDataSet(set); return bd; }
@Override public DataSet<BubbleEntry> copy() { List<BubbleEntry> yVals = new ArrayList<BubbleEntry>(); for (int i = 0; i < mValues.size(); i++) { yVals.add(mValues.get(i).copy()); } BubbleDataSet copied = new BubbleDataSet(yVals, getLabel()); copied.mColors = mColors; copied.mHighLightColor = mHighLightColor; return copied; }
@Override public DataSet<BubbleEntry> copy() { List<BubbleEntry> yVals = new ArrayList<BubbleEntry>(); for (int i = 0; i < mValues.size(); i++) { yVals.add(mValues.get(i).copy()); } BubbleDataSet copied = new BubbleDataSet(yVals, getLabel()); copied.mColors = mColors; copied.mHighLightColor = mHighLightColor; return copied; }
@Override public DataSet<BubbleEntry> copy() { List<BubbleEntry> yVals = new ArrayList<BubbleEntry>(); for (int i = 0; i < mValues.size(); i++) { yVals.add(mValues.get(i).copy()); } BubbleDataSet copied = new BubbleDataSet(yVals, getLabel()); copied.mColors = mColors; copied.mHighLightColor = mHighLightColor; return copied; }
@Override public DataSet<BubbleEntry> copy() { List<BubbleEntry> entries = new ArrayList<BubbleEntry>(); for (int i = 0; i < mValues.size(); i++) { entries.add(mValues.get(i).copy()); } BubbleDataSet copied = new BubbleDataSet(entries, getLabel()); copy(copied); return copied; }
BubbleDataSet set1 = new BubbleDataSet(yVals1, "DS 1"); set1.setColor(ColorTemplate.COLORFUL_COLORS[0], 130); set1.setDrawValues(true); BubbleDataSet set2 = new BubbleDataSet(yVals2, "DS 2"); set2.setColor(ColorTemplate.COLORFUL_COLORS[1], 130); set2.setDrawValues(true); BubbleDataSet set3 = new BubbleDataSet(yVals3, "DS 3"); set3.setColor(ColorTemplate.COLORFUL_COLORS[2], 130); set3.setDrawValues(true);
protected BubbleData generateBubbleData() { BubbleData bd = new BubbleData(); ArrayList<BubbleEntry> entries = new ArrayList<>(); for (int index = 0; index < itemCount; index++) { float y = getRandom(10, 105); float size = getRandom(100, 105); entries.add(new BubbleEntry(index + 0.5f, y, size)); } BubbleDataSet set = new BubbleDataSet(entries, "Bubble DataSet"); set.setColors(ColorTemplate.VORDIPLOM_COLORS); set.setValueTextSize(10f); set.setValueTextColor(Color.WHITE); set.setHighlightCircleWidth(1.5f); set.setDrawValues(true); bd.addDataSet(set); return bd; }