Telerik Forums
Kendo UI for jQuery Forum
0 answers
10 views
We need to display different properties per node in an orgchart or diagram. How can we accomplish this with different datasource schema's and templates?
Brad
Top achievements
Rank 1
 asked on 19 Apr 2024
0 answers
37 views
I've been searching through the forum for an example of a many-to-many example in dojo and thus far I've been unsuccessful.  I've seen a couple of questions from 6-8 years ago, but nothing recent to tell me that it is possible.  My desire is that given a proper datasource representing objects that have multiple parents and/or children that a relationship diagram can be created.  I have a single parent orgchart working just fine and it works great because I don't have to set positions for the elements or set connectors.  From my limited searching and reading on Diagrams I'm pretty sure I can eventually figure out how to get one working, but I believe it would require me to explicitly position each element as well as create and position connectors.  If I'm wrong, a working example would work wonders for my understanding.
Martin
Top achievements
Rank 1
 asked on 24 Jan 2024
0 answers
87 views
Hello,

I'm creating a diagram using the Diagram component. I'm adding my nodes using the addShape and connect methods.

The problem is that my nodes aren't positioned correctly in the window, they're one on top of the other.

I've set the layout-type and layout-subtype properties, but they don't seem to work in my case. But, by using Hierarchicaldatasource with Diagram, these properties are taken into account and the diagram is displayed correctly.

Unfortunately, this doesn't suit me because I need to customize the connections between nodes (add labels), which is not possible using hierarchical data source.



So my question is whether it's possible to take advantage of the layout-type and layout-subtype properties when adding nodes manually?


Thanks in advance
VB
Top achievements
Rank 1
Veteran
Iron
 asked on 02 Aug 2023
0 answers
66 views

Hello, 

I'm trying to combine custom positions of shape connectors with the save and load functionality.  I've combined the following two examples in the dojo:

https://docs.telerik.com/kendo-ui/api/javascript/dataviz/ui/diagram/configuration/shapes.connectors.position 

https://docs.telerik.com/kendo-ui/api/javascript/dataviz/ui/diagram/methods/load

Dojo example: https://dojo.telerik.com/oqAloqOY/2 

As you can see after loading the saved model the custom connectors are gone. Is there any way to persist them or at least re-apply them after load?

Thanks

The Cowboy
Top achievements
Rank 1
 asked on 17 Jan 2023
0 answers
75 views

 

Hi, I'm trying to insert a grid in the background of a diagram and have found some suggestions on how to do it, but the problem with these solutions is that when I try to remove a specific element, the other element disappears.

 

Suggested solution: image in Kendo UI for jQuery | Telerik Forums or Untitled | Kendo UI Dojo (telerik.com)

The problem is this insert 

diagram.mainLayer.drawingElement.insertAt(grid, 0)

 As far as I understand, this breaks the sequence and removes the previous element.

 

Does anyone know how to avoid this behavior or another solution to insert grid?

PS: The grid is only needed for positioning.

 

Siarhei
Top achievements
Rank 1
 updated question on 21 Oct 2022
0 answers
85 views

I have a diagram configured that reads data from an MVC Controller.  It displays and works fine.  I need to do a long poll and refresh the diagram from the database.  I have tried all kinds of things.

Called refresh on the diagram object,  called read on the datasource. 

What is the proper way to get a Diagram to read the data again and redraw itself.  

Ed
Top achievements
Rank 1
 asked on 07 Sep 2022
0 answers
58 views

I am trying to figure out how to format some nodes in my diagram.  See attached dojo.  https://dojo.telerik.com/ASinArEh

 

I would like:

  1. The Circles to be centered under the titles.
  2. The Node Name to be centered in the circle, not the group.
  3. The Connections to hook to the Circle connectors, not the group connectors.

 

It seems like my visual template needs to create the circles, then possibly go back and add groups to the diagram then include the existing circles in the new groups, but I haven't figured out a way to do that yet

 

 

 

 

Jeffrey
Top achievements
Rank 1
 asked on 02 Aug 2021
0 answers
42 views
.Model(m =>
{
    m.Id(c => c.WorkflowTypeEventID);
    m.Field(c => c.WorkflowTypeEventID).Editable(false);
 
    m.Field(c => c.Name).Editable(true);
    m.Field(c => c.Description).Editable(true);
    m.Field(c => c.SortOrder).Editable(false);
    m.Field(c => c.EventType).Editable(false);
 
    //m.Field(c => c.WorkflowTypeStateID).Editable(false);
    //m.Field(c => c.NextWorkflowTypeStateID).Editable(false);
 
    m.From(c => c.WorkflowTypeStateID);
    m.To(c => c.NextWorkflowTypeStateID);
 
})

 

When I uncomment out the two lines both items are hidden when editing the connection but they do not pass the values to the Create method. If I comment them both out and create a connection it will pass both values to the models Create method.

 I am looking to hide both on edit but still send the values to the controller.

Thanks

Michelle
Top achievements
Rank 1
 asked on 25 Sep 2015
0 answers
87 views

Hi,

I am adding a Shape via a drag and drop function. I am looking to also add a default dataItem to the options of this Shape.

 

$("#diagram").kendoDropTarget({
    drop: function (e) {
        var item, pos, transformed;
        if (e.draggable.hint) {
            item = e.draggable.hint.data("shape");
            pos = e.draggable.hintOffset;
            pos = new Point(pos.left, pos.top);
            transformed = diagram.documentToModel(pos);
            item.x = transformed.x;
            item.y = transformed.y;
 
            //Want to add default dataItem or find a better place to add.
            diagram.addShape(item);
        }
    }
});

 

Here is what my current dataItem look like from other shapes added by Read method. Attached Item.

I want to be able to add this data item like the diagram would normally do but through a drag and drop action. So it can be saved back to the database.

 

Thanks

 

 

 

Michelle
Top achievements
Rank 1
 asked on 25 Sep 2015
0 answers
99 views

Hi,

Just wondering if there is a way to specify the sequence of the shapes in the diagram when I add shapes to the diagram via datasource and connectionSource.

the example 1 is

http://dojo.telerik.com/aQUPE

I am trying to get the s1 above the s2 and s2 above s3, but the result is s3 above s2 and s2 above s1.

 

the example 2 is 

http://dojo.telerik.com/EfUPu

I am still trying to add s1 above s2 and s2 above s3. In the next level , I am trying to have s4 above s5

Please could  you let me how specify the order of the space in the diagram if it can be done? I am using layout - layered and right.

If not, could you let me know the logic of setting up the shapes' positions behide the diagram

 

 

 

Coal8Support
Top achievements
Rank 1
 asked on 29 Jun 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Mark
Top achievements
Rank 1
Yurii
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Hon
Top achievements
Rank 1
Iron
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Mark
Top achievements
Rank 1
Yurii
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Hon
Top achievements
Rank 1
Iron
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?