janhoy commented on code in PR #2249: URL: https://github.com/apache/solr/pull/2249#discussion_r1480454195
########## 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; + var tree = d3.layout.tree().size([h, w - hostnameWidth]); Review Comment: I have not tested with different host names. Guess the perfect formula would be `w - legendWidth - hostnameWidth` -- 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: issues-unsubscr...@solr.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org