Use meal color parameter.

This commit is contained in:
Johannes Mockenhaupt 2018-03-06 20:32:53 +01:00 committed by AdrianLxM
parent e710ef81a4
commit 7bd85c5972
2 changed files with 4 additions and 3 deletions

View file

@ -67,6 +67,7 @@ public class BIGChart extends WatchFace implements SharedPreferences.OnSharedPre
public int basalBackgroundColor = Color.BLUE;
public int basalCenterColor = Color.BLUE;
public int bolusColor = Color.MAGENTA;
public int carbsColor = Color.GREEN;
public int pointSize = 2;
public boolean lowResMode = false;
public boolean layoutSet = false;
@ -677,9 +678,9 @@ public class BIGChart extends WatchFace implements SharedPreferences.OnSharedPre
if(bgDataList.size() > 0) { //Dont crash things just because we dont have values, people dont like crashy things
int timeframe = Integer.parseInt(sharedPrefs.getString("chart_timeframe", "3"));
if (lowResMode) {
bgGraphBuilder = new BgGraphBuilder(getApplicationContext(), bgDataList, predictionList, tempWatchDataList, basalWatchDataList, bolusWatchDataList, pointSize, midColor, gridColour, basalBackgroundColor, basalCenterColor, bolusColor, Color.GREEN, timeframe);
bgGraphBuilder = new BgGraphBuilder(getApplicationContext(), bgDataList, predictionList, tempWatchDataList, basalWatchDataList, bolusWatchDataList, pointSize, midColor, gridColour, basalBackgroundColor, basalCenterColor, bolusColor, carbsColor, timeframe);
} else {
bgGraphBuilder = new BgGraphBuilder(getApplicationContext(), bgDataList, predictionList, tempWatchDataList, basalWatchDataList, bolusWatchDataList, pointSize, highColor, lowColor, midColor, gridColour, basalBackgroundColor, basalCenterColor, bolusColor, Color.GREEN, timeframe);
bgGraphBuilder = new BgGraphBuilder(getApplicationContext(), bgDataList, predictionList, tempWatchDataList, basalWatchDataList, bolusWatchDataList, pointSize, highColor, lowColor, midColor, gridColour, basalBackgroundColor, basalCenterColor, bolusColor, carbsColor, timeframe);
}
chart.setLineChartData(bgGraphBuilder.lineData());

View file

@ -267,7 +267,7 @@ public class BgGraphBuilder {
}
}
Line line = new Line(pointValues);
line.setColor(Color.GREEN);
line.setColor(carbsColor);
line.setHasLines(false);
line.setPointRadius(pointSize*2);
line.setHasPoints(true);