Skip to content
Snippets Groups Projects
Commit 07d28dee authored by Pogman's avatar Pogman
Browse files

fix for graph dot colouring

parent 8e8f274b
No related branches found
No related tags found
No related merge requests found
...@@ -875,11 +875,11 @@ public class MainActivity extends AppCompatActivity implements OnSharedPreferenc ...@@ -875,11 +875,11 @@ public class MainActivity extends AppCompatActivity implements OnSharedPreferenc
public void draw(Canvas canvas, Paint paint, float x, float y, DataPointInterface dataPoint) { public void draw(Canvas canvas, Paint paint, float x, float y, DataPointInterface dataPoint) {
double sgv = dataPoint.getY(); double sgv = dataPoint.getY();
boolean mmolxl = configurationStore.isMmolxl(); boolean mmolxl = configurationStore.isMmolxl();
if (sgv < (mmolxl ? 4.5 : 80)) if (sgv < 80)
paint.setColor(Color.RED); paint.setColor(Color.RED);
else if (sgv <= (mmolxl ? 10 : 180)) else if (sgv <= 180)
paint.setColor(Color.GREEN); paint.setColor(Color.GREEN);
else if (sgv <= (mmolxl ? 14 : 260)) else if (sgv <= 260)
paint.setColor(Color.YELLOW); paint.setColor(Color.YELLOW);
else else
paint.setColor(Color.RED); paint.setColor(Color.RED);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment