Elements missing Id-Attribute

4 posts, 0 answers
  1. Markus
    Markus avatar
    14 posts
    Member since:
    Apr 2012

    Posted 07 Sep 2015 Link to this post

    Hello,

    we have a project in which have our own widget extending the ChartElement. Currently we have Kendo UI version v2014.1.624. 
    For now, we want to update to the latest Build of KendoUI(Kendo UI v2015.2.805) and figured out, that the ID-Attribute of Elements are missing in the Template of kendo.all.js. 

    For example: new ShapeElement({type: SQUARE, id: "foo", background: "bar", width: 100});

    We need the id-Attribute and it would be great if you can tell us, why this id-Attribute was deleted and how we can add this again.

    Best regards,

    Markus.
  2. Genady Sergeev
    Admin
    Genady Sergeev avatar
    1596 posts

    Posted 08 Sep 2015 Link to this post

    Hello Markus,

    Indeed there was a change in one of the recent releases and the rendering of the chart got detached from the chart itself. This was done for the sake of decoupling the dataviz widgets from the svg rendering, in order to enable for export to PDF or alternative renderers (for example).

    What do you need these IDs for? Can you please describe your use case?

    Regards,
    Genady Sergeev
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  3. Kendo UI is VS 2017 Ready
  4. Markus
    Markus avatar
    14 posts
    Member since:
    Apr 2012

    Posted 08 Sep 2015 Link to this post

    Hello Genady,

    thanks for your reply.

    We have many use cases for our project to use this IDs.

    One of the use case is, that we have a dragAndDrop-Handler for each element and we need to identification each element.

    Seeing forward for your answer,

     - Markus.

  5. T. Tsonev
    Admin
    T. Tsonev avatar
    2770 posts

    Posted 10 Sep 2015 Link to this post

    Hi,

    I'm afraid the changes to the Chart internal implementation are quite substantial. It now uses the Drawing API to render.
    This library was built specifically for the DataViz widgets in mind, but also aims to serve as a general-purpose cross-browser vector graphics solution.

    You can't assign IDs to shapes, but you can handle surface events. Those provide direct reference to the shapes such as the one referenced by ShapeElement.visual.
    The Surface instance used in the chart is accessible as chart.surface.

    Let me know of any issues you have if you decide to port your code to the Drawing API.

    Regards,
    T. Tsonev
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
Back to Top
Kendo UI is VS 2017 Ready