use of lecho.lib.hellocharts.formatter.LineChartValueFormatter in project xDrip by NightscoutFoundation.
the class BgGraphBuilder method treatmentValuesLine.
public Line[] treatmentValuesLine() {
Line[] lines = new Line[9];
try {
lines[0] = new Line(treatmentValues);
lines[0].setColor(getCol(X.color_treatment_dot_background));
lines[0].setHasLines(false);
lines[0].setPointRadius(pointSize * 5 / 2);
lines[0].setHasPoints(true);
lines[1] = new Line(treatmentValues);
lines[1].setColor(getCol(X.color_treatment_dot_foreground));
lines[1].setHasLines(false);
lines[1].setPointRadius(pointSize * 5 / 4);
lines[1].setHasPoints(true);
lines[1].setShape(ValueShape.DIAMOND);
lines[1].setHasLabels(true);
LineChartValueFormatter formatter = new SimpleLineChartValueFormatter(1);
lines[1].setFormatter(formatter);
// insulin on board
lines[2] = new Line(iobValues);
lines[2].setColor(getCol(X.color_treatment));
// need splitter for cubics
lines[2].setHasLines(true);
lines[2].setCubic(false);
lines[2].setFilled(true);
lines[2].setAreaTransparency(35);
lines[2].setFilled(true);
lines[2].setPointRadius(1);
lines[2].setHasPoints(true);
// lines[2].setShape(ValueShape.DIAMOND);
// lines[2].setHasLabels(true);
// iactivity on board
lines[3] = new Line(activityValues);
lines[3].setColor(getCol(X.color_treatment_dark));
lines[3].setHasLines(false);
lines[3].setCubic(false);
lines[3].setFilled(false);
lines[3].setFilled(false);
lines[3].setPointRadius(1);
lines[3].setHasPoints(true);
// annotations
lines[4] = new Line(annotationValues);
lines[4].setColor(getCol(X.color_treatment_dot_foreground));
lines[4].setHasLines(false);
lines[4].setCubic(false);
lines[4].setFilled(false);
lines[4].setPointRadius(0);
lines[4].setHasPoints(true);
lines[4].setHasLabels(true);
lines[5] = new Line(predictedBgValues);
lines[5].setColor(getCol(X.color_predictive));
lines[5].setHasLines(false);
lines[5].setCubic(false);
lines[5].setStrokeWidth(1);
lines[5].setFilled(false);
lines[5].setPointRadius(2);
lines[5].setHasPoints(true);
lines[5].setHasLabels(false);
lines[6] = new Line(cobValues);
lines[6].setColor(getCol(X.color_predictive_dark));
lines[6].setHasLines(false);
lines[6].setCubic(false);
lines[6].setFilled(false);
lines[6].setPointRadius(1);
lines[6].setHasPoints(true);
lines[6].setHasLabels(false);
lines[7] = new Line(polyBgValues);
lines[7].setColor(ChartUtils.COLOR_RED);
lines[7].setHasLines(false);
lines[7].setCubic(false);
lines[7].setStrokeWidth(1);
lines[7].setFilled(false);
lines[7].setPointRadius(1);
lines[7].setHasPoints(true);
lines[7].setHasLabels(false);
lines[8] = new Line(noisePolyBgValues);
lines[8].setColor(ChartUtils.COLOR_ORANGE);
lines[8].setHasLines(true);
lines[8].setCubic(false);
lines[8].setStrokeWidth(1);
lines[8].setFilled(false);
lines[8].setPointRadius(1);
lines[8].setHasPoints(true);
lines[8].setHasLabels(false);
} catch (Exception e) {
if (d)
Log.i(TAG, "Exception making treatment lines: " + e.toString());
}
return lines;
}
use of lecho.lib.hellocharts.formatter.LineChartValueFormatter in project xDrip by NightscoutFoundation.
the class BgGraphBuilder method treatmentValuesLine.
public Line[] treatmentValuesLine() {
Line[] lines = new Line[2];
try {
lines[0] = new Line(treatmentValues);
// getCol(X.color_treatment_dot_background) 0xFFFFFF
lines[0].setColor(highColor);
lines[0].setHasLines(false);
// pointSize * 5 / 2
lines[0].setPointRadius(pointSize * 5 / 3);
lines[0].setHasPoints(true);
// KS
lines[0].setShape(ValueShape.DIAMOND);
lines[1] = new Line(treatmentValues);
// getCol(X.color_treatment_dot_foreground)//0x77aa00 //lowColor
lines[1].setColor(Color.GREEN);
lines[1].setHasLines(false);
// pointSize * 5 / 4
lines[1].setPointRadius(pointSize * 5 / 4);
lines[1].setHasPoints(true);
lines[1].setShape(ValueShape.DIAMOND);
// lines[1].setHasLabels(true);
LineChartValueFormatter formatter = new SimpleLineChartValueFormatter(1);
lines[1].setFormatter(formatter);
} catch (Exception e) {
if (d)
UserError.Log.i(TAG, "Exception making treatment lines: " + e.toString());
}
return lines;
}
use of lecho.lib.hellocharts.formatter.LineChartValueFormatter in project xDrip-plus by jamorham.
the class BgGraphBuilder method treatmentValuesLine.
public Line[] treatmentValuesLine() {
Line[] lines = new Line[2];
try {
lines[0] = new Line(treatmentValues);
// getCol(X.color_treatment_dot_background) 0xFFFFFF
lines[0].setColor(highColor);
lines[0].setHasLines(false);
// pointSize * 5 / 2
lines[0].setPointRadius(pointSize * 5 / 3);
lines[0].setHasPoints(true);
// KS
lines[0].setShape(ValueShape.DIAMOND);
lines[1] = new Line(treatmentValues);
// getCol(X.color_treatment_dot_foreground)//0x77aa00 //lowColor
lines[1].setColor(Color.GREEN);
lines[1].setHasLines(false);
// pointSize * 5 / 4
lines[1].setPointRadius(pointSize * 5 / 4);
lines[1].setHasPoints(true);
lines[1].setShape(ValueShape.DIAMOND);
// lines[1].setHasLabels(true);
LineChartValueFormatter formatter = new SimpleLineChartValueFormatter(1);
lines[1].setFormatter(formatter);
} catch (Exception e) {
if (d)
UserError.Log.i(TAG, "Exception making treatment lines: " + e.toString());
}
return lines;
}
use of lecho.lib.hellocharts.formatter.LineChartValueFormatter in project xDrip-plus by jamorham.
the class BgGraphBuilder method treatmentValuesLine.
public Line[] treatmentValuesLine() {
Line[] lines = new Line[9];
try {
lines[0] = new Line(treatmentValues);
lines[0].setColor(getCol(X.color_treatment_dot_background));
lines[0].setHasLines(false);
lines[0].setPointRadius(pointSize * 5 / 2);
lines[0].setHasPoints(true);
lines[1] = new Line(treatmentValues);
lines[1].setColor(getCol(X.color_treatment_dot_foreground));
lines[1].setHasLines(false);
lines[1].setPointRadius(pointSize * 5 / 4);
lines[1].setHasPoints(true);
lines[1].setShape(ValueShape.DIAMOND);
lines[1].setHasLabels(true);
LineChartValueFormatter formatter = new SimpleLineChartValueFormatter(1);
lines[1].setFormatter(formatter);
// insulin on board
lines[2] = new Line(iobValues);
lines[2].setColor(getCol(X.color_treatment));
// need splitter for cubics
lines[2].setHasLines(true);
lines[2].setCubic(false);
lines[2].setFilled(true);
lines[2].setAreaTransparency(35);
lines[2].setFilled(true);
lines[2].setPointRadius(1);
lines[2].setHasPoints(true);
// lines[2].setShape(ValueShape.DIAMOND);
// lines[2].setHasLabels(true);
// iactivity on board
lines[3] = new Line(activityValues);
lines[3].setColor(getCol(X.color_treatment_dark));
lines[3].setHasLines(false);
lines[3].setCubic(false);
lines[3].setFilled(false);
lines[3].setFilled(false);
lines[3].setPointRadius(1);
lines[3].setHasPoints(true);
// annotations
lines[4] = new Line(annotationValues);
lines[4].setColor(getCol(X.color_treatment_dot_foreground));
lines[4].setHasLines(false);
lines[4].setCubic(false);
lines[4].setFilled(false);
lines[4].setPointRadius(0);
lines[4].setHasPoints(true);
lines[4].setHasLabels(true);
lines[5] = new Line(predictedBgValues);
lines[5].setColor(getCol(X.color_predictive));
lines[5].setHasLines(false);
lines[5].setCubic(false);
lines[5].setStrokeWidth(1);
lines[5].setFilled(false);
lines[5].setPointRadius(2);
lines[5].setHasPoints(true);
lines[5].setHasLabels(false);
lines[6] = new Line(cobValues);
lines[6].setColor(getCol(X.color_predictive_dark));
lines[6].setHasLines(false);
lines[6].setCubic(false);
lines[6].setFilled(false);
lines[6].setPointRadius(1);
lines[6].setHasPoints(true);
lines[6].setHasLabels(false);
lines[7] = new Line(polyBgValues);
lines[7].setColor(ChartUtils.COLOR_RED);
lines[7].setHasLines(false);
lines[7].setCubic(false);
lines[7].setStrokeWidth(1);
lines[7].setFilled(false);
lines[7].setPointRadius(1);
lines[7].setHasPoints(true);
lines[7].setHasLabels(false);
lines[8] = new Line(noisePolyBgValues);
lines[8].setColor(ChartUtils.COLOR_ORANGE);
lines[8].setHasLines(true);
lines[8].setCubic(false);
lines[8].setStrokeWidth(1);
lines[8].setFilled(false);
lines[8].setPointRadius(1);
lines[8].setHasPoints(true);
lines[8].setHasLabels(false);
} catch (Exception e) {
if (d)
Log.i(TAG, "Exception making treatment lines: " + e.toString());
}
return lines;
}
Aggregations