Merge pull request #997 from swissalpine/transparent-deviations

Make deviation bars transparent
This commit is contained in:
Milos Kozak 2018-05-04 13:25:58 +02:00 committed by GitHub
commit ea063cd1f1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 4 deletions

View file

@ -436,10 +436,10 @@ public class GraphData {
for (long time = fromTime; time <= toTime; time += 5 * 60 * 1000L) {
AutosensData autosensData = IobCobCalculatorPlugin.getPlugin().getAutosensData(time);
if (autosensData != null) {
int color = Color.BLACK; // "="
if (autosensData.pastSensitivity.equals("C")) color = Color.GRAY;
if (autosensData.pastSensitivity.equals("+")) color = Color.GREEN;
if (autosensData.pastSensitivity.equals("-")) color = Color.RED;
int color = MainApp.gc(R.color.deviationblack); // "="
if (autosensData.pastSensitivity.equals("C")) color = MainApp.gc(R.color.deviationgrey);
if (autosensData.pastSensitivity.equals("+")) color = MainApp.gc(R.color.deviationgreen);
if (autosensData.pastSensitivity.equals("-")) color = MainApp.gc(R.color.deviationred);
devArray.add(new DeviationDataPoint(time, autosensData.deviation, color, devScale));
maxDevValueFound = Math.max(maxDevValueFound, Math.abs(autosensData.deviation));
}

View file

@ -64,4 +64,9 @@
<color name="notificationLow">#ff827c</color>
<color name="notificationInfo">#009705</color>
<color name="deviationgrey">#c8666666</color>
<color name="deviationgreen">#7200FF00</color>
<color name="deviationred">#72FF0000</color>
<color name="deviationblack">#72000000</color>
</resources>