Issue with flow chart auto layout

Hi, I am evaluating Aspose.Diagram component to create organization chart. I am following the example given on Create or Make Organizational Chart Programmatically in C# .NET with exception of using flow chart layout.

But auto layout generated by Aspose.Diagrams is not as clean as auto layout generated by Visio. How can I get clean Visio like layout generated?

Thank you for considering my support request.

image.png (21.0 KB)

image.png (11.8 KB)

@amit.vaishnav-1
Please provide code for generating this flowchart, because the file we generated following the code in the blog is normal, and the screenshot is as follows. flowchart.PNG (5.1 KB)

Thanks.

There is the code:

public class TestLargeScenario2
{
    static string dataDir = RunExamples.GetDataDir_LoadSaveConvert();

    public static void Run()
    {
        string visioStencil = dataDir + "Basic Shapes.vss";
        const string rectangleMaster = "Rectangle";
        const string connectorMaster = "Dynamic connector";
        const int pageNumber = 0;
        const double width = 1;
        const double height = 1;
        double pinX = 4.25;
        double pinY = 9.5;
        // Define values to construct the hierarchy
        List<string> listPos = new List<string>(new string[] { "0", "0:0", "0:1", "0:2", "0:3", "0:4", "0:5", "0:6", "0:0:0", "0:0:1", "0:3:0", "0:3:1", "0:3:2", "0:6:0", "0:6:1" });
        // Define a Hashtable to map the string name to long shape id
        Hashtable shapeIdMap = new Hashtable();
        // Create a new diagram
        Diagram diagram = new Diagram(visioStencil);
        diagram.Pages[pageNumber].PageSheet.PageProps.PageWidth.Value = 11;
        foreach (string orgnode in listPos)
        {
            // Add a new rectangle shape
            long rectangleId = diagram.AddShape(pinX++, pinY++, width, height, rectangleMaster, pageNumber);
            // Set the new shape's properties
            Shape shape = diagram.Pages[pageNumber].Shapes.GetShape(rectangleId);
            shape.Text.Value.Add(new Txt(orgnode));
            shape.Name = orgnode;
            shapeIdMap.Add(orgnode, rectangleId);
        }
        // Create connections between nodes
        foreach (string orgName in listPos)
        {
            int lastColon = orgName.LastIndexOf(':');
            if (lastColon > 0)
            {
                string parendName = orgName.Substring(0, lastColon);
                long shapeId = (long)shapeIdMap[orgName];
                long parentId = (long)shapeIdMap[parendName];
                Shape connector1 = new Shape();
                long connecter1Id = diagram.AddShape(connector1, connectorMaster, pageNumber);
                diagram.Pages[pageNumber].ConnectShapesViaConnector(parentId, ConnectionPointPlace.Right,
                    shapeId, ConnectionPointPlace.Left, connecter1Id);
            }
        }

        LayoutOptions compactTreeOptions = new LayoutOptions
        {
            LayoutStyle = LayoutStyle.FlowChart,
            Direction = LayoutDirection.TopToBottom,
            EnlargePage = false
        };
        diagram.Pages[pageNumber].Layout(compactTreeOptions);

        string outputFile = dataDir + "CompactTreeChart_out.vsdx";
        diagram.Save(outputFile, SaveFileFormat.Vsdx);

        Process.Start(outputFile);
    }
}

We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): DIAGRAMNET-53080

You can obtain Paid Support services if you need support on a priority basis, along with the direct access to our Paid Support management team.

Hi Asad,

Thanks for opening the support ticket! How do I know when it is fixed and how do I download component with the fix? I am evaluating Aspose.Diagrams preliminarily for generating organization diagram. My diagram is more complex than this example and I see similar issues in it. I am hoping that this fix will also address the issues in the complex diagram that I need to generate with Aspose.Diagram. I need to prove Aspose.Diagram fulfills our requirements before we can make the purchase decision.

Thank you!

@amit.vaishnav-1

The ticket has just been logged and we will investigate it on first come first serve basis. We will let you know via this forum thread and update you about the progress of ticket resolution. We will investigate how the main issue you are facing can be fixed. If we find a workaround or possible option to make things work, we will share it with you. In case of any fixes, we will deliver it in any of the upcoming monthly release(s) of the API. In case you have further concerns or requirements, please feel free to share with us.

Thank you! I will look forward for update.

Is it possible to give me some idea when issue will be fixed OR where this issue stand in the queue. We cannot make purchase decision if we cannot generate the diagram. If you can give me some idea, it will helm us to plan the project and purchase. Thank you!

@amit.vaishnav-1

We would like to share with you that the earlier logged ticket is resolved and its fix will be included in 23.2 version of the API which will be released in this month soon.

That’s quick! Thanks! Is there any way to get nightly/pre-release build so I can continue my evaluation and can report any additional issue that I may face. My diagram is complex and I fear I may hit additional bugs. Thanks for considering my request!

@amit.vaishnav-1

We are afraid that it would not be possible to share ore-release version. However, you can request an extension to your temporary license in our Purchase forum category in case it is expired before your evaluation is done.

The issues you have found earlier (filed as DIAGRAMNET-53080) have been fixed in this update. This message was posted using Bugs notification tool by philip.zhou

Issue with the simple diagram (code that I submitted) has been resolved with the new update. However, as I mentioned I do have more complex diagram. I see improvement in flow chart diagram after update. But it is not as clean as MS Visio creates it. I will try to submit that diagram code. Thnak you.

@amit.vaishnav-1

We request you please share the details of that complex diagram and complete code snippet that you have tried so far. Also, please share an expected outcome so that we can further investigate your requirements.

Thanks for reply. Is this public forum? Is there any way to share my code privately?

@amit.vaishnav-1

You can use the option shown in the screenshot to send the files privately: image.png (11.0 KB)

Thanks. I have sent you the message.

@amit.vaishnav-1

We have opened the following new ticket(s) in our internal issue tracking system in order to further investigate your requirements and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): DIAGRAMNET-53094

You can obtain Paid Support services if you need support on a priority basis, along with the direct access to our Paid Support management team.

Hi Asad,

Is there any update on this issue? Is it fixed yet? We would like to use Aspose.Diagrams if it works for us.

@amit.vaishnav-1

The ticket is currently under the phase of the investigation and we will surely deliver its fix on a first come first serve basis. As soon as it is resolved, we will update you via this forum thread. Please be patient and spare us some time.

We are sorry for the inconvenience.