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

2 posts, 0 answers
  1. Manoj
    Manoj avatar
    1 posts
    Member since:
    Apr 2013

    Posted 10 Nov 2016 Link to this post

    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
  2. Vessy
    Admin
    Vessy avatar
    1513 posts

    Posted 14 Nov 2016 Link to this post

    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.
     
Back to Top