This is an automated email from the ASF dual-hosted git repository.

kezhenxu94 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/skywalking-cli.git


The following commit(s) were added to refs/heads/master by this push:
     new 744192f  Center the heat map (#57)
744192f is described below

commit 744192f01ad5670769088fabbf30959246fe3696
Author: Hoshea Jiang <[email protected]>
AuthorDate: Mon Aug 17 11:33:37 2020 +0800

    Center the heat map (#57)
---
 display/graph/dashboard/global.go | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/display/graph/dashboard/global.go 
b/display/graph/dashboard/global.go
index 9e9f05e..1d4a2d6 100644
--- a/display/graph/dashboard/global.go
+++ b/display/graph/dashboard/global.go
@@ -150,8 +150,15 @@ func gridLayout(w *widgets, lt layoutType) 
([]container.Option, error) {
                }
 
        case layoutHeatMap:
+               const heatmapColWidth = 85
+
                rows = append(rows,
-                       grid.RowHeightPerc(99-buttonRowHeight, 
grid.Widget(w.heatmap)),
+                       grid.RowHeightPerc(
+                               99-buttonRowHeight,
+                               grid.ColWidthPerc((99-heatmapColWidth)/2), // 
Use two empty cols to center the heatmap.
+                               grid.ColWidthPerc(heatmapColWidth, 
grid.Widget(w.heatmap)),
+                               grid.ColWidthPerc((99-heatmapColWidth)/2),
+                       ),
                )
        }
 

Reply via email to