Hi sir / madam, how can I draw the following nodes in diagram control?

1 Answer 25 Views
Diagram
Parth
Top achievements
Rank 1
Iron
Iron
Parth asked on 03 Jan 2024, 12:58 PM

I need help with the node shape I have provided in the image. If this type of node can be drawn in your control , then can you please provide me with the code of the chart drawn in diagram control with the help of node (as per layout shown in attached png file) (include three or four nodes for the example).

I have tried to use it in custom shape but I didn't get any success.

I am using ui for WPF ( version latest ).

If you can help  me out with this problem  (as I have failed by other tool providers) then i might think of purchasing your product license soon.

1 Answer, 1 is accepted

Sort by
0
Martin Ivanov
Telerik team
answered on 03 Jan 2024, 04:29 PM

Hello Parth,

The desired visualization is not available out of the box, but you can manually create it and add it in the Content of the RadDiagram's shapes. I have attached a small sample showing a basic setup that mimics the visualization from your picture. I hope that helps.

Note that in the project I use hard-coded values for the different settings and draw the ellipses programmatically. You can choose another approach to do that. You can also expose DependencyProperties in the ShapeContentView control in order to allow customizing the parameters used in the example.

Regards,
Martin Ivanov
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Parth
Top achievements
Rank 1
Iron
Iron
commented on 04 Jan 2024, 05:26 AM

Hi Martin,

I was able to draw the normal shape which you're providing me but I am not able to understand how to form a layout / visualization around the ellipses as shown in the .png file.

If you can help me with that it would be great help from your side.

Regards,

Parth

Martin Ivanov
Telerik team
commented on 04 Jan 2024, 01:49 PM

Hey Parth, I am not sure that I understand the requirement here. The attached project was showing how to draw the ellipses around the shape. Can you tell me why this doesn't work for you?

If you don't want the ellipses to be part of the shape's bounds, you can wrap them in a Canvas panel. I have updated my project to show this.

Parth
Top achievements
Rank 1
Iron
Iron
commented on 05 Jan 2024, 05:25 AM

Hey Martin,

Thank you for your help. Last solution provided by you solved my problem.

 

Parth
Top achievements
Rank 1
Iron
Iron
commented on 09 Jan 2024, 09:55 AM

Hi Martin,

I need your help with binding the shapes which are generated dynamically through list or datatable without setting the position so how can i do that?

Martin Ivanov
Telerik team
commented on 09 Jan 2024, 10:44 AM

If you have dynamic number of shapes coming from a data source, you can consider using the GraphSource of RadDiagram. You can read more about this approach in the MVVM article

Or alternatively, you can generate the shapes in code-behind. You can see this in the attached project.

About the "without setting the position" part of your question, can you please tell me what exactly do you mean by that? If you don't explicitly set the Position property of the shapes they will be positioned at the top left corner of the diagram (0, 0). This said, if your datatable doesn't have position information for the shapes, you can come up with this in the code-behind by using some algorithm that works for you. Or you can try one of the automatic layouts of RadDiagram.

Tags
Diagram
Asked by
Parth
Top achievements
Rank 1
Iron
Iron
Answers by
Martin Ivanov
Telerik team
Share this question
or