Pie Charts: some improvements wrt the labels
Still room for optimization. Thanks to Alberto!
This commit is contained in:
parent
8e780fa122
commit
f48729cc64
|
@ -139,6 +139,9 @@ public abstract class AbstractWeekChartFragment extends AbstractChartFragment {
|
||||||
entries.add(new PieEntry(value, pieLabels[i]));
|
entries.add(new PieEntry(value, pieLabels[i]));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
set.setValueTextColor(DESCRIPTION_COLOR);
|
||||||
|
set.setValueTextSize(13f);
|
||||||
|
set.setXValuePosition(PieDataSet.ValuePosition.OUTSIDE_SLICE);
|
||||||
set.setValueFormatter(getPieValueFormatter());
|
set.setValueFormatter(getPieValueFormatter());
|
||||||
set.setColors(getColors());
|
set.setColors(getColors());
|
||||||
|
|
||||||
|
|
|
@ -105,6 +105,10 @@ public class SleepChartFragment extends AbstractChartFragment {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
set.setColors(colors);
|
set.setColors(colors);
|
||||||
|
set.setValueTextColor(DESCRIPTION_COLOR);
|
||||||
|
set.setValueTextSize(13f);
|
||||||
|
set.setXValuePosition(PieDataSet.ValuePosition.OUTSIDE_SLICE);
|
||||||
|
set.setYValuePosition(PieDataSet.ValuePosition.OUTSIDE_SLICE);
|
||||||
data.setDataSet(set);
|
data.setDataSet(set);
|
||||||
|
|
||||||
//setupLegend(pieChart);
|
//setupLegend(pieChart);
|
||||||
|
|
Loading…
Reference in New Issue