RadDiagram with images programatically

2 posts, 0 answers
  1. Miguel Angel
    Miguel Angel avatar
    7 posts
    Member since:
    Apr 2013

    Posted 10 Jul Link to this post

    Hi,

    I'm trying to create a diagram with images programatically, I followed the demo  http://demos.telerik.com/aspnet-ajax/diagram/examples/serverside/defaultcs.aspx and its ok. The problem is that the image only shows in the first shape.

     

    The code is

     

    <telerik:RadDiagram  runat="server" ID="diagrama" >
       <LayoutSettings  Type="Tree" Subtype="Right"/>
       <ShapeDefaultsSettings Type="Circle"/>
     </telerik:RadDiagram>

     

    And .Net

    for (int i = 0; i < 4; i++)
    {
       DiagramShape nodo = new DiagramShape();
       nodo.Id = i.ToString();
       String contenido = "<label>" + i.ToString() + "</Label>";
       contenido += "<img src='FacturaPagada.png' />";
       nodo.ContentSettings.Html = contenido;
       diagrama.ShapesCollection.Add(nodo);
     }

     

     

     

     

     

  2. Vessy
    Admin
    Vessy avatar
    1678 posts

    Posted 17 Jul Link to this post

    Hi Miguel,

    Thank a lot for sharing reporting this issue with us. I managed to reproduce it and logged it into our back-log system for a further investigation. You can track its progress and vote in order to increase its priority in the following item:
    https://feedback.telerik.com/Project/108/Feedback/Details/222753

    Your Telerik points also have been updated accordingly.

    Meanwhile, you can workaround the problem either by using different images for each shape, or by adding the images client-side by implementing Visual template for the shapes:
    http://docs.telerik.com/devtools/aspnet-ajax/controls/diagram/functionality/shape-templates

    Regards,
    Vessy
    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top