janhoy commented on code in PR #2249:
URL: https://github.com/apache/solr/pull/2249#discussion_r1480455903


##########
solr/webapp/web/js/angular/controllers/cloud.js:
##########
@@ -971,7 +974,10 @@ solrAdminApp.directive('graph', function(Constants) {
                 var w = element.width(),
                     h = leafCount * 20;
 
-                var tree = d3.layout.tree().size([h, w - 400]);
+                // Calculate roughly the width of host name to align the graph
+                var hostnameWidth = graphData.children.length > 0 ?
+                  graphData.children[0].children[0].children[0].name.length * 
7.5 : 400;

Review Comment:
   Will test with a few other widths I suppose. I'm trying a formula with 
substracting legend box width and then calculating hostname width using chars * 
`5.5` :)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to