This is a migrated thread and some comments may be shown as answers.

RadDiagram Round Container & Overlap

4 Answers 82 Views
Diagram
This is a migrated thread and some comments may be shown as answers.
Joel Palmer
Top achievements
Rank 2
Joel Palmer asked on 20 May 2014, 09:51 PM
I want to start from your example labeled "Diagram Toolbox".  This examples has a lot of circles.  However, your containers are square.  Can you give me an example of a container that is styled as round?

Also, I need to model circles that over-lap.  Do you have a way to show the part that is overlapping as a different color and I could put some text explaining the over-lap?  For example, if I have Family1 and Family2 and I need to model how Family3 has people from both groups because of a marriage between F1 and F2, I would have 3 circles that have overlap.

4 Answers, 1 is accepted

Sort by
0
Joel Palmer
Top achievements
Rank 2
answered on 21 May 2014, 05:57 PM
Ignore the 2nd paragraph.  From my learning, it seems that request is out of bounds. 

However, I would still like to have an example on how to make a container a circle instead of its default square.
0
Joel Palmer
Top achievements
Rank 2
answered on 21 May 2014, 11:45 PM
Also, is there a way I can perform a Layout command against a Container?  There are a lot of examples on how to do this against a RadDiagram, but what if I have a list of items in a Container that needs to be formatted?
TreeLayoutSettings settings = new TreeLayoutSettings()
{
    TreeLayoutType = TreeLayoutType.RadialTree,
    VerticalDistance = 20,
};
var layout = new TreeLayout();
 
foreach (var item in this.diagram.Items)
{
    if (item is IContainerShape)
    {
        settings.Roots.Add(item as IContainerShape);
    }
}
 
layout.Layout(this.diagram, settings);
this.diagram.AutoFit();
var main = diagram.CreateContainerShape("Main");
var group1 = diagram.CreateContainerShape("Group1");
var group2 = diagram.CreateContainerShape("Group 2");
group2.AddItems(lst.ToArray());
main.AddItems(new[] { group1, group2 });
ontrol? 
0
Accepted
Pavel R. Pavlov
Telerik team
answered on 23 May 2014, 07:50 AM
Hi,

Unfortunately, there is not an easy way to change the shape of the RadDiagramContainerShape objects. They are designed to be rectangular and we do not suggest changing such core functionality.

Furthermore, the RadDiagram framework exposes the Layout feature. This means that the RadDiagram is capable of arranging its items. The RadDiagramContainerShapes are actually shapes which can also be arranged by the diagramming framework. Unfortunately, they do not expose the same Layout functionality. This is why there is no way to trigger that feature in the context of the RadDiagramContainerShape.

Regards,
Pavel R. Pavlov
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
 
0
Joel Palmer
Top achievements
Rank 2
answered on 27 May 2014, 06:17 PM
I found that performing a layout first then adding the shapes to the container subsequently allows me to show them in a layout fashion.  Thanks for your help.
Tags
Diagram
Asked by
Joel Palmer
Top achievements
Rank 2
Answers by
Joel Palmer
Top achievements
Rank 2
Pavel R. Pavlov
Telerik team
Share this question
or