This is a migrated thread and some comments may be shown as answers.

Diagram showing support for code / Ayuda mostrar Diagrama por código

3 Answers 122 Views
Diagram
This is a migrated thread and some comments may be shown as answers.
Diego
Top achievements
Rank 1
Diego asked on 25 Aug 2015, 03:12 PM

achieved implement the diagram on page in my project, but they are asking me to be drawn by code that is within DefaultVB.aspx.vb then receive and display parameters

  How the code development? They have something to help me please

http://demos.telerik.com/aspnet-ajax/diagram/examples/overview/defaultvb.aspx ​​

logre implementar el Diagrama que aparece en la pagina en mi proyecto, pero me están pidiendo que se dibuje por código, es decir dentro de DefaultVB.aspx.vb para luego recibir parámetros y mostrarlos

 ¿como lo desarrollo por código? tienen algo que me ayuden por favor

http://demos.telerik.com/aspnet-ajax/diagram/examples/overview/defaultvb.aspx ​

3 Answers, 1 is accepted

Sort by
0
Danail Vasilev
Telerik team
answered on 28 Aug 2015, 09:58 AM
Hello Diego,

Could you please elaborate more about the actual and the expected behavior of the control?

If you want to data-bind the diagram on the server-side you can refer to this article - http://docs.telerik.com/devtools/aspnet-ajax/controls/diagram/data-binding/server-side/shapes

If you want, however, to plot custom shapes you can find details here - http://docs.telerik.com/devtools/aspnet-ajax/controls/diagram/how-to/custom-shapes-and-connectors

Regards,
Danail Vasilev
Telerik
0
Diego
Top achievements
Rank 1
answered on 28 Aug 2015, 12:52 PM

Hello Danial:

Thanks for the answer, I tell you

I miss a diagram in BPM (bizagi), the idea is to get the code, which are the nodes, coordinates, length, width, among other

and / and implement the new diagram receiving the above parameters, hopefully the same diagram on the page is displayed http://demos.telerik.com/aspnet-ajax/diagram/examples/overview/defaultvb.aspx

 

I have just now:

shape.Id = shapeID
                shape.X = x
                shape.Y = y
                shape.Width = w
                shape.Height = h
                shape.ContentSettings.Text = contentText
                shape.ContentSettings.Color = backgroundColor
                shape.FillSettings.Color = backgroundColor
                If Not String.IsNullOrWhiteSpace(tipoShape) Then
                    shape.Type = tipoShape
                End If
                If Not String.IsNullOrWhiteSpace(visual) Then
                    shape.Visual = visual
                End If
 shape.Id = ShapeID
                shape.X = x
                shape.Y = y
                shape.Width = w
                shape.Height = h
                shape.ContentSettings.Text = contentText
                shape.ContentSettings.Color backgroundColor =
                shape.FillSettings.Color backgroundColor =
                If Not String.IsNullOrWhiteSpace (tipoShape) Then
                    shape.Type = tipoShape
                End If
                If Not String.IsNullOrWhiteSpace (visual) Then
                    visual shape.Visual =
                End If 

 

 but I manage to display correctly.

 

 Case WFTipoTarea.INICIO
                    aux = AddDiagramShape(titulo, "#49a046", titulo, "#fff", theDiagram, "circle", "", x, y, h, w, tipo)    
                Case WFTipoTarea.CONDICION
                    aux = AddDiagramShape(titulo, "#49a046", titulo, "#fff", theDiagram, "rectangle", "", x, y, h, w, tipo)
            Case WFTipoTarea.MULTIPLE, WFTipoTarea.JOIN_MULTIPLE
                    aux = AddDiagramShape(titulo, "#49a046", titulo, "#cccccc", theDiagram, "question", "", x, y, h, w, tipo)

 

the question or decision can not be displayed, the program does not recognize, however if the rectangle and circle

 

​-----------------------------------------------------------------------------------------------------

Hola Danial:

Gracias por la respuesta, te cuento

tengo un diagrama echo en BPM(bizagi), la idea es sacar el código de el, que son los nodos, coordenadas, largo, ancho,  entre otras

y/e  implementarlos al nuevo diagrama recibiendo los parámetros anteriores, ojala que se muestre el mismo diagrama que aparece en la pagina http://demos.telerik.com/aspnet-ajax/diagram/examples/overview/defaultvb.aspx

 

por ahora solo tengo :

 shape.Id = shapeID
                shape.X = x
                shape.Y = y
                shape.Width = w
                shape.Height = h
                shape.ContentSettings.Text = contentText
                shape.ContentSettings.Color = backgroundColor
                shape.FillSettings.Color = backgroundColor
                If Not String.IsNullOrWhiteSpace(tipoShape) Then
                    shape.Type = tipoShape
                End If
                If Not String.IsNullOrWhiteSpace(visual) Then
                    shape.Visual = visual
                End If

 

el question o decision no se puede mostrar, no reconoce el programa, en cambio el rectangulo y circulo si

0
Danail Vasilev
Telerik team
answered on 02 Sep 2015, 12:05 PM
Hi Diego,

Thank you for the clarification.

Diagram Shape Type property supports currently three types - Rectangle, Circle, Image. More information on the matter is available here - http://docs.telerik.com/devtools/aspnet-ajax/controls/diagram/structure/shape

If you want, however, to draw custom shapes you should use the path property, as illustrated here - http://docs.telerik.com/devtools/aspnet-ajax/controls/diagram/how-to/custom-shapes-and-connectors

Regards,
Danail Vasilev
Telerik
Tags
Diagram
Asked by
Diego
Top achievements
Rank 1
Answers by
Danail Vasilev
Telerik team
Diego
Top achievements
Rank 1
Share this question
or