janhoy commented on code in PR #2249:
URL: https://github.com/apache/solr/pull/2249#discussion_r1481345438
##########
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 *
5.5 : 400;
+ var tree = d3.layout.tree().size([h, w - 140 - hostnameWidth]);
Review Comment:
Perhaps also make sure `w - 140 - hostnameWidth` has a certain minimum
width, such as 200?
--
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]