diff --git a/src/app/components/pab-profile-graph/pab-profile-graph.component.ts b/src/app/components/pab-profile-graph/pab-profile-graph.component.ts index a4fe27e1d187e9d5a812a93e8212310cbeec41e2..1fcbeb2d5fe59f8bb3015a6bdaa774af02ed9f21 100644 --- a/src/app/components/pab-profile-graph/pab-profile-graph.component.ts +++ b/src/app/components/pab-profile-graph/pab-profile-graph.component.ts @@ -8,7 +8,7 @@ import { ResultsComponent } from "../fixedvar-results/results.component"; import { PabResults } from "../../results/pab-results"; import { IYSeries } from "../../results/y-series"; -import { CloisonAval } from "jalhyd"; +import { CloisonAval, Cloisons } from "jalhyd"; @Component({ selector: "pab-profile-graph", @@ -226,22 +226,29 @@ export class PabProfileGraphComponent extends ResultsComponent { const pabLength = Number(xs[xs.length - 1]) - Number(xs[0]); const pabLength5Pct = (pabLength * 5) / 100; - // 1. fond du machin + // 1. radier (cotes amont et mi-bassin) const dataF: { x: string, y: string }[] = []; const nDigits = this.appSetupService.displayDigits; - // extend upstrem + // extend upstream dataF.push({ x: (Number(xs[0]) - pabLength5Pct).toFixed(nDigits), y: this._results.cloisonsResults[0].resultElement.getValue("ZRAM").toFixed(nDigits) }); // regular walls for (let i = 0; i < this._results.cloisonsResults.length; i++) { + const c = (this._results.result.sourceNub.getChildren()[i] as Cloisons); const cr = this._results.cloisonsResults[i]; const ZRAM = cr.resultElement.getValue("ZRAM"); // any ResultElement will do + const ZRMB = cr.resultElement.getValue("ZRMB"); // any ResultElement will do + const halfLB = c.prms.LB.singleValue / 2; dataF.push({ x: xs[i], y: ZRAM.toFixed(nDigits) }); + dataF.push({ + x: (Number(xs[i]) + halfLB).toFixed(nDigits), + y: ZRMB.toFixed(nDigits) + }); } // downwall const dw = (this._results.cloisonAvalResults.sourceNub as CloisonAval);