From 76c0c81912d8c183e0e5cef6c03056b2e1f0b8fd Mon Sep 17 00:00:00 2001 From: lsagona Date: Wed, 18 Nov 2020 09:52:12 +0100 Subject: [PATCH] add offset to time value --- src/app/component/graph/graph.component.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/component/graph/graph.component.ts b/src/app/component/graph/graph.component.ts index b8b2f3c..b785acb 100644 --- a/src/app/component/graph/graph.component.ts +++ b/src/app/component/graph/graph.component.ts @@ -62,7 +62,7 @@ export class GraphComponent implements OnInit { break; case 'time': this.selectedVessel.messages.forEach(value => { - this.trace.x.push(Date.parse(value.time) / 1000); + this.trace.x.push(Date.parse(value.time) / 1000 - this.selectedVessel.firstAppearance); }); break; case 'latitude': @@ -152,7 +152,7 @@ export class GraphComponent implements OnInit { break; case 'time': this.selectedVessel.messages.forEach(value => { - this.trace.y.push(Date.parse(value.time) / 1000); + this.trace.y.push(Date.parse(value.time) / 1000 - this.selectedVessel.firstAppearance); }); break; case 'latitude': -- 1.7.10.4