Telerik Forums
Kendo UI for jQuery Forum
0 answers
21 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
1 answer
19 views

Hello Telerik

First check this example : https://dojo.telerik.com/oraZInUQ

Q1. When constructing a diagram like this, if the length of the textblock text becomes larger than the length of the rectangle, is there a way to control this? I wish there was a line break.

Q2. The length of the text is longer, so the selection area for the shape has increased. I want the selection area to be based on the width and height of the rectangle. Is it possible to adjust the selection area of ​​shape?

Thank you for your reply.

Nikolay
Telerik team
 answered on 14 Dec 2023
1 answer
50 views

Hello,

 

I'm creating a diagram. I've done some research on how to create a custom shape, but I'm having a few problems on dynamically modifying the data of the various elements present in the shape.

1) Firstly, I've understood the code bellow that allows me to create a custom shape:

 

let newShape = function() {
            let dataviz = kendo.dataviz
            let g = new dataviz.diagram.Group()
            let dataItem = options.dataItem

            g.append(new dataviz.diagram.Rectangle({
                width: 210,
                height: 75,
                stroke: {
                    width: 0
                },
                fill: {
                    gradient: {
                        type: 'linear',
                        stops: [{
                            color: dataItem.colorScheme,
                            offset: 0,
                            opacity: 0.5
                        }, {
                            color: dataItem.colorScheme,
                            offset: 1,
                            opacity: 1
                        }]
                    }
                }
            }))
            
            g.append(new dataviz.diagram.TextBlock({
                text: dataItem.name,
                x: 20,
                y: 20,
                fill: '#fff'
            }))
            
            g.append(new dataviz.diagram.TextBlock({
                text: dataItem.props,
                x: 20,
                y: 40,
                fill: '#fff'
            }))
            return g
}

However,  I'm having trouble dynamically modifying the value of a TextBlock. 

 

Which field do I need to access, after retrieving the shape via diagram.shapes[i] , to be able to modify the "text" field of a TextBlock? Or, more generally, how can I easily retrieve an element (TextBlock, etc.) from a compound shape?

 

I've tried accessing various fields in the shape object referring to the TextBlock element and then calling shape[i].redraw( ) / .redrawVIsual( ), but no shape is updated.

 

2) Secondly, what kind of components can be added to the Group ? My goal is to add a progress bar into my shape, but I don't think that's possible. Is there a list of elements (TextBlocks, ...) that can be appended to Group ? Or any idea to have a progress bar in a shape ? Maybe using the progressbar component and attach a progress bar to each shape ? 

 

Thanks in advance, 

 

Best,

VB

Neli
Telerik team
 answered on 10 Aug 2023
0 answers
74 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
1 answer
59 views

I need to add a button inside a diagram element as example inside a shape or group elements, if it is not possible, add a pop up menu or something similar... 

Do you have any advice?

Nikolay
Telerik team
 answered on 17 Jul 2023
4 answers
281 views
We are trying to build organizational chart using Kendo UI for jQuery component DIAGRAM. Does this component provide Expand/Collapse functionality like your Telerik UI for ASP.NET AJAX component ORG CHART does?
If it doesn’t, what is the best way to implement expand/collapse functionality? May be there are some jQuery plugins built for this purpose or Kendo UI for jQuery has other component which fits better for building organizational chart. Any advice appreciated.
Sami
Top achievements
Rank 2
Iron
Iron
Iron
 answered on 08 Jul 2023
1 answer
113 views

My requirement is to create a diagram which is using different widgets to child and parent nodes. Is there a way to use two or more different custom templates for parent and its child nodes. Please see the image below that is something I want to create

 

 

 

Georgi Denchev
Telerik team
 answered on 28 Mar 2023
0 answers
58 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
1 answer
51 views

Hello,

We have a diagram with layered layout, aligned to right. The diagram can have one or more root nodes.

The problem is that when we have multiple roots, we want to align them one under another, instead, if they are not very long, they are aligned to the right of each other.

Is there a way to achieve this alignment? We searched documentation but didn't find any specific property.

I attach images of how the diagram looks now and how we need it to look.

 

Thanks,

Iuliana

Nikolay
Telerik team
 answered on 27 Oct 2022
0 answers
70 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
horváth
Top achievements
Rank 2
Iron
Iron
Steve
Top achievements
Rank 2
Iron
Erkki
Top achievements
Rank 1
Iron
Mark
Top achievements
Rank 2
Iron
Iron
Veteran
Jakub
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
horváth
Top achievements
Rank 2
Iron
Iron
Steve
Top achievements
Rank 2
Iron
Erkki
Top achievements
Rank 1
Iron
Mark
Top achievements
Rank 2
Iron
Iron
Veteran
Jakub
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?