1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-11-28 04:46:51 +01:00

Pie Charts: some improvements wrt the labels

Still room for optimization.

Thanks to Alberto!
This commit is contained in:
cpfeiffer 2017-04-05 00:08:17 +02:00
parent 8e780fa122
commit f48729cc64
2 changed files with 7 additions and 0 deletions

View File

@ -139,6 +139,9 @@ public abstract class AbstractWeekChartFragment extends AbstractChartFragment {
entries.add(new PieEntry(value, pieLabels[i]));
}
set.setValueTextColor(DESCRIPTION_COLOR);
set.setValueTextSize(13f);
set.setXValuePosition(PieDataSet.ValuePosition.OUTSIDE_SLICE);
set.setValueFormatter(getPieValueFormatter());
set.setColors(getColors());

View File

@ -105,6 +105,10 @@ public class SleepChartFragment extends AbstractChartFragment {
}
});
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);
//setupLegend(pieChart);