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

Issue With connectionDefaults.content.visual in kendo UI diagram.

1 Answer 47 Views
Diagram
This is a migrated thread and some comments may be shown as answers.
Manoj
Top achievements
Rank 1
Manoj asked on 10 Nov 2016, 10:26 AM
I want the content to be divide into two lines. But as per [this][1] thread the template function does not allow a line break. So I tried setting `connectionDefaults.content.visual` with the below function:


            var getConnection = function (data) {
            var g = new kendo.dataviz.diagram.Group({
                autoSize: true
            });
            var text1 = new kendo.dataviz.diagram.TextBlock({
                text: data.label.name,
                fontSize: 16
            });


            g.append(text1);

            var text2 = new kendo.dataviz.diagram.TextBlock({
                text: data.label.value,
                fontSize: 16
            });


            g.append(text2);
            return g;
        }
But the problem here is that the `data` field does not populate the connection data due to which assigning values is not possible.


A solution for this is much appreciated.


  [1]: http://www.telerik.com/forums/split-labels-over-multiple-lines

1 Answer, 1 is accepted

Sort by
0
Vessy
Telerik team
answered on 14 Nov 2016, 10:24 AM
Hi Manoj,

I am afraid that currently the dataItem is indeed not accessible through the Visual function of the connections. If you will need this feature, the best option I can suggest you is to submit a feature request into our UserVoice portal and we will consider its implementation depending on the items popularity.

Regards,
Vessy
Telerik by Progress
 
Build rich, delightful, *native* Angular 2 apps with Kendo UI for Angular 2. Try it out today! Kendo UI for Angular 2 (currently in beta) is a jQuery-free toolset, written in TypeScript, designed from the ground up to offer true, native Angular 2 components.
 
Tags
Diagram
Asked by
Manoj
Top achievements
Rank 1
Answers by
Vessy
Telerik team
Share this question
or