mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2025-01-25 16:15:55 +01:00
Fix spider arms haging out of pie slices
Also make the Pie in week sleep chart look as the other pie chart in "Your Sleep"
This commit is contained in:
parent
45eb14684b
commit
3675386c13
@ -139,13 +139,8 @@ 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.setColors(getColors());
|
set.setColors(getColors());
|
||||||
|
|
||||||
//this hides the values (numeric) added to the set. These would be shown aside the strings set with addXValue above
|
|
||||||
if (totalValues.length < 2) {
|
if (totalValues.length < 2) {
|
||||||
if (totalValue < mTargetValue) {
|
if (totalValue < mTargetValue) {
|
||||||
entries.add(new PieEntry((mTargetValue - totalValue)));
|
entries.add(new PieEntry((mTargetValue - totalValue)));
|
||||||
@ -158,6 +153,13 @@ public abstract class AbstractWeekChartFragment extends AbstractChartFragment {
|
|||||||
if (totalValues.length < 2) {
|
if (totalValues.length < 2) {
|
||||||
data.setDrawValues(false);
|
data.setDrawValues(false);
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
set.setXValuePosition(PieDataSet.ValuePosition.OUTSIDE_SLICE);
|
||||||
|
set.setYValuePosition(PieDataSet.ValuePosition.OUTSIDE_SLICE);
|
||||||
|
set.setValueTextColor(DESCRIPTION_COLOR);
|
||||||
|
set.setValueTextSize(13f);
|
||||||
|
set.setValueFormatter(getPieValueFormatter());
|
||||||
|
}
|
||||||
|
|
||||||
return new DayData(data, formatPieValue((int) totalValue));
|
return new DayData(data, formatPieValue((int) totalValue));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user