We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Getting SVG from shape/connector model

Thread ID:

Created:

Updated:

Platform:

Replies:

127560 Nov 23,2016 09:39 AM UTC Nov 24,2016 12:49 PM UTC JavaScript 1
loading
Tags: ejDiagram
Gabriel Axel
Asked On November 23, 2016 09:39 AM UTC

Greetings,

I am trying to implement my own symbol palette component and trying to figure out how to map each shape and connector model to an SVG to render in the palette as the items preview. So far I found that calling ej.datavisualization.Diagram.FlowShape(options) and ej.datavisualization.Diagram.ArrowShape(options) adds pathData property which I can use in the SVG's path element's d property, and this works for some of the Flow and Arrow shapes, but not all, and it doesn't work for basic, swimlane and connectors. Is there a function or a set of functions that returns an SVG for a model that could work for all the shapes?

Thanks.

Shyam G [Syncfusion]
Replied On November 24, 2016 12:49 PM UTC

Hi Gabriel, 

The flowShapes is an built-in shapes. So you can get an path and append it in the SVG. For an other shape(basic shape), we need to define it in code behind and can access the SVG element in DOM. We suspect that you need to render the SVG element in the palette. if yes, you can use our native node to achieve your requirement. Please refer to the help documentation below in which we have shown to render the native node. 


Regards, 
Shyam G 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;