There is a graph A:
digraph MyGraph {
"OssInterface.Host"
"OssInterface"
"OssInterface.CliApp"
"OssInterface.UnitTests"
"Services.Localization"
"Services.Logging"
"Services.Statistics"
"Services.Statistics.DataServiceRepo"
"Services.Statistics.Dto"
"Services.Utilities"
"OssInterface.Host" -> "Services.Logging"
"OssInterface.Host" -> "OssInterface"
"OssInterface.Host" -> "Services.Utilities"
"OssInterface.Host" -> "Services.Localization"
"OssInterface.Host" -> "Services.Statistics.DataServiceRepo"
"OssInterface.Host" -> "Services.Statistics"
"OssInterface" -> "Services.Utilities"
"OssInterface" -> "Services.Logging"
"OssInterface.CliApp" -> "Services.Logging"
"OssInterface.CliApp" -> "OssInterface.Host"
"OssInterface.CliApp" -> "Services.Utilities"
"OssInterface.CliApp" -> "OssInterface"
"OssInterface.UnitTests" -> "OssInterface"
"OssInterface.UnitTests" -> "Services.Logging"
"Services.Localization" -> "Services.Logging"
"Services.Statistics" -> "Services.Statistics.Dto"
"Services.Statistics" -> "Services.Logging"
"Services.Statistics.DataServiceRepo" -> "Services.Statistics"
"Services.Statistics.DataServiceRepo" -> "Services.Statistics.Dto"
"Services.Utilities" -> "Services.Logging"
}
And graph B:
digraph MyGraph {
subgraph "cluster_OssInterface.Host" {
"OssInterface.Host/OssInterface.Host"
"OssInterface.Host/OssInterface.Host.Building"
"OssInterface.Host/OssInterface.Host.Statistics"
}
subgraph "cluster_OssInterface" {
"OssInterface/OssInterface"
"OssInterface/OssInterface.Agent"
"OssInterface/OssInterface.DataSources"
"OssInterface/OssInterface.DataSources.GrpcStorages"
"OssInterface/OssInterface.DataSources.HttpStorages"
"OssInterface/OssInterface.Records"
"OssInterface/OssInterface.Storage"
"OssInterface/OssInterface.Storage.Cache"
"OssInterface/OssInterface.Traps"
"OssInterface/Common.Trees"
"OssInterface/Common.Trees.Utils"
"OssInterface/DataService.Proto.OssData"
}
subgraph "cluster_OssInterface.CliApp" {
"OssInterface.CliApp/OssInterface.CliApp"
}
subgraph "cluster_OssInterface.UnitTests" {
"OssInterface.UnitTests/OssInterface.UnitTests"
"OssInterface.UnitTests/OssInterface.UnitTests.Fakes"
"OssInterface.UnitTests/OssInterface.UnitTests.Storage"
"OssInterface.UnitTests/OssInterface.UnitTests.Storage.Cache"
"OssInterface.UnitTests/OssInterface.UnitTests.Traps"
}
subgraph "cluster_Services.Localization" {
"Services.Localization/Services.Localization"
}
subgraph "cluster_Services.Logging" {
"Services.Logging/Services.Logging"
}
subgraph "cluster_Services.Statistics" {
"Services.Statistics/Services.Statistics"
}
subgraph "cluster_Services.Statistics.DataServiceRepo" {
"Services.Statistics.DataServiceRepo/Services.Statistics.DataServiceRepo"
}
subgraph "cluster_Services.Statistics.Dto" {
"Services.Statistics.Dto/Services.Statistics.Dto"
}
subgraph "cluster_Services.Utilities" {
"Services.Utilities/Services.Utilities"
}
"OssInterface.Host/OssInterface.Host.Building" -> "Services.Logging/Services.Logging"
"OssInterface.Host/OssInterface.Host.Building" -> "OssInterface/OssInterface"
"OssInterface.Host/OssInterface.Host.Building" -> "OssInterface.Host/OssInterface.Host"
"OssInterface.Host/OssInterface.Host.Building" -> "OssInterface/OssInterface.Agent"
"OssInterface.Host/OssInterface.Host.Building" -> "OssInterface/OssInterface.Traps"
"OssInterface.Host/OssInterface.Host.Building" -> "OssInterface/OssInterface.Storage.Cache"
"OssInterface.Host/OssInterface.Host.Building" -> "OssInterface/OssInterface.Storage"
"OssInterface.Host/OssInterface.Host.Building" -> "Services.Utilities/Services.Utilities"
"OssInterface.Host/OssInterface.Host.Building" -> "OssInterface/OssInterface.DataSources"
"OssInterface.Host/OssInterface.Host.Building" -> "OssInterface/OssInterface.Records"
"OssInterface.Host/OssInterface.Host.Building" -> "OssInterface/DataService.Proto.OssData"
"OssInterface.Host/OssInterface.Host.Building" -> "OssInterface/OssInterface.DataSources.GrpcStorages"
"OssInterface.Host/OssInterface.Host.Building" -> "OssInterface/OssInterface.DataSources.HttpStorages"
"OssInterface.Host/OssInterface.Host.Building" -> "Services.Localization/Services.Localization"
"OssInterface.Host/OssInterface.Host.Building" -> "Services.Statistics.DataServiceRepo/Services.Statistics.DataServiceRepo"
"OssInterface.Host/OssInterface.Host.Building" -> "OssInterface.Host/OssInterface.Host.Statistics"
"OssInterface.Host/OssInterface.Host.Building" -> "Services.Statistics/Services.Statistics"
"OssInterface.Host/OssInterface.Host" -> "Services.Statistics/Services.Statistics"
"OssInterface.Host/OssInterface.Host" -> "OssInterface/OssInterface"
"OssInterface.Host/OssInterface.Host" -> "OssInterface/OssInterface.Traps"
"OssInterface.Host/OssInterface.Host.Statistics" -> "OssInterface/OssInterface.Agent"
"OssInterface.Host/OssInterface.Host.Statistics" -> "Services.Statistics/Services.Statistics"
"OssInterface.Host/OssInterface.Host.Statistics" -> "Services.Utilities/Services.Utilities"
"OssInterface/OssInterface.Agent" -> "OssInterface/OssInterface"
"OssInterface/OssInterface.Agent" -> "Services.Utilities/Services.Utilities"
"OssInterface/OssInterface.Agent" -> "Services.Logging/Services.Logging"
"OssInterface/OssInterface.Agent" -> "OssInterface/OssInterface.Traps"
"OssInterface/OssInterface.DataSources.GrpcStorages" -> "OssInterface/OssInterface.DataSources"
"OssInterface/OssInterface.DataSources.GrpcStorages" -> "OssInterface/DataService.Proto.OssData"
"OssInterface/OssInterface.DataSources.GrpcStorages" -> "OssInterface/OssInterface.Records"
"OssInterface/OssInterface.DataSources.GrpcStorages" -> "OssInterface/OssInterface"
"OssInterface/OssInterface.DataSources.GrpcStorages" -> "Services.Utilities/Services.Utilities"
"OssInterface/OssInterface.DataSources.HttpStorages" -> "OssInterface/OssInterface.DataSources"
"OssInterface/OssInterface.DataSources" -> "Services.Utilities/Services.Utilities"
"OssInterface/OssInterface.DataSources" -> "Services.Logging/Services.Logging"
"OssInterface/OssInterface.DataSources" -> "OssInterface/OssInterface"
"OssInterface/OssInterface" -> "Services.Logging/Services.Logging"
"OssInterface/OssInterface.Records" -> "OssInterface/OssInterface"
"OssInterface/OssInterface.Storage" -> "OssInterface/OssInterface"
"OssInterface/OssInterface.Storage" -> "Services.Logging/Services.Logging"
"OssInterface/OssInterface.Storage.Cache" -> "OssInterface/OssInterface.DataSources"
"OssInterface/OssInterface.Storage.Cache" -> "OssInterface/Common.Trees"
"OssInterface/OssInterface.Storage.Cache" -> "OssInterface/OssInterface.Storage"
"OssInterface/OssInterface.Storage.Cache" -> "OssInterface/OssInterface"
"OssInterface/OssInterface.Storage.Cache" -> "OssInterface/OssInterface.Records"
"OssInterface/OssInterface.Storage.Cache" -> "OssInterface/OssInterface.Traps"
"OssInterface/OssInterface.Storage" -> "Services.Utilities/Services.Utilities"
"OssInterface/OssInterface.Storage" -> "OssInterface/OssInterface.Agent"
"OssInterface/OssInterface.Traps" -> "OssInterface/OssInterface"
"OssInterface/OssInterface.Traps" -> "OssInterface/OssInterface.DataSources"
"OssInterface/OssInterface.Traps" -> "OssInterface/OssInterface.Records"
"OssInterface/OssInterface.Traps" -> "Services.Utilities/Services.Utilities"
"OssInterface/OssInterface.Traps" -> "Services.Logging/Services.Logging"
"OssInterface/OssInterface" -> "Services.Utilities/Services.Utilities"
"OssInterface/Common.Trees" -> "OssInterface/Common.Trees.Utils"
"OssInterface.CliApp/OssInterface.CliApp" -> "Services.Logging/Services.Logging"
"OssInterface.CliApp/OssInterface.CliApp" -> "OssInterface.Host/OssInterface.Host"
"OssInterface.CliApp/OssInterface.CliApp" -> "Services.Utilities/Services.Utilities"
"OssInterface.CliApp/OssInterface.CliApp" -> "OssInterface/OssInterface"
"OssInterface.CliApp/OssInterface.CliApp" -> "OssInterface.Host/OssInterface.Host.Building"
"OssInterface.UnitTests/OssInterface.UnitTests" -> "OssInterface/OssInterface.DataSources"
"OssInterface.UnitTests/OssInterface.UnitTests.Fakes" -> "OssInterface/OssInterface.Storage"
"OssInterface.UnitTests/OssInterface.UnitTests.Fakes" -> "OssInterface/OssInterface"
"OssInterface.UnitTests/OssInterface.UnitTests.Fakes" -> "Services.Logging/Services.Logging"
"OssInterface.UnitTests/OssInterface.UnitTests.Fakes" -> "OssInterface/OssInterface.Traps"
"OssInterface.UnitTests/OssInterface.UnitTests.Fakes" -> "OssInterface/OssInterface.Agent"
"OssInterface.UnitTests/OssInterface.UnitTests.Storage.Cache" -> "OssInterface/OssInterface.Storage.Cache"
"OssInterface.UnitTests/OssInterface.UnitTests.Storage.Cache" -> "OssInterface/OssInterface.Storage"
"OssInterface.UnitTests/OssInterface.UnitTests.Storage.Cache" -> "OssInterface/OssInterface"
"OssInterface.UnitTests/OssInterface.UnitTests.Storage" -> "OssInterface/OssInterface.Storage"
"OssInterface.UnitTests/OssInterface.UnitTests.Storage" -> "OssInterface.UnitTests/OssInterface.UnitTests.Fakes"
"OssInterface.UnitTests/OssInterface.UnitTests.Storage" -> "OssInterface.UnitTests/OssInterface.UnitTests"
"OssInterface.UnitTests/OssInterface.UnitTests.Storage" -> "OssInterface/OssInterface.Storage.Cache"
"OssInterface.UnitTests/OssInterface.UnitTests.Traps" -> "OssInterface/OssInterface.Traps"
"OssInterface.UnitTests/OssInterface.UnitTests.Traps" -> "OssInterface/OssInterface.DataSources"
"OssInterface.UnitTests/OssInterface.UnitTests.Traps" -> "OssInterface.UnitTests/OssInterface.UnitTests"
"OssInterface.UnitTests/OssInterface.UnitTests.Traps" -> "OssInterface/OssInterface.Records"
"OssInterface.UnitTests/OssInterface.UnitTests.Traps" -> "OssInterface/OssInterface"
"OssInterface.UnitTests/OssInterface.UnitTests" -> "OssInterface/OssInterface.Traps"
"OssInterface.UnitTests/OssInterface.UnitTests" -> "OssInterface/OssInterface"
"OssInterface.UnitTests/OssInterface.UnitTests" -> "OssInterface.UnitTests/OssInterface.UnitTests.Fakes"
"Services.Localization/Services.Localization" -> "Services.Logging/Services.Logging"
"Services.Statistics/Services.Statistics" -> "Services.Statistics.Dto/Services.Statistics.Dto"
"Services.Statistics/Services.Statistics" -> "Services.Logging/Services.Logging"
"Services.Statistics.DataServiceRepo/Services.Statistics.DataServiceRepo" -> "Services.Statistics/Services.Statistics"
"Services.Statistics.DataServiceRepo/Services.Statistics.DataServiceRepo" -> "Services.Statistics.Dto/Services.Statistics.Dto"
"Services.Utilities/Services.Utilities" -> "Services.Logging/Services.Logging"
}
With visualization:
And same graph visualization with msagl

In the first case, graphviz visualizes a good graph. In the second case, the graph begins to grow in width. It seems that the graphviz in the second case ignores implicit connections between clusters and creates markup based on child nodes. Msagl takes into account cluster nodes and creates a graph that is very similar in visualization to the first graph.
Is it possible to achieve the same results in graphviz as in msagl? It may not be the same in msagl, but I would like to receive an image that is more compressed horizontally.

Here is a solution:
Giving:
