Hi,
I'm using the NGraphDataSourceImporter class to import vertices and edges. For the layout I'm using NLayeredGraphLayout.
In the event of a vertex is imported (NGraphDataSourceImporter.VertexImported) I set the text of the vertex then I call the NShape.SizeToText(New NMarginsF(10)) method to resize automatically the vertex based on its content.
I try the same in case of edges (in the NGraphDataSourceImporter.EdgeImported event). Here is my code:
Private Sub OnEdgeImported(ByVal importer As NDataSourceImporter, ByVal shape As NShape, ByVal dataRecord As INDataRecord)
Dim text As Object = dataRecord.GetColumnValue("LinkTitle")
shape.Text = text.ToString()
Dim label As NLogicalLineLabel = CType(shape.Labels.GetChildAt(0), NLogicalLineLabel)
label.UseLineOrientation = True
shape.SizeToText(New NMarginsF(10))
End Sub
But this is not resizes the edge (see the attached screenshot)
How can I resize automaticaly the edged?
Thanks,
Sandor Nagy