GraphView -> 4.2.2
This commit is contained in:
parent
5aa1d988b1
commit
4350a2d5d1
6 changed files with 21 additions and 11 deletions
|
@ -110,6 +110,9 @@ 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
|
||||||
|
@ -144,8 +147,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();
|
maxY = graphView.getSecondScale().getMaxY(false);
|
||||||
minY = graphView.getSecondScale().getMinY();
|
minY = graphView.getSecondScale().getMinY(false);
|
||||||
} 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.minY = 0.0
|
secondScale.setMinY(0.0)
|
||||||
secondScale.maxY = 1.0
|
secondScale.setMaxY(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.toTypedArray())
|
data.overviewData.treatmentsSeries = PointsWithLabelGraphSeries(filteredTreatments.sortedBy { it.x }.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,8 +46,7 @@ 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"
|
||||||
|
|
||||||
// Graphview cannot be upgraded
|
api "com.jjoe64:graphview:4.2.2"
|
||||||
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,6 +26,7 @@ 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;
|
||||||
|
|
||||||
|
@ -129,6 +130,9 @@ 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
|
||||||
|
@ -164,8 +168,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();
|
maxY = graphView.getSecondScale().getMaxY(false);
|
||||||
minY = graphView.getSecondScale().getMinY();
|
minY = graphView.getSecondScale().getMinY(false);
|
||||||
} else {
|
} else {
|
||||||
maxY = graphView.getViewport().getMaxY(false);
|
maxY = graphView.getViewport().getMaxY(false);
|
||||||
minY = graphView.getViewport().getMinY(false);
|
minY = graphView.getViewport().getMinY(false);
|
||||||
|
|
|
@ -14,6 +14,7 @@ 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;
|
||||||
|
|
||||||
|
@ -79,6 +80,9 @@ 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
|
||||||
|
@ -109,8 +113,8 @@ public class PointsWithLabelGraphSeries<E extends DataPointWithLabelInterface> e
|
||||||
double maxY;
|
double maxY;
|
||||||
double minY;
|
double minY;
|
||||||
if (isSecondScale) {
|
if (isSecondScale) {
|
||||||
maxY = graphView.getSecondScale().getMaxY();
|
maxY = graphView.getSecondScale().getMaxY(false);
|
||||||
minY = graphView.getSecondScale().getMinY();
|
minY = graphView.getSecondScale().getMinY(false);
|
||||||
} else {
|
} else {
|
||||||
maxY = graphView.getViewport().getMaxY(false);
|
maxY = graphView.getViewport().getMaxY(false);
|
||||||
minY = graphView.getViewport().getMinY(false);
|
minY = graphView.getViewport().getMinY(false);
|
||||||
|
|
Loading…
Reference in a new issue