Commit 76c0c81912d8c183e0e5cef6c03056b2e1f0b8fd

Authored by lsagona
1 parent 29e50d28c6
Exists in master

add offset to time value

Showing 1 changed file with 2 additions and 2 deletions Side-by-side Diff

src/app/component/graph/graph.component.ts View file @ 76c0c81
... ... @@ -62,7 +62,7 @@
62 62 break;
63 63 case 'time':
64 64 this.selectedVessel.messages.forEach(value => {
65   - this.trace.x.push(Date.parse(value.time) / 1000);
  65 + this.trace.x.push(Date.parse(value.time) / 1000 - this.selectedVessel.firstAppearance);
66 66 });
67 67 break;
68 68 case 'latitude':
... ... @@ -152,7 +152,7 @@
152 152 break;
153 153 case 'time':
154 154 this.selectedVessel.messages.forEach(value => {
155   - this.trace.y.push(Date.parse(value.time) / 1000);
  155 + this.trace.y.push(Date.parse(value.time) / 1000 - this.selectedVessel.firstAppearance);
156 156 });
157 157 break;
158 158 case 'latitude':