Skip to content

Commit ba5caed

Browse files
graph's path marker adjusted for gaps
1 parent 9dd76d9 commit ba5caed

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

cache.manifest

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
CACHE MANIFEST
2-
# version 86
2+
# version 87
33

44
# gogole maps files
55
http://maps.google.com/maps/api/js?v=3.10&sensor=false&key=AIzaSyCOqkcNey4CCyG4X0X5qxHAhCgD8g5DwXg

js/plot_config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,9 @@ function updateLegend() {
108108
}
109109

110110
if(follow_vehicle != -1 && vehicles[follow_vehicle].positions.length) {
111+
// adjust index for null data points
112+
j = j - vehicles[follow_vehicle].graph_data[0].nulls;
113+
// update position
111114
polyMarker.setPosition(vehicles[follow_vehicle].positions[j]);
112115
}
113116
}

js/tracker.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -817,7 +817,7 @@ function graphAddLastPosition(idx) {
817817
var ts_last = data[0].data[ts_last_idx][0];
818818

819819
if(ts_last + 120000 < ts) {
820-
$.each(data, function(k,v) { v.data.push([ts_last+1, null]); })
820+
$.each(data, function(k,v) { v.data.push([ts_last+1, null]); v.nulls += 1; })
821821
}
822822
}
823823

@@ -828,6 +828,7 @@ function graphAddLastPosition(idx) {
828828
color: '#33B5E5',
829829
yaxis: series_idx,
830830
lines: { show:true, fill: true, fillColor: "rgba(51, 181, 229, 0.1)" },
831+
nulls: 0,
831832
data: []
832833
};
833834
}

0 commit comments

Comments
 (0)