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
close icon

Creating a custom diagram

I have been trying to create a custom diagram using some pre-defined images that we have. Do I have to create the diagram image by loading and placing the images manually (ie, through code) or can I build the diagram in a third-party image editor and convert to the proper format? If a converter is not available maybe someone at Syncfusion should write one. It would be a very useful product to have.

Thanks.
David.

6 Replies

J. J.Nagarajan Syncfusion Team October 4, 2006 11:46 PM UTC

Hi David,

We are currently working on this issue. I will update you very soon.

Thanks for your patience.

Regards,
Nagaraj


J. J.Nagarajan Syncfusion Team October 9, 2006 07:00 PM UTC

Hi David,

Sorry for the delay in getting back to you.

I will consult with our developer regarding this. We need to investigate more on this and we will try to address this at the earliest.

Thanks for your patience.

Best Regards,
Nagaraj


J. J.Nagarajan Syncfusion Team October 9, 2006 07:00 PM UTC

Hi David,

Sorry for the delay in getting back to you.

I will consult with our developer regarding this. We need to investigate more on this and we will try to address this at the earliest.

Thanks for your patience.

Best Regards,
Nagaraj


J. J.Nagarajan Syncfusion Team October 11, 2006 03:25 PM UTC

Hi David,

Sorry for the delay in gettin back you. If your intention is to convert the diagram to a image file then please refer the following code snippet

//In page load event
System.Drawing.Bitmap thumbNailImg = new Bitmap(1000, 1000, System.Drawing.Imaging.PixelFormat.Format24bppRgb);
Graphics bmpgrfx = Graphics.FromImage(thumbNailImg);
this.DiagramWebControl1.View.Draw(bmpgrfx);
string path = Server.MapPath(@"..\SyncfusionDiagramPDF_Sample\SampleImage1.bmp");
thumbNailImg.Save(path, System.Drawing.Imaging.ImageFormat.Bmp);


You can also conver the Diagram to pdf file.Please refer the attached sample. In this sample when you click on the button "Export pdf" you can convert the current diagram to pdf file.Also you can convert the diagram to a Bitmap image file. Please let me know if this helps for you.If this doesn''t helps please give us some more details about your requirement.

Regards,
Nagaraj

DiagramPDF_Sample.zip



SE Seenivasan February 27, 2007 08:52 AM UTC

Hello there,
I have tried to insert the .edd file into diagramwebcontrol. But i was not able to insert the edd file into diagramwebcontrol .Listed code here that i tried in my system

If Me.IsPostBack = False Then
Dim path As String = Server.MapPath(String.Empty)
path = path + "\App_Data\testdiagram.edd"
Response.Write(path)
Me.DiagramWebControl1.LoadBinaryDocument(path)
Me.DiagramWebControl1.EnableNodeSelection = True
Me.DiagramWebControl1.RenderImageMap = False
End If

I have verified the edd file that is in exact directory location. Please help me to resolve this problem.Do i need to do extra things for this ?

Thanks
Seenivasan.R


J. J.Nagarajan Syncfusion Team February 27, 2007 06:25 PM UTC

Hi Seenivasan,

If your intention is to load a edd file to the diagram web control then please refer to the following code snippet

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Me.IsPostBack = False Then
Dim path As String = Server.MapPath(String.Empty)
path = path + "\App_Data\SimpleOrgChart.edd"
Me.DiagramWebControl1.LoadBinaryDocument(path)
End If
Me.DiagramWebControl1.RenderImageMap = False
End Sub

Please refer the SimpleDiagram sample in \Syncfusion\Essential Studio\\Web\Diagram.Web\Samples\2.0\SimpleDiagram demonstrates how to load a diagram file to the diagram web control.

Please refer to the sample and let me know if you have any questions.

Regards,
Nagaraj

Loader.
Live Chat Icon For mobile
Up arrow icon