Split Labels over multiple Lines

2 posts, 0 answers
  1. Jonathan
    Jonathan avatar
    1 posts
    Member since:
    Apr 2015

    Posted 09 Feb Link to this post

    We had some support from the Telerik team about a year ago when we wanted to split a connecting label over multiple lines. At the time, they advised us of a bug and gave us a workaround.

    We've just had to update to the latest version of the Kendo UI js file to fix another bug related to a JQuery update, and it has broken our workaround. The original fix was to replace the standard text in the box, and add it into a tspan. Following the update, this now renders the tspan on the diagram following the new update. I've attached a screen of how it showed before, with the workaround, and how it shows now following the update.

    The current value in the DescriptionForKendo field:

    <tspan x="0" dy="0em">Class A, 50 Shares</tspan><tspan x="0" dy="1em">Class B, 100 Shares</tspan>

    The binding of the field to the view:

    .ConnectionDefaults(cd => cd.Editable(false).Content(o => o.Template("#= dataItem.DescriptionForKendo #"))

    Any ideas if this was specifically catered for in the latest version, or how we can add a line break into a connecting label now?


  2. T. Tsonev
    T. Tsonev avatar
    2760 posts

    Posted 12 Feb Link to this post


    This is a result of some substantial changes on how the Diagram is being rendered. We now support multiple rendering targets - SVG, Canvas and PDF to name a few.
    This requires that we encode any HTML entities as they're SVG specific and will result in incorrect output in other rendering modes.

    Our recommendation is to set up a visual template with absolutely positioned TextBlocks as illustrated in the API reference.

    Apologies for the caused inconvenience.

    T. Tsonev
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top