This is a migrated thread and some comments may be shown as answers.

Elements missing Id-Attribute

3 Answers 49 Views
Charts
This is a migrated thread and some comments may be shown as answers.
Markus
Top achievements
Rank 2
Markus asked on 07 Sep 2015, 09:03 AM
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.

3 Answers, 1 is accepted

Sort by
0
Genady Sergeev
Telerik team
answered on 08 Sep 2015, 02:27 PM
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!
 
0
Markus
Top achievements
Rank 2
answered on 08 Sep 2015, 03:38 PM

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.

0
T. Tsonev
Telerik team
answered on 10 Sep 2015, 01:25 PM
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!
 
Tags
Charts
Asked by
Markus
Top achievements
Rank 2
Answers by
Genady Sergeev
Telerik team
Markus
Top achievements
Rank 2
T. Tsonev
Telerik team
Share this question
or