Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
18e3768355
3 changed files with 25 additions and 4 deletions
|
@ -237,12 +237,15 @@
|
|||
|
||||
<color name="gpx_chart_blue">#2f7af5</color>
|
||||
<color name="gpx_chart_orange">#ff8800</color>
|
||||
<color name="gpx_chart_red">#ff0000</color>
|
||||
<color name="gpx_chart_green">#23b03b</color>
|
||||
<color name="gpx_chart_blue_grid">#c32561c2</color>
|
||||
<color name="gpx_chart_orange_grid">#c3b35f00</color>
|
||||
<color name="gpx_chart_red_grid">#c3b30000</color>
|
||||
<color name="gpx_chart_green_grid">#c3197d2a</color>
|
||||
<color name="gpx_chart_blue_label">#2561c2</color>
|
||||
<color name="gpx_chart_orange_label">#b27700</color>
|
||||
<color name="gpx_chart_red_label">#b20000</color>
|
||||
<color name="gpx_chart_green_label">#197d2a</color>
|
||||
|
||||
</resources>
|
|
@ -303,6 +303,10 @@ public class GPXUtilities {
|
|||
return maxElevation != -100;
|
||||
}
|
||||
|
||||
public boolean hasSpeedInTrack() {
|
||||
return hasSpeedInTrack;
|
||||
}
|
||||
|
||||
public boolean isBoundsCalculated() {
|
||||
return left !=0 && right != 0 && top != 0 && bottom != 0;
|
||||
}
|
||||
|
|
|
@ -1257,8 +1257,14 @@ public class GpxUiHelper {
|
|||
} else {
|
||||
yAxis = mChart.getAxisLeft();
|
||||
}
|
||||
yAxis.setTextColor(ActivityCompat.getColor(mChart.getContext(), R.color.gpx_chart_orange_label));
|
||||
yAxis.setGridColor(ActivityCompat.getColor(mChart.getContext(), R.color.gpx_chart_orange_grid));
|
||||
if (analysis.hasSpeedInTrack()) {
|
||||
yAxis.setTextColor(ActivityCompat.getColor(mChart.getContext(), R.color.gpx_chart_orange_label));
|
||||
yAxis.setGridColor(ActivityCompat.getColor(mChart.getContext(), R.color.gpx_chart_orange_grid));
|
||||
} else {
|
||||
yAxis.setTextColor(ActivityCompat.getColor(mChart.getContext(), R.color.gpx_chart_red_label));
|
||||
yAxis.setGridColor(ActivityCompat.getColor(mChart.getContext(), R.color.gpx_chart_red_grid));
|
||||
}
|
||||
|
||||
yAxis.setAxisMinimum(0f);
|
||||
|
||||
ArrayList<Entry> values = new ArrayList<>();
|
||||
|
@ -1320,11 +1326,19 @@ public class GpxUiHelper {
|
|||
}
|
||||
dataSet.units = mainUnitY;
|
||||
|
||||
dataSet.setColor(ContextCompat.getColor(mChart.getContext(), R.color.gpx_chart_orange));
|
||||
if (analysis.hasSpeedInTrack()) {
|
||||
dataSet.setColor(ContextCompat.getColor(mChart.getContext(), R.color.gpx_chart_orange));
|
||||
} else {
|
||||
dataSet.setColor(ContextCompat.getColor(mChart.getContext(), R.color.gpx_chart_red));
|
||||
}
|
||||
dataSet.setLineWidth(1f);
|
||||
if (drawFilled) {
|
||||
dataSet.setFillAlpha(128);
|
||||
dataSet.setFillColor(ContextCompat.getColor(mChart.getContext(), R.color.gpx_chart_orange));
|
||||
if (analysis.hasSpeedInTrack()) {
|
||||
dataSet.setFillColor(ContextCompat.getColor(mChart.getContext(), R.color.gpx_chart_orange));
|
||||
} else {
|
||||
dataSet.setFillColor(ContextCompat.getColor(mChart.getContext(), R.color.gpx_chart_red));
|
||||
}
|
||||
dataSet.setDrawFilled(true);
|
||||
} else {
|
||||
dataSet.setDrawFilled(false);
|
||||
|
|
Loading…
Reference in a new issue