Diagram Create Shape not working in Editing controller

3 posts, 1 answers
  1. Ron
    Ron avatar
    2 posts
    Member since:
    Dec 2010

    Posted 30 Jun 2015 Link to this post

    Hello All,

             I am just trying to see the code in the Kendo examples for diagram implementation that I have downloaded recently (Latest release telerik.ui.for.aspnetmvc.2015.2.624.commercial), But when I run the solution locally and browse the 'Editing' section of the diagram I do get the shapes and connections as in demo site but I am not able to add a new shape (or new rectangle) to the diagram. When I press the rectangle icon in tool bar I get a error in browser console as follows.

    Chrome: kendo.all.min.js:68 Uncaught TypeError: Cannot read property 'gradient' of undefined)

    FireFox: kendo.all.min.js:68:8298 TypeError: t is undefined

     Also other options in the tool bar are also not working.


  2. Answer
    Daniel avatar
    2231 posts

    Posted 02 Jul 2015 Link to this post

    Hello Ron,

    This is a known issue when setting null or undefined for the elements fill(fill: dataItem.Color, for new items) option. The problem is already fixed and the fix will be included in the next internal build. A workaround for now is to set a default value for the color when creating the visual:
    g.append(new dataviz.diagram.Rectangle({
        width: 8,
        height: 67,
        fill: dataItem.Color || "#586477",
        stroke: {
            width: 0
    or for the Color field in the model:
    m.Field(s => s.Color).DefaultValue("#586477");

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. Ron
    Ron avatar
    2 posts
    Member since:
    Dec 2010

    Posted 03 Jul 2015 in reply to Daniel Link to this post

    Thanks Daniel, That did resolve the issue.
Back to Top