From 0f86c484b26d43a9ad3ca8bdb899a81ac4d41b4f Mon Sep 17 00:00:00 2001
From: "francois.grand" <francois.grand@irstea.fr>
Date: Thu, 9 Nov 2017 11:17:30 +0100
Subject: [PATCH] =?UTF-8?q?remous=20:=20correction=20d'un=20bug=20d'affich?=
 =?UTF-8?q?age=20des=20courbes=20fluviale,=20torrentielle=20et=20param?=
 =?UTF-8?q?=C3=A8tre=20suppl=C3=A9mentaire?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .../remous-results/remous-results.component.ts     | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/app/components/remous-results/remous-results.component.ts b/src/app/components/remous-results/remous-results.component.ts
index 0fd32a475..1a372893b 100644
--- a/src/app/components/remous-results/remous-results.component.ts
+++ b/src/app/components/remous-results/remous-results.component.ts
@@ -196,15 +196,15 @@ export class RemousResultsComponent {
             let yTor: string = r["tor"];
 
             let yExtra: string = r["extraFlu"];
-            if (yExtra == undefined)
+            if (yExtra == "")
                 yExtra = r["extraTor"];
 
-            if (yFlu != undefined && yFlu != "")
-                dataFlu.push(this.mapY(x, +yFlu));
-            if (yTor != undefined && yTor != "")
-                dataTor.push(this.mapY(x, +yTor));
-            if (yExtra != undefined && yExtra != "")
-                dataExtra.push(this.mapY(x, +yExtra));
+            if (yFlu != "")
+                dataFlu.push({ "x": x, "y": this.mapY(x, +yFlu) });
+            if (yTor != "")
+                dataTor.push({ "x": x, "y": this.mapY(x, +yTor) });
+            if (yExtra != "")
+                dataExtra.push({ "x": x, "y": this._extraGraph ? +yExtra : this.mapY(x, +yExtra) });
         }
         if (this._extraGraph)
             ds2.push({ label: this._extraParamLabel, data: dataExtra, tension: 0, borderColor: "#0093BD", pointRadius: 5 });
-- 
GitLab