We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Text(annotation) width is not getting set for nodes in diagram

Refer the highlighted node in attached diagram above, We want to add ellipsis to the text which is present inside node, we tried adding "width" property in style object but still it is not getting set.

Please refer the code snippet for same-

It would be great help if any solution is provided such that long texts will be clearly visible inside node with ellipses and proper padding.

1 Reply

BM Balasubramanian Manikandan Syncfusion Team December 19, 2022 09:13 AM UTC

In your sample, you have defined annotation width inside the style property. So only the width is not working. You should define width in annotation object. We have created a sample in which we have defined annotation width and ellipsis. Refer to the below mentioned code example and sample.

Code Snippet:

annotations: [


          content: 'diagram control in the syncfusion',

          offset: { x: 0.5, y: 0.5 },

          verticalAlignment: 'Bottom',

          style: {

            textOverflow: 'Ellipsis',

            textWrapping: 'NoWrap',


          width: 50,





Live Chat Icon For mobile
Up arrow icon