Diagram shapes get converted into SVG elements such as Path, Text, Image, or group (g) tags. These tags support the primary HTML event handlers (such as on click) and other attributes. It becomes essential to add a hiddle sibling with identification to work around this limitation.
var fooText = new KD.TextBlock({
x: fooX,
y: fooY,
text: textFromDb,
id: uniqueIdBasedOnDataFromDb, // This ID (or another property "domId") should become the Id in the HTML
onclick: someMethod,
customAttributeA: valueAFromDb,
customAttributeB: valueBFromDb});
barGroup.append(fooText);
Hello, Sudip,
Could you please provide me with a bit more information about the request?
The Diagram already supports the "click" event on shapes:
https://docs.telerik.com/kendo-ui/api/javascript/dataviz/ui/diagram/events/click
The event works for both shapes and connections. The type of the shape(Path, Text, Image) is of no concern.
Best Regards,
Georgi Denchev
Progress Telerik
Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.