diff --git a/src/app/components/remous-results/line-and-chart-data.ts b/src/app/components/remous-results/line-and-chart-data.ts index c0c7b1d17b1a6292f905fb1de97de6efba3f2e85..433e147f689e97ead4367d5ce43a93ae4b71e2d3 100644 --- a/src/app/components/remous-results/line-and-chart-data.ts +++ b/src/app/components/remous-results/line-and-chart-data.ts @@ -193,13 +193,15 @@ export class ChartData { /** * Dessigne une ligne droite entre y0 (abscisse 0) et ymax (abscisse max), * sans passer par les méthodes mapPoint() et mapY() utilisées dans drawLine + * @param fillArea true pour remplir la zone sous la ligne + * @param fillColor couleur de remplissage de la zone sous la ligne */ - public drawSimpleLine(y0: number, ymax: number, prof: number, color: string, lbl: string, fillColor?: string) { + public drawSimpleLine(y0: number, ymax: number, prof: number, color: string, lbl: string, fillArea: boolean = false, fillColor?: string) { const l = this.newLine(prof); l.setPoint(0, y0); l.setPoint(this._longBief, ymax); l.data = { - label: lbl, fill: fillColor !== undefined, tension: 0, spanGaps: true, + label: lbl, fill: fillArea, tension: 0, spanGaps: true, borderColor: color, backgroundColor: fillColor, pointRadius: 0, showLine: "true" }; } diff --git a/src/app/components/remous-results/remous-results.component.ts b/src/app/components/remous-results/remous-results.component.ts index 0e810fe2a55df3a5a9125e44a7c1908bdfc820ab..e982e199981bf88ddacefa52deec267414c82487 100644 --- a/src/app/components/remous-results/remous-results.component.ts +++ b/src/app/components/remous-results/remous-results.component.ts @@ -272,18 +272,18 @@ export class RemousResultsComponent extends ResultsComponentDirective implements } // ligne de fond - gr1.drawSimpleLine(ZF1, ZF2, 3, "#753F00", this.uitextFond, "#753F00"); + gr1.drawSimpleLine(ZF1, ZF2, 3, "#753F00", this.uitextFond, true, "#753F00"); // ligne de berge if (hauteurBerge) { - gr1.drawSimpleLine(ZF1 + hauteurBerge, ZF2 + hauteurBerge, 4, "#C58F50", this.uitextBerge); + gr1.drawSimpleLine(ZF1 + hauteurBerge, ZF2 + hauteurBerge, 4, "#C58F50", this.uitextBerge, false, "#C58F50"); } // hauteur normale if (this._remousResults.hautNormale?.ok) { const Yn = this._remousResults.hautNormale.vCalc; gr1.drawSimpleLine(Yn + ZF1, Yn + ZF2, - 5, "#A4C537", this.uitextTirantNormal + 5, "#A4C537", this.uitextTirantNormal, false, "#A4C537" ); } @@ -291,7 +291,7 @@ export class RemousResultsComponent extends ResultsComponentDirective implements if (this._remousResults.hautCritique?.ok) { const Yc = this._remousResults.hautCritique.vCalc; gr1.drawSimpleLine(Yc + ZF1, Yc + ZF2, - 6, "#FF0000", this.uitextTirantCritique + 6, "#FF0000", this.uitextTirantCritique, false, "#FF0000" ); }