EJ2 - Description on Symbols

Hi, this seems like a newbie question, but how do you set the description on a symbol.

The samples in the documentation have a comment, but no actual declaration/code and the documentation seems to refer to the a SymbolDescription type object, but these don't seem to work.

So....a quick sample or some working code would be great.

1 Reply

SG Shyam G Syncfusion Team March 17, 2020 06:32 AM UTC

Hi James, 

To display text to shapes in symbol palette, please use the description property in the getSymbolInfo function as shown in the below code example. 
 
Code example: 
var palette = new ej.diagrams.SymbolPalette({ 
    getSymbolInfo: function (symbol) { 
           // display text for palette item 
             return { description: { text: symbol.id }, fit: true }; 
 
        } 
    }); 
 palette.appendTo('#symbolpalette'); 
 
 

Regards, 
Shyam G 


Loader.
Up arrow icon