Report unavailable data usage.

- when showing the data usage graph, if the first data point is equal to
the first available data, insert a 0 usage point on the first day of
available data, so that it will show a flat line for the days that do
not have available data instead of showing a non-zero slope.

Change-Id: Ibf305e292a65ab3310ea12efbb575e3a7e1b6012
Fixes: 76155147
Test: make RunSettingsRoboTests
This commit is contained in:
Doris Ling
2018-03-28 17:14:23 -07:00
parent caf72cf3ff
commit 02b4cf2aca
4 changed files with 171 additions and 5 deletions

View File

@@ -185,6 +185,10 @@ public class UsageGraph extends View {
int x = paths.keyAt(i);
int y = paths.valueAt(i);
if (y == PATH_DELIM) {
if (i == 1) {
localPaths.put(getX(x+1) - 1, getY(0));
continue;
}
if (i == paths.size() - 1 && skippedLastPoint) {
// Add back skipped point to complete the path.
localPaths.put(lx, ly);