parent
2b23d20e36
commit
b2beb2d98e
|
@ -110,9 +110,6 @@ public class FixedLineGraphSeries<E extends DataPointInterface> extends BaseSeri
|
|||
init();
|
||||
}
|
||||
|
||||
@Override public void drawSelection(GraphView mGraphView, Canvas canvas, boolean b, DataPointInterface value) {
|
||||
}
|
||||
|
||||
/**
|
||||
* do the initialization
|
||||
* creates internal objects
|
||||
|
@ -147,8 +144,8 @@ public class FixedLineGraphSeries<E extends DataPointInterface> extends BaseSeri
|
|||
double maxY;
|
||||
double minY;
|
||||
if (isSecondScale) {
|
||||
maxY = graphView.getSecondScale().getMaxY(false);
|
||||
minY = graphView.getSecondScale().getMinY(false);
|
||||
maxY = graphView.getSecondScale().getMaxY();
|
||||
minY = graphView.getSecondScale().getMinY();
|
||||
} else {
|
||||
maxY = graphView.getViewport().getMaxY(false);
|
||||
minY = graphView.getViewport().getMinY(false);
|
||||
|
|
|
@ -54,8 +54,8 @@ class ActivityGraph : GraphView {
|
|||
it.color = Color.MAGENTA
|
||||
it.backgroundColor = Color.argb(70, 255, 0, 255)
|
||||
})
|
||||
secondScale.setMinY(0.0)
|
||||
secondScale.setMaxY(1.0)
|
||||
secondScale.minY = 0.0
|
||||
secondScale.maxY = 1.0
|
||||
gridLabelRenderer.verticalLabelsSecondScaleColor = Color.MAGENTA
|
||||
}
|
||||
}
|
|
@ -122,7 +122,7 @@ class PrepareTreatmentsDataWorker(
|
|||
?.let(::addUpperChartMargin)
|
||||
?.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.epsSeries = PointsWithLabelGraphSeries(filteredEps.toTypedArray())
|
||||
|
||||
|
|
|
@ -46,7 +46,8 @@ dependencies {
|
|||
api 'com.madgag.spongycastle:core:1.58.0.0'
|
||||
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
|
||||
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.series.BaseSeries;
|
||||
import com.jjoe64.graphview.series.DataPointInterface;
|
||||
|
||||
import java.util.Iterator;
|
||||
|
||||
|
@ -130,9 +129,6 @@ public class AreaGraphSeries<E extends DoubleDataPoint> extends BaseSeries<E> {
|
|||
init();
|
||||
}
|
||||
|
||||
@Override public void drawSelection(GraphView mGraphView, Canvas canvas, boolean b, DataPointInterface value) {
|
||||
}
|
||||
|
||||
/**
|
||||
* do the initialization
|
||||
* creates internal objects
|
||||
|
@ -168,8 +164,8 @@ public class AreaGraphSeries<E extends DoubleDataPoint> extends BaseSeries<E> {
|
|||
double maxY;
|
||||
double minY;
|
||||
if (isSecondScale) {
|
||||
maxY = graphView.getSecondScale().getMaxY(false);
|
||||
minY = graphView.getSecondScale().getMinY(false);
|
||||
maxY = graphView.getSecondScale().getMaxY();
|
||||
minY = graphView.getSecondScale().getMinY();
|
||||
} else {
|
||||
maxY = graphView.getViewport().getMaxY(false);
|
||||
minY = graphView.getViewport().getMinY(false);
|
||||
|
|
|
@ -14,7 +14,6 @@ import androidx.core.content.ContextCompat;
|
|||
|
||||
import com.jjoe64.graphview.GraphView;
|
||||
import com.jjoe64.graphview.series.BaseSeries;
|
||||
import com.jjoe64.graphview.series.DataPointInterface;
|
||||
|
||||
import java.util.Iterator;
|
||||
|
||||
|
@ -80,9 +79,6 @@ public class PointsWithLabelGraphSeries<E extends DataPointWithLabelInterface> e
|
|||
init();
|
||||
}
|
||||
|
||||
@Override public void drawSelection(GraphView mGraphView, Canvas canvas, boolean b, DataPointInterface value) {
|
||||
}
|
||||
|
||||
/**
|
||||
* init the internal objects
|
||||
* set the defaults
|
||||
|
@ -113,8 +109,8 @@ public class PointsWithLabelGraphSeries<E extends DataPointWithLabelInterface> e
|
|||
double maxY;
|
||||
double minY;
|
||||
if (isSecondScale) {
|
||||
maxY = graphView.getSecondScale().getMaxY(false);
|
||||
minY = graphView.getSecondScale().getMinY(false);
|
||||
maxY = graphView.getSecondScale().getMaxY();
|
||||
minY = graphView.getSecondScale().getMinY();
|
||||
} else {
|
||||
maxY = graphView.getViewport().getMaxY(false);
|
||||
minY = graphView.getViewport().getMinY(false);
|
||||
|
|
Loading…
Reference in a new issue