Merge pull request #301 from MilosKozak/insulin-colourlables

Add color of chart to corresponding lables/scale
This commit is contained in:
AdrianLxM 2017-07-21 16:46:39 +02:00 committed by GitHub
commit 0297f2b75d

View file

@ -63,6 +63,7 @@ public class ActivityGraph extends GraphView {
getViewport().setMaxX(hours * 60); getViewport().setMaxX(hours * 60);
getGridLabelRenderer().setNumHorizontalLabels(hours + 1); getGridLabelRenderer().setNumHorizontalLabels(hours + 1);
getGridLabelRenderer().setHorizontalAxisTitle("[min]"); getGridLabelRenderer().setHorizontalAxisTitle("[min]");
getGridLabelRenderer().setVerticalLabelsColor(activitySeries.getColor());
DataPoint[] iobDataPoints = new DataPoint[iobArray.size()]; DataPoint[] iobDataPoints = new DataPoint[iobArray.size()];
iobDataPoints = iobArray.toArray(iobDataPoints); iobDataPoints = iobArray.toArray(iobDataPoints);
@ -72,5 +73,6 @@ public class ActivityGraph extends GraphView {
iobSeries.setBackgroundColor(Color.argb(70, 255, 0, 255)); iobSeries.setBackgroundColor(Color.argb(70, 255, 0, 255));
getSecondScale().setMinY(0); getSecondScale().setMinY(0);
getSecondScale().setMaxY(1); getSecondScale().setMaxY(1);
getGridLabelRenderer().setVerticalLabelsSecondScaleColor(Color.MAGENTA);
} }
} }