parent
2b23d20e36
commit
b2beb2d98e
6 changed files with 11 additions and 21 deletions
app/src/main/java/info/nightscout/androidaps
plugins
workflow
core
core_dependencies.gradle
src/main/java/info/nightscout/androidaps/plugins/general/overview/graphExtensions
|
@ -110,9 +110,6 @@ public class FixedLineGraphSeries<E extends DataPointInterface> extends BaseSeri
|
||||||
init();
|
init();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override public void drawSelection(GraphView mGraphView, Canvas canvas, boolean b, DataPointInterface value) {
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* do the initialization
|
* do the initialization
|
||||||
* creates internal objects
|
* creates internal objects
|
||||||
|
@ -147,8 +144,8 @@ public class FixedLineGraphSeries<E extends DataPointInterface> extends BaseSeri
|
||||||
double maxY;
|
double maxY;
|
||||||
double minY;
|
double minY;
|
||||||
if (isSecondScale) {
|
if (isSecondScale) {
|
||||||
maxY = graphView.getSecondScale().getMaxY(false);
|
maxY = graphView.getSecondScale().getMaxY();
|
||||||
minY = graphView.getSecondScale().getMinY(false);
|
minY = graphView.getSecondScale().getMinY();
|
||||||
} else {
|
} else {
|
||||||
maxY = graphView.getViewport().getMaxY(false);
|
maxY = graphView.getViewport().getMaxY(false);
|
||||||
minY = graphView.getViewport().getMinY(false);
|
minY = graphView.getViewport().getMinY(false);
|
||||||
|
|
|
@ -54,8 +54,8 @@ class ActivityGraph : GraphView {
|
||||||
it.color = Color.MAGENTA
|
it.color = Color.MAGENTA
|
||||||
it.backgroundColor = Color.argb(70, 255, 0, 255)
|
it.backgroundColor = Color.argb(70, 255, 0, 255)
|
||||||
})
|
})
|
||||||
secondScale.setMinY(0.0)
|
secondScale.minY = 0.0
|
||||||
secondScale.setMaxY(1.0)
|
secondScale.maxY = 1.0
|
||||||
gridLabelRenderer.verticalLabelsSecondScaleColor = Color.MAGENTA
|
gridLabelRenderer.verticalLabelsSecondScaleColor = Color.MAGENTA
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -122,7 +122,7 @@ class PrepareTreatmentsDataWorker(
|
||||||
?.let(::addUpperChartMargin)
|
?.let(::addUpperChartMargin)
|
||||||
?.let { data.overviewData.maxTherapyEventValue = maxOf(data.overviewData.maxTherapyEventValue, it) }
|
?.let { data.overviewData.maxTherapyEventValue = maxOf(data.overviewData.maxTherapyEventValue, it) }
|
||||||
|
|
||||||
data.overviewData.treatmentsSeries = PointsWithLabelGraphSeries(filteredTreatments.sortedBy { it.x }.toTypedArray())
|
data.overviewData.treatmentsSeries = PointsWithLabelGraphSeries(filteredTreatments.toTypedArray())
|
||||||
data.overviewData.therapyEventSeries = PointsWithLabelGraphSeries(filteredTherapyEvents.toTypedArray())
|
data.overviewData.therapyEventSeries = PointsWithLabelGraphSeries(filteredTherapyEvents.toTypedArray())
|
||||||
data.overviewData.epsSeries = PointsWithLabelGraphSeries(filteredEps.toTypedArray())
|
data.overviewData.epsSeries = PointsWithLabelGraphSeries(filteredEps.toTypedArray())
|
||||||
|
|
||||||
|
|
|
@ -46,7 +46,8 @@ dependencies {
|
||||||
api 'com.madgag.spongycastle:core:1.58.0.0'
|
api 'com.madgag.spongycastle:core:1.58.0.0'
|
||||||
api "com.google.crypto.tink:tink-android:$tink_version"
|
api "com.google.crypto.tink:tink-android:$tink_version"
|
||||||
|
|
||||||
api "com.jjoe64:graphview:4.2.2"
|
// Graphview cannot be upgraded
|
||||||
|
api "com.jjoe64:graphview:4.0.1"
|
||||||
|
|
||||||
//db
|
//db
|
||||||
api "com.j256.ormlite:ormlite-core:$ormLite_version"
|
api "com.j256.ormlite:ormlite-core:$ormLite_version"
|
||||||
|
|
|
@ -26,7 +26,6 @@ import android.graphics.Path;
|
||||||
|
|
||||||
import com.jjoe64.graphview.GraphView;
|
import com.jjoe64.graphview.GraphView;
|
||||||
import com.jjoe64.graphview.series.BaseSeries;
|
import com.jjoe64.graphview.series.BaseSeries;
|
||||||
import com.jjoe64.graphview.series.DataPointInterface;
|
|
||||||
|
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
|
|
||||||
|
@ -130,9 +129,6 @@ public class AreaGraphSeries<E extends DoubleDataPoint> extends BaseSeries<E> {
|
||||||
init();
|
init();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override public void drawSelection(GraphView mGraphView, Canvas canvas, boolean b, DataPointInterface value) {
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* do the initialization
|
* do the initialization
|
||||||
* creates internal objects
|
* creates internal objects
|
||||||
|
@ -168,8 +164,8 @@ public class AreaGraphSeries<E extends DoubleDataPoint> extends BaseSeries<E> {
|
||||||
double maxY;
|
double maxY;
|
||||||
double minY;
|
double minY;
|
||||||
if (isSecondScale) {
|
if (isSecondScale) {
|
||||||
maxY = graphView.getSecondScale().getMaxY(false);
|
maxY = graphView.getSecondScale().getMaxY();
|
||||||
minY = graphView.getSecondScale().getMinY(false);
|
minY = graphView.getSecondScale().getMinY();
|
||||||
} else {
|
} else {
|
||||||
maxY = graphView.getViewport().getMaxY(false);
|
maxY = graphView.getViewport().getMaxY(false);
|
||||||
minY = graphView.getViewport().getMinY(false);
|
minY = graphView.getViewport().getMinY(false);
|
||||||
|
|
|
@ -14,7 +14,6 @@ import androidx.core.content.ContextCompat;
|
||||||
|
|
||||||
import com.jjoe64.graphview.GraphView;
|
import com.jjoe64.graphview.GraphView;
|
||||||
import com.jjoe64.graphview.series.BaseSeries;
|
import com.jjoe64.graphview.series.BaseSeries;
|
||||||
import com.jjoe64.graphview.series.DataPointInterface;
|
|
||||||
|
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
|
|
||||||
|
@ -80,9 +79,6 @@ public class PointsWithLabelGraphSeries<E extends DataPointWithLabelInterface> e
|
||||||
init();
|
init();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override public void drawSelection(GraphView mGraphView, Canvas canvas, boolean b, DataPointInterface value) {
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* init the internal objects
|
* init the internal objects
|
||||||
* set the defaults
|
* set the defaults
|
||||||
|
@ -113,8 +109,8 @@ public class PointsWithLabelGraphSeries<E extends DataPointWithLabelInterface> e
|
||||||
double maxY;
|
double maxY;
|
||||||
double minY;
|
double minY;
|
||||||
if (isSecondScale) {
|
if (isSecondScale) {
|
||||||
maxY = graphView.getSecondScale().getMaxY(false);
|
maxY = graphView.getSecondScale().getMaxY();
|
||||||
minY = graphView.getSecondScale().getMinY(false);
|
minY = graphView.getSecondScale().getMinY();
|
||||||
} else {
|
} else {
|
||||||
maxY = graphView.getViewport().getMaxY(false);
|
maxY = graphView.getViewport().getMaxY(false);
|
||||||
minY = graphView.getViewport().getMinY(false);
|
minY = graphView.getViewport().getMinY(false);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue