Hi Syncfusion Support Team!
I want to insert a diagram connector as ARC in diagram control from symbol palette as below image
I have used the connector with the 'Bezier' type to create connector but it's not working
I cannot create a connector as Arc
Do you have any solution to do this one?
Please help me
Thanks!
Sy
Hi,
Currently we don’t have support to render arc connector. We have logged it as a feature, we don’t have any immediate plan to implement this feature. We are closing this forum now. You can communicate with us or track the status of the feature using the below feedback link.
https://www.syncfusion.com/feedback/59859/support-to-render-the-arc-connector
Regards,
Vivisa
Thank for your reply
I know, although you don't support creating the connector as an Arc, but do you have any way to create arc from the available entities?
For example, I have used devexpress library to created points close together and connect these points to create a polyline, base on the trajectory of a circle
I have tried using syncfusion library in the same way, but the results did not meet my expectations
Below is my code I have implemented
Please let me know your comments
Thanks!
Sy
Hi,
On further analysis, we don’t have any workaround for arc connector. As said earlier, we consider it as a feature request. We have checked with our freehand and polyline connector but still could not achieve the expected output. Please find the sample below for your reference.
Sample:
https://stackblitz.com/edit/angular-j6sa6q?file=src%2Fapp.component.html,src%2Fapp.component.ts
Regards,
Vivisa
Hi Vivisa
As you can see on below image. I can create a connector as arc
I have added my code into your sample, it's can create a connector as arc
But when I add this code into my project and when I drag and drop arc object from symbol palette, the results is not good, the start and end points is incorrect
Do you know what's the cause of this problem?
Thanks!
Sy
Hi,
We have created a sample to render an arc connector using Syncfusion's diagram component. This is achieved by utilizing Bezier vector points to form the arc. In the palette we rendered the connector as the image node. When dragging and dropping from the palette, drop event gets triggered. In this event, we remove the dropped node and create a new one using the add method. Refer to the sample and code snippet below.
Code-snippet:
|
public drop(arg: IDropEventArgs): void { if ((arg.element as any).shape.type === 'Image') { arg.cancel = true; let connector = { id: 'connector1', type: 'Bezier', sourcePoint: { x: 200, y: 100 }, targetPoint: { x: 400, y: 300 }, constraints: ConnectorConstraints.Default | ConnectorConstraints.DragSegmentThumb, segments: [ { type: 'Bezier', vector1: { distance: 150, angle: 350, }, vector2: { distance: 150, angle: 290, }, }, ], bezierSettings: { controlPointsVisibility: ControlPointsVisibility.Source | ControlPointsVisibility.Target, }, }; this.diagram.add(connector); } }
|
UG: https://ej2.syncfusion.com/angular/documentation/diagram/connectors#bezier
Sample:
Regards,
Vivisa
Thank for your solution
I will try it and get back to you if have any questions
Thanks!
Sy
Hi,
Thank you for the update. We will wait for your response.
Regards,
Vivisa