[DiagramComponent] Define zero point of a node OR customize tooltip

Hello,

for a node, the OffsetX/OffsetY is in the middle of the node. Is it possible to set the "zero point" of the node to left-top?

Mathematically, it's no problem if I calculate it myself. However, in this case the values in the tooltips, which are displayed when moving, are not correct. (See picture below)

Image_8707_1711378715137

Is there a way to "customize" these three tooltips from the image above


1 Reply 1 reply marked as answer

SU Sumathi Uthayakumar Syncfusion Team March 26, 2024 12:02 PM UTC

Hi,


In the SfDiagramComponent, the default pivot values for a node are set to X=0.5 and Y=0.5, placing the pivot at the center of the node. However, if you wish to set the pivot to (0,0), indicating the top-left corner of the node, you can assign this value to the node's pivot property. In this configuration, when X=0 and Y=0, the OffsetX and OffsetY values align with the node's top-left corner. Conversely, when X=0.5 and Y=0.5, the OffsetX and OffsetY values correspond to the node’s center point. Similarly, when X=1 and Y=1, the OffsetX and OffsetY values indicate the bottom-right corner of the node. For further details, please refer to the provided User Guide link.


UG link: https://blazor.syncfusion.com/documentation/diagram/nodes/customization#how-to-set-pivot-property-for-node



Regards,

Sumathi U.


Marked as answer
Loader.
Up arrow icon