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

kendo.diagram.Path might be missing in kendo.all.d.ts

4 Answers 105 Views
Diagram
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 29 Dec 2014, 11:47 PM
I have a test index.html file that uses the following successfully:

var path = "M10 0 L90 0 L100 25 L90 50 L10 50 L0 25 Z";
var block = new kendo.dataviz.diagram.Path({ width: dataItem.width, height: dataItem.height, fill: { color: 'green' }, data: path });

When I try to recode this in Typescript, kendo.dataviz.diagram.Path is undefined/undeclared.  I see no evidence of it in kendo.all.d.ts.

This code is trying to build a group by assembling a rectangle, or a shape like the above, and some text, rather than adding shapes directly to the diagram.

Using 2014.2.1008.commercial.  I'll look at 2014.3.1119 but I see no reference to this in the release notes.

4 Answers, 1 is accepted

Sort by
0
Alex Gyoshev
Telerik team
answered on 30 Dec 2014, 09:47 AM
Hello David,

The reason for it not showing in any release is that this class is not documented. Are you passing this path on an official API method/configuration?

Regards,
Alex Gyoshev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
David
Top achievements
Rank 1
answered on 30 Dec 2014, 12:40 PM
Hi Alex,

I probably discovered it in the code rather than the documentation.  I guess we can go two ways with this.  1)Is this going to be documented and therefore become official soon?, or 2)Is there another way to accomplish what I'm trying to do?

All I want to do is create other shapes than the default rectangle and circle by supplying SVG path data as shown.  They need to be vector graphic in nature, not image or raster in nature.

I'd prefer not to switch to the Drawing API since Diagram provides so many additional features.

0
David
Top achievements
Rank 1
answered on 30 Dec 2014, 12:49 PM
I should have also added:

I'm aware of the html5-diagram-sample-code app which shows how to do custom shapes.  A key difference is that I want to make mine part of a Group while the sample app handles this by adding the shape directly to the diagram.  If I use dataviz.diagram.Shape I get an error when I try to append it to the Group.  The error complains about not having a method called drawingContainer().
0
Alex Gyoshev
Telerik team
answered on 30 Dec 2014, 03:26 PM
Hello David,

The said functionality is not supported at this time. It appears that you have found a way to workaround it, so you can add the missing TypeScript definitions via your own file at the time being. You can suggest the path grouping functionality on UserVoice so that it is considered for implementation in future releases.

Regards,
Alex Gyoshev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Diagram
Asked by
David
Top achievements
Rank 1
Answers by
Alex Gyoshev
Telerik team
David
Top achievements
Rank 1
Share this question
or