From bbeeacb0cd7daa3073c9cbed90caca71509d9a50 Mon Sep 17 00:00:00 2001 From: Rudolf Achter Date: Sun, 23 May 2021 13:34:14 +0200 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20Es=20wurde=20kein=20Positionsparamet?= =?UTF-8?q?er=20gefunden,=20der=20das=20Argument=20"=E2=94=82"=20akzeptier?= =?UTF-8?q?t.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Show-Graph.ps1 | 2 +- src/UtilityFunctions.ps1 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Show-Graph.ps1 b/src/Show-Graph.ps1 index 5948584..3718091 100644 --- a/src/Show-Graph.ps1 +++ b/src/Show-Graph.ps1 @@ -240,7 +240,7 @@ Function Show-Graph { $XAxisTitle = " "*$LengthOfMaxYAxisLabel + (CenterAlignString $XAxisTitle $XAxis.Length) Write-Host -Object $VerticalEdge -NoNewline Write-Host -Object $XAxisTitle -ForegroundColor DarkYellow -NoNewline # Prints XAxisTitle - Write-Host -Object $(" "*$(($LengthOfMaxYAxisLabel + $XAxis.length) - $XAxisTitle.Length - 2)) $VerticalEdge + Write-Host -Object ($(" "*$(($LengthOfMaxYAxisLabel + $XAxis.length) - $XAxisTitle.Length - 2)) + " " + $VerticalEdge) } # bottom boundary diff --git a/src/UtilityFunctions.ps1 b/src/UtilityFunctions.ps1 index 31f4b50..546f438 100644 --- a/src/UtilityFunctions.ps1 +++ b/src/UtilityFunctions.ps1 @@ -15,5 +15,5 @@ Function Write-Graph($YAxisLabelAlphabet, $YAxisLabel, $Row, $RowColor, $LabelCo Write-Host -Object "$($YAxisLabel.tostring().PadLeft($LengthOfMaxYAxisLabel+2) + [Char]9508)" -NoNewline ##Write-Host "$YAxisLabel|" -NoNewline Write-Host -Object $Row -ForegroundColor $RowColor -NoNewline - Write-Host -Object " " $([char]9474) + Write-Host -Object (" " + $([char]9474)) } From 60734485f56ed59cf32def21781934c730262f61 Mon Sep 17 00:00:00 2001 From: Rudolf Achter Date: Sun, 23 May 2021 15:41:51 +0200 Subject: [PATCH 2/2] fix: Einheitliche Ausgabe mit Write-Host --- src/Show-Graph.ps1 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Show-Graph.ps1 b/src/Show-Graph.ps1 index 3718091..5aade83 100644 --- a/src/Show-Graph.ps1 +++ b/src/Show-Graph.ps1 @@ -141,8 +141,8 @@ Function Show-Graph { $BottomBoundaryLength = $XAxis.Length + 2 # draw top boundary - [string]::Concat($TopLeft," ",$GraphTitle," ",$([string]$TopEdge * $TopBoundaryLength),$TopRight) - [String]::Concat($VerticalEdge,$(" "*$($XAxis.length+2)),$VerticalEdge) # extra line to add space between top-boundary and the graph + Write-Host ([string]::Concat($TopLeft," ",$GraphTitle," ",$([string]$TopEdge * $TopBoundaryLength),$TopRight)) + Write-Host ([String]::Concat($VerticalEdge,$(" "*$($XAxis.length+2)),$VerticalEdge)) # extra line to add space between top-boundary and the graph # draw the graph For($i=$NumOfRows;$i -gt 0;$i--){ @@ -231,8 +231,8 @@ Function Show-Graph { # draw bottom boundary $XAxisLabel +=" "*($XAxis.Length-$XAxisLabel.Length) # to match x-axis label length with x-axis length - [String]::Concat($VerticalEdge,$XAxis," ",$VerticalEdge) # Prints X-Axis horizontal line - [string]::Concat($VerticalEdge,$XAxisLabel," ",$VerticalEdge) # Prints X-Axis step labels + Write-Host([String]::Concat($VerticalEdge,$XAxis," ",$VerticalEdge)) # Prints X-Axis horizontal line + Write-Host([string]::Concat($VerticalEdge,$XAxisLabel," ",$VerticalEdge)) # Prints X-Axis step labels if(![String]::IsNullOrWhiteSpace($XAxisTitle)){ @@ -244,7 +244,7 @@ Function Show-Graph { } # bottom boundary - [string]::Concat($BottomLeft,$([string]$BottomEdge * $BottomBoundaryLength),$BottomRight) + Write-Host([string]::Concat($BottomLeft,$([string]$BottomEdge * $BottomBoundaryLength),$BottomRight)) }