Hi Dante,
We have an option to add a description/label for palette symbol item as shown in the below screenshot. We should use getSymbolInfo function in which you can set the description/label for the palette symbols using text property. Please refer to a code example and the help documentation below.
Code example:
|
Index.cshtml file
function getSymbolInfo(symbol) { if (symbol['text'] !== undefined) { return { //Add or Remove the Text for Symbol palette item. description: { //Defines the symbol description text: symbol['text'], } }; }
|
Help documentation: https://ej2.syncfusion.com/aspnetmvc/documentation/diagram/symbol-palette#adding-symbol-description-for-symbols-in-the-palette
Screenshot:
Regards,
Shyam G
Hi Shyam, Is it possible to add the description when creating the symbol? for example like this (Blazor):
Hi Dante,
No, we cannot able to add the description when creating a symbol like a blazor. Instead of adding description, by using the addInfo property we can able to add additional information for the nodes. AddInfo property of a node is an object type, so you can set it as an array, number, or string type. So in addInfo property, you can set a description for the node and set that description to the symbol description property in getSymbolInfo function. Please refer to the below code snippet
|
List<DiagramNode> flowShapes = new List<DiagramNode>(); flowShapes.Add(new FlowShapes() { Id = "Terminator", Shape = new { type = "Flow", shape = "Terminator" }, AddInfo="Terminator" });
//cshtml function getSymbolInfo(symbol) { return { width: 75, height: 40, description: { text: symbol.addInfo, overflow: 'Wrap' } } } |
We have attached a sample of how to add a description for the symbol using symbol info. Please refer to the sample in the below link
Sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/Palette-SymbolInfo-210294179
Regards
Aravind Ravi