# Customize Edge Appearance

## Content

Style properties can enhance how edges represent relationship between nodes. FlexDiagram allows the customization of their appearance through the <span class="code" spellcheck="false" data-prosemirror-content-type="mark" data-prosemirror-mark-name="code">C1.Chart.ArrowStyle</span> enumeration.**Available Arrow Styles:**

* <span class="code" spellcheck="false" data-prosemirror-content-type="mark" data-prosemirror-mark-name="code">ArrowStyle.None</span>
* <span class="code" spellcheck="false" data-prosemirror-content-type="mark" data-prosemirror-mark-name="code">ArrowStyle.Normal</span>
* <span class="code" spellcheck="false" data-prosemirror-content-type="mark" data-prosemirror-mark-name="code">ArrowStyle.Tee</span>
* <span class="code" spellcheck="false" data-prosemirror-content-type="mark" data-prosemirror-mark-name="code">ArrowStyle.Diamond</span>
* <span class="code" spellcheck="false" data-prosemirror-content-type="mark" data-prosemirror-mark-name="code">ArrowStyle.Generalization</span>

<span id="56f53207-563f-46ac-b674-cfedd55d3c9b" annotationtype="inlineComment" data-mark-type="annotation" data-mark-annotation-type="inlineComment" data-id="56f53207-563f-46ac-b674-cfedd55d3c9b" data-prosemirror-content-type="mark" data-prosemirror-mark-name="annotation"> Change ArrowStyle appearance by using the following code:</span>

```auto
diagram.Edges.Add(new Edge()
{
    Source = startNode,
    Target = processNode,
    TargetArrow = ArrowStyle.Normal
});
```

#### **Style Edges in FlexDiagram**

The <span class="code" spellcheck="false" data-prosemirror-content-type="mark" data-prosemirror-mark-name="code">Edge</span> class represents a connection between two nodes and provides properties to customize stroke color, fill color, dash patterns, and thickness.

| Property | Description |
| -------- | ----------- |
| **StrokeColor** | <span id="e60e90b5-4b82-4909-8fba-b310906c7b4e" annotationtype="inlineComment" data-mark-type="annotation" data-mark-annotation-type="inlineComment" data-id="e60e90b5-4b82-4909-8fba-b310906c7b4e" data-prosemirror-content-type="mark" data-prosemirror-mark-name="annotation">Specifies the edge line color.</span> |
| **FillColor** | <span id="fef166b8-475a-4eee-a6f3-a431462a5da4" annotationtype="inlineComment" data-mark-type="annotation" data-mark-annotation-type="inlineComment" data-id="fef166b8-475a-4eee-a6f3-a431462a5da4" data-prosemirror-content-type="mark" data-prosemirror-mark-name="annotation">Specifies the interior color of the edge.</span> |
| **StrokeDashPattern** | <span id="1e22d3e8-c54b-4c86-847a-49d647b4fe9e" annotationtype="inlineComment" data-mark-type="annotation" data-mark-annotation-type="inlineComment" data-id="1e22d3e8-c54b-4c86-847a-49d647b4fe9e" data-prosemirror-content-type="mark" data-prosemirror-mark-name="annotation">Defines dashed or dotted line patterns.</span> |
| **StrokeWidth** | <span id="b7d7a5f1-f280-4dd5-8cd5-17b5b0f67c32" annotationtype="inlineComment" data-mark-type="annotation" data-mark-annotation-type="inlineComment" data-id="b7d7a5f1-f280-4dd5-8cd5-17b5b0f67c32" data-prosemirror-content-type="mark" data-prosemirror-mark-name="annotation">Sets the line thickness.</span> |

#### **Edge Styling Example**

<span id="c5974ee4-c4ec-46cf-a2c2-5cbb7c604c11" annotationtype="inlineComment" data-mark-type="annotation" data-mark-annotation-type="inlineComment" data-id="c5974ee4-c4ec-46cf-a2c2-5cbb7c604c11" data-prosemirror-content-type="mark" data-prosemirror-mark-name="annotation">The following example demonstrates how to create an edge, assign source and target nodes, apply a style, and add a tooltip:</span>

```auto
// Create nodes
var startNode = new Node() { Text = "Start" };
var endNode = new Node() { Text = "End" };

// Create edge and configure style
var edge = new Edge()
{
    Source = startNode,
    Target = endNode,
    Tooltip = "Connects Start to End"
};

// Apply edge style
edge.Style = new ChartStyle()
{
    StrokeColor = Color.DarkBlue,
    StrokeWidth = 2.0f,
    StrokeDashPattern = new float[] { 3, 2 },
    FillColor = Color.Transparent
};

// Add nodes and edge to the diagram
diagram.Nodes.Add(startNode);
diagram.Nodes.Add(endNode);
diagram.Edges.Add(edge);
```


