How to Set Margin Between the Symbol and Text in JavaScript Diagram?
This article explains how to set the margin between the symbol and text in the JavaScript Diagram. The Syncfusion® JavaScript Diagram Symbol Palette provides an option to display a description for symbols.
You can customize the spacing between the symbol and its description using the margin property in the getSymbolInfo function.
Below is a code example of adding a margin between the symbol and its description:
getSymbolInfo: function (symbol) {
return { description: {
text: symbol.annotations[0].content,
margin : {top : 40, left : 0, right : 0, bottom :20},
}};
}
Refer to the working sample for additional details and implementation: Click Here
Conclusion
We hope you enjoyed learning how to set margin between the symbol and text in JavaScript Diagram.
You can refer to our JavaScript Diagram feature tour page to know about its other groundbreaking feature representations and documentation, and how to quickly get started for configuration specifications. You can also explore our JavaScript Diagram example to understand how to create and manipulate data.
For current customers, you can check out our components from the License and Downloads page. If you are new to Syncfusion®, you can try our 30-day free trial to check out our other controls.
If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forums, BoldDesk Support, or feedback portal. We are always happy to assist you!