Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
33 views

Hi,

How to disable zooming?

Regards,

Omar

Vasko
Telerik team
 answered on 06 Nov 2023
0 answers
31 views

Hello,

 I'm a beginner when it comes to working with diagrams.

 I'm wondering if there's a method to automatically rearrange the shapes in the diagram using server-side code. For instance, in the image I've shared, I used x and y coordinates to position the shapes on the diagram. Is there a way to have the shapes auto-arrange themselves as soon as I establish connections between them?

 Best regards,

Omar

Omar
Top achievements
Rank 2
Iron
Iron
Iron
 asked on 03 Nov 2023
1 answer
41 views

Hi,

I am trying to run the example https://docs.telerik.com/devtools/aspnet-ajax/controls/diagram/server-side-programming

But the output is as shown in the attached picture.

Can anyone inform me what I am missing?

 


 protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            //RadDiagram2.Visible = true;
            //RadDiagram2.DataSource = GetShapes();
            //RadDiagram2.ConnectionDataSource = GetConnections();
            //RadDiagram2.DataBind();
        }

        RadDiagram RadDiagram1 = new RadDiagram();

        // General diagram settings
        RadDiagram1.Width = 800;
        RadDiagram1.Height = 600;
        RadDiagram1.ShapeDefaultsSettings.Width = 140;
        RadDiagram1.ShapeDefaultsSettings.Height = 30;
        RadDiagram1.ShapeDefaultsSettings.StrokeSettings.Color = "#fff";
        Form.Controls.Add(RadDiagram1);

        // Layout settings
        RadDiagram1.LayoutSettings.Enabled = true;
        RadDiagram1.LayoutSettings.Type = Telerik.Web.UI.Diagram.LayoutType.Layered;
        RadDiagram1.LayoutSettings.Subtype = Telerik.Web.UI.Diagram.LayoutSubtype.Right;
        RadDiagram1.LayoutSettings.VerticalSeparation = 20;
        RadDiagram1.LayoutSettings.HorizontalSeparation = 30;

        // Programmatic creation of shapes and connections
        AddDiagramShape("Shape1", "#8CB20F", "Shape 1", "#fff", RadDiagram1);
        AddDiagramShape("Shape2", "#F8C43A", "Shape 2", "#fff", RadDiagram1);
        AddDiagramShape("Shape3", "#F18100", "Shape 3", "#fff", RadDiagram1);
        ConnectDiagramShapes("Shape1", "Shape3", RadDiagram1);
        ConnectDiagramShapes("Shape2", "Shape3", RadDiagram1);


    }

    protected void AddDiagramShape(string shapeID, string backgroundColor, string contentText, string contentColor, RadDiagram diagram)
    {
        var shape = new DiagramShape()
        {
            Id = shapeID,
        };
        shape.ContentSettings.Text = contentText;
        shape.ContentSettings.Color = contentColor;
        shape.FillSettings.Color = backgroundColor;
        diagram.ShapesCollection.Add(shape);
    }

    protected void ConnectDiagramShapes(string startShapeID, string endShapeID, RadDiagram diagram)
    {
        var connection = new DiagramConnection();
        connection.FromSettings.ShapeId = startShapeID;
        connection.ToSettings.ShapeId = endShapeID;
        diagram.ConnectionsCollection.Add(connection);
    }


 

 

Regards,

Omar

 

Vessy
Telerik team
 answered on 31 Oct 2023
4 answers
178 views

Can anyone help with a database structure to create RadDiagram Shapes and Connectors in the database using co-ordinates to automatically load the diagram.

I couldn't find anything in the demos or docs. For example on the link beloq the sql connections are shown but not what structure is need to create this?

http://demos.telerik.com/aspnet-ajax/diagram/examples/databind/defaultcs.aspx  

Thank you.

 

Omar
Top achievements
Rank 3
Iron
Iron
Iron
 answered on 30 Oct 2023
1 answer
50 views
Is it possible to add a hyperlink to a diagram shape?
Rumen
Telerik team
 answered on 19 Jul 2023
0 answers
49 views

I have a diagram with fixed width and height, and on this diagram I have tons of generated shapes in a tree layout.

The shapes cannot be fully displayed in the diagram, only a part of them can be seen. I need to zoom out to shrink all the shapes in order to see the complete picture. However, because there are a lot of shapes, after zooming out, each shape becomes very small and cannot be seen clearly. I hope the diagram can have a horizontal and vertical scrolling feature, so that I can scroll to view the entire picture. I did not find the scrolling feature for the diagram in the documentation.  (Pan and drag are not what I'm looking for.)

How can I implement this?

Thanks.

yuki
Top achievements
Rank 2
Iron
Iron
Iron
 asked on 13 Apr 2023
1 answer
43 views

Hi. New here, still getting my hands on Telerik.

I want to draw a diagram in tree layout, and I followed the documentation, added LayoutSettings.

The shapes and connections for the diagram are generated in C# code.

But what I got was nothing near what is shown in the documentation and demo. The shapes are overlapping each other. The connections between shapes look weird. You can see that in file problem_diagram.png. In fact, I have 8 shapes in this diagram, but the shapes are overlapping at the top left corner, so you can only see 5 shapes. I dragged the shapes so that all shapes can be seen in file dragged_diagram.png.

update: I solved the problem.


yuki
Top achievements
Rank 2
Iron
Iron
Iron
 answered on 12 Apr 2023
1 answer
94 views
I'm pretty sure that this functionality hasn't been implemented by Telerik with the Kendo UI Diagram control.
Anybody out there got any ideas how to implement this - I've experimented with Select and had a look at the Range methods but nothing seems to cater for selecting any number of shapes and then arranging them equidistant apart.
Any pointers appreciated.
Vessy
Telerik team
 answered on 18 Aug 2021
1 answer
68 views
How do I zoom by percentages with the Diagram control so that I could have a dropdown with a list of percentages e.g 25%,50%,75%,100%
Vessy
Telerik team
 answered on 15 Jun 2021
5 answers
119 views

Hi,

i would like to know if it is possible to include in the individual 'cells' of a diagram any HTML content or better still other UI controls, such as Cards, even better at runtime.

Thank you

Vessy
Telerik team
 answered on 04 Dec 2020
Narrow your results
Selected tags
Tags
+? more
Top users last month
Dominik
Top achievements
Rank 1
Giuliano
Top achievements
Rank 1
Dominic
Top achievements
Rank 1
Glendys
Top achievements
Rank 1
NoobMaster
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Dominik
Top achievements
Rank 1
Giuliano
Top achievements
Rank 1
Dominic
Top achievements
Rank 1
Glendys
Top achievements
Rank 1
NoobMaster
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?