diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2022-01-18 12:08:08 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-18 12:08:08 -0500 |
commit | 094665ac0cccc04c7797881ff2a27ff330e9a72e (patch) | |
tree | 5e858d21a6d9ad22049bb8188fa71727be14e523 /vendor/github.com/buger/goterm/plot.go | |
parent | 0bbf8fa14035371cdc5bb04f5db51da8a8f94d48 (diff) | |
parent | 774271c38a8c3e96c7518b3c03de2f00e87138be (diff) | |
download | podman-094665ac0cccc04c7797881ff2a27ff330e9a72e.tar.gz podman-094665ac0cccc04c7797881ff2a27ff330e9a72e.tar.bz2 podman-094665ac0cccc04c7797881ff2a27ff330e9a72e.zip |
Merge pull request #12894 from Luap99/deps
upgrade all dependencies
Diffstat (limited to 'vendor/github.com/buger/goterm/plot.go')
-rw-r--r-- | vendor/github.com/buger/goterm/plot.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/vendor/github.com/buger/goterm/plot.go b/vendor/github.com/buger/goterm/plot.go index 120147623..504358cbe 100644 --- a/vendor/github.com/buger/goterm/plot.go +++ b/vendor/github.com/buger/goterm/plot.go @@ -4,6 +4,7 @@ import ( "fmt" "math" "strings" + "unicode/utf8" ) const ( @@ -119,7 +120,7 @@ func (c *LineChart) DrawAxes(maxX, minX, maxY, minY float64, index int) { c.writeText(ff(minX), c.paddingX, 0) x_col := c.data.columns[0] - c.writeText(c.data.columns[0], c.Width/2-len(x_col)/2, 1) + c.writeText(c.data.columns[0], c.Width/2-utf8.RuneCountInString(x_col)/2, 1) if c.Flags&DRAW_INDEPENDENT != 0 || len(c.data.columns) < 3 { col := c.data.columns[index] |