function drawPolygon() {
var diagram = $("#diagram").ejDiagram("instance");
//JSON to create a polygon
diagram.model.drawType = { type: "basic", shape: "polygon", points: [{ x: 13.560, y: 67.524 }, { x: 21.941, y: 41.731 }, { x: 0.000, y: 25.790 }, { x: 27.120, y: 25.790 }, { x: 35.501, y: 0.000 }, { x: 43.882, y: 25.790 }, { x: 71.000, y: 25.790 }, { x: 49.061, y: 41.731 }, { x: 57.441, y: 67.524 }, { x: 35.501, y: 51.583 }, { x: 13.560, y: 67.524 }] };
//To draw an object once, activate draw once
diagram.update({
tool: ej.datavisualization.Diagram.Tool.DrawOnce,
});
}
JSPlayground link:http://jsplayground.syncfusion.com/qxbh0rdf
Please refer to the below online sample link and UG documentation link for more details.
Online sample link:http://js.syncfusion.com/demos/web/#!/azure/diagram/drawingtools
UG documentation link:http://help.syncfusion.com/js/diagram/tools
Regards,
Shyam G
Hi Tezcan,
Please ignore our previous update.
We considered this “Need to provide support to draw polygon points dynamically using polygon tool” as an feature request and a support incident has been created under your account to track the status of this requirement. Please log on to our support website to check for further updates.
https://www.syncfusion.com/account/login?ReturnUrl=/support/directtrac/incidents
Regards,
Shyam G
Hi Tezcan,
Please ignore our previous update.
We considered this “Need to provide support to draw polygon points dynamically using polygon tool” as an feature request and a support incident has been created under your account to track the status of this requirement. Please log on to our support website to check for further updates.
https://www.syncfusion.com/account/login?ReturnUrl=/support/directtrac/incidents
Regards,
Shyam G
You have confirmed that you have got the samples through direct - trac support in forum 122127. Please let us know if you need any other assistance
Regards,
Shyam G